[TOT] CivSprite 2 beta (Create ToT animating sprite files)

Mercator

Emperor
Joined
Mar 9, 2001
Messages
1,074
https://user.fm/civ2.mercator.fastmail.fm/mapedit/files/CivSprite2beta2.zip

Moderator Action: If link doesn't work, use mirror download attached to this post - Blake00

Looks a bit similar to CivSprite 1.0 except uglier. But in contrast with CivSprite 1.0 you now have full control over the animations you create. You can create sprite files from scratch with whichever images/animations you like.

Download and extract to start. You'll get a csui folder.
  1. Open the csui folder and run the csui program inside it.
  2. Select an existing Test of Time sprite file as input.
  3. Select a new "text configuration file" to create as output. (Make sure to select the "Text configuration files" option in the type drop-down.)
  4. Press the Convert button.
That should've created the text file you specified plus a directory full of PNG images. Read the text file it created. It looks sort of like a Rules.txt with some comments in there on what everything means.

The Static.spr files are a little different from the other ones, so be sure to try both.

Edit images or create new ones. They can be bitmaps too. Edit the existing text file (or create a new one) to describe how CivSprite should turn your images into animations.

The text file is pretty flexible. CivSprite itself always generates images in a specific structure when converting an existing sprite file. But you can organize the images you create yourself in pretty much any way you like. You just need to edit some filenames and image coordinates in the text file.
  1. Run csui again.
  2. Select files the other way around now. I.e. select your text file as input first.
  3. And select a new ToT sprite file as output.
  4. Convert
  5. Play ToT with new graphics.
Ask me questions or swear at me if it doesn't work. ;)

I suspect it only works on 64-bit computers (if anyone still has 32-bit). But if you know Python, here's the source: https://github.com/gofr/civsprite

Homepage: https://user.fm/civ2.mercator.fastmail.fm/
 

Attachments

  • CivSprite2beta2.7z
    7.5 MB · Views: 42
Last edited by a moderator:
Mercator, that´s a great surprise! :woohoo:
I will use your tool as soon as I have the time for it and thank you very much for all your work! :thanx:
 
I've updated the download link. I tweaked it a bit so now you can basically use it like SpriteGen as well to create Static.spr files from existing units.bmp files. There are some text config files included unitsbmp_to_staticspr... that let you do that.
 
Ah, this'll be a valuable addition to the modding scene! Thanks a lot!
 
Hey @Mercator ,

Just wanted to let you know that I just had a go with this updated tool and followed your instructions above and was very impressed with the results compared to the old tool. You can read the full results of my testing over in Civinator's old unit animation thread here:
https://forums.civfanatics.com/threads/animated-units-for-civ-2-tot.411816/page-3#post-16248907

So I won't repeat myself much here but suffice to say I was very impressed with the new grouping system which makes looking at units with lots of animation frames FAR less intimidating! I also love the traditional green borders seperating the frames and the way you structured the text config file just like the Civ2 rules file ensuring that it all feels familiar to Civ2 users. Really appreciate such care and attention to detail! :)

Makes things a lot easier which I think may just lead to more scenarios with animation in the future. Including me making animating versions of my MGE scenarios one day hopefully haha. :)

Screens from my other post...

Even the Warrior with its gazillion animation frames doesn't look intimidating thanks to the new grouped images.



Resources look easy too..



My successful animation experiment using your tool..





More easy to understand settings including a limit of 1024 animation frames for one unit??? wow!!! Adjustable transparency and the ability to make all animations play continuously (like oil wells do) without long pauses/breaks is very cool. Accessible unused animating terrain slots that Microprose didn't bother to use and the ability to support 2 special resource animations for even more terrain types not in the original added via ToTPP. CRAZY!!!

 
Last edited:
Is this tool still available attempting to open the download link fails
 
Is this tool still available attempting to open the download link fails
Download works, it's just your browser blocking old http links and insisting you only dare to click on modern more secure https links. With chrome I open the link in a new window instead of a new tab (that stops the auto closing), I get a warning, then I go to advanced and force it to load the link anyway, download works fine after that.
 
I tried opening it in a new window. Just shuts down automatically. I'll try to clear the cache and then attempt again
 
Ok, so how exactly do you link the new sprite to the unit? Naming it Unitxx.spr with xx aligning to its place in the Rules.txt and placing it in the folder doesn't seem to work.
 
With my successful Warrior / Titan experiment I replaced the default Warrior unit2.spr file in the 'Original' folder in ToT. I didn't try doing it from a custom scenario/mod folder, however that shooooould still work as I played Kestrel's Mars extended scenario a few years back which had custom animations throughout that worked and loaded the animations from the scenario folder although it was glitchy.

The reason it can be glitchy is if you don't also change your new custom units entry in Static.spr as well then you'll have issues as generally I think the game only plays the unit animation file when you've either clicked on/activated it or it plays it intermittently every minute or so when the unit is not selected. The rest of the time I think it's using a combination of the units.bmp file and the Static.spr which you could think of as a second units.bmp file that sits over the top.

I didn't bother to change Static.spr in my experiment so yeah I think it still appeared as a warrior until I clicked on it and then my custom titan appeared and animated as long as it was highlighted.
.
 
Last edited:
Also since Mercator hasn't been here for a few years and people are having problems with the old format HTTP download I've edited his post and attached a copy of his file here as a mirror download. That should stop the problems people are having as you'll now have a second option. Because it's Mercator's forum post he'll still have control over the attachment when he returns so hopefully he won't mind me tinkering. Oh and because his zip file was just slightly too big to be attached I recompressed it with 7zip and that got it down to a small enough size to let me attach it! Also slapped an S on the end of the HTTP in his original download link which won't solve the issue but it may change how some people's browsers handle it (eg maybe it'll be nice enough to warn/ask you about it instead of just blocking it).

EDIT: Oh and I also noticed his old website is down (like truly down, not just a HTTP issue) and his old CivSprite version 1.0 download along with many of his other cool tools no longer work.
However I've found a recent backup here:
https://web.archive.org/web/2022070...or.fastmail.fm.user.fm/mapedit/downloads.html
Also found a 2012 backup of his original site here:
https://web.archive.org/web/20121029160031/http://www.civgaming.net/mercator/mapedit/downloads.html
Looks like a lot of the downloads on these pages were backed up by webarchive too thankfully.

And lastly I feel like a lot of people don't know about his awesome tool since this thread can disappear down the list pretty quick & not everyone visits this section. So I've created a resource page in the download section that's referral only so when people click on download it will take them to this thread (meaning once again Mercator still has full control over the download should he return).
 
Last edited:
Alright, so when adding extra units does the same apply? I'm not trying to replace a sprite but to add a new one to a new unit added at the end of the list.
 
Thanks @Blake00 for trying it out, the kind words and editing my post! I've fixed the link, but left the attachment you added too.

My site should still work. But on HTTPS it's in a slightly different location: https://user.fm/civ2.mercator.fastmail.fm/

Oh, and I don't think the mask does anything on the terrain resource animations, but the originals had them for some reason. CivSprite just exports whatever's there.

And @DaggerDigwillow, I don't have access to any computer where I can check, so I'm afraid I can't help. But make sure you check the Rules.txt. Things need to be configured there too before Civ2 will use the animations. You might be able to find more details in some of the other scenario creation guides/threads.

I'll disappear for another few years now. ;)
 
Last edited:
https://user.fm/civ2.mercator.fastmail.fm/mapedit/files/CivSprite2beta2.zip

Moderator Action: If link doesn't work, use mirror download attached to this post - Blake00

Looks a bit similar to CivSprite 1.0 except uglier. But in contrast with CivSprite 1.0 you now have full control over the animations you create. You can create sprite files from scratch with whichever images/animations you like.

Download and extract to start. You'll get a csui folder.
  1. Open the csui folder and run the csui program inside it.
  2. Select an existing Test of Time sprite file as input.
  3. Select a new "text configuration file" to create as output. (Make sure to select the "Text configuration files" option in the type drop-down.)
  4. Press the Convert button.
That should've created the text file you specified plus a directory full of PNG images. Read the text file it created. It looks sort of like a Rules.txt with some comments in there on what everything means.

The Static.spr files are a little different from the other ones, so be sure to try both.

Edit images or create new ones. They can be bitmaps too. Edit the existing text file (or create a new one) to describe how CivSprite should turn your images into animations.

The text file is pretty flexible. CivSprite itself always generates images in a specific structure when converting an existing sprite file. But you can organize the images you create yourself in pretty much any way you like. You just need to edit some filenames and image coordinates in the text file.
  1. Run csui again.
  2. Select files the other way around now. I.e. select your text file as input first.
  3. And select a new ToT sprite file as output.
  4. Convert
  5. Play ToT with new graphics.
Ask me questions or swear at me if it doesn't work. ;)

I suspect it only works on 64-bit computers (if anyone still has 32-bit). But if you know Python, here's the source: https://github.com/gofr/civsprite
Just tested it, that's a really great tool to use, allowing to bring sprites to units until the 189th ! :)

Much thanks Mercator !
 
Here may you find Template files for this wonderfull tool for the static.spr construction with 189 units (5 directions + corresponding masks).
Please consider the program needs a little time to build the spr file for all 189 units.
 

Attachments

  • DefaultGlobalFiles.7z
    16 KB · Views: 13
Top Bottom