davidlallen
Deity
I have written some action buttons in pure python, modifying CvMainInterface.py in a similar way to what the Gods Of Old mod does. The action buttons lead to some simple code which modifies the game state, such as, a particular unit "refugee" has an action button. If you use the action button when the unit is in a city, it removes the refugee and increases the city population by one. The active part of the python is:
pUnit.kill(true, iUnitOwn)
pCity.changePopulation(1)
This is working correctly, in single player games. I have only the one CD, so I cannot directly test network multiplayer. But, recently somebody tried out multiplayer, and reported that an OOS error comes as soon as these action buttons are used. After thinking about it, I guess I had naively expected calls like kill and changePopulation to inform the other players; but there is no reasonable way they could do that.
How do action buttons in MP games work? Is there some step which I have missed, to communicate these arbitrary changes to the other players?
pUnit.kill(true, iUnitOwn)
pCity.changePopulation(1)
This is working correctly, in single player games. I have only the one CD, so I cannot directly test network multiplayer. But, recently somebody tried out multiplayer, and reported that an OOS error comes as soon as these action buttons are used. After thinking about it, I guess I had naively expected calls like kill and changePopulation to inform the other players; but there is no reasonable way they could do that.
How do action buttons in MP games work? Is there some step which I have missed, to communicate these arbitrary changes to the other players?