Ok this is a slight problem I am having with the coding for my mod.
CLICK ME for more info about the mod. As to understand parts of this you will need to know the basic concept of the mod.
Now this isnt a major problem as I do have a work around for it
With the upgrades From what i have seen you can only have 1 weapon upgrade as compared to the 2 that i am aiming for.... (I will use the Overlord Tank as an example)
Quote:
Behavior = ObjectCreationUpgrade ModuleTag_07
UpgradeObject = OCL_OverlordGattlingCannon
TriggeredBy = Upgrade_ChinaOverlordGattlingCannon
ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker
End
Behavior = ObjectCreationUpgrade ModuleTag_08
UpgradeObject = OCL_OverlordPropagandaTower
TriggeredBy = Upgrade_ChinaOverlordPropagandaTower
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordBattleBunker
End
Behavior = ObjectCreationUpgrade ModuleTag_09
UpgradeObject = OCL_OverlordBattleBunker
TriggeredBy = Upgrade_ChinaOverlordBattleBunker
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower
End
Behavior = ProductionUpdate ModuleTag_10
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
|
With the above code it limits the fact of building multiple weapon upgrades as once you build one the others are disabled so you cant build another one.
This is the problem as i need 2 weapon upgrades per vehicle.
With the above code it is only 3 possible upgrades but i need 4 so i would add...(new in red)
Quote:
Behavior = ObjectCreationUpgrade ModuleTag_07
UpgradeObject = OCL_OverlordGattlingCannon
TriggeredBy = Upgrade_ChinaOverlordGattlingCannon
ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker Upgrade_ChinaOverlordNewThing
End
Behavior = ObjectCreationUpgrade ModuleTag_08
UpgradeObject = OCL_OverlordPropagandaTower
TriggeredBy = Upgrade_ChinaOverlordPropagandaTower
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordBattleBunker Upgrade_ChinaOverlordNewThing
End
Behavior = ObjectCreationUpgrade ModuleTag_09
UpgradeObject = OCL_OverlordBattleBunker
TriggeredBy = Upgrade_ChinaOverlordBattleBunker
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordNewThing
End
Behavior = ObjectCreationUpgrade ModuleTag_10
UpgradeObject = OCL_OverlordNewthing
TriggeredBy = Upgrade_ChinaOverlordNewThing
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker
End
Behavior = ProductionUpdate ModuleTag_11
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
|
Now that code works very simalar to the first code but now i have the four upgrades needed. The problem with it is that when i build 1 the others will be disabled, whereas i need to be able to build 2 differant upgrades before they are disabled.
Now a simple way to avoid some of this is to change..
Quote:
|
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
|
and put in
Quote:
|
MaxQueueEntries = 2; So you can't build multiple upgrades in the same frame
|
Now this technique could work but the problem is you have to build them at the same time (have to click the second upgrade before the first one is done) This way i do have 2 upgrades on the unit. The problems with that is
1) If you only build the first one, once the first one is finished building, you cannot build another one.
2) It would be possible to build the same upgrade twice.
Now that way I dont want to have to use at all (would rather go down to one weapon upgrade than use that method)
Now the next method will work effectively, but makes the command bar abit crowded.
Now the above methods use 4 buttons in the command bar. This method will use 8!
now the origional command bar will look something like this
Quote:
+--------------+----------------+--------------+--------------+-----------+
| Tower | Cannon | | | |
+--------------+----------------+--------------+--------------+-----------+
| Bunker | Thingy | | | |
+--------------+----------------+--------------+--------------+-----------+
|
But with this workaround it will look something like this...
Quote:
+--------------+----------------+--------------+--------------+-----------+
| TowerA | CannonA | TowerB | CannonB | |
+--------------+----------------+--------------+--------------+-----------+
| BunkerA | ThingyA | BunkerB | ThingyB | |
+--------------+----------------+--------------+--------------+-----------+
|
As you can tell it get 8 icons now instead of the origional four.
Now with the coding, I will also have to add alot to it aswell. Now using my 4 upgrade code from above and adding the new code (green) it will look something like this...
Quote:
Behavior = ObjectCreationUpgrade ModuleTag_07
UpgradeObject = OCL_OverlordGattlingCannon
TriggeredBy = Upgrade_ChinaOverlordGattlingCannon
ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker Upgrade_ChinaOverlordNewThing Upgrade_ChinaOverlordGattlingCannon1
End
Behavior = ObjectCreationUpgrade ModuleTag_08
UpgradeObject = OCL_OverlordPropagandaTower
TriggeredBy = Upgrade_ChinaOverlordPropagandaTower
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordBattleBunker Upgrade_ChinaOverlordNewThing Upgrade_ChinaOverlordPropagandaTower1
End
Behavior = ObjectCreationUpgrade ModuleTag_09
UpgradeObject = OCL_OverlordBattleBunker
TriggeredBy = Upgrade_ChinaOverlordBattleBunker
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordNewThing Upgrade_ChinaOverlordBattleBunker1
End
Behavior = ObjectCreationUpgrade ModuleTag_10
UpgradeObject = OCL_OverlordNewthing
TriggeredBy = Upgrade_ChinaOverlordNewThing
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker Upgrade_ChinaOverlordNewThing1
End
Behavior = ObjectCreationUpgrade ModuleTag_11
UpgradeObject = OCL_OverlordGattlingCannon
TriggeredBy = Upgrade_ChinaOverlordGattlingCannon1
ConflictsWith = Upgrade_ChinaOverlordPropagandaTower1 Upgrade_ChinaOverlordBattleBunker1 Upgrade_ChinaOverlordNewThing1 Upgrade_ChinaOverlordGattlingCannon
End
Behavior = ObjectCreationUpgrade ModuleTag_12
UpgradeObject = OCL_OverlordPropagandaTower
TriggeredBy = Upgrade_ChinaOverlordPropagandaTower1
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon1 Upgrade_ChinaOverlordBattleBunker1 Upgrade_ChinaOverlordNewThing1 Upgrade_ChinaOverlordPropagandaTower
End
Behavior = ObjectCreationUpgrade ModuleTag_13
UpgradeObject = OCL_OverlordBattleBunker
TriggeredBy = Upgrade_ChinaOverlordBattleBunker1
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon1 Upgrade_ChinaOverlordPropagandaTower1 Upgrade_ChinaOverlordNewThing1 Upgrade_ChinaOverlordBattleBunker
End
Behavior = ObjectCreationUpgrade ModuleTag_14
UpgradeObject = OCL_OverlordNewthing
TriggeredBy = Upgrade_ChinaOverlordNewThing1
ConflictsWith = Upgrade_ChinaOverlordGattlingCannon1 Upgrade_ChinaOverlordPropagandaTower1 Upgrade_ChinaOverlordBattleBunker1 Upgrade_ChinaOverlordNewThing
End
Behavior = ProductionUpdate ModuleTag_15
MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
End
|
Now that above code dont look like much was changed but alot of it was just some numbering added to create doubles of each of the 4 origional upgrades, in essance creating 8 upgrades. Now with clever usage of the ConflictsWith = command it gives the desired affect fo having 2 differant upgrades at once. It will work kinda like this...
Now say you want to have the Tower upgrade on your tank. OK so you build that and now the menu will look like this...
Quote:
+--------------+----------------+--------------+--------------+-----------+
| xxxxxx | xxxxxxxx | xxxxxxx | CannonB | |
+--------------+----------------+--------------+--------------+-----------+
| xxxxxxx | xxxxxxx | BunkerB | ThingyB | |
+--------------+----------------+--------------+--------------+-----------+
|
Now the xxxxx is options that are darkened and unbuildable. And it leaves us with the 3 remaining upgrades to choose from.
So I do have a working way to make this whole thing workable. But one of the biggest problems is that it takes up 8 spots of the 12 available spots, wich only leaves 4 spoets remaing. Now this wouldnt be a problem but i also have the skill upgrades to work with, wich would have to be done the same way as this

wich would make a total of 16! spots. not to mention other spots needed aswell (Guard, move+fire, and things like that)
But the work around for that is have a buildg simalar to the USA stratagy center that i can have a general upgrade for all units (maybe evan 2 using the same method as the weapons) wich could work effectively, but i was hoping for more individual customization, not an upgrade that works for all.
So if anyone has any ideas as to how to make this work, they are welcome
