Many people have asked for a script that takes troops.txt and converts it back into module system code. You can now find such a script at the repository: http://www.mbrepository.com/file.php?id=1398. This will allow you to hack up your troops.txt file and bring the data back into your module system code with a minimum of effort. As a test of effectiveness, I successfully decompiled a Native module, re-compiled the resulting code, and diffed the results against the original txt data.
Caveats:
- If you have stats higher than 30, you'll need to add new stat lines in header_troops.py to get things to compile again. Note that Native has one troop with a stat at that level (the fugitive has strength of 31)
- Aliasing of flag values, especially skills, is not guaranteed to come out 100% like your original module system code. Many of the skill macros (like knight_skills_5 and knows_common) overlap and it's impossible to tell from the txt files what the original code looked like. Face codes also have value collisions.
- Weapon proficiencies as produced by the module system have a random component of 10+10%. Rather than try to approximate this value, I assume that anyone using the unofficial editor to hack this stuff up is going to continue to do so and I kept the literal values. Anyone intending to only use the script once should go through and tidy up their proficiency values with the expected macros.
To use:
- Install Ruby.
- Edit the script to look at your data files (look near the top of the script).
- Pop open a command window.
- run the script.
- Copy & paste the tuples from the destination file to your module_troops.py. Fight with all your might, the urge to make the destination output the same as your module_troops.py. I don't replace macro and alias values.
And since I haven't in a while: BLAM
Caveats:
- If you have stats higher than 30, you'll need to add new stat lines in header_troops.py to get things to compile again. Note that Native has one troop with a stat at that level (the fugitive has strength of 31)
- Aliasing of flag values, especially skills, is not guaranteed to come out 100% like your original module system code. Many of the skill macros (like knight_skills_5 and knows_common) overlap and it's impossible to tell from the txt files what the original code looked like. Face codes also have value collisions.
- Weapon proficiencies as produced by the module system have a random component of 10+10%. Rather than try to approximate this value, I assume that anyone using the unofficial editor to hack this stuff up is going to continue to do so and I kept the literal values. Anyone intending to only use the script once should go through and tidy up their proficiency values with the expected macros.
To use:
- Install Ruby.
- Edit the script to look at your data files (look near the top of the script).
- Pop open a command window.
- run the script.
- Copy & paste the tuples from the destination file to your module_troops.py. Fight with all your might, the urge to make the destination output the same as your module_troops.py. I don't replace macro and alias values.
And since I haven't in a while: BLAM