Forrest's arrival is caused by the following event, in CSA Leaders:
Code: Select all
SelectFaction = $CSA
StartEvent = evt_nam_CSA_Forrest|1|1|NULL|NULL|NULL|NULL
Conditions
MinDate = 1862/02/01
MaxDate = 1862/03/01
EvalUnqUnit = Nathan B. Forrest;NOT
SelectRegion = $Stewart, TN
SelectRegInArea = $TN;Squared;OwnedCities;CondSkip
GenMsg
PickFromRegList = NotEnemy
GenMsg
EvalRegionSel = NULL
Actions
GenMsg
etc, etc.
At any rate, here is my best guess for what the critical part of this code does:
Code: Select all
EvalUnqUnit = Nathan B. Forrest;NOT // If Forest is not on the map
SelectRegion = $Stewart, TN // Pick Stewart, TN as region
SelectRegInArea = $TN;Squared;OwnedCities;CondSkip
// If valid region has been picked, which it always has, skip
// this line. In other words, this line is a no-op.
GenMsg // Connect map region to event display
PickFromRegList = NotEnemy // Pick only regions that are not enemy from list. This is a guess.
GenMsg // Again, associate map region to event display.
EvalRegionSel = NULL // Accept event even if there are no valid regions.
// This is a complete guess. I have no documentation on "EvalRegionSel".
Actions
GenMsg // Again, etc.
Correcting the code:
I submit that the following code much more accurately represents the desired intention:
Code: Select all
Conditions
MinDate = 1862/02/01
MaxDate = 1862/03/01
EvalUnqUnit = Nathan B. Forrest;NOT
SelectRegion = $Stewart, TN;NotEnemy
SelectRegInArea = $TN;Squared;OwnedCities;CondSkip
SelectRegion = $Stewart, TN;CondSkip
GenMsg
Pick Stewart, TN if not enemy owned.
If Stewart is not valid (i.e. was enemy owned) pick a random friendly-owned
Tennessee city, weighted by city size squared,
If still don't have a valid region, go back to Stewart, TN.
Associate event message with region on map.
I am not sure if multiple "GenMsg" commands are needed, or just one after all the regions are finally picked. I am also unsure if this should go before or after the "Actions" statement.
If I am correct that this event is bugged, and how it bugged, then there are at least twenty-five other instances of similar bugs just in the file "CSA Leaders". I have not yet looked at the other event files for this bug.