Jump to content
Sign in to follow this  
Madin

Tiberian Sun style multi missile?

Recommended Posts

I am wondering how I would go about coding a Tiberian sun style multi missile (so basically having the missile spilt before it reaches the ground into smaller projectiles which detonate on impact with the ground)?.

 

Any ideas?

Share this post


Link to post

The easiest way would be to make it like the nuke where it goes straight up at the launch position and straight down at the target as the time it takes is always equal. With that you can do a LifetimeUpdate that triggers a FireWeaponWhenDead with some scatter.

The other option is to have the carrier rocket basically be an Orca Strike/Armageddon Bomber, just looking like a rocket, then firing the payload at the target with some scatter while killing itself..

Share this post


Link to post

If you can wait a few i dont mind sharing my code with you, i was working on a MultiMissile specialweapon myself.

The idea was to fire 1 large missile from a silo, then if there are smaller targets(vehicles,infantry,basedefenses) near the target zone the missile will detonade midair and spawn several guided(or unguided if you prefer) smaller missiles that home in on the smaller targets, if there are no targets it just strikes the targetzone with its mainbody for a heavy explosion.

 

I put this project on hold abit due..reasons...i expirement to much i guess with other things. Might aswell be a good time to finish it.

Share this post


Link to post

First iteration: Using the heightdieupdate to fireweaponwhendead 5 smaller missiles

 

Note: Most parts are adepted to the use of my own mod, rename parts where needed. The BRD_ OSR_ parts in the code are basicly the NOD_ GDI_ versions of themselfs in my mod(alternate reality/timeline stuff etc)....replace or rename where apropriate.

 

<WeaponFireSpecialAbilityUpdate
                id="ModuleTag_SpecialPower_BRD_MultiMissile"
                SpecialPowerTemplate="SpecialPower_BRD_MultiMissile"
                SpecialWeapon="BRD_MultiMissileCarrierWeapon"
                UnpackTime="0s"                
                PackTime="3s"
                WhichSpecialWeapon="1"
            />
 

 

<SpecialPowerTemplate
        id="SpecialPower_BRD_MultiMissile"
        DisplayName="NAME:SuperweaponTimerIonCannon"
        Description="DESC:SuperweaponTimerIonCannon"
        Flags="HAS_PUBLIC_TIMER IS_PLAYER_POWER FOGGED_SHROUDED_CELLS_OK WATER_OK IGNORE_MAP_EXTENTS SHARED_SYNC"
        ReloadTime="35s"
        TargetType="LOCATION"
        RadiusCursorRadius="30"
        RestrictionType="1"
        EvaEventToPlayWhenSelectingTarget="SelectSpecialPowerTarget"
        EvaEventToPlayOnInitiateOwner="OwnIonCannonActivated"
        EvaEventToPlayOnInitiateAlly="AlliedIonCannonActivated"
        EvaEventToPlayOnInitiateEnemy="EnemyIonCannonActivated"
        TimerImage="Button_PlayerPowerRadarJammingMissile"/>

 

 

<!-- MultiMissile -->
<!-- Main Carrier Missile -->
<WeaponTemplate
           id="BRD_MultiMissileCarrierWeapon"
            Name="BRD_MultiMissileCarrierWeapon"
          AttackRange="99999.0"
          WeaponSpeed="600"
          RadiusDamageAffects="ALLIES ENEMIES NEUTRALS"
          ShotsPerBarrel="1"
          ClipSize="1"
          ReAcquireDetailType="POST_FIRE"
          ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS"
         FireFX="FX_NODMilitantMissileFire"
         AutoReloadsClip="NONE"
         FireSound="NOD_RocketBunkerHub_RocketLaunch"
         AntiMask="ANTI_GROUND"
        >

        <FiringDuration
                MinSeconds="0.5s"
                MaxSeconds="0.5s" />
        <ClipReloadTime
            MinSeconds="30.5s"
            MaxSeconds="30.5s" />

        <Nuggets>
            <ProjectileNugget
                WarheadTemplate="OSR_A10MissileWarhead"
                ProjectileTemplate="BRD_MultiMissileCarrierProjectile">
            
            </ProjectileNugget>
        </Nuggets>
        
    </WeaponTemplate>


