Jumpjet construction on dedicated AircraftType structures
This guide requires:
- rule(md).ini
- Engine extensions: Ares (Must have), Phobos (Optional)
PPM link: [How to Build Jumpjet Vehicle from Airfield]
Credit to cxtian39 for discovering this.
How Jumpjets can be constructed inside a Airfields
In Vanilla RA2 and YR, production structures can only construct units on their dedicated factories. InfantryTypes from Barracks, Vehicle (And Jumpjets) from War Factories, and Aircraft from Airfields.
Typically, Jumpjets share the same production queue with your average Vehicles, that being Nighthawks, Siege Choppers, Kirovs or Floating Disks.
But what if you want your Jumpjets to be produced seperately from your Vehicles and sharing the queue with true Aircraft instead like with other games like Generals or Red Alert 3. Then you found just the right tutorial for this!
Step 1: Setting up
1.1: Defining dummy AircraftType
First you need an AircraftType that kills itself on birth
[AircraftTypes] +=MYDUMMYAIRCRAFT01
1.2: Setting up AircraftType
Then set up your dummy AircraftType with properties as followed
[MYDUMMYAIRCRAFT01] ... TechLevel=1 ; buildable Sight=0 ; will not reveal anything DesignatorRange=1 ; yes this is a designator DontScore=yes ; not count as unit death ...
Step 2: Preparing for its autodeath
The AircraftType must automatically kills itself to free up space for next AircraftType on production and avoid potential glitches with your desired Jumpjet Vehicle. There are two ways to automatically kill the dummy AircraftType:
2.1: Autodeath with Ares
- With Ares, unit auto death can be executed either by assigning the dummy Aircraft to use a custom ArmorType attaching an AE that instantly kills it:
In Rules(md).ini, insert this following code:
[ArmorTypes] die=100% ; Warheads impacts on it is default to 100% vs this one
[Animation] +=KILLDUMMY
[MYDUMMYAIRCRAFT01] Armor=die ; killed by the suicide AE AttachEffect.Animation=KILLDUMMY ; a suicide AE AttachEffect.Duration=-1
Dummy should be assigned a custom armor that isn't used by any other objects as a failsafe. Otherwise on death it will take production structure down with it. In this case the "die" custom armor is used, and now a Warhead should be made to accomodate this custom ArmorType.
[Warheads] +=DummyKiller
[DummyKiller] Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%
Now open Art(md).ini and give the KILLDUMMY animation the damage and warhead to kill the dummy:
[KILLDUMMY] Damage=32767 ; max Damage Warhead=DummyKiller
2.2: Autodeath with Phobos
- With Phobos, you can alternatively make it simply automatically die instantly by using [Phobos's Kill Object Automatically] logic:
[MYDUMMYAIRCRAFT01] AutoDeath.Behavior=vanish ; "kill" option also valid
Step 3: True Aircraft Jumpjet definition
With dummy Aircraft done prepared, you may now define what your real Jumpjet that pops out of AircraftType Factory will be
[VehicleTypes] +=MYJUMPJET
[MYJUMPJET] ;Your helicopter, airship, disc, whatever
If you want AI to recruit unit-delivered unit, set [Hunt]->Recruitable=yes.
To simplify production and recruiting process, [Phobos's TechnoType considered as other type on recruitment and creating] mechanic is most recommended.
[MYJUMPJET] TeamMember.ConsideredAs=MYDUMMYAIRCRAFT01
When this is applied, MYJUMPJET is now considered as MYDUMMYAIRCRAFT01, thus eligible not only for recruiting, but also as member of team on creation.
Step 4: Finalization
Now it's time to make your dummy aircraft turned into a proper Jumpjet aircraft by setting up an custom Ares superweapon. The dummy AircraftType knows how to delete itself already, so you need something that helps putting MYJUMPJET on its place.
4.1: Define SuperWeapon
Just like many other SuperWeapon, it must first be defined into the game
[SuperWeaponTypes] +=GiveMeJumpjet
4.2: Setting up the SuperWeapon
Now set up your SuperWeapon to place your Jumpjet into where the Dummy aircraft was:
[GiveMeJumpjet] Type=UnitDelivery Deliver.Type=MYJUMPJET SW.AITargeting=self SW.AutoFire=yes SW.FireIntoShroud=yes IsPowered=false RechargeTime=.01 SW.ShowCameo=no SW.Deferment=0 SW.Designators=MYDUMMYAIRCRAFT01
Reason behind: you build the dummy designator, causing the give-me-jumpjet-sw to fire only once then the designator dies right after born and the superweapon is on hold again. This trick supports setting primary exit.
4.3: SuperWeapon placement
You can either place the SuperWeapon at its respective production structure:
[GiveMeJumpjet] SW.AuxBuildings=YOURAIRCRAFTFACTORY
Or make it pernamently available without being tied to any structure:
[GiveMeJumpjet] SW.AlwaysGranted=yes
4.4: Limitations
Only one Superweapon can support a Conversion. In our case, we already have [GiveMeJumpjet] Superweapon to change [MYDUMMYAIRCRAFT01] into [MYJUMPJET]
To create additional one, they must be created seperately from the first and rinse and repeat. For instace: [GiveMeJumpjet2] Superweapon to change [MYDUMMYAIRCRAFT02] into [MYJUMPJET2]
And that's how you can produce Jumpjet vehicles on airfield.