I have been able to make new action buttons work only with SDK and XML (not using Python).
To make this posible, I have modified the following files:
- CIV4MissionInfos.xml (basic to show the new buttons on screen). IMPORTANT: It seems imperative to put the new defined mission at the bottom of the file to prevent crashes.
- CvEnums.h (C++ interface to Mission Types in CIV4MissionInfos.xml). IMPORTANT: Its imperative that the new defined missions be added at the bottom of the "enum DllExport MissionTypes" and in the SAME order as in the XML file.
- CvSelectionGroup.cpp (implement what the new actions do here).
Less important files (buttons MAY work if you don't touch them):
- CvGameCoreUtils.cpp (it seems an DLL interface. Don't know for sure).
- CyEnumsInterface.cpp (it seems an interface with Python. Don't know for sure).
Help files (XML): Put the help for the labels in CIV4MissionInfos.xml here.
- CIV4GameText_BTS.xml
- CIV4GameText_BTS_Fixed.xml
Optional: (Help files in my particular mod):
CvDLLWidgetData.cpp (time to heal for MISSION_HEAL is displayed here)
CvUnit.cpp (Lightning to the recommended actions here).
You can see the source code in my mod file (the mod contains several things. Just search "SENTRY_WHILE_HEAL" to see the code for the new action.
[EDITED] I have moved the attached file to the "Mod Components" forum:
http://forums.civfanatics.com/showthread.php?p=7432537#post7432537
To make this posible, I have modified the following files:
- CIV4MissionInfos.xml (basic to show the new buttons on screen). IMPORTANT: It seems imperative to put the new defined mission at the bottom of the file to prevent crashes.
- CvEnums.h (C++ interface to Mission Types in CIV4MissionInfos.xml). IMPORTANT: Its imperative that the new defined missions be added at the bottom of the "enum DllExport MissionTypes" and in the SAME order as in the XML file.
- CvSelectionGroup.cpp (implement what the new actions do here).
Less important files (buttons MAY work if you don't touch them):
- CvGameCoreUtils.cpp (it seems an DLL interface. Don't know for sure).
- CyEnumsInterface.cpp (it seems an interface with Python. Don't know for sure).
Help files (XML): Put the help for the labels in CIV4MissionInfos.xml here.
- CIV4GameText_BTS.xml
- CIV4GameText_BTS_Fixed.xml
Optional: (Help files in my particular mod):
CvDLLWidgetData.cpp (time to heal for MISSION_HEAL is displayed here)
CvUnit.cpp (Lightning to the recommended actions here).
You can see the source code in my mod file (the mod contains several things. Just search "SENTRY_WHILE_HEAL" to see the code for the new action.
[EDITED] I have moved the attached file to the "Mod Components" forum:
http://forums.civfanatics.com/showthread.php?p=7432537#post7432537