Posted by: acidbrain - Friday, September 18, 2015 1:39:22 AM
So i am working on a new map and thought let's make the AI spawn some random minefields. Picked the 'manholecover' to work with and made this piece of code for the map.ini: [code=plain] Object ManHoleCover ReplaceModule ModuleTag_01 Draw = W3DModelDraw ModuleTag_01_Override DefaultConditionState Model = None End AliasConditionState = DAMAGED End End CommandSet = MinefieldCommandSet KindOf = IMMOBILE STRUCTURE UNATTACKABLE RemoveModule ModuleTag_02 AddModule Body = ImmortalBody Module_IB MaxHealth = 1.0 InitialHealth = 1.0 End Behavior = ProductionUpdate Module_PU End Behavior = CommandSetUpgrade Module_CSU CommandSet = MinefieldCommandSetUpgrade TriggeredBy = Upgrade_ChinaMines End Behavior = GenerateMinefieldBehavior Module_GMB TriggeredBy = Upgrade_ChinaMines MineName = ChinaStandardMine SmartBorder = Yes AlwaysCircular = Yes Upgradable = Yes UpgradedTriggeredBy = Upgrade_ChinaEMPMines UpgradedMineName = ChinaEMPMine End End End CommandSet MinefieldCommandSet 1 = Command_UpgradeChinaMines End CommandSet MinefieldCommandSetUpgrade 1 = Command_UpgradeEMPMines End [/code] I thought that it would work but it doesnt, it gave me a nice 'conflicting upgrade cannot be purchased' message in game, after an hour of testing i discovered that you need a freaking 'ArmorUpgrade Module' for the EMPMines upgrade to work properly while the object doesnt even have an armorupgrade. Checked the ini files and the module is also added to the buildings of china while they dont have any upgraded armor. Had to add this to the 'Addmodule' part: [code] Behavior = ArmorUpgrade Module_AU TriggeredBy = Upgrade_ChinaEMPMines End [/code] To make it work... Really weird or i am too stupid to understand this, im probably too stupid..:P Greetz