Posted: Thu Jan 29, 2009 4:01 am Post subject:
Nanocores and MCVs! [ZH]
Subject description: deploying units into structures and vice versa
I have been able to successfully recreate the building style of nanocores from red alert 3 in Generals Zero Hour. This is almost an exact recreation! You build the core, move it to where you want, deploy it, and it takes some time, and you’ve got a building! You can do the exact same thing by making an MCV too (only difference is deploy time). The method took me some to come up with, but essentially it involves an upgrade that replaces the core with a building, and that building has a predetermined lifespan, after which it creates the final building in it’s death. I based it off of a combination upgrade a fake building to a real one, and the sneak attack building (which does most of the work).
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
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 . You are done with commandbutton and commandset, but keep the nanocore file open.
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
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:
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
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:
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!
success!.jpg
Description:
The green box is just my laziness, as I used a placeholder instead a buildup. The explosion is residual from the Sneak attack code.
wow. thats actually quite interesting. Too bad the work arounds to worker building are poor at best. _________________ You come for the modding but you stay for the Crap Forum. QUICK_EDIT
You can reuse the worker command set switch upgrade for the upgrade you created, since I think it should be instant. Don't worry about the cameo, you won't be making an upgrade icon in the unit, and the button cameo can be changed easily.
Otherwise I see nothing that should be noted. QUICK_EDIT
Oh, the build time on the upgrade is not suppose to be there. IT was there because I first I couldn't think about how to make it so that it didn't instantly turn into the end building, but I forgot to change it when I added the foundation idea. I'll change it when I get home, along with a little paragraph on how to make a con yard undeploy (same logic, just a little backwards). _________________ Please, read the signature rules of the forum. QUICK_EDIT
something much more sophisiticated was worked on by beng and a few others awhile back. They designed the true build style of cnc by creating a building that fired a weapon that would change condition states. If a building was not being fired upon (outside fire radius) it would self destuct and leave behind a money crate. _________________ Go to CJ get yo BJ only 2.99 fo a limited time - The Chronicals of BJ written by myself. QUICK_EDIT
They used a weapon? Bah, I'll use the sneak attack ability and a commandset upgrade. _________________ Please, read the signature rules of the forum. QUICK_EDIT
The Japs can pretty much build anywhere, since their buildings are mobile at first before deploying... Not sure about undeploying though besides the MCV. I think DaFool's idea for the nanocores using the sneak attack thing is a good idea QUICK_EDIT
never said is idea was bad. what I should have said before though was that beng and the people at cncmaps.com had this same concept except it was much more involved. _________________ Go to CJ get yo BJ only 2.99 fo a limited time - The Chronicals of BJ written by myself. QUICK_EDIT
Well, I am talking about a vehicle deploying into a building and you are talking about classis cnc build style. And from what I understand about what you are saying, it is not classis cnc build style, but rather you place it first and then it builds, correct? _________________ Please, read the signature rules of the forum. QUICK_EDIT
it builds up instantly like in cnc. Its pretty much cnc in everyway. Truthfully i dont know many details. If you do a google search and click the "cache" button below the advertised webpage it should recall the page, but not as is. See the site went down a few months ago so I cant link you the page. _________________ Go to CJ get yo BJ only 2.99 fo a limited time - The Chronicals of BJ written by myself. QUICK_EDIT
You couldn't build a building with a building that builds buildings, but now you can build a building that builds an MCV that builds into a building that builds buildings!! _________________
You couldn't build a building with a building that builds buildings, but now you can build a building that builds an MCV that builds into a building that builds buildings!!
Don't start that again. Pleeease don't!
But, to be ontopic, what we have here is a breakthrough, a well crafted workaround and, imo, a welcome break for Generals modding. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum