• images
  • 11:05 am
  • images
  • No Comments.

Python Overhaul

Over the last 2 days (~30 hours), I have pulled out all of my manual loading code from the C++ code.  I have, in its place, embedded LibRocket’s Python, Boost::Python, and some of my own binds.  This has set me back in that I have lost the ability to switch contexts (‘screens’ in my code) for now, but I have changed up some of the workflow:

  • Contexts are created in Python and then located in C++ (the opposite direction never seemed to work for me in Python, and this way I can be sure that Python is pulling a valid reference);
  • Documents, Fonts, Cursors, etc., are now to be loaded, hidden, shown, etc., in Python (by the ‘loader.py’ file within the mod);
  • The core mod’s UI files are now within the core mod’s folder;
  • Localisation and images will remain in the assets folder;
  • I have created a ‘mods-shared’ folder for shared assets (e.g. the fonts that ship with the game, which are Apache 2 Licensed, will live in ‘mods-shared/fonts’).

There remains a substantial amount of work to complete this overhaul, but it will mean unparalleled (I hope?) modding potential, using only Python and an image editor (and some HTML/CSS style coding for the UI).