OpenFodder / openfodder

Open Fodder: An open source port of Cannon Fodder
http://openfodder.com
GNU General Public License v3.0
459 stars 42 forks source link

Custom Soldiers Names #65

Open TsukiZero opened 1 year ago

TsukiZero commented 1 year ago

This is more of a question than a suggestion for feature, but you can take as such if you will: Is it possible to make a custom soldier names mod that perhaps from an ASCII text file with one name per linebreak?

To contribute some more, in the SNES version it's straight-up stored in text format, 6-characters long, A-Z (all caps), doesn't support numbers nor symbols, low caps results in a different text color (highlighted) with an "offset" to which character correspond to what ("o" becomes golden "K"), needs a space to fill the blank.

So a name like COOKS is perfectly fine, but Coffee, Max!me, BL0RB1, PIZZA are not

segrax commented 1 year ago

This is possible, its similar to this already, except its compiled in and still contains data from a dropped feature

https://github.com/OpenFodder/openfodder/blob/master/Source/Recruits.cpp#L27

TsukiZero commented 1 year ago

So it should be simple to implement, I presume?

drnovice commented 1 year ago

Hello, it could be a check in the resources loading: if a Recruits.ini file is present, it could override the default mRecruits[] struct. The file reader will take only first 6 characters and a capitalization of the letters, maybe a regExp to discard names with non-alphabetical chars.

I'll try to see what can I do for a PR, but time is very limited.