• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Eraclio

Major
1 Badges
Nov 26, 2006
615
2
  • For The Glory
I tried to edit spr files and convert them into bmp file but I don't reach to do it.

I tried with sprview, actor, rosprtoolkit... but all the programs crash to desktop... why? :(
 
.spr files are actually text files, you can open them with any text editor, like Notepad. The .bmp files are... in the \bmp folder. :)

!!! I thought sprites are images too!!!!!!!!!!!!!! Stupid me! :eek:

Thanks a lot!!!!! (and hour and half to try view spr file yesterday!!!!!!!!!!!!!!!!!!!!! :D)

So, what precisely are spr files? What they set?
 
The .spr files tell the game where to look for the actual image files.

Here's an example file, "T-ARMY C-AZT A-FIRE L-1 D-SW.spr":
Code:
Sprite = {
	Bitmap = "T-ARMY C-AZT A-FIRE L-1 D-SW.bmp"
	Origin = { x = 33 y = 53 }
	Frames = 14
        Palette = "sprpalette_army_3.bmp"
	Speed = 5
}
First, the game finds the .spr file that it needs. It would use this one if a country using the AZT units with a land tech of less than 11 is defending in a battle (thus shooting/spearing to the lower left); the name of the file is the important part here.

This file tells the game that the .bmp file to pull is "T-ARMY C-AZT A-FIRE L-1 D-SW.bmp", with a palette defined by "sprpalette_army_3.bmp". The origin tells the game where the unit's feet are (so it knows where to place the unit in the screen), and the frames and speed tell the game how exactly to play the sprite.
 
Why capital spr set 23 for x and in the game is in 20? (I've controlled it)
I'm sorry, I don't understand what you're asking here.
 
I'm sorry, I don't understand what you're asking here.

T-STABILITY :

Code:
Sprite = {
	Bitmap = "T-STABILITY.bmp"
	Origin = { x = 23 y = 40 }
	Frames = 7
	Palette = "sprpalette_stability.bmp"
}

x = 23 mean that it is exactly in the 23rd pixel from left or is it approximately?
 
I suppose they decided it looked better with a little bit of offset. I really don't know.
 
I suppose they decided it looked better with a little bit of offset. I really don't know.

Ok, and where in the spr file or elsewhere are the position of the city flag?

I mean the flag that is over the city icon.

Is there any way to change the position of the flag?
 
The flag position is hardcoded to the city position plus 8x, -22y.