<WeaponTemplate
           id="BRD_MultiMissileSplitWeapon"
            Name="BRD_MultiMissileSplitWeapon"
          AttackRange="600.0"
          WeaponSpeed="600"
          RadiusDamageAffects="ALLIES ENEMIES NEUTRALS"
          ShotsPerBarrel="1"
          ClipSize="1"
          ReAcquireDetailType="POST_FIRE"
          ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS"
         FireFX="FX_NODMilitantMissileFire"
         AutoReloadsClip="NONE"
         ScatterIndependently="true"
         ScatterRadius="200"
         FireSound="NOD_RocketBunkerHub_RocketLaunch"
         AntiMask="ANTI_GROUND"
        >

        <FiringDuration
                MinSeconds="0.1s"
                MaxSeconds="0.1s" />
        <ClipReloadTime
            MinSeconds="30.5s"
            MaxSeconds="30.5s" />

        <Nuggets>
            <ProjectileNugget
                WarheadTemplate="OSR_A10MissileWarhead"
                ProjectileTemplate="OSR_RocketProjectile">
            </ProjectileNugget>
            <ProjectileNugget
                WarheadTemplate="OSR_A10MissileWarhead"
                ProjectileTemplate="OSR_RocketProjectile">
            </ProjectileNugget>
            <ProjectileNugget
                WarheadTemplate="OSR_A10MissileWarhead"
                ProjectileTemplate="OSR_RocketProjectile">
            </ProjectileNugget>
            <ProjectileNugget
                WarheadTemplate="OSR_A10MissileWarhead"
                ProjectileTemplate="OSR_RocketProjectile">
            </ProjectileNugget>
            <ProjectileNugget
                WarheadTemplate="OSR_A10MissileWarhead"
                ProjectileTemplate="OSR_RocketProjectile">
            </ProjectileNugget>
        </Nuggets>
        <ScatterRadiusVsType
            Radius="100.0">
            <Filter
                Rule="NONE"
                Include="INFANTRY" />
        </ScatterRadiusVsType>
    </WeaponTemplate>
 

i use a existing warhead for testing...its a basic heavy missile antivehicle warhead...nothing special.

 

 

<!-- Multimissile -->

<GameObject
        id="BRD_MultiMissileCarrierProjectile"
        Side="GDI"
        EditorSorting="SYSTEM"
        KindOf="PROJECTILE SMALL_MISSILE DEFLECT_BY_SPECIAL_POWER NO_COLLIDE HIDE_IF_FOGGED"
        EditorName="BRD_MultiMissileCarrierProjectile">
        <ArmorSet
            Armor="NoArmor" />
        <Draws>
            <ScriptedModelDraw
                id="ModuleTag_ScriptedModelDraw">
                <ModelConditionState
                    ParseCondStateType="PARSE_DEFAULT">
                    <Model
                        Name="FX_OSR_MavrickMissile01" />
                    <ParticleSysBone
                        BoneName="TrailBone02"
                        FXParticleSystemTemplate="OSR_SamMissileTrail"
                        FollowBone="true" />
                    <ParticleSysBone
                        BoneName="TrailBone02"
                        FXParticleSystemTemplate="OSR_SamMissileFlame01"
                        FollowBone="true" />
                    <ParticleSysBone
                        BoneName="TrailBone02"
                        FXParticleSystemTemplate="OSR_SamMissileFlame02"
                        FollowBone="true" />
                </ModelConditionState>
            </ScriptedModelDraw>
        </Draws>
        <Behaviors>
            <FireWeaponWhenDead
                id="ModuleTag_FireWeaponWhenDead"
                InitiallyActive="true"
                ContinueToBezierDestination="true"
                DeathWeapon="BRD_MultiMissileSplitWeapon">
                <DieMuxData
                    DeathTypes="ALL" />
            
            </FireWeaponWhenDead>
            <DestroyDie
                id="ModuleTag_Die">
                <DieMuxData
                    DeathTypes="ALL" />
            </DestroyDie>

             <HeightDieUpdate
             TargetHeight="100"    
             TargetHeightIncludesStructures="true"
              OnlyWhenMovingDown="true"
              />
            <BezierProjectile
                id="ModuleTag_BezierProjectileBehavior"
            FirstHeightMin="250"
                FirstHeightMax="150"
                SecondHeightMin="300"
                SecondHeightMax="200"
                FirstPercentIndent="5"
                SecondPercentIndent="10"
                SidewaysDrift="100"
                FlightPathAdjustDistPerSecond="500"
                GroundHitFX="FX_GDIMissleMiss"
                OrientToFlightPath="true"
                DetonateCallsKill="true"
                />
        </Behaviors>
        <Body>
            <ActiveBody
                id="ModuleTag_ActiveBody"
                MaxHealth="100.0" />
        </Body>
        <Geometry
            IsSmall="true">
            <Shape
                Type="SPHERE"
                MajorRadius="0.8"></Shape>
        </Geometry>
        <VisionInfo
            VisionRange="0" />
    </GameObject>
 

