ChgRgnDecisionFP Bug
Posted: Sun Feb 28, 2016 6:37 pm
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.
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.