|
RA2/YR: How to NOT Break the YR Campaigns in Your Mod Introduction For completness, this tutorial attempts to explain why mods break the campaigns, as well as offering possible fixes to the problem. If some of the details of the explanations also serve to make your eyes glaze over, we apologize. | ||
|
Defining the Problem Simply put, adding new [BuildingTypes] to your mod in rulesmd.ini is what breaks the Yuri's Revenge campaigns. When Yuri's Revenge is loaded, it reads the [BuildingTypes] list and builds an array from it. Many of the stock campaign maps add new [BuildingTypes] in the mission maps themselves, and such added buildings are appended to that array. The Yuri's Revenge singleplayer missions are dependent on triggers which identify "building-by-number", as defined in that array. If your mod adds new buildings in rulesmd.ini, you've extended the [BuildingTypes] list, and lengthened the array. Therefore, you also have shifted the campaign-added buildings further down the array, which gives them different array values. The most notorious example is the first Allied campaign. Each of those tech power plants are actually unique [BuildingTypes] which all use the tech power plant image. Those new buildings are added in the campaign map itself. Then, triggers look for "building-by-number", as defined in the [BuildingTypes] array, to know if you own them or not. If you add new buildings to rulesmd.ini, then the mission's new buildings get added to the end of that longer rules array... which prevents those particular map triggers from working. The mission thinks you haven't captured any of the buildings, even if you captured all of them. This problem could have been avoided entirely if Westwood to had added placeholder buildings to the end of the rulesmd.ini list, which could be used by the campaign maps... but they didn't. | ||
|
Solutions
(The Project adds campaign building placeholders in rulesmd.ini, along with a complete sweep of the campaign maps, as described in solutions #1 and #2.)
(CannisRules limits new buildings to the multiplayer game, as described in solution #5). | ||