Page 1 of 1

ChgRgnDecisionFP Bug

Posted: Sun Feb 28, 2016 6:37 pm
by vicberg
I've been wondering for a while why the RGD cards seem off. This is what I found.

I originally ran this script and I couldn't figure out why I wasn't getting a draft card. I had ZERO draft cards at the time and it was turn index 0.


[color="#FF8C00"]SelectFaction = FRA
SelectRegion = $Paris

StartEvent = evt_nam_FRA_RGDExceptionalDraft|999|0|NULL|NULL|$Paris|NULL

Conditions
EvalRgnDecisionDef = $rgdExceptionalDraft;<=;4
TurnIndex = 0;11;23;35

Actions
ChgRgnDecisionFP = $rgdExceptionalDraft;1;

EndEvent[/color]

I saw no RGD Draft Card and saw this in the log

[color="#FF8C00"]Line 45679: Started processing event: evt_nam_FRA_RGDExceptionalDraft
Line 45679: Event already referenced, current occurences 1 Max allowed: 999 <<Active>>
Line 45682: EvalRgnDecisionDef: France Draft Current Number 0 against 4 - Operator: <= Result: True
Line 45683: TurnIndex: Testing 0 vs current turn index: 0 True
Line 45685: Entering triggered actions for event evt_nam_FRA_RGDExceptionalDraft
Line 45686: ChgRgnDecisionFP: Current Region Decisions allowed Draft 0
[/color]
Then I ran the above with this

[color="#FF0000"] ChgRgnDecisionFP = $rgdExceptionalDraft;2;[/color]

And I got 1 Draft Card. So to confirm, I added this into another script running before the renewal script so that there should have been 4 cards at the end of turn.

[color="#FF0000"] ChgRgnDecisionFP = $rgdExceptionalDraft;2;[/color]

and I received 3 cards.

You have a bug in regional decision processing. If you have 0 cards, it's incorrectly subtracting 1 from the renewal amount.

Posted: Sun Feb 28, 2016 11:40 pm
by vicberg
Please ignore. It looks like if a card with a duration > 1 is active, the engine holds the new card until the duration has ended. Not a bug.

Posted: Mon Feb 29, 2016 11:47 am
by Pocus
You mean the effect? Yes, this can be set to trigger continuously, on the first turn, on the last turn (of the duration).