again working of a existing missile i alrdeady had + particle fx...nothing to fancy or special....just ad your own.

 

not including the command/set as i just copied the ones from the ioncannon and reworked/named them to create a new commandbutton, same for the specialpower button...i can post it if need be, but its your basic bread and butter code nothing special...

 

Edited by Ravendark
  • Upvote 1

Share this post


Link to post

The easiest way would be to make it like the nuke where it goes straight up at the launch position and straight down at the target as the time it takes is always equal. With that you can do a LifetimeUpdate that triggers a FireWeaponWhenDead with some scatter.

The other option is to have the carrier rocket basically be an Orca Strike/Armageddon Bomber, just looking like a rocket, then firing the payload at the target with some scatter while killing itself..

I will look into those options.

 

If you can wait a few i dont mind sharing my code with you, i was working on a MultiMissile specialweapon myself.

The idea was to fire 1 large missile from a silo, then if there are smaller targets(vehicles,infantry,basedefenses) near the target zone the missile will detonade midair and spawn several guided(or unguided if you prefer) smaller missiles that home in on the smaller targets, if there are no targets it just strikes the targetzone with its mainbody for a heavy explosion.

 

I put this project on hold abit due..reasons...i experiment to much i guess with other things. Might aswell be a good time to finish it.

I can wait for this, sounds interesting! (you just posted!)

Edited by Madin

Share this post


Link to post

working on a "cooler" version , will update over the weekend or so.

Share this post


Link to post

working on a "cooler" version , will update over the weekend or so.

OK!

Share this post


Link to post

Raven: you have flipped the min/max heights.

                FirstHeightMin="250"
                FirstHeightMax="150"
                SecondHeightMin="300"
                SecondHeightMax="200"
Also I'd suggest setting SecondPercentIndent to something like 99 so it detonates over the target and not a quarter way into the flight.

 

Totally forgot you can set OnlyWhenMovingDown in HeightDieUpdate which is why I didn't have it in my first post. It's imo the best of the 3 options.

Edited by Lauren

Share this post


Link to post

 

Raven: you have flipped the min/max heights.

                FirstHeightMin="250"
                FirstHeightMax="150"
                SecondHeightMin="300"
                SecondHeightMax="200"
Also I'd suggest setting SecondPercentIndent to something like 99 so it detonates over the target and not a quarter way into the flight.

 

Totally forgot you can set OnlyWhenMovingDown in HeightDieUpdate which is why I didn't have it in my first post. It's imo the best of the 3 options.

I tottaly am a numbnuts when it comes to math tbh, i touch bezier curves like ones every a year or so when im fiddling with a artillery unit or something that needs a different bezier curve.

i would love a good explanation on what actually does what of those stings, beats my trial and error method.

 

ps: the curve im using is copied from a missile i used in a Advanced Guardtower attempt i once did....it basicly launched high then rapidly declined on its way towards th target (i didnt want a full topdown hit on the target) hence the less then perfect curve in this example.

Edited by Ravendark

Share this post


Link to post

Early trial nr 2: lockon after split, currently only set to target structures (personaly infantry might be abit spammy on the missiles, things to try target sqauds instead of single units to limit missile spam). downside to this version: spams a misile for every building in range, cant set a fixed number of missiles.

 

  • Upvote 1

Share this post


Link to post

A cubic (which TW uses) bezier curve is defined by 4 points. You already got start and end point set (attacker and victim). It interpolates through all points which results in a more or less smooth curve.

 

Point 1 is defined by FirstPercentIndent, FirstHeightMin, and FirstHeightMax (point 2 with the ones starting with second obviously).

Percent Indent is the relative distance from the attacker to the victim.

The min/max height defines the minimum and maximum height (relative to the ground) of the control point at that coordinate.

So if we've got 2 objects lets say one at (0, 0, 0) and the other at (0, 1, 0) and set FirstPercentIndent to 20, SecondPercentIndent to 80, and Min/Max height of both to 2 the calculation would be:

f(t) = (1 - t) ^ 3 * (0, 0, 0) + 3 * (1 - t) ^ 2 * t * (0, 0.2, 2) + 3 * (1 - t) * t ^ 2 * (0, 0.8, 2) + t ^ 3 * (0, 1, 0)

Share this post


Link to post

Raven sucks at math, Megumi uses Formula...it is super effective :rolleyes:

I think i understand tho.

Share this post


Link to post

Yeah well in short the object goes from point to point but the points between the start and end just give it a rough direction to follow.

Share this post


Link to post

Early trial nr 2: lockon after split, currently only set to target structures (personaly infantry might be abit spammy on the missiles, things to try target sqauds instead of single units to limit missile spam). downside to this version: spams a misile for every building in range, cant set a fixed number of missiles.

 

That is very nice, I would use a non auto lock on version for the multi missile, but the fact that your example spawns a missile for every building in its radius is very interesting, I could see that being useful in the future.

Share this post


Link to post

well the actuall small missiles, you can give that weapon a scatterradius and even a hit% (i think) to give it a more dumbfire aproach after launch, but it would garantee you would atleast fire a missile in the direction of a target and not just scatter them randomly on the target area (like the first version does) also i might have an idea on how to limit the number of missiles fired + give them a semi( if need be) lockon capability.

Share this post


Link to post

The only issue that I am having with your method is that the actual launch looks terrible due to the lack of control that the missile has in C&C3 (the weird weapon scaling over long distances especially).

It really will not do for a relatively large missile launch.

 

However if I try and use the Nuke\Catalyst launch method (animation and OCL created weapon), the 'HeightDie' or 'Lifetimeupdate' methods do not work (the cluster weapon will only travel and detonate in the air, not towards the ground).

This has taken far longer than I thought it would!

Edited by Madin

Share this post


Link to post

Could you post the cluster code?

Share this post


Link to post

Try doing the following:

 

1. Give yoru carrier the <BezierProjectile> module coding and small_missile/missile kindofs....the firewhendeadweapon uses the projectile's flightpath to launch the mini missiles....basicly turn your carrier into a projectile and not just a delivery ocl

 

ill see about coding a ocl based missile strike later this week aswell.

Edited by Ravendark

Share this post


Link to post

What would you actually be happy with?

Do you want to show the carrier missile? Do you want it flying over the map or just coming down? Would you settle for a more realistic MIRV effect, basicly not seeing the main body re-enter but only the cluste projectiles?

Share this post


Link to post

Apologies, it was dumb, me not posting the code.

 

The issue with the Nuke\Catalyst method is that they use a high gravity number to make the missile drop once it is summoned above the target:

 

<GameObject id="NODMultiMissile" Side="NOD" EditorSorting="SYSTEM" KindOf="HIDE_IF_FOGGED NO_COLLIDE INERT NOT_AUTOACQUIRABLE" RadarPriority="UNIT" UnitCategory="AIRCRAFT" EditorName="NODMultiMissile">
 <DisplayName>NODMultiMissile</DisplayName>
 <ArmorSet Armor="ProjectileArmor"/>
<Draws>
<ScriptedModelDraw id="ModuleTag_Draw" OkToChangeModelColor="true">
<ModelConditionState ParseCondStateType="PARSE_DEFAULT">
 <Model Name="NPMultiMissile"/>
 <ParticleSysBone BoneName="FXMultiMis" FXParticleSystemTemplate="NodNukeMissleSmoke" FollowBone="true"/>
 <ParticleSysBone BoneName="FXMultiMis" FXParticleSystemTemplate="NodNukeMissleSmoke" FollowBone="true"/>
 <ParticleSysBone BoneName="FXMultiMis" FXParticleSystemTemplate="NodNukeMissleFire" FollowBone="true"/>
 <ParticleSysBone BoneName="FXMultiMis" FXParticleSystemTemplate="NodNukeMissleFire" FollowBone="true"/>
 </ModelConditionState>
<AnimationState ParseCondStateType="PARSE_DEFAULT">
 <Animation AnimationName="NPMultiMissile" AnimationMode="LOOP"/>
 </AnimationState>
 </ScriptedModelDraw>
 </Draws>
<Behaviors>
 <HeightDieUpdate id="ModuleTag_HeightDieUpdate" TargetHeight="200" OnlyWhenMovingDown="true"/>
<!--<LifetimeUpdate id="ModuleTag_LifetimeUpdate" MinLifetime="1.65s" MaxLifetime="1.75s" xmlns="uri:ea.com:eala:asset" />
 -->
<FXListBehavior id="ModuleTag_FXList">
 <DieMuxData DeathTypes="ALL"/>
 <Event Index="onDeath" FX="FX_GDIAirVehicleExplode"/>
 </FXListBehavior>
<DestroyDie id="ModuleTag_DestroyDie">
 <DieMuxData DeathTypes="ALL"/>
 </DestroyDie>
<FireWeaponWhenDead id="ModuleTag_FireWeaponWhenDead" InitiallyActive="true" DeathWeapon="MultiMissileClusterWeapon">
 <DieMuxData DeathTypes="ALL"/>
 </FireWeaponWhenDead>
<CreateObjectDie id="ModuleTag_CreateTreeCrusher" CreationList="OCL_GenericTreeCrusher">
 <DieMuxData DeathTypes="ALL"/>
 </CreateObjectDie>
 <Physics id="ModuleTag_Physics" GravityMultiplier="4.0"/>
 </Behaviors>
<Body>
 <ActiveBody id="ModuleTag_Body" MaxHealth="10000.0"/>
 </Body>
<Geometry IsSmall="true">
 <Shape Type="CYLINDER" MajorRadius="7.0" Height="20.0"/>
 </Geometry>
<AudioArraySound>
 <AudioEntry Sound="NOD_NuclearMissile_Incoming" AudioType="soundAmbient"/>
 </AudioArraySound>
 </GameObject>

Having looked at the RA3 cluster code (V4), that also uses a method similar to yours, ie they all use the 'BezierProjectile' code on both the carrier and cluster missile.

 

Here is my cluster mini missiles:

<GameObject id="MultiMissileClusterWeaponProjectile" EditorSorting="SYSTEM" KindOf="PROJECTILE SMALL_MISSILE DEFLECT_BY_SPECIAL_POWER NO_COLLIDE HIDE_IF_FOGGED" EditorName="MultiMissileClusterWeaponProjectile">
 <ArmorSet Armor="NoArmor"/>
<Draws>
<ScriptedModelDraw id="ModuleTag_ScriptedModelDraw">
<ModelConditionState ParseCondStateType="PARSE_DEFAULT">
 <Model Name="NPSamMissile"/>
 <ParticleSysBone BoneName="NONE" FXParticleSystemTemplate="SamMissileTrailSmoke" FollowBone="true"/>
 <ParticleSysBone BoneName="NONE" FXParticleSystemTemplate="SamMissileTrailSmokeDistortion" FollowBone="true"/>
 <ParticleSysBone BoneName="NONE" FXParticleSystemTemplate="SamMissileExhaustFire" FollowBone="true"/>
 <ParticleSysBone BoneName="NONE" FXParticleSystemTemplate="SamMissileExhaustFireDistort" FollowBone="true"/>
 </ModelConditionState>
 </ScriptedModelDraw>
 </Draws>
<Behaviors>
<FXListBehavior id="ModuleTag_FXLists">
 <DieMuxData DeathTypes="ALL"/>
 <Event Index="onDeath" FX="FX_Madin_MultiMissleExplosion"/>
 </FXListBehavior>
<DestroyDie id="ModuleTag_DestroyDie">
 <DieMuxData DeathTypes="ALL"/>
 </DestroyDie>
 <BezierProjectile id="ModuleTag_BezierProjectileBehavior" FirstHeightMin="0" FirstHeightMax="0" SecondHeightMin="0" SecondHeightMax="0" FirstPercentIndent="33" SecondPercentIndent="66" OrientToFlightPath="true" DetonateCallsKill="true" GroundHitFX="FX_Madin_MultiMissleExplosion"/>
 </Behaviors>
<Body>
 <ActiveBody id="ModuleTag_ActiveBody" MaxHealth="100.0"/>
 </Body>
<Geometry IsSmall="true">
 <Shape Type="SPHERE" MajorRadius="0.8"/>
 </Geometry>
 <VisionInfo VisionRange="0"/>
 </GameObject>

Here is the cluster weapon code (note the main weaponability code is simple a weapon OCL nugget):

<WeaponTemplate id="MultiMissileClusterWeapon" Name="MultiMissileClusterWeapon" WeaponSpeed="300" FireSound="NOD_TSSAMSite_RocketLaunch" ClipSize="1" ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS" AutoReloadsClip="NONE" ScatterIndependently="true" ScatterRadius="200" NoVictimNeeded="true" HitPercentage="0%">
 <FiringDuration MinSeconds="1s" MaxSeconds="1s"/>
<Nuggets>
 <ProjectileNugget WarheadTemplate="MultiMissileClusterWeaponWarhead" ProjectileTemplate="MultiMissileClusterWeaponProjectile"/>
 <ProjectileNugget WarheadTemplate="MultiMissileClusterWeaponWarhead" ProjectileTemplate="MultiMissileClusterWeaponProjectile"/>
 <ProjectileNugget WarheadTemplate="MultiMissileClusterWeaponWarhead" ProjectileTemplate="MultiMissileClusterWeaponProjectile"/>
 <ProjectileNugget WarheadTemplate="MultiMissileClusterWeaponWarhead" ProjectileTemplate="MultiMissileClusterWeaponProjectile"/>
 <ProjectileNugget WarheadTemplate="MultiMissileClusterWeaponWarhead" ProjectileTemplate="MultiMissileClusterWeaponProjectile"/>
 <SuppressionNugget Radius="300.0" Suppression="50" DurationSeconds="2s"/>
 </Nuggets>
 </WeaponTemplate>
<WeaponTemplate id="MultiMissileClusterWeaponWarhead" Name="MultiMissileClusterWeaponWarhead" ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS NOT_SIMILAR">
<Nuggets>
<DamageNugget Damage="2500.0" Radius="150.0" DelayTimeSeconds="0s" DamageType="GRENADE" DeathType="EXTRA_3">
<DamageScalarDetails Scalar="50%">
 <Filter Rule="NONE" Include="TIBERIUM"/>
 </DamageScalarDetails>
 </DamageNugget>
 </Nuggets>
 </WeaponTemplate>

====================================================================

 

A simple explanation for what I want is this. I want to have what I currently have, an animated missile launch (because it is animated, I can simulate the missile accelerating), but still have a working cluster missile spilt at the actual target.

 

I am thinking of trying Lauren's idea of using a 'StrafeAreaUpdate' on a missile that will appear high above the target, and either have a high gravity value, or if possible using the 'DivingFloor' attribute to get the missile close in, in combination with either a 'hieghtdie' or 'lifetimeupdate'.

Edited by Madin

Share this post


Link to post

the problem with the divingfloor is that it doesnt account for hills and cliffs..you might be having a hardtime with the heighdieupdate with that.

 

Another idea:

 

Have the ocl spawn 2 things:

* the cluster carrier missile with a heightupdate and a deadweapon.

* several ground based dummies that have a verry special kindof(either create a new one in the schematics or use a obscure one like wall_gate or castle or such thing), if you want6 cluster missiles make 6 dummies..in the ocl make them spawn scattered(maybe there is some code in there to spawn randomly..im not that familiar with the objectcreationlist)

 

make your deathweapon something like this:

 

 

<WeaponTemplate
        id="BRD_Targeting_MultiM_Weapon"
        Name="BRD_Targeting_MultiM_Weapon"
        >
        
        <Nuggets>
            <FireOnObjectsNugget
                Radius="300.0"
                Weapon="BRD_MultiMissileSplitWeapon">
            <Filter
                    Rule="NONE"
                    Include="STRUCTURE"/> /** from experimenting you can only set 1 kindof in here, adding another wont work
                
            </FireOnObjectsNugget>
            
        </Nuggets>
    </WeaponTemplate>
 

altho i use STRUCTURE as a kindof, this will only target structures, if you set a unique kindof matching the dummies it will fire on the dummies instead, matching more closely to your none lockon requirement....depending on the number of dummies you spawn, their disposition , you can match a cluste strike. Only thing you need to do is remove the followbezier component from the previous deadweapon coding...bezier doesnt work with gravity idd.

 

BRD_MultiMissileSplitWeapon would be your actuall mini missile with its warhead.

Share this post


Link to post

also regarding the stafe thing..you might be able to use the projectileself inweapon code to have it work as both carrier and projectile for the strafe specialpower...altho iirc you cant trigger that from the strafeweaponupdate...you might have to set a weaponslotweapon for that.....

Edited by Ravendark

Share this post


Link to post

My take on it would be something like this,

just needs more pep, maybe make the launch an animation, use that when the sp is triggered and delay the spawn for that time.

 

 

If you want the relevant code I'll post it.

Also note the acceleration of the cluster rockets. Also it doesn't use LifeTimeUpdate nor HeightDie.

Edited by Lauren
  • Upvote 1

Share this post


Link to post

My take on it would be something like this,

just needs more pep, maybe make the launch an animation, use that when the sp is triggered and delay the spawn for that time.

 

 

If you want the relevant code I'll post it.

Also note the acceleration of the cluster rockets. Also it doesn't use LifeTimeUpdate nor HeightDie.

Yes please, I would like to see the code!

Share this post


Link to post

NODTempleOfNOD.xml

<?xml version="1.0" encoding="UTF-8"?>

<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xai="uri:ea.com:eala:asset:instance">

 

<Includes>

<Include

type="instance"

source="DATA:NOD/Structures/NODTempleOfNOD.xml" />

</Includes>

 

<GameObject

id="NODTempleOfNOD"

inheritFrom="NODTempleOfNOD">

<Behaviors>

<OCLSpecialPower

id="ModuleTag_NuclearMissile"

xai:joinAction="Overwrite"

SpecialPowerTemplate="SpecialPowerNuclearMissile"

AvailableAtStart="false"

OCL="OCL_NODNukeSeed"

CreateLocation="CREATE_AT_EDGE_NEAR_SOURCE" />

<WeaponFireSpecialAbilityUpdate

id="ModuleTag_NuclearMissileUpdate"

xai:joinAction="Remove" />

</Behaviors>

</GameObject>

 

</AssetDeclaration>

OCL.xml
<?xml version="1.0" encoding="UTF-8" ?>

<AssetDeclaration xmlns="uri:ea.com:eala:asset">

 

<ObjectCreationList

id="OCL_NODNukeSeed">

<CreateObject

Options="IGNORE_ALL_OBJECTS ISSUE_MOVE_AFTER_CREATION MOVE_USES_STRAFE_UPDATE MOVE_TARGET_USES_DISPOSITION_OFFSET"

Disposition="SPAWN_AROUND"

DispositionIntensity="100"

DispositionAngle="180d"

Count="1">

<Offset

x="0"

y="0"

z="50" />

<CreateObject>NODNukeSeed</CreateObject>

</CreateObject>

</ObjectCreationList>

 

</AssetDeclaration>

NODNukeSeed.xml
<?xml version="1.0" encoding="UTF-8"?>

<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xai="uri:ea.com:eala:asset:instance">

 

<Includes>

<Include

type="instance"

source="DATA:NOD/Units/NODArmageddonBomber.xml" />

</Includes>

 

<GameObject

id="NODNukeSeed"

inheritFrom="NODArmageddonBomber"

KindOf="PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SCORE AIRCRAFT VEHICLE TRANSPORT SUMMONED">

<Behaviors>

<StrafeAreaUpdate

id="ModuleTag_StrafeArea"

WeaponName="NuclearMissileStageTwo"

PreattackDistance="10"

Radius="0"

MinRadius="0"

ShotsToFirePerFrame="1" />

</Behaviors>

<AI>

<JetAIUpdate

id="ModuleTag_AI"

xai:joinAction="Overwrite"

AutoAcquireEnemiesWhenIdle="NO"

NeedsRunway="false"

AILuaEventsList="GDIOrcaAirstrikeEventsList">

<LockonInfo />

</JetAIUpdate>

</AI>

<Body>

<ActiveBody

id="ModuleTag_Body"

xai:joinAction="Overwrite"

MaxHealth="4000" />

</Body>

<EvaEvents

xai:joinAction="Remove" />

</GameObject>

 

</AssetDeclaration>

Weapon.xml
<?xml version="1.0" encoding="UTF-8" ?>

<AssetDeclaration xmlns="uri:ea.com:eala:asset">

 

<WeaponTemplate

id="NuclearMissileStageTwo"

Name="NuclearMissileStageTwo"

ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS"

RadiusDamageAffects="SELF ALLIES ENEMIES NEUTRALS"

AttackRange="50000.0"

MinWeaponSpeed="50"

MaxWeaponSpeed="250"

ScaleWeaponSpeed="true"

ScatterRadius="100"

ScatterIndependently="true"

NoVictimNeeded="true"

BombardType="true">

<Nuggets>

<ProjectileNugget

WarheadTemplate="NuclearMissileStageThree"

ProjectileTemplate="NODAttackBikeRocketProjectile_Veteran" />

<ProjectileNugget

WarheadTemplate="NuclearMissileStageThree"

ProjectileTemplate="NODAttackBikeRocketProjectile_Veteran" />

<ProjectileNugget

WarheadTemplate="NuclearMissileStageThree"

ProjectileTemplate="NODAttackBikeRocketProjectile_Veteran" />

<ProjectileNugget

WarheadTemplate="NuclearMissileStageThree"

ProjectileTemplate="NODAttackBikeRocketProjectile_Veteran" />

<ProjectileNugget

WarheadTemplate="NuclearMissileStageThree"

ProjectileTemplate="NODAttackBikeRocketProjectile_Veteran" />

<ProjectileNugget

WarheadTemplate="NuclearMissileStageThree"

ProjectileTemplate="NODAttackBikeRocketProjectile_Veteran" />

<ProjectileNugget

WarheadTemplate="NuclearMissileStageThree"

ProjectileTemplate="NODAttackBikeRocketProjectile_Veteran" />

<ProjectileNugget

WarheadTemplate="NuclearMissileStageThree"

ProjectileTemplate="NODAttackBikeRocketProjectile_Veteran" />

<ProjectileNugget

WarheadTemplate="NuclearMissileStageThree"

ProjectileTemplate="NODAttackBikeRocketProjectile_Veteran" />

<DamageNugget

OnlyKillOwnerWhenTriggered="true" />

</Nuggets>

</WeaponTemplate>

 

<WeaponTemplate

id="NuclearMissileStageThree"

Name="NuclearMissileStageThree"

ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS"

RadiusDamageAffects="SELF ALLIES ENEMIES NEUTRALS"

AttackRange="50000.0">

<Nuggets>

<DamageNugget

Damage="200"

DamageTaperOff="50"

Radius="50"

DamageType="CANNON"

DeathType="DETONATED" />

</Nuggets>

</WeaponTemplate>

 

<WeaponTemplate

id="NuclearMissileStageFour"

Name="NuclearMissileStageFour"

ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS"

RadiusDamageAffects="SELF ALLIES ENEMIES NEUTRALS"

AttackRange="50000.0">

<Nuggets>

<MetaImpactNugget

ShockWaveAmount="50"

ShockWaveRadius="50"

ShockWaveTaperOff="10"

ShockWaveSpeed="0"

ShockWaveZMult="1.2"

ShockwaveDelaySeconds="0.1s"

ShockWaveClearRadius="true"

ShockWaveClearFlingHeight="25"

ShockWaveClearWaveMult="2" />

</Nuggets>

</WeaponTemplate>

 

</AssetDeclaration>

These are the important ones.
  • Upvote 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×