Page 1 of 1

Doubled Event message - splitter bug?

Posted: Sat Aug 16, 2008 5:47 pm
by lodilefty
Occasionaly, we encounter 'doubled event reports', where the message appears twice in the log, but investigation shows that it only occurred once.

I believe I've found a cause:

If the Actions in an event creates a new Group, AND creates new Replacements, it appears that the splitter adds an exxtra 'GenMsg' for the replacements.

The Event as generated by csv splitter [version 0.51]:
SelectFaction = $GBR
SelectRegion = $Ramsay
StartEvent = evt_nam_MilitiaLeviedLoyalists|1|1|NULL|NULL|$Ramsay|NULL

Conditions
FixedDate = 1776/03/01

Actions

SelectRegion = $Trading Ford

SelectFaction = $GBR
SelectRegion = $Trading Ford
CreateGroup
Posture = $Defensive
SetKind = $Land
Entranch = 1
InCS = 0
FixType = 0
SetName = North Carolina Highlanders
Apply
CreateUnit
SetType = $uni_GBR_Tor3
NumCreate = 3
SetName = North Carolina Highlanders
Apply
Remplacement = GBR;$famMilitia;1
[color="Red"]GenMsg[/color]

EndEvent


The script report resulting:
Line 2: SelectFactions, 1 Faction selected: Great Britain
Line 5: SelectFactions, 1 Faction selected: Great Britain
Line 7: Started processing event: evt_nam_MilitiaLeviedLoyalists
Line 7: This event is not yet referenced, base number of allowed occurences 1
Line 10: Fixed date evaluated: 1776/03/01 converted to turn 2115 current turn 2115 True
Line 12: Entering triggered actions for event evt_nam_MilitiaLeviedLoyalists
Line 14: SelectRegion, 421 Trading Ford selected (simple mode)
Line 16: SelectFactions, 1 Faction selected: Great Britain
Line 17: SelectRegion, 421 Trading Ford selected (simple mode)
Line 25: Great Britain North Carolina Highlanders created in region Trading Ford
Line 30: North Carolina Highlanders created in group North Carolina Highlanders
Line 31: Change Remplacements Great Britain FactionTag: GBR Rpl type: 42 changed by: 1
[color="red"]Line 32: Flavor Message Generated: evt_nam_MilitiaLeviedLoyalists Region 421 Trading Ford[/color]
Line 34: Finished processing event: evt_nam_MilitiaLeviedLoyalists


Screenshots:
The report appearing twice
The DB code that leads to the script

...and an archive file with the full event file [modified to recrate the problem], script report, screenies and save game [you'll need to use the included event file in place of the 'vanilla' file]