Upgradeable Units

Avatar of Yurisarmy

Yurisarmy

Category: Code
Level: Expert
Created: Wednesday July 29, 2009 - 4:49
Updated: Sunday October 11, 2009 - 8:18
Views: 3690
Summary: Allows units to be upgraded through map triggers.
Rating
  • Staff-
  • Members5.0
  • Average5.0/5.0

1 vote

Tested, and works!

1. Open up FA2, make a trigger. For the trigger name just put anything like "upgrade" or something. Set the House to American for now.

2. Go to Event. Select event #19: Build Building Type. Then set its parameter to 6: Allied Battle Lab.

3. Go to Action. Make two Actions. On the first one, select #106: Set TechLevel. For its number parameter, put in "-1". For the TechType param, put in "MTNK". For the second action, select #106 again, and for the number param put in "2" or anything between 1-10. Set the TechType to "MTNK2".

Place the trigger somewhere on the map(not sure if required but do it anyway) and save the map.

4. Open Rules and copy the MTNK code. Rename the copy to "MTNK2" and change something like cost so something other than MTNK's stat, something you'll easily recognize. Add it to the VehicleTypes list. Make a new voxel for MTNK2 as well. Make the standard art entry for the MTNK2 also. Now, change MTNK's prerequisite to include the Allied Battle Lab.

Play YR, as America, on the new map. Build up like normal, then build the battle lab.
Notice how the Grizzly's gone and this new unit is in its place? Just give it some stat boosts and it'll be like a unit upgrade!

What it does: It makes it to where you build a battle lab and the unit to be 'upgraded' is made unbuildable. It then makes another unit buildable, thus appearing to make the unit be 'upgraded'.

Upsides: You can give your 'upgraded' unit any change you want; weapon, speed, armor, doesn't matter, Can be used to the same effect with any unit type, such as aircraft or buildings.

Possible Upsides but not tested: Can work for all Allied countries and not just America with this code, Can make an upgrade to place on a building that also grants this ability(if you can figure out how to get that to work. So far I can't yet)

Downsides: Can't upgrade your existing tanks on the battlefield; you must build the new tank, Hogs up a lot of available VehicleTypes if you use this on a bunch of units or a bunch of 'upgrades', Currently map-specific; you must make all your maps like this. Shouldn't be too hard tho, just copy Action, Event, and Trigger from the map with Wordpad.

Return to top