trystero49
Prince
- Joined
- Apr 30, 2012
- Messages
- 515
I'm trying to make a mod to remove embarkation from a unit, and it looks like I'll need to attach code removing this onto four different events to cover all the bases:
ActivePlayerTurnStart
SerialEventUnitCreated
SerialEventUnitMovetoHexes
UnitSelectionChanged.
Of course, not all of these events fire on the AIs turn, but I'll have to work out what I should do for the AI later.
Anyway, I've made some unpack functions to determine what the argument list is for these events. The unpack function lists a bunch of numbers and boolean values (except APTS, that seems to have no argumnets). I don't understand how I'm supposed to deduce some of these values. I'm pretty certain that the first value in most of these events is "PlayerId", since it always returns 0 no matter what. However, other values have numbers like "8192", and I can't possibly imagine what that number might mean?
Does anyone have any tips or pointers on how to work through this?
ActivePlayerTurnStart
SerialEventUnitCreated
SerialEventUnitMovetoHexes
UnitSelectionChanged.
Of course, not all of these events fire on the AIs turn, but I'll have to work out what I should do for the AI later.
Anyway, I've made some unpack functions to determine what the argument list is for these events. The unpack function lists a bunch of numbers and boolean values (except APTS, that seems to have no argumnets). I don't understand how I'm supposed to deduce some of these values. I'm pretty certain that the first value in most of these events is "PlayerId", since it always returns 0 no matter what. However, other values have numbers like "8192", and I can't possibly imagine what that number might mean?
Does anyone have any tips or pointers on how to work through this?