I came across the following while playing Casus Belli by Vegard Bjørketun.
After fixing what I considered to be ridiculously low unit movement in this scen, the scen turned out to be extremely interesting to play. Casus Belli reminds me very much of techumseh's excellent Frederick the Great except that, in CB, Sweden is the state that is surrounded by enemies, Denmark, Russia, Poland and Prussia.
One of the somewhat unusual features of the scen is that, once a civ is on the offensive, it can obtain adequate funds by destroying stationary enemy units. The most frequently used events that reward such destruction are the following, excerpted from the CB EVENTS file.
For the first dozen turns everything went fine as my Swedes enthusiastically beat up on the Danes and destroyed a number of their Fortresses, Towns and Garrisons. Popups and gold appeared on schedule and HRH Charlie XII was mightily pleased.
By this time, there were adequate forces to start in on the Poles and Saxons by capturing a city and destroying a Garrison and a Town that it was shielding. However, in neither case did the the expected popup and gold appear. Uttering a torrent of highly original Norse oaths, Charlie flew into a royal rage, and I started investigating.
As long as any civ attacks only one of the other civs, everything works properly.
If any civ first attacks one civ and then attacks another, there are no popups or gold from the second set of attacks.
If a human civ attacks another, and the CHEAT mode is used to change the human civ to a different which in turn attacks any civ, there are no popups and no loot.
It makes no difference whether the above sequences of attacks occur during a single turn or are spread out over many turns.
I suspect that the problem comes from the use of
attacker=anybody
defender=anybody
It appears that the identities of the initial attacker and the defender get locked in the EVENTS section of the save when the events are first triggered and cannot be changed subsequently. This possibility is suggested by the fact that the following sequence works perfectly.
Have a civ attack Civ A, save the game, run the save over DELEVENT, load the save, attack Civ B, save the game, run the save over DELEVENT, load the save, attack Civ C, save the game, run the save over DELEVENT, etc.
Also, the problem appears to be limited to MGE because techumseh uses the following types of events repeatedly in his TOT FTG and they function perfectly.
WORKAROUNDS
There is inadequate space in the EVENTS file to have a separate event for each of the 5 civs to attack each of the 4 others and kill the 3 types of stationary units.
For SP play, there is enough space for the human civ to attack the 3 unit types of 3 AI civs but not enough for attacks on the 4th AI civ or for AI attacks on the human civ. This is not too bad because I assume that players would quickly figure out that it is in their interest to disband threatened units rather than leaving them to be killed. Also, in SP, the 4th AI civ (Prussia) is neutral until turn 159. By that time Sweden will either be kingpin of northern Europe or a Danish province.
For MP play, like the PBEM game that Werd100 (aka McMonkey) has started on the German Webring Civ site, the only solution seems to be that everybody has to use DELEVENT and reload, either at the start or the end of their turn.
Does any of the very experienced SL designers have a better explanation or fix for the problem?
After fixing what I considered to be ridiculously low unit movement in this scen, the scen turned out to be extremely interesting to play. Casus Belli reminds me very much of techumseh's excellent Frederick the Great except that, in CB, Sweden is the state that is surrounded by enemies, Denmark, Russia, Poland and Prussia.
One of the somewhat unusual features of the scen is that, once a civ is on the offensive, it can obtain adequate funds by destroying stationary enemy units. The most frequently used events that reward such destruction are the following, excerpted from the CB EVENTS file.
@IF
UNITKILLED
unit=Fortress
attacker=anybody
defender=anybody
@THEN
TEXT
^A successfull siege! The defeated defenders are forced
^to pay 350 Rdl to their besiegers to get away alive.
ENDTEXT
CHANGEMONEY
receiver=triggerattacker
amount=350
@ENDIF
@IF
UNITKILLED
unit=Town
attacker=anybody
defender=anybody
@THEN
TEXT
^A town is attacked and burned to the ground!
^The conquered booty is estimated to 500 Rdl.
ENDTEXT
CHANGEMONEY
receiver=triggerattacker
amount=500
@ENDIF
@IF
UNITKILLED
unit=Garrison
attacker=anybody
defender=anybody
@THEN
TEXT
^A military garrison falls to the superior enemy!
^250 Rdl is plundered from the burning barracks.
ENDTEXT
CHANGEMONEY
receiver=triggerattacker
amount=250
@ENDIF
UNITKILLED
unit=Fortress
attacker=anybody
defender=anybody
@THEN
TEXT
^A successfull siege! The defeated defenders are forced
^to pay 350 Rdl to their besiegers to get away alive.
ENDTEXT
CHANGEMONEY
receiver=triggerattacker
amount=350
@ENDIF
@IF
UNITKILLED
unit=Town
attacker=anybody
defender=anybody
@THEN
TEXT
^A town is attacked and burned to the ground!
^The conquered booty is estimated to 500 Rdl.
ENDTEXT
CHANGEMONEY
receiver=triggerattacker
amount=500
@ENDIF
@IF
UNITKILLED
unit=Garrison
attacker=anybody
defender=anybody
@THEN
TEXT
^A military garrison falls to the superior enemy!
^250 Rdl is plundered from the burning barracks.
ENDTEXT
CHANGEMONEY
receiver=triggerattacker
amount=250
@ENDIF
By this time, there were adequate forces to start in on the Poles and Saxons by capturing a city and destroying a Garrison and a Town that it was shielding. However, in neither case did the the expected popup and gold appear. Uttering a torrent of highly original Norse oaths, Charlie flew into a royal rage, and I started investigating.
As long as any civ attacks only one of the other civs, everything works properly.
If any civ first attacks one civ and then attacks another, there are no popups or gold from the second set of attacks.
If a human civ attacks another, and the CHEAT mode is used to change the human civ to a different which in turn attacks any civ, there are no popups and no loot.
It makes no difference whether the above sequences of attacks occur during a single turn or are spread out over many turns.
I suspect that the problem comes from the use of
attacker=anybody
defender=anybody
It appears that the identities of the initial attacker and the defender get locked in the EVENTS section of the save when the events are first triggered and cannot be changed subsequently. This possibility is suggested by the fact that the following sequence works perfectly.
Have a civ attack Civ A, save the game, run the save over DELEVENT, load the save, attack Civ B, save the game, run the save over DELEVENT, load the save, attack Civ C, save the game, run the save over DELEVENT, etc.
Also, the problem appears to be limited to MGE because techumseh uses the following types of events repeatedly in his TOT FTG and they function perfectly.
@IF
CityTaken
city=Berlin
attacker=Anybody
defender=Anybody
@THEN
CreateUnit
owner=TriggerAttacker
unit=Fortress*
veteran=no
homecity=None
locations
38,18
endlocations
@ENDIF
CityTaken
city=Berlin
attacker=Anybody
defender=Anybody
@THEN
CreateUnit
owner=TriggerAttacker
unit=Fortress*
veteran=no
homecity=None
locations
38,18
endlocations
@ENDIF
WORKAROUNDS
There is inadequate space in the EVENTS file to have a separate event for each of the 5 civs to attack each of the 4 others and kill the 3 types of stationary units.
For SP play, there is enough space for the human civ to attack the 3 unit types of 3 AI civs but not enough for attacks on the 4th AI civ or for AI attacks on the human civ. This is not too bad because I assume that players would quickly figure out that it is in their interest to disband threatened units rather than leaving them to be killed. Also, in SP, the 4th AI civ (Prussia) is neutral until turn 159. By that time Sweden will either be kingpin of northern Europe or a Danish province.
For MP play, like the PBEM game that Werd100 (aka McMonkey) has started on the German Webring Civ site, the only solution seems to be that everybody has to use DELEVENT and reload, either at the start or the end of their turn.
Does any of the very experienced SL designers have a better explanation or fix for the problem?
Comment