Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,443
You have 33 special buildings in python, but you have 35 in XML. It loops though the python array using the index limit from XML, which naturally leads to a problem.
I think I will go back to my idea about moving the special building locations to XML. That way we will not have two lists, which can go out of sync and we will remove some mod specific code from python. Ray correctly pointed out that python changes takes place right away while XML changes will need a game restart. I wonder if I can add gc.reloadSpecialBuildingXML() to main screen init and get those XML changes to appear right away
The problem would be that it should call CvXMLLoadUtility::(something), which mean I will need a pointer to an instance of CvXMLLoadUtility. If I figure out how to get that pointer, then the rest should be trivial. However it looks like the pointer is handled by the exe, but that isn't the same as it can't be done from DLL.
I think I will go back to my idea about moving the special building locations to XML. That way we will not have two lists, which can go out of sync and we will remove some mod specific code from python. Ray correctly pointed out that python changes takes place right away while XML changes will need a game restart. I wonder if I can add gc.reloadSpecialBuildingXML() to main screen init and get those XML changes to appear right away

The problem would be that it should call CvXMLLoadUtility::(something), which mean I will need a pointer to an instance of CvXMLLoadUtility. If I figure out how to get that pointer, then the rest should be trivial. However it looks like the pointer is handled by the exe, but that isn't the same as it can't be done from DLL.

I will try recoding the python specialbuildings. I was using the updated M:C python, thinking this would work with the M:C DLL, but hadn't kept track of the fact that python always needs a hardcoded specialbuildings grid for each mod. The 2071 python otherwise doesn't have any differences from standard M:C ATM.



In 2071 that kind of breakthrough requires 200 units of Isotopes. 


and it looks like the techs are all showing up, but in a very large multiply-branching arrangement, maybe because of the new relativeposition system. I think the xmlgen script should be placing X & Y coordinates ok, should I just set RelativePosition to 0 to let X & Y coordinates control placement?