GAME EVENTS:
All event names have been changed to follow a past tense subject-verb naming convention. In addition, all events now simply pass an args
argument as its only argument, which act as an object type. So instead of having many different arguments for the OnCardsMoved event, you will now do something like this:
def MoveCardsEvent(args):
card = args.card
x, y = args.xs, args.ys
Here is the list of all the events, and the values you can get from them (view the most up-to-date list here: https://github.com/octgn/OCTGN/blob/master/octgnFX/Octgn.Library/Scripting/GameEvents.xml#L241) :
<eventversion version="3.1.0.2">
<!-- Happens when the table first loads, and never again -->
<event name="OnTableLoaded"/>
<!-- Happens after OnTableLoaded and after each game reset -->
<event name="OnGameStarted"/>
<event name="OnPlayerConnected">
<param name="player" type="Player"/>
</event>
<event name="OnPlayerQuit">
<param name="player" type="Player"/>
</event>
<event name="OnDeckLoaded">
<param name="player" type="Player"/>
<!-- Groups cards are loaded into -->
<param name="groups" type="Group[]"/>
</event>
<event name="OnCounterChanged">
<param name="player" type="Player"/>
<param name="counter" type="Counter"/>
<param name="value" type="int"/>
<param name="scripted" type="bool"/>
</event>
<event name="OnTurnPaused">
<!-- Player who toggled the Pause Turn button -->
<param name="player" type="Player"/>
</event>
<event name="OnTurnPassed">
<!-- Triggers when the turn is passed to another player -->
<param name="player" type="Player"/>
</event>
<event name="OnCardTargeted">
<param name="player" type="Player"/>
<param name="card" type="Card"/>
<!-- If false, we untargeted, else we targeted -->
<param name="targeted" type="bool"/>
<param name="scripted" type="bool"/>
</event>
<event name="OnCardArrowTargeted">
<param name="player" type="Player"/>
<param name="fromCard" type="Card"/>
<param name="toCard" type="Card"/>
<!-- If false, we untargeted, else we targeted -->
<param name="targeted" type="bool"/>
<param name="scripted" type="bool"/>
</event>
<event name="OnPlayerGlobalVariableChanged">
<param name="player" type="Player"/>
<param name="name" type="string"/>
<param name="oldValue" type="string"/>
<param name="value" type="string"/>
</event>
<event name="OnGlobalVariableChanged">
<param name="name" type="string"/>
<param name="oldValue" type="string"/>
<param name="value" type="string"/>
</event>
<event name="OnCardClicked">
<param name="card" type="Card"/>
<param name="mouseButton" type="int"/>
<param name="keysDown" type="string[]"/>
</event>
<event name="OnCardDoubleClicked">
<param name="card" type="Card"/>
<param name="mouseButton" type="int"/>
<param name="keysDown" type="string[]"/>
</event>
<event name="OnMarkerChanged">
<param name="card" type="Card"/>
<param name="marker" type="string"/>
<param name="id" type="string"/>
<param name="value" type="int"/>
<param name="scripted" type="bool"/>
</event>
<event name="OnCardsMoved">
<param name="player" type="Player"/>
<param name="cards" type="Card[]"/>
<param name="fromGroups" type="Group[]"/>
<param name="toGroups" type="Group[]"/>
<!-- index within the group -->
<param name="indexs" type="int[]"/>
<param name="xs" type="int[]"/>
<param name="ys" type="int[]"/>
<param name="highlights" type ="string[]"/>
<param name="markers" type ="string[]"/>
<param name="faceups" type="bool[]"/>
</event>
<event name="OnScriptedCardsMoved">
<param name="player" type="Player"/>
<param name="cards" type="Card[]"/>
<param name="fromGroups" type="Group[]"/>
<param name="toGroups" type="Group[]"/>
<!-- index within the group -->
<param name="indexs" type="int[]"/>
<param name="xs" type="int[]"/>
<param name="ys" type="int[]"/>
<param name="highlights" type ="string[]"/>
<param name="markers" type ="string[]"/>
<param name="faceups" type="bool[]"/>
</event>
</eventversion>