login

Author Topic: automatically update module_parties.py after making changes with the Map Editor  (Read 3239 times)

Offline HokieBT

  • Master
  • *****
  • Posts: 514
    • View Profile
This is a very basic program to create a module_parties_new.py file:
  - the data will be taken from a module_parties.py file
  - the party coordinates will be taken from a parties.txt file

This would be helpful if you want to use the Map Editor to move items on the world map (which updates parties.txt) but want to re-build your mod using module_parties.py later (which would overwrite any changes to the coordinates in parties.txt)

Possible Workflow:
1) edit town names in module_parties.py, run build_module.bat, create a parties.txt file
2) use the Map Editor to move towns on the map, save changes to parties.txt
3) put module_parties.py and parties.txt into the same folder as UpdatePartyCoordinates.exe, run it and it should create module_parties_new.py
4) rename module_parties_new.py to module_parties.py (backup your old module_parties.py)
5) re-run build_module.bat, launch your mod and the towns should be in the correct location

Notes:
- this has only been tested very briefly on a native party file in M&B 0.960 but should work on 1.x since it appears to be the same format
- this only copies the coordinates, so if you use the Map Editor to change icons, names, etc, these changes will not be updated in module_parties_new.py

Download:
http://www.mbrepository.com/modules/PDdownloads/singlefile.php?cid=3&lid=884

Taleworlds Forum: - I'll hopefully release a new version which can copy party names and some other info, check here for updates.
http://forums.taleworlds.net/index.php/topic,45772.0.html