Results 1 to 30 of 169

Thread: Sprite Generator... CA ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    aka AggonyAdherbal Member Lord Adherbal's Avatar
    Join Date
    Oct 2004
    Location
    Belgium
    Posts
    1,014

    Default Sprite Generator... CA ?

    I guess all modders realise this is a problem: we need a sprite generator. This is not something that can (or will) be done by a community member such as vercingetorix, as it must be a hell of a lot of work (basicly writing a small 3D engine that can display the models and animations).

    Now CA must have had some kind of tool for this job, so I wonder if they could consider releasing it *hopes a CA member reads this*. This doesn't need to be a userfriendly, nice looking application, just a stupid executable that uses a commandline would be more then enough. Or whatever CA used to get it done.


    I hope I'm not the only one who thinks this is important
    Member of The Lordz Games Studio:
    A new game development studio focusing on historical RTS games of the sword & musket era
    http://www.thelordzgamesstudio.com

    Member of The Lordz Modding Collective:
    Creators of Napoleonic Total War I & II
    http://www.thelordz.co.uk

  2. #2
    CA CA JeromeGrasdyke's Avatar
    Join Date
    Dec 2002
    Location
    At a new top-secret (non-CA) location, surrounded by lots of steel and glass, high atriums, hordes of lovely marketing ladies, and with a new and spacious desk with plenty of room for body-moving.
    Posts
    257

    Default Re: Sprite Generator... CA ?

    Ah. Yes. The sprite generator. It's there already, but I'm afraid it's not all that user friendly. Like many of the tools used for Rome it's embedded in the main Rome exe, and you access it by starting up the game with "-sprite_script" on the command line. It was made available in the 1.2 patch exe, and won't be there in earlier versions.

    What this does is cause the game to start up looking for a file called "sprite_script.txt" in the game's root directory, which it uses to construct the sprite pages and .spr files for the sprite imposters into the data/sprites directory. This process references data in the descr_model_battle.txt file to create sprites which correspond to the different faction colour / model texture pages. I'm including a chunk of the syntax below, so that you will have something to work from when creating the script:


    barb_female_peasant no_faction
    east_female_peasant no_faction
    generals_horse romans_julii generals horse
    generals_horse romans_brutii generals horse
    generals_horse romans_scipii generals horse
    horse_cataphract seleucid horse cataphract
    horse_cataphract parthia horse cataphract
    barb_cavalry gauls generals horse
    barb_cavalry germans generals horse
    carthaginian_medium_cavalry carthage generals horse
    carthaginian_medium_cavalry numidia generals horse
    carthaginian_medium_cavalry spain generals horse
    persian_sparabara_merc no_faction
    egyptian_peltast_merc no_faction
    greek_elephant_crew_merc no_faction sprite_root


    And so on... it's essentially a list of "descr_model_battle type id" "faction type" "mount type". You have to explicitly list all the factions that you want sprites for, since you could economise on space by sharing sprites among factions. The sprite_root keyword is used to indicate a model which is on a mount but is nevertheless standing up (chariot drivers, etc).

    Be warned that this process can take a long time - a couple of hours for regenerating the complete set of sprites was not unusual - and requires a decent graphics card (128mb of video memory minimum, I believe). If you run with -ne on the command line you should be able to do other things during that time, although I wouldn't recommend running anything that uses DirectX.

    After it completes you'll have to modify descr_model_battle.txt to correctly use the new sprite files.

    Hope that gets you started...
    Last edited by JeromeGrasdyke; 02-28-2005 at 18:06.
    "All our words are but crumbs that fall down from the feast of the mind."
    -- from 'The Prophet' by Kahlil Gibran

  3. #3
    aka AggonyAdherbal Member Lord Adherbal's Avatar
    Join Date
    Oct 2004
    Location
    Belgium
    Posts
    1,014

    Default Re: Sprite Generator... CA ?

    yes, thank you, thats excellent :D

    a couple of hours for regenerating the complete set of sprites was not unusual
    I hope you don't mean for 1 unit's sprite set :O either way, anything better then the alternative ways of making sprites :)
    Member of The Lordz Games Studio:
    A new game development studio focusing on historical RTS games of the sword & musket era
    http://www.thelordzgamesstudio.com

    Member of The Lordz Modding Collective:
    Creators of Napoleonic Total War I & II
    http://www.thelordz.co.uk

  4. #4
    Modder Member Encaitar's Avatar
    Join Date
    Oct 2003
    Location
    Melbourne, Australia
    Posts
    234

    Default Re: Sprite Generator... CA ?

    Fantastic. Thank you very much Jerome :)
    Encaitar Arandur

    Middle-earth: Total War Dev

  5. #5
    Modding Godfather Member Vercingetorix's Avatar
    Join Date
    Oct 2004
    Location
    I am but a figment of your imagination
    Posts
    453

    Default Re: Sprite Generator... CA ?

    Thanks Adherbal for finding that! And thanks Jerome for the explantion!
    I have found God.

  6. #6
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Sprite Generator... CA ?

    Thanks Jerome, thats saved me a hell of a lot of time (believe it or not, I was going to recolour the existing sprites so they vaguely fit my units)


  7. #7
    Aosta Mac Tíre Member WhiteWolf's Avatar
    Join Date
    Oct 2004
    Location
    Nomadic
    Posts
    49

    Default Re: Sprite Generator... CA ?

    Ah I could just kiss you... except Im not that kind of wolf..

    Anyway thanks for the great info!
    Chomh sean leis an cheo agus níos sine faoi dhó.
    As old as the mist and older by two.

  8. #8
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Sprite Generator... CA ?

    Could I suggest somebody to make a "How To" about this question?
    It would be great.

  9. #9
    Spends his time on TWC Member Simetrical's Avatar
    Join Date
    Dec 2004
    Location
    New York City
    Posts
    1,358

    Default Re: Sprite Generator... CA ?

    I tried doing this. I created a shortcut to my RTW.exe which went to "C:\Games\Rome Total Realism\RomeTW.exe" -sprite_script. I made a file in C:\Games\Rome Total Realism\ called sprite_script.txt. In that file, I wrote
    generals_horse romans_julii generals horse
    with that spacing, copied directly from Jerome's post. When I clicked the shortcut, RTW started up, went through the initial loading screen, and then returned me to the desktop almost immediately. The data\sprites folder doesn't even exist. I must be doing something wrong—but what? Jerome, [cF]Adherbal? Any ideas?

    -Simetrical
    TWC Administrator

    MediaWiki Developer

  10. #10
    CA CA JeromeGrasdyke's Avatar
    Join Date
    Dec 2002
    Location
    At a new top-secret (non-CA) location, surrounded by lots of steel and glass, high atriums, hordes of lovely marketing ladies, and with a new and spacious desk with plenty of room for body-moving.
    Posts
    257

    Default Re: Sprite Generator... CA ?

    Quote Originally Posted by Simetrical
    When I clicked the shortcut, RTW started up, went through the initial loading screen, and then returned me to the desktop almost immediately. The data\sprites folder doesn't even exist. I must be doing something wrong—but what? Jerome, [cF]Adherbal? Any ideas?
    Are you sure the original Rome dataset is still completely intact? The fact that it returns almost immediately could indicate that it's not even getting to the sprite generator execution.

    Also, you need to make sure there are no -mod options on the command line, and since it's a modded game, there's a risk that some of the typenames have been renamed or removed from descr_model_battle.txt or descr_mount.txt ... i'd suggest you make sure that the typenames are there, the cas models reference valid textures, and so on. And of course run with -show_err on the command line as well.
    "All our words are but crumbs that fall down from the feast of the mind."
    -- from 'The Prophet' by Kahlil Gibran

  11. #11

    Default Re: Sprite Generator... CA ?

    Quote Originally Posted by JeromeGrasdyke
    Ah. Yes. The sprite generator. It's there already, but I'm afraid it's not all that user friendly. Like many of the tools used for Rome it's embedded in the main Rome exe, and you access it by starting up the game with "-sprite_script" on the command line. It was made available in the 1.2 patch exe, and won't be there in earlier versions.

    What this does is cause the game to start up looking for a file called "sprite_script.txt" in the game's root directory, which it uses to construct the sprite pages and .spr files for the sprite imposters into the data/sprites directory. This process references data in the descr_model_battle.txt file to create sprites which correspond to the different faction colour / model texture pages.

    "game with "-sprite_script" on the command line", i dont understand what it means by this

  12. #12
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Sprite Generator... CA ?

    Its same as where you put -show_err, right click on your desktop icon, select properties and in target box, add a space after ...exe" and add -sprite_script
    so result looks like
    "X:\blah\blah\RomeTW-BI.exe" -sprite_script
    Last edited by Makanyane; 09-07-2006 at 07:39.
    Not used mods before? Looking for something small and fun?!
    Download the:

  13. #13

    Default Re: Sprite Generator... CA ?

    thank you

  14. #14

    Default Re: Sprite Generator... CA ?

    haha, I finally got it to work. Thank you.


    ah, nvm, i knew it was too good to be true. the sprites were made no problem, bu the when i tried to play a game, this signal that said:out of area - came up. then i went to adherbal(?) preference thing on the second page, and just as battle was about to begin, it went to that stupid signal again. Please help!!
    Last edited by Roman_Man#3; 01-25-2007 at 05:11.

  15. #15

    Default Re: Sprite Generator... CA ?

    I am wondering if this works with ver1.3 or it's a v1.2 only.
    I can not even put "-sprite_script" on the command line of RomeTW.exe v1.3.

  16. #16
    The Dark Knight Member wlesmana's Avatar
    Join Date
    Jan 2005
    Location
    Indonesia
    Posts
    602

    Default Re: Sprite Generator... CA ?

    I tried this and got this error:

    DATABASE_TABLE error found : unrecognised record id c requested

    so I'm guessing this is not a video card problem but something else. I followed the instruction to the letter so I have no idea why this happened.

  17. #17

    Default Re: Sprite Generator... CA ?

    does this work with 1.3

    all i'm getting are black tga files that don't have alpha chanels

  18. #18

    Default Re: Sprite Generator... CA ?

    i've been able to make sprites with 1.2 but not 1.3, has anyone tried 1.5?

  19. #19

    Question Re: Sprite Generator... CA ?

    I tried this and got this error:

    DATABASE_TABLE error found : unrecognised record id c requested


    Hi there. I've tried this sprite generator and it doesn't work.

    I get an error message like this:

    DATABASE_TABLE error found : unrecognised record id r requested

    or this

    DATABASE_TABLE error found : unrecognised record id m requested

    I created the sprite_script.txt. If i open the file and write "barb_female_peasant" (without the ""), i get the first error message. If i write "camel numidia", i get the second error message.

    It doesn't create any sprite files (i've created the sprites folder though).

    I use a fresh installation of RTW with the 1.2 patch. I copied the preferences posted in this thread but it still doesn't work.

    1-ran game/reseted my graphics on automatic in opptions/video
    2-made a folder data\sprites
    3-made a file in rtw directory - sprite_script.txt
    4-put the descr_model_battle.txt inside the sprite_script.txt/desert_infantry greek_cities
    5-run RomeTW.exe -sprite_script -show_err,
    6-the errors are shown in the following picture. The letters after the wrong ID are the third letter of the file of "sprite_script.txt"



    I'm chinese, english it's difficult for me, sorry for my bad langage .

  20. #20
    Wise and Partially Handsome Member Jarardo's Avatar
    Join Date
    Jan 2006
    Location
    Midlands, US
    Posts
    155

    Default Re: Sprite Generator... CA ?

    I definetly tried that. I tried changing all sorts of options around. I was thinking my video card just couldnt do it. I have a saphire radeon 9000 128mb. Whats wierd is when I try to take a SS of it, the units look fine in the screen shot? I'm just using the print screen key, and they are saved as tga's I can view with photoshop.

    Anyway thanks for the response man.
    I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones. -Albert Einstein


    www.EuropaBarbarorum.com

  21. #21

    Default Re: Sprite Generator... CA ?

    Will this work in BI, i tried to put the txt file in the BI folder but i get no sprites
    EDIT:got it to work! Thanks for this amazing tool CA!
    Last edited by killerxguy; 02-28-2006 at 17:11.

  22. #22

    Default Re: Sprite Generator... CA ?

    hello, i am Jumper but doesn't jump jet

    I do have a question and i am not sure if this is the right place to put my question.
    So i sorry.

    I wanted to ask for making Sprites.

    what i have done is this.
    put a txt file Sprites_Script under Map Rome -Total War
    change AA in preference in AA_QUALITY:AA_OFF
    change 32_BIT in STRATEGY_RESOLUTION:1024x768
    STRATEGY_MAX_RESOLUTION:1280x960
    STRATEGY_16_BIT:FALSE
    BATTLE_RESOLUTION:1024x768
    BATTLE_MAX_RESOLUTION:1280x960
    BATTLE_16_BIT:FALSE

    Placed a map Sprites under Map DATA
    the unit i wanted to make a sprite is;
    barb_cavalry thrace generals horse

    did make a sortcut of Rome-total war icoon
    and put in the propeties -Sprites_Script -Show_err

    and i do have a clean Rome Total War install
    Still it doesn't work what is wrong with me
    Thank you and again sorry if i post this in the wrong place..

  23. #23
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Sprite Generator... CA ?

    First in your preferences I think it should be
    STRATEGY_32_BIT:FALSE
    so effectively it is 16 bit - I think that's the correct way of writing it.

    If you look at 1st / 2nd page of thread I think it shows that adding 'generals horse' at end is incorrect. You just need
    (descr_model_battle)'type' faction
    in script file, if that doesn't help post again as I could have interpreted the mount effect bit wrong!!
    Not used mods before? Looking for something small and fun?!
    Download the:

  24. #24

    Default Re: Sprite Generator... CA ?

    Quote Originally Posted by Jumper
    did make a sortcut of Rome-total war icoon
    and put in the propeties -Sprites_Script -Show_err
    i do believe it is supposed to be -sprite_script, not sprites_script. but don't take my word for it, I can't get it to work either. and sorry about triple post.

  25. #25
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Sprite Generator... CA ?

    Its definitely -sprite_script (singular)

    Meghas Alexandros, haven't seen your error before
    this signal that said:out of area
    sounds a bit more like a graphics card glitch than a RTW error message, does that seem right? If thats possible have you done rest of process and converted the tga's the generator gives you to tga.dds files? Think game runs with them left as tga but they are bigger files that way so may overload something?????

    Also check what it has generated as tga's for you to see if they look right. You should get roughly between one and five tga's for each sprite (depending on size of unit - guys with long spear get more files) and if you open tga in your graphics program you should be able to see lots of very small men per tga (well blobs really). Mainly just make sure you haven't got 100's per sprite or blank tgas. Finally check the DMB sprite line is correct.
    Last edited by Makanyane; 01-25-2007 at 07:29.
    Not used mods before? Looking for something small and fun?!
    Download the:

  26. #26

    Default Re: Sprite Generator... CA ?

    I doubt it is my graphics card, because I can run rtw and m2tw almost perfectly. I am going to put in my original preference text into the folder and see if it plays then. I will also try to take a screenshot of the message so you can see it.

    It did generate the sprites. There was three of them. In the descr_model_battle text, i changed the sprite for my hastati from the original to whatever name the sprite created was called.

  27. #27

    Default Re: Sprite Generator... CA ?

    which set of sprites do I use? I have 3 of them. I tried to take a screen of the error sign, but when I loaded the screen outside of the the game, it was the actual loading screen, except that wasn't what I saw. My guess now is maybe my moniter could possibly have gotten disconnected a bit? and can someone please post the vanilla preference text so I can see if that is it?


    thanks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO