davidlallen
Deity
I have been setting up a mod where fuel is precious. I have a simple system (described here) for units to run out of gas, which is working, in python with no SDK changes.
I want a fuel truck, which has an action button. When the action button is used it should refuel all the units in the stack. There is an Action Buttons mod which is pure python, and another Action Buttons 2.0 mod, which is SDK. Both of these appear to predate Warlords, let alone BTS. That means the particular files are relatively useless to "modern" modders, and I cannot find anything more recent on this.
I was able to patch the changes from Action Buttons 1.0 into the current game interface files, and my action button is successfully appearing. My problem is that my handler is not called; something is changed along the call chain between vanilla and BTS. In the Action Buttons 1 mod, I find:
That no longer appears to be true; I added a print statement in this function and it is never called.
Can anybody suggest a standalone way to get action buttons working in BTS? If there is a relatively small but up-to-date SDK mod I can incorporate, that is fine, but I would prefer a python solution.
I want a fuel truck, which has an action button. When the action button is used it should refuel all the units in the stack. There is an Action Buttons mod which is pure python, and another Action Buttons 2.0 mod, which is SDK. Both of these appear to predate Warlords, let alone BTS. That means the particular files are relatively useless to "modern" modders, and I cannot find anything more recent on this.
I was able to patch the changes from Action Buttons 1.0 into the current game interface files, and my action button is successfully appearing. My problem is that my handler is not called; something is changed along the call chain between vanilla and BTS. In the Action Buttons 1 mod, I find:
Code:
class CvActionButtonsGameUtils(CvGameUtils.CvGameUtils):
def cannotHandleAction(self,argsList):
# this is the only place I've found that you can respond to the action buttons
That no longer appears to be true; I added a print statement in this function and it is never called.
Can anybody suggest a standalone way to get action buttons working in BTS? If there is a relatively small but up-to-date SDK mod I can incorporate, that is fine, but I would prefer a python solution.