Tool for easier export_descr_unit editing

Tool for easier export_descr_unit editing

Introduction

Here's a tool a python tool I made to make editing the export_descr_unit.txt a little bit easier. As far as I could tell, no good tools like this has been developed for a while. So I used this as an opportunity to get some practice in and turn the headache of fixing my pike units into a bigger headache.

Link To Tool

https://github.com/DanJ555/EDU-Converter/

Feel free to copy, fork, modify, or suggest features.

Usage


Tool for easier export_descr_unit editing image 6

Pretty simple I think. No GUI (yet) but after you install the prerequisites and run the cli.py it's just a matter of

convert /path/to/export_descr_unit.txt edu.db to convert the text document into a database. I suggest this[sqlitebrowser.org] DB Browser for individual and mass editing. You can leverage SQL from this point on too:

UPDATE units SET attributes = 'sea_faring, hide_forest' WHERE category = 'infantry';

Here's a great guide to reference to make sure you're editing these values correctly:

https://steamcommunity.com/sharedfiles/filedetails/?id=3136670088

When you're done fixing the units to your preference just enter

convert edu.db modded_EDU.txt to get your modded export_descr_unit.txt. When I was testing this early on Medieval 2 would reject any text file from python regardless of encoding. However, I could copy and paste the entire document into the export_descr_unit using plain jane notepad and the game would be happy again. Fixing that is out of my league.

Note that this tool doesn't support ';' comments except on the dictionary line. I didn't feel like thinking of how to handle all the places they can pop up so your new file will have nearly all of them removed.

Conclusion

Feel free to use, modify, and improve as you see fit. Let me know of bugs and hopefully I'll still have the free time to see what's up and help you with it :)

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=3437515316					

More Total War: MEDIEVAL II - Definitive Edition guilds