Page 1 of 6 12345 ... LastLast
Results 1 to 30 of 169

Thread: Sprite Generator... CA ?

  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
    aka AggonyAdherbal Member Lord Adherbal's Avatar
    Join Date
    Oct 2004
    Location
    Belgium
    Posts
    1,014

    Default Re: Sprite Generator... CA ?

    well it works perfectly - generating a sprite for 1 unit (1 faction) took only like 1-2 minutes.
    The game then went back to desktop (I assume that's normal) and the sprite files (spr + TGA files) were there in the data\sprites folder. The TGAs are then easily converted to the much smaller DDS fileformat with photoshop.
    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

  8. #8

    Default Re: Sprite Generator... CA ?

    Jerome... !!

  9. #9
    Member Member blindfaithnogod's Avatar
    Join Date
    Jan 2005
    Location
    Lawrence, KS USA
    Posts
    175

    Default Re: Sprite Generator... CA ?

    this is great news indead. thanks for helping us as much as you have Jerome. I sure do apreciate it.

    Blue Lotus Total War
    --------------------------------------------------------------------------------------
    Byzantium Total War

  10. #10
    Magister Vitae Senior Member Kraxis's Avatar
    Join Date
    Feb 2002
    Location
    Frederiksberg, Denmark
    Posts
    7,129

    Default Re: Sprite Generator... CA ?

    Being a lowkey modder and a bad photoshop, and such programs, user I have always avoided changing the look of units in games.
    Thus I know next to nothing about this.

    So am I getting this right when I think this makes it possible for every faction to get every unit with the correct colour if you just make the correct changes in descr file?
    You may not care about war, but war cares about you!


  11. #11
    Member Member blindfaithnogod's Avatar
    Join Date
    Jan 2005
    Location
    Lawrence, KS USA
    Posts
    175

    Default Re: Sprite Generator... CA ?

    Quote Originally Posted by Kraxis
    So am I getting this right when I think this makes it possible for every faction to get every unit with the correct colour if you just make the correct changes in descr file?
    no, what this does is it creates 2d sprites for the models and textures one would make. sprites show up at a long distance to keep the cpu usage down.

    Blue Lotus Total War
    --------------------------------------------------------------------------------------
    Byzantium Total War

  12. #12
    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.

  13. #13
    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.

  14. #14
    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

  15. #15
    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

  16. #16

    Default Re: Sprite Generator... CA ?

    I tried it on a fresh installation and I couldn't get it to work either. Went straight to desktop after the red credits screen. show_err was used but said nothing.

  17. #17

    Default Re: Sprite Generator... CA ?

    I haven't been able to get this to work, with a fresh install of RTW and 1.2 patch. The game returns to the desktop after showing the red credits screen, and show_err gives no report.

    In fact, no one I know of who has tried it has been successful either.

  18. #18

    Default Re: Sprite Generator... CA ?

    Question if you Put no faction will it generate a sprite with the unit color and not faction color it? In other words, made the sprite more realistic by keeping the colors of the unit and not the faction?

    Thanks,

    Lt
    LT_1956 Creator of SPQR: Total War


    SPQR:TW Mod forums

  19. #19
    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 bouis
    In fact, no one I know of who has tried it has been successful either.
    No-one i know who has tried it has failed Make sure you have the 1.2 patch exe.
    "All our words are but crumbs that fall down from the feast of the mind."
    -- from 'The Prophet' by Kahlil Gibran

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

    Default Re: Sprite Generator... CA ?

    @Simetrical
    Use: "C:\Games\Rome Total Realism\RomeTW.exe" -sprite_script -show_err
    so it shows error reports.

    generals_horse romans_julii generals horse is wrong. The 3rd mount type parameter is for mounted units only, NOT for the mount itself (generals_horse in your case). Leave it out and it should work.

    @lt1956
    Not sure what you mean, but it doesnt use faction colours anywere. It only uses the texture you specified for the given faction.
    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

  21. #21
    Member Member blindfaithnogod's Avatar
    Join Date
    Jan 2005
    Location
    Lawrence, KS USA
    Posts
    175

    Default Re: Sprite Generator... CA ?

    Quote Originally Posted by bouis
    In fact, no one I know of who has tried it has been successful either.
    i have 2 complete factions done. so now you know one person who has been successful.

    Blue Lotus Total War
    --------------------------------------------------------------------------------------
    Byzantium Total War

  22. #22

    Default Re: Sprite Generator... CA ?

    Wow it seemed to work for me. lol Now Do we just delete the TGA files? Because it made a Spr file and a pile of TGAs just for one unit.

    Lt1956

    This is neat.
    LT_1956 Creator of SPQR: Total War


    SPQR:TW Mod forums

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

    Default Re: Sprite Generator... CA ?

    no, you either use the TGA files or convert them to (tga.)DDS files
    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

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

    Default Re: Sprite Generator... CA ?

    As far as I can tell, the spr file is just the information about the TGA's. The tga's contain the images, the spr file tells the game which bit of image to use for which sprite.

  25. #25

    Default Re: Sprite Generator... CA ?

    But it makes 600 TGA files! lol Even at 40k each compressed that alot of Megs for one unit. isnt it?

    It did work as I could tell and made the sprite show up at 40 instead of 60 and I couldnt tell the difference seemed to be the same color etc.

    Lt
    LT_1956 Creator of SPQR: Total War


    SPQR:TW Mod forums

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

    Default Re: Sprite Generator... CA ?

    600, I haven't tried the generator yet, maybe thats usual

    Open up the one of the TGA's, is it one sprite or a collection of many? I know that the existing ones contain many sprites in one tga..

  27. #27

    Default Re: Sprite Generator... CA ?

    Its only one per tga, that must explain it, but then is there a different string or something? It made the sprite but looked like 1 per tga when I opened it some had black background others had yellow.

    Anyone else?

    Lt1956

    Example of My Script inside.

    egyptian_elite_guards_spears egypt

    It only took 15-20 seconds to make the 1 unit sprite, but then again I have a powerful system and a x800xt platinum video card 256mb
    Last edited by lt1956; 03-03-2005 at 14:29.
    LT_1956 Creator of SPQR: Total War


    SPQR:TW Mod forums

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

    Default Re: Sprite Generator... CA ?

    600 files ??? I had 4 at max, some unit (archer i think) only had 1. Each TGA file has like 60 sprites on it.
    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

  29. #29

    Default Re: Sprite Generator... CA ?

    whats going on then it did it on TWO units the same thing? Is there a string to use with the editor? Show me what you entered in your Stript that may help.

    Did you try it on a NEW unit model and skin?

    Lt
    LT_1956 Creator of SPQR: Total War


    SPQR:TW Mod forums

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

    Default Re: Sprite Generator... CA ?

    the script example you use is fine, and yes I'm only using brand new models and textures. Maybe it's video card related ? I have a GF4 Ti 4200 myself (pretty old but very reliable)
    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

Page 1 of 6 12345 ... LastLast

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