-
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 :help:
-
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...
-
Re: Sprite Generator... CA ?
yes, thank you, thats excellent :D
Quote:
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 :)
-
Re: Sprite Generator... CA ?
Fantastic. Thank you very much Jerome :)
-
Re: Sprite Generator... CA ?
Thanks Adherbal for finding that! And thanks Jerome for the explantion!
-
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)
~;)
-
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.
-
Re: Sprite Generator... CA ?
-
Re: Sprite Generator... CA ?
this is great news indead. thanks for helping us as much as you have Jerome. I sure do apreciate it.
-
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?
-
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.
-
Re: Sprite Generator... CA ?
Ah I could just kiss you... except Im not that kind of wolf..
Anyway thanks for the great info!
-
Re: Sprite Generator... CA ?
Could I suggest somebody to make a "How To" about this question? :dizzy2:
It would be great. :bow:
-
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
Quote:
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
-
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.
-
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.
-
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.
-
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
-
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.
-
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.
-
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. ~;)
-
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.
-
Re: Sprite Generator... CA ?
no, you either use the TGA files or convert them to (tga.)DDS files
-
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.
-
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
-
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..
-
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
-
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.
-
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
-
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)