You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I've verified the following in TD. Most of the issues probably also impact RA.)
The value of Scenario is used for a bunch of hard-coded stuff specific to particular missions, and also for some generic AI behaviors. So it causes problems when the GlyphX client is passing us garbage (or nothing) in most cases:
Official SP missions: Correct scenario number
Custom SP missions: Always Scenario = 1
AI-controlled infantry won't scatter (like the early missions)
Threshhold for AI to start repairing buildings is 25% hp (like the early missions)
AI cannot sell buildings it can't afford to repair. (like the very early missions)
Official MP maps: Scenario = number in the map's filename. Often very large.
When the AI has a damaged building it can't afford to repair, it always passes the random roll to sell it on the first tick it makes the check.
Custom MP maps: Always Scenario = 0
AI-controlled infantry won't scatter (like the early missions)
Threshhold for AI to start repairing buildings is 25% hp (like the early missions)
AI cannot sell buildings it can't afford to repair. (like the very early missions)
A related issue is that the range for the random roll whether to sell a building the AI can't afford to repair didn't get updated for Covert Ops or the console missions, so the odds on the first tick can be higher than intended, sometimes even 100%. WW fixed this in RA by using a value derived from BuildLevel instead.
Note: You cannot just change Scenario to a sane value because Decode_Pointers() will use it to rewrite ScenarioName during a save operation, and we can't be sure that GlyphX client won't call later call CNC_Get_Game_State() which would use the now-incorrect ScenarioName.
The fix I used for my mod is to make a new global variable EffectiveScenario to replace Scenario where it impacts the AI. When Scenario gets set, so does EffectiveScenario. Additionally, EffectiveScenario can be set by a value passed in through a custom mission's INI file, or, failing that, to a sane default value when initializing a custom mission. For MP maps, EffectiveScenario is set to a value derived from BuildLevel similar to how RA does it. EffectiveScenario needs to be added to he save file. I also added an option to cap EffectiveScenario for the random roll to sell a building.
(It's also possible to support custom dino missions by looking for a value in the mission's INI file and setting some flags accordingly.)
The text was updated successfully, but these errors were encountered:
(I've verified the following in TD. Most of the issues probably also impact RA.)
The value of Scenario is used for a bunch of hard-coded stuff specific to particular missions, and also for some generic AI behaviors. So it causes problems when the GlyphX client is passing us garbage (or nothing) in most cases:
A related issue is that the range for the random roll whether to sell a building the AI can't afford to repair didn't get updated for Covert Ops or the console missions, so the odds on the first tick can be higher than intended, sometimes even 100%. WW fixed this in RA by using a value derived from BuildLevel instead.
Note: You cannot just change Scenario to a sane value because Decode_Pointers() will use it to rewrite ScenarioName during a save operation, and we can't be sure that GlyphX client won't call later call CNC_Get_Game_State() which would use the now-incorrect ScenarioName.
The fix I used for my mod is to make a new global variable EffectiveScenario to replace Scenario where it impacts the AI. When Scenario gets set, so does EffectiveScenario. Additionally, EffectiveScenario can be set by a value passed in through a custom mission's INI file, or, failing that, to a sane default value when initializing a custom mission. For MP maps, EffectiveScenario is set to a value derived from BuildLevel similar to how RA does it. EffectiveScenario needs to be added to he save file. I also added an option to cap EffectiveScenario for the random roll to sell a building.
(It's also possible to support custom dino missions by looking for a value in the mission's INI file and setting some flags accordingly.)
The text was updated successfully, but these errors were encountered: