You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking through the code, mainly in order to play around with the
face generator. As far as I can see, the number of items in each source image
(e.g. hairs_64b.png) is hardcoded in game.cpp (e.g. as faceGen.nHairs = 17).
It would be a lot more flexible to have this number as a field in the mod XML
input, e.g.:
<image assetName="faceHairs" filename="hairs_64b.png" number="17"
dither="false"/>
The builder might even check that the file height is actually evenly divisible
by the number.
Is there a reason not to change these numbers, e.g. for saved game
compatibility or whatever? If the soldier faces are just kept in a FaceParam, I
think it should not matter if the number of elements increases, as long as the
original images stay in the same order, right? The new images would only be
used in the randomizer, to make new soldiers with extra variation...
Original issue reported on code.google.com by [email protected] on 23 Oct 2011 at 4:05
The text was updated successfully, but these errors were encountered:
Save file compatibility is the big issue. Every unit has a seed/body that is a
31 bit random number, that determines name & appearance. However, I made a very
silly mistake, and didn't zero-out the unused bits. :( To add extended range,
takes a version check.
For better or worse, there is a solution to the code. Check for 'version' and
LAST_NAME_EXT. When version >= 1, it uses the LAST_NAME_EXT bit which double
the # of potential last names.
You would have to use the same trick to add more face parts.
Which is also why this stuff isn't in the XML - it takes logic to make it work.
(The zero thing really was a stupid mistake. Oh well.)
Original issue reported on code.google.com by
[email protected]
on 23 Oct 2011 at 4:05The text was updated successfully, but these errors were encountered: