• 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.

KaRei

Lt. General
14 Badges
Dec 27, 2005
1.588
47
  • Ancient Space
  • Crusader Kings II
  • Europa Universalis III
  • Divine Wind
  • For The Glory
  • Heir to the Throne
  • Majesty 2 Collection
  • Victoria: Revolutions
  • Rome Gold
  • Sengoku
  • Rome: Vae Victis
  • Europa Universalis III: Collection
  • Stellaris
  • Age of Wonders
Almost all custom unit sprites are causing two graphic bugs:
1) selecting of small provinces is impossible if army is in;
2) misplacement of fighting animation in combat screen.

Now I will explain why are these bugs caused and suggest how to correct them. It would be good if unit makers correct the sprites they have already done and continue with creating sprites without these bugs. ;)

Selecting

Each unit sprite contains several phases. Compared with vanilla sprites most of the custom sprites have large phases with unit picture in the mid.

Picture1.jpg


Using large phases isn't very clever. Maybe it's only lesser work if you are converting units from Civ.
Game engine of EU select the unit whenever you click anywhere on the phase's rectangle. If the phase's rectangle is large, you will have problems with selecting small provinces.

Picture2.jpg


Reduce the phase's size as much as possible.
Remember only to that, that the phase's length (size x) MUST be even number (not odd) otherwise the sprite will be flashing.

Combat misplacement

Position of the sprite on a map is controled by parameter "Origin" in SPR file. But position of sprite on the combat screen is hardcoded.

Picture3.jpg


As you see, large phases with unit in the mid are sending the battle animation almost out of the combat screen. If you reduce the phase size, the units will move closer to the center of battlefield.

But sadly the reducing of phase's size in the attack sprites isn't so easy as in other (walk or stand) sprites. If you only reduce the phase's size as much as possible, something like this could happen:

Picture4.jpg


To correct this you must insert "distance borders" to the phases.

Picture5.jpg


Sometimes it's good to insert "distance borders" to the top of the sprite if you need to move the animation down.

Picture6.jpg


Now it should work correctly. But I take it little bit further.

Unification of attack sprites

Setting the phase to fit the battlefield regardless on the other unit sprites needn't be the best way. Let unify the position of the units in the attack sprites. As reference values we could use vanilla positions.

Picture7.jpg


Moving the custom unit pictures to the same position as in vanilla sprites would unify the combat sprites and make each custom unit able to fight with any other unit (custom or vanilla) without causing graphic bugs.

If the unit picture is so large that it is unable to place it in the unified position (cavalry, elephant and few infantry), move it as close to the unified position as possible.
 
jorian said:
KaRei? Could you please help me make somehow sprites for HoI2 C&C mod? :)
I'm not sure if I'm the right person for this. I didn't create any units. My graphical abilities aren't good enough to create units from the ground and I don't know how are others converting them (from Civ for example). My position on the field of units creating is only making SPR files and reworking the sprites to the unified format (without bugs). :(

If you have some sprites already and want to correct them, I can help you. But creating new sprites isn't my branch. Sorry

EDIT: Or I can try to do something, but can't guarantee the result ;)
 
Last edited: