This is a pretty advanced thing to do (at least to me it was) and I suggest you have an understanding of modding generals before you proceed with this. You will to work with 5 INIs; CommandButton, CommandSet, Upgrade, one to store your objects in (1 vehicles and 2 structures) and finally Object Creation list (Get the one in Data/INI, not Data/INI/Default). We’ll work from easy to hardest.
The first step is to create the upgrade that will begin the process. It will be an object upgrade, and it should not cost anything and be able to be deployed instantly.
Code:
Upgrade Upgrade_JapanCoreDeploy
Type = OBJECT
BuildTime = 0.0
BuildCost = 0
ButtonImage = XXXX
End
Type = OBJECT
BuildTime = 0.0
BuildCost = 0
ButtonImage = XXXX
End
This one works perfectly. Create a Command Button (make sure it’s an OBJECT_UPGRADE) for it and save. Afterwards, create a Command Set for the nanocore, and add the Button to it for the upgrade. Next create the nanocore vehicle, and give it the Command Set. I know I just went through that pretty fast, but after doing it for so long it is practically second nature to me. Oh yeah, make a command button for building the nanocore and add it to whatever building you are using as a command center

Next is to create the buildings that the nanocore will deploy into. There will be two: One will be the “foundation” and pretty much be the buildup animation, while the other will be the building itself. So create two buildings, and add the name “foundation” to the end of one just so you know which is which. The foundation building should play an animation that looks like a buildup in it’s default condition state. There are two very important tags that you need to give the foundation in order for everything to work. The first is:
Code:
Behavior = LifetimeUpdate ModuleTag_XX
MinLifetime = 5000 ; min lifetime in msec
MaxLifetime = 5000 ; max lifetime in msec
End
MinLifetime = 5000 ; min lifetime in msec
MaxLifetime = 5000 ; max lifetime in msec
End
This controls how long the building lives for before it dies (or how long the buildup is as you are concerned). Change the time values accordingly. The is:
Code:
Behavior = CreateObjectDie ModuleTag_XX
CreationList = OCL_CreateJapPowerCoreBuilding
TransferPreviousHealth = Yes
End
CreationList = OCL_CreateJapPowerCoreBuilding
TransferPreviousHealth = Yes
End
The Module controls what happens when the foundation dies (and no, it doesn’t go to heaven). It simply spawns something else. The other line is whether or not you want the created object to have it’s health or not. It seems pretty obvious here, but if you make a building where dudes pop out when the building gets destroyed, you may not want it have the same health as the dead building. Anyways, you just can’t add the name of the building you want to add in the creation list tag, you have to actually create a list for it. This is where the aforementioned ObjectCreationList comes in. Open that bad up and lets take a look.
The object creation list contains a bunch of entries, but the one that is important to us is the SneakAttack one, since that is the one I based this concept off of. This is my entry:
Code:
ObjectCreationList OCL_CreateJapPowerCoreBuilding
CreateObject
ObjectNames = JapPowerCoreBuilding
Disposition = LIKE_EXISTING
End
End
CreateObject
ObjectNames = JapPowerCoreBuilding
Disposition = LIKE_EXISTING
End
End
The entry is pretty self explanatory, Line names it, line 2 says what happens, line 3 and 4 state what is created and how, and then they end the entry. Just reference everything together and you should be ok.
Finally, you need to get the nanocore to become the foundation, so simply add the replace object module to it, and everything should be handy dandy. Here it is incase you forgot it:
Code:
Behavior = ReplaceObjectUpgrade ModuleTag_10
ReplaceObject = JapPowerFoundation
TriggeredBy = Upgrade_JapanCoreDeploy
End
ReplaceObject = JapPowerFoundation
TriggeredBy = Upgrade_JapanCoreDeploy
End
So to Recap:
Command Center -Builds-> Nanocore -DeploysInto-> Foundation -Spawns-> Final Structure.
Having a building that deploys into a vehicle works pretty much the same way, only opposite. You have a building that replaces itself with a foundation (and make it so it plays the build anim backwards) and after the foundation's lifespan is up, it spawns the vehicle. So if dozer construction has you down, you now have a new alternative-Nanocores!