civsprite

Fairline

Emperor
Joined
Mar 21, 2002
Messages
1,552
Location
UK
I've been trying to export from a static.spr file that Catfish made for the scenario Cassus Belli, and I'm getting an error message when using Mercator's CivSprite utility:

'CivSprite caused an error (#9) Subscript out of range'

I'm on win10. Is civsprite no longer working with newer OS, or have a done something silly? It's been years (a decade?) since I last used the utility.
 
Todas las aplicaciones que de 8 bits no funcionan con 64 bits y por ello no sirven para las últimas versiones de windows. TheNamelessOne creó una aplicación para 64 bits que mejora el CivCity y sirve para TOTPP: Civitas http://forums.civfanatics.com/threads/626602
Yo no he visto que haya nuevas versiones 64 bits de CivSprite. Ahora no tengo acceso a mi viejo ordenador con XP, donde las utilicé la viejas aplicaciones de Mercator bastante para modificar los escenarios que adaptaba a ToT. Yo he visto que en la página de Mercator: http://civ2.mercator.fastmail.fm/mapedit/downloads.html hace mención a Visual Basic 6.0 SP5 Run-Time Files para que funcionen sus aplicaciones. Intentaré probar a ver si funcionan.

All applications that 8-bit do not work with 64-bit and therefore do not work for the latest versions of windows. TheNamelessOne created a 64-bit application that improves CivCity and works for TOTPP: Civitas http://forums.civfanatics.com/threads/626602
I have not seen that there are new 64-bit versions of CivSprite. Now I don't have access to my old computer with XP, where I used the Mercator's old applications enough to modify the scenarios that I adapted to ToT. I have seen that on the Mercator page: http://civ2.mercator.fastmail.fm/mapedit/downloads.html it mentions Visual Basic 6.0 SP5 Run-Time Files for its applications to work. I'll try to see if they work.
 
Installing the Visual Basic 6 Run-Time Files I can already see the application and request as Mercator indicates the components: files COMDLG32.OCX and MSCOMCTL.OCX are required.
I add them in rar file. But I'm still not clear where they should be included in the system.
 

Attachments

  • files.rar
    477.9 KB · Views: 209
Last edited:
It is already working, after installing Visual Basic 6 Run-Time File: just include COMDLG32.OCX and MSCOMCTL.OCX in C: \ Windows \ SysWOW64 and open CivSprite with the right button and run as administrator.
 
Visual Basic 3 Run-Time Module is required for the following 3 utilities: CivCity, CivHot and CivTweak. Let's see where these should include VBRUN300.DLL
 
Thanks for your investigations Gapetit! I'll give it a try myself
 
For the applications (CivCity, CivHot and CivTweak) I must resign. I have tried to include the vbrun300.dll, but I get an error, both in system32 and in SysWoW64. In both cases it indicates that it is not compatible with the Windows version. :undecide:

upload_2020-3-29_13-18-37.png


upload_2020-3-29_13-18-48.png


upload_2020-3-29_13-19-0.png
 
No luck for me either - seems it's not compatible with 64-bit OS :(

Thanks anyway mate :)
 
@Fairline I'm pretty sure CivSprite is a 32-bit program which should run on a 64-bit OS. Regarding the message that says "CivSprite caused an error (#9): subscript out of range", @gapetit himself reported this about 5 years ago -- but I wasn't able to find any post referencing a solution. I don't think it's an OS compatibility issue though. I have Windows 98 running (through VMWare) and when I run CivSprite on that OS, I get the same message trying to export from the Casus Belli static.spr file you mentioned. Actually, it turns out that I get that message, on either OS, trying to export from any static.spr file. So... :confused: Is it possible this was only intended to be used with animated sprites, not static ones? I'm not familiar enough with CivSprite to know if it ever worked, or what's going on. But I don't think Windows 10 is really the problem.
 
@Knighttime Civsprite certainly used to work in making unit masks to allow civ colours to be overlaid on units. Catfish used it for his replacement default units and Curt has used it fairly frequently in his scenarios. I haven't touched it since 2011-ish I think. Thanks for looking though.
 
@Knighttime Civsprite certainly used to work in making unit masks to allow civ colours to be overlaid on units. Catfish used it for his replacement default units and Curt has used it fairly frequently in his scenarios.
But you're trying to go the opposite direction, right? Not to make a sprite file, but to extract images from a sprite file that already exists?

I know SpriteGen can also be used to create a static.spr file (I managed to get this working for me on 64-bit Windows 7, awhile back), but apparently it doesn't support exporting from an existing one. It looks like both programs were created by Mercator... so apparently CivSprite was created to be an updated version of SpriteGen?

Can you create a static.spr file with CivSprite, or isn't that working either?

Sorry I can't be of more help.
 
CivSprite and SpriteGen were made with different functionality in mind: SpriteGen was (is?) used to raise health bars to make them invisible in game (depending on zoom level) - this is now made obsolete by an option in ToTPP - whereas Spritegen was used to create unit masks to allow civ colours to be overlayed on units. I believe Spritegen also allowed animated sprites to be made, but I only ever used it with static sprites.

In truth I was trying to export from an existing static.spr file in order to remind myself of the format of the bmp file used to make the sprite file in the first place; I couldn't recall if the units file needed to predominantly black, with white areas in places where the colour mask was to be applied, or predominantly magenta. It may well be that the export function never worked - when I used it previously to create masked sprite files Mercator and Catfish were around to answer questions regarding format and procedure.
 
Last edited:
Got it, thanks. Well, in addition to raising health bars, SpriteGen v1.1 also lets you merge a Units_mask.bmp with Units.bmp to generate a Static.spr file that will allow civ colors to be overlayed on units. (I think this wasn't part of v1.0 but was added in v1.1.) In that program, the documentation says: "SpriteGen will only treat two colors as transparent. Magenta and the color of the top-left pixel of a unit. The latter can be different for each unit." It works well, though, if Units_mask.bmp is mostly black, as you said, with white or grayscaled areas where the civ colors should be applied to each icon.

EDIT: For CivSprite, the documentation says: "Any non-black pixel in the mask will turn the corresponding pixel in the image into the shade of the owning civilization." So there it sounds like you have to use black. Does that answer your question?
 
Last edited:
BTW, the unfortunate thing I've found is that these programs only seem to work with the first 81 unit icons (the original amount supported by TOT). TOTPP supports up to 127 unit types, but it doesn't seem possible to use static sprites (with tribe colors) for these additional slots. If you can find a way to get that working, please share details!
 
Got it, thanks. Well, in addition to raising health bars, SpriteGen v1.1 also lets you merge a Units_mask.bmp with Units.bmp to generate a Static.spr file that will allow civ colors to be overlayed on units. (I think this wasn't part of v1.0 but was added in v1.1.) In that program, the documentation says: "SpriteGen will only treat two colors as transparent. Magenta and the color of the top-left pixel of a unit. The latter can be different for each unit." It works well, though, if Units_mask.bmp is mostly black, as you said, with white or grayscaled areas where the civ colors should be applied to each icon.

EDIT: For CivSprite, the documentation says: "Any non-black pixel in the mask will turn the corresponding pixel in the image into the shade of the owning civilization." So there it sounds like you have to use black. Does that answer your question?

I think it probably does. Cheers knighttime :)

Always pays to RTFM; in my defence, in this case I don't have the readme just the program file which I acquired way back when...
 
:) Glad I could help. Here's the documentation I have, just in case you need it.
 

Attachments

  • CivSprite 1.0 Readme.txt
    5.1 KB · Views: 69
Top Bottom