Jump to content
Sign in to follow this  
Ravendark

Brainstorm about Aircraft fuel and Reloading.

Recommended Posts

So i've been wrestling with this idea of changing how aircraft/choppers handle their ammo and return to base and re arm logic.

 

The idea was:

Create a fake Weapon that will use the ammo pips to simulate fuel reserves.

Have that weapon "consume" fuel/ammo when ever it attacks something instead of the actuall weapons using up ammo.

When it runs out of "fuel" it disengages and goes back to its landing pad to rearm/refuel.

 

The above is rather easy to do...real weapon just autoreload clips as needed(adjust volleys,speed and power for basicly unlimited ammo), fake fuel weapon does 0 dmg but its fire speed and clipsize mimic that of fuel capacity and consumption.

 

The issues that have come up so far:

* The aircraft doesnt respect its out of fuel(ammo) state for the fuel weapon...it will use its other (no ammo) weapons inthil the target = destroyed and sometimes thill no hostiles are near it anymore.

even setting

UseForOutOfAmmoCheck
 

in the jetai and setting it to the fuelweapon doesnt make it stop attacking with its other weapons.

 

Things im wondering about and will prob try out over the next days:

 

Could the modelcondition: Reloading or Reloading_A or maybe inbetween_shots, etc be used to prevent the actuall weapons from firing

 

example by using:

 

ForbiddenFiringObjectStatus="RELOADING_A"
 

in the actuall weapons.

 

Now, on it self mimicing a fuelweaponthingy...not that usefull. What i actually was hoping on getting to work:

 

If i could get the fuelweapon to fire constantly....at nothing or a dummy object(like a invisible drone that follows the aircraft closely), it would use the ammo pips to simulate fuel consumption. The cool thing that should be possible then: Give the aircraft a attribute modifier thaqt increases rate of fire during a supercruise or afterburner ability and you could increase fuelconsumption making fuel a tactical resource when moving aircraft far acros a map or far fast across a map with afterburner/supercruise like abilities. You could get there faster at higher fuel cost thus limiting the time to actuall attack before needing to rearm/refuel.

 

If anyone is interested in helping/ brainstorming about this idea....feel free to post or help.

 

Share this post


Link to post

So i've been wrestling with this idea of changing how aircraft/choppers handle their ammo and return to base and re arm logic.

 

The idea was:

Create a fake Weapon that will use the ammo pips to simulate fuel reserves.

Have that weapon "consume" fuel/ammo when ever it attacks something instead of the actuall weapons using up ammo.

When it runs out of "fuel" it disengages and goes back to its landing pad to rearm/refuel.

 

The above is rather easy to do...real weapon just autoreload clips as needed(adjust volleys,speed and power for basicly unlimited ammo), fake fuel weapon does 0 dmg but its fire speed and clipsize mimic that of fuel capacity and consumption.

 

The issues that have come up so far:

* The aircraft doesnt respect its out of fuel(ammo) state for the fuel weapon...it will use its other (no ammo) weapons inthil the target = destroyed and sometimes thill no hostiles are near it anymore.

even setting

UseForOutOfAmmoCheck
 

in the jetai and setting it to the fuelweapon doesnt make it stop attacking with its other weapons.

You see has a gamer, I would not expect this to be any different. The Nod Vertigo has the dual set up you describe (One limited ammo weapon, one unlimited), and there is no way from a gameplay perspective that I would want the aircraft returning to base to refill its limited ammo weapon, while it was engaging targets that could be hit by the unlimited weapon.

So I am basically saying that I believe that the above behaviour is correct, and that the 'UseForOutOfAmmoCheck' attribute would not have the eefct you desire in that situation.

 

In terms of getting the basics of what you desire to work, if you use a 'PRIMARY', 'SECONDARY' weapon set-up for your dual system (like the Nod Vertigo), then theoretically it should be relatively simple to lock the usage of the unlimited weapon once the ammo is depleted on the limited weapon (using your ForbiddenFiringObjectStatus="RELOADING_A" idea).

 

This is certainly interesting, although has you probably know, there is a number of code items that do not work, or are broken within the weapon template code. For complicated weapon coding, I would attempt to do has much has possible using LUA.

Share this post


Link to post

when i get a chance to work on this somewhere over or after the weekend i will need to test the following:

 

*try the basic realweapon(no ammo) + fakefuelweapon(ammo) and see if i can disable the realweapon with the fuel one when out of ammo.

things to consider:

-does the Reloading condition go in effect when the ammo(fuel) is spend or when the aircraft lands on the helipad, if its the lather i might have to do this in lua aswell and use the clipempty event to block the real weapon... maybe.

 

*if the above is feasable, start thinking on a way to get the fuel weapon to auto aquire a fake target (even when no enemies are present) to mimic the consumption of fuel.

-off the top of my head: Maybe spawn a drone , use lua to turn it hostile(creep?) (would hostile drones still follow the spawner?) , maybe just poop out invisible dummies that can only be targeted by the fuel weapon...look at visceroid code maybe for turning hostile on creation?(atribute status= dessident or how it was called again). visceroid like dummies have high health, but life time to prevent dumping the map and memory full of dummies over time...fuel weapon has infinite range so it can target any dummy even if the dummy isnt following it ?

Share this post


Link to post

You can set an autofire behavior thingy to your fuel weapon.

Also it might be possible instead of using pips to have a special power being used, and showing a progress bar, which at completion empties the weapon or to use return to base or something. Via lua you can auto trigger it if the aircraft takes flight (might get harder if you want it for ground stuff, maybe set the lua to when it's loosing its docking state).

Edited by Lauren

Share this post


Link to post

You can set an autofire behavior thingy to your fuel weapon.

Did you mean the AutoAbilityBehavior module? else im kindof at a loss on where to find/use a autofire behavior...didnt find anything related to that in either weapon or weaponset/slot coding yet.

 

 

Also it might be possible instead of using pips to have a special power being used, and showing a progress bar, which at completion empties the weapon or to use return to base or something. Via lua you can auto trigger it if the aircraft takes flight (might get harder if you want it for ground stuff, maybe set the lua to when it's loosing its docking state).

am i assuming correctly that you mean the weaponfirespecialability module?

 

<xs:complexType name="WeaponFireSpecialAbilityUpdateModuleData">
        <xs:complexContent>
            <xs:extension base="SpecialAbilityUpdateModuleData">
                <xs:sequence>
                </xs:sequence>
                <xs:attribute name="SpecialWeapon" type="WeaponRef" />
                <xs:attribute name="WhichSpecialWeapon" type="SageInt" default="0" />
                <xs:attribute name="SkipContinue" type="SageBool" default="false" />
                <xs:attribute name="BusyForDuration" type="Time" default="0s" />
                <xs:attribute name="NeedLivingTargets" type="SageBool" default="false" />
                <xs:attribute name="PlayWeaponPreFireFX" type="SageBool" default="false" />
                <xs:attribute name="OffsetTargetLocationFromObject" type="SageBool" default="false" />
                <xs:attribute name="WeaponSlotID" type="SageInt" default="1" />
                <xs:attribute name="WeaponSlotType" type="WeaponSlotType" default="PRIMARY_WEAPON" />
                <xs:attribute name="DestealthClosestObjectMatchingFilter" type="SageBool" default="false"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
 

If i use this then i will not be able to use ammo pips because you have to reference the specialweapon outside of the units weaponslots? like the orca stickypodmissile thing or the juggernaughts bombardment?

Thats where progres bar comes in then?

And show that progress bar by using:

 

Options="SHOW_PREPARATION_PROGRESS
 

that about right?

 

edit: might not even need a fuel weapon with that if im starting to understand it correctly....at the end of the preperation time you basicly trigger the return to producer specialpower?

Edited by Ravendark

Share this post


Link to post

One of the reason i would like a more "conservative" ammopip/weaponslot fuelweapon is to be able to apply atribute modifiers to it, or even upgrade it (upgrade fuel tank or veterancy increases clipsize by upgrading the weapon and thus flight time, damage states could also increase fuel consumption etc). Using specialpowers might not allow for any of that enless im wrong?

Share this post


Link to post

In terms of having the fuel weapon fire on something, I would also look at the 'NoVictimNeeded' attribute in the weapon template.

 

I believe that this was used quite a bit in BFME for a variety of leaps and death animations, that played and could hit, but did not necessarily hit (like the Balrog leap, or troll death animations).

 

I have no experience using this code, but there should be some information from BFME modders (obviously the idea here is that you do not need to go to the bother of creating dummy targets etc).

Share this post


Link to post

If you will look closer on WeaponFireSpecialAbilityUpdate you will see it actually has settings to select a weapon slot, which would mean it would consume ammo out of this slot iirc.

Share this post


Link to post

If you will look closer on WeaponFireSpecialAbilityUpdate you will see it actually has settings to select a weapon slot, which would mean it would consume ammo out of this slot iirc.

That idea crossed my mind aswell, but how its used so far in TW seems to indicate its more about using the id and weaponslot to select the launchbone...But it might idd be something to try out....even if it doesnt work for this littleproject it might be interesting for a rocketpod/barage like weapon of sorts, where you have a consistent normal firemode and a volley fire special ability of the same weapon.

 

In terms of having the fuel weapon fire on something, I would also look at the 'NoVictimNeeded' attribute in the weapon template.

 

I believe that this was used quite a bit in BFME for a variety of leaps and death animations, that played and could hit, but did not necessarily hit (like the Balrog leap, or troll death animations).

 

I have no experience using this code, but there should be some information from BFME modders (obviously the idea here is that you do not need to go to the bother of creating dummy targets etc).

interesting...will have a look at that.

Share this post


Link to post

I can get a rudementary effect working....but the real hung up seems to be the fireweaponupdate

 

What i have so far:

 

My special power:

 

 

<SpecialPowerTemplate
        id="SpecialPower_StartUsingFuel"
        ReloadTime="0s"        
        TargetType="NONE" >
        <GameDependency
            ForbiddenModelConditions="LOCOMOTOR_TAXIING"
            RequiredModelConditionsAny="MOVING ATTACKING" />
        
</SpecialPowerTemplate>
 

Thinking...Not have it fire when on a helipad by using the TAXI conditionstate. Only have it fire/usefuel when moving or attacking...hovering idle doesnt consume fuel.

 

My Weaponfireupdate in my unit:

 

 

<SpecialPower
                id="ModuleTag_SpecialPower_StartFuelUse"
                SpecialPowerTemplate="SpecialPower_StartUsingFuel"
                UpdateModuleStartsAttack="true" />
            <WeaponFireSpecialAbilityUpdate
                id="ModuleTag_SpecialPower_StartUsingFuel_Update"
                SpecialPowerTemplate="SpecialPower_StartUsingFuel"
                UnpackTime="0.0s"
                PackTime="0.0s"
                PersistentPrepTime="0.1s"
                StartAbilityRange="100000.0"
                BusyForDuration="0s"
                Options="CHECK_SPECIALPOWER_REQUIREMENTS_DURING_UPDATE"
                WeaponSlotID="1"
                WeaponSlotType="PRIMARY_WEAPON" />
 

My eventlist:

And this is where i might be going wrong...my scripting is still meh :(

 

 

<ModelConditionEvent Name="StartUsingFuel">
            <Conditions>-LOCOMOTOR_TAXIING +MOVING +ATTACKING</Conditions>
</ModelConditionEvent>

<EventList Name="OSR_New_OrcaFunctions" Inherit="BaseScriptFunctions">
        <EventHandler EventName="OnClipEmpty"    ScriptFunctionName="On_OSR_New_OrcaClipEmpty" DebugSingleStep="false"/>
        <EventHandler EventName="OnClipFull"    ScriptFunctionName="On_OSR_New_OrcaClipFull" DebugSingleStep="false"/>
        <EventHandler EventName="StartUsingFuel"    ScriptFunctionName="StartUsingFuelFunction01" DebugSingleStep="false"/>
        
</EventList>
 

I might be totaly wrong in assuming that + means modelstate is active and - is inactive..so my thinking was -LOCOMOTOR_TAXIING = when not on the helipad, and +MOVING +ATTACKING means when those conditions are active.

Not sure if i need to Make a ModelConditionEvent for:

-TAXIING

-TAXIING +MOVING

-TAXIING +ATTACKING

-TAXIING +MOVING +ATTACKING

instead of only having one eventlist

 

My lua:

 

 

function On_OSR_New_OrcaClipEmpty(self)
    ObjectDoSpecialPower( self, "SpecialPowerReturnToProducer" )
    ObjectHideSubObjectPermanently( self, "MissileRack", true )
end

function On_OSR_New_OrcaClipFull(self)
    ObjectHideSubObjectPermanently( self, "MissileRack", false )
end

function StartUsingFuelFunction01(self)
    ObjectDoSpecialPower( self, "SpecialPower_StartUsingFuel" )
end
 

 

My biggest doubts so far are either that my weaponfireupdate is missing something and/or that my use of the eventlist is totaly off.

Edited by Ravendark

Share this post


Link to post

My eventlist:

And this is where i might be going wrong...my scripting is still meh :(

 

 

<ModelConditionEvent Name="StartUsingFuel">
            <Conditions>-LOCOMOTOR_TAXIING +MOVING +ATTACKING</Conditions>
</ModelConditionEvent>

<EventList Name="OSR_New_OrcaFunctions" Inherit="BaseScriptFunctions">
        <EventHandler EventName="OnClipEmpty"    ScriptFunctionName="On_OSR_New_OrcaClipEmpty" DebugSingleStep="false"/>
        <EventHandler EventName="OnClipFull"    ScriptFunctionName="On_OSR_New_OrcaClipFull" DebugSingleStep="false"/>
        <EventHandler EventName="StartUsingFuel"    ScriptFunctionName="StartUsingFuelFunction01" DebugSingleStep="false"/>
        
</EventList>
 

I might be totaly wrong in assuming that + means modelstate is active and - is inactive..so my thinking was -LOCOMOTOR_TAXIING = when not on the helipad, and +MOVING +ATTACKING means when those conditions are active.

Not sure if i need to Make a ModelConditionEvent for:

-TAXIING

-TAXIING +MOVING

-TAXIING +ATTACKING

-TAXIING +MOVING +ATTACKING

instead of only having one eventlist

 

My lua:

 

 

function On_OSR_New_OrcaClipEmpty(self)
    ObjectDoSpecialPower( self, "SpecialPowerReturnToProducer" )
    ObjectHideSubObjectPermanently( self, "MissileRack", true )
end

function On_OSR_New_OrcaClipFull(self)
    ObjectHideSubObjectPermanently( self, "MissileRack", false )
end

function StartUsingFuelFunction01(self)
    ObjectDoSpecialPower( self, "SpecialPower_StartUsingFuel" )
end
 

 

My biggest doubts so far are either that my weaponfireupdate is missing something and/or that my use of the eventlist is totaly off.

The model condition event is very useful for when you want a scripted reaction from an absolute set of model conditions.

Your set up requires that both the 'MOVING' and 'ATTACKING' model conditions are active (and that the 'LOCOMOTOR_TAXIING' is not active), in order to trigger.

 

At this point the issue is that I am also not so good when it comes to LUA scripting, however for the flexible kind of scripting that you require (were multiple combinations of model conditions can trigger the same reaction) I would use the 'ObjectTestModelCondition' within LUA itself.

 

Actually it is probably best that a proper coder helps you, I do not want to start misleading you.

Also I am not sure that the 'OnClipEmpty' script is that helpful in multi weapon set ups.

Edited by Madin

Share this post


Link to post

So i tried with adding

 

 

<ModelConditionEvent Name="StartUsingFuel1">
            <Conditions>-LOCOMOTOR_TAXIING</Conditions>
        </ModelConditionEvent>
        <ModelConditionEvent Name="StartUsingFuel2">
            <Conditions>-LOCOMOTOR_TAXIING +MOVING +ATTACKING</Conditions>
        </ModelConditionEvent>
        <ModelConditionEvent Name="StartUsingFuel3">
            <Conditions>-LOCOMOTOR_TAXIING +ATTACKING</Conditions>
        </ModelConditionEvent>
        <ModelConditionEvent Name="StartUsingFuel4">
            <Conditions>-LOCOMOTOR_TAXIING +MOVING</Conditions>
        </ModelConditionEvent>

<EventList Name="OSR_New_OrcaFunctions" Inherit="BaseScriptFunctions">
        <EventHandler EventName="OnClipEmpty"    ScriptFunctionName="On_OSR_New_OrcaClipEmpty" DebugSingleStep="false"/>
        <EventHandler EventName="OnClipFull"    ScriptFunctionName="On_OSR_New_OrcaClipFull" DebugSingleStep="false"/>
        <EventHandler EventName="StartUsingFuel1"    ScriptFunctionName="StartUsingFuelFunction01" DebugSingleStep="false"/>
        <EventHandler EventName="StartUsingFuel2"    ScriptFunctionName="StartUsingFuelFunction01" DebugSingleStep="false"/>
        <EventHandler EventName="StartUsingFuel3"    ScriptFunctionName="StartUsingFuelFunction01" DebugSingleStep="false"/>
        <EventHandler EventName="StartUsingFuel4"    ScriptFunctionName="StartUsingFuelFunction01" DebugSingleStep="false"/>
    </EventList>
 

The result was weird, hilarious yet disheartening. My aircraft just slides across the map floor, cant even attack anymore.

 

I was thinking of using Testmodelcondition...but im unsure on what event to use to trigger the function. Oncreate only gets evaluated at start, the other internal events dont look apealing either...no idea if or how Ongeneric event could work.

A thought might be, to use the ondamaged event, have a building or any building constantly use a fireweaponupdate that only targets aircraft with 1dmg+1heal and use that to trigger the function dospecialpower inside the ondamaged event.

 

Ye the empty clip event seems a bust...the problem is even with a empty fuelclip the aircraft keeps attacking....not asmuch on a direct attackcommand but after a moveorder and it engages it keeps hanging thill the target is death. So i really would need a way to disable my actuall weapons....and i noticed relaoding doesnt trigger inthill it has returned to base. If there were some way to define a emptyclip/outofammo modelcondition or even better objectstatus for a particular weapon or weaponslot it would be handy.

 

Abit of a segway conserning OnClipEmpty....if i would just give the aircraft ONLY the fuelweapon....is there a way in TW to split the actuall weapons up in different units attached or linked to the aircraft...im thinking like the overlord tank in general had a gtling turret, the turret basicly was a different draw or another unit that ride on top of the overlord...that way it could work alot simpler...when the ONLY weapon it has is empty it goes to rearm that being the fakefuelweapon.

Edited by Ravendark

Share this post


Link to post

Do you have the fuel weapon auto firing?

 

If yes then I can probably try and work something out.

Share this post


Link to post

Nope..kindof did a rollback.

 

At the moment im back to basic:

 

got 3 weapons set up..all on different ID's and all set as primary: Tried messing arround with id grouping and interleave allowance etc...but keeping all 3 weapons on different weaponslot id's (turreted gun, weaponslot missile and turreted fakefuelweapon) seem to work better...the fuelweapon basicly doesnt do dmg or neough dmg so it seems that when its secondary or primary with another weapon, weapon ai chooses not to fire it because of lowest dmg....or atleast it looks like that.

 

The effect is the following so far:

 

Attack order on target: when the fuel weapon is empty the aircraft will RTB.

Hanging still and then engaging a enemy that enters within range: when the fuel weapon is empty the aircraft will RTB.

 

The not working so well part:

Attack/move command: will engage a target that comes within range, but wont RTB when fuel clip is empty, will kill target with gun or missile, then RTB

Moving order near a enemy...will not RTB thill all targets are killed.

 

In the last 2 cases overriding their current attacks by giving a move order or attack order makes it RTB.

 

Thinking of focussing on finding a way to prevent weapon usage when fuel clip is empty.

Edited by Ravendark

Share this post


Link to post

I am starting to think the fuel idea might be heading towards a bust.

 

I managed to finaly...finaly...get my other weapons to stop firing when im out of "fuel ammo" for my fakefuelweapon. The problem is the aircraft still doesnt RTB...it just hovers there doing nothing.

It will how ever rtb if:

 

1. It was a direct attackcommand.

 

2. It auto engages the enemy if the enemy enters its vision/weaponrange when it is hanging still first.

 

It wont work if itself apraoches within weaponrange after a move or force move/attack order. under these conditions it will keep attacking thill the fuel weapon clip is empty...then it will disable its other weapons but wont go rearm/refuel..it just hovers there. even if it kills all the enemies in range or a new ones aproaches...will just hang there and do nothing.

 

Might put this idea in the fridge for the time being.

Share this post


Link to post

Might be able by using the Generic Event thing in lua (if you get the right event) and then specifically let it use ObjectDoSpecialPower(self, "SpecialPowerReturnToProducer")

function OnAircraftGenericEvent(self, data)

local str = tostring(data)

if str == "something" then

ObjectDoSpecialPower(self, "SpecialPowerReturnToProducer")

end

end

Edited by Lauren

Share this post


Link to post

Finding the right event might be the problem.

 

Basicly it needs to be an event that fires the moment Weapon ID 1 or Primary weapon its clip is empty....i tried with the OnClipEmpty event....but that seems to not work well with multiple weapons. (might come back to that later again as i updated my current code abit)

 

It is hard to find a single condition or status that can trigger that. Relaoding only seems to happen after it lands..so any modelcondition or status that has anythig involving relaoding reacts to late basicly.

 

atm im using this:

 

  <ModelConditionEvent Name="UnLockWeaponsEvent">
            <Conditions>+WEAPONSLOTID_01 +PREATTACK_A -FIRING_A</Conditions>
        </ModelConditionEvent>
        <ModelConditionEvent Name="LockWeaponsEvent">
            <Conditions>+WEAPONSLOTID_01 +FIRING_A -PREATTACK_A</Conditions>
        </ModelConditionEvent>
 

true lua i use those events to trigger a upgrades that switch WEAPON_UPGRADED_01 on and off in my real weapons....basicly my real weapons fire during the pre attack build up time....when my fuel clip is empty it stops pre attacking and basicly that removes WEAPON_UPGRADED_01 wich my weapons need to fire. This works as described in previous post. i basicly have like 5 fuel pips wich loose one fuel every 6 seconds or so..so thats 30 sec of airtime to for testing purpose.

 

lua:

 

 

function UnLockWeaponsFunction(self)
    ObjectGrantUpgrade( self, "Upgrade_UnLockWeapons" )
    ObjectRemoveUpgrade( self, "Upgrade_LockWeapons" )
end
function LockWeaponsFunction(self)
    ObjectGrantUpgrade( self, "Upgrade_LockWeapons" )
    ObjectRemoveUpgrade( self, "Upgrade_UnLockWeapons" )
end
 

and then use a statisbitupgrade in my unit to trigger the weaponset status. (i realise i might have some redundancy in my grant upgrades...needs tuning i guess)

 

Also replacing preattack and firingA with USING_WEAPON_A might work aswell and simply it abit. Assuming USING_WEAPON_A means im in effect aslong as either pre,fire or reloading A is being done.

 

What im at a loss on is telling it:

 

what to do when the clip of a specific weapon is empty.

 

 

Another option would be to do as you hinted before...use the specialability progress bar to mimic fuel consumption (except it fills up insteadof down unfortunatly). specialabilities also seem not to like to be triggered while moving or doing other things....in my attempts with that the unit seemed to stutter while triging to do it and other weird things happenend.

Edited by Ravendark

Share this post


Link to post

Reading this reminds me of my modding "skills" before my two month holiday. But now I can' t remember most of them...

 

Anyway, here is my tiny contribution:

 

It is done by using the alien shield body slots:

 

First a vid:

 

Next the issues:

-The main is the inner "fuel damage" that needs to have nearly a radius of 20, cuz if not it won't hit the plane while moving. However it also hits every ally airhsip in that area.

-the fuel reload is too fast.

-the emp paralyze effect needs patching...

-no upgrade for increasing shield amount

-no extra penalties for using strato boost.

 

And last the code:

 

The important parts:

 

In weapons file:

	<WeaponTemplate
		id="FuelConsumption"
		Name="FuelConsumption" 
		CanFireWhileMoving="true"
		RadiusDamageAffects="ALLIES SELF">
		<!-- the self it seems to be the weapon not who is firing it-->
		<Nuggets>
			<DamageNugget
				Damage="27.0"
				Radius="20.0"
				DamageType="PENALTY"
				DeathType="NORMAL"
				ForbiddenTargetModelCondition="LOCOMOTOR_TAXIING">
				<SpecialObjectFilter
					Rule="NONE"
					Include="AIRCRAFT">
				</SpecialObjectFilter>
			</DamageNugget>
		</Nuggets>
	</WeaponTemplate>	

In armor file:

	<ArmorTemplate
		id="FuelDamageArmor"
		Default="100"
		SideDamageScalar="100"
		RearDamageScalar="100">
		<Armor
			Damage="GRENADE"
			Percent="0" />
		<Armor
			Damage="ROCKET"
			Percent="0" />
		<Armor
			Damage="CANNON"
			Percent="0" />
		<Armor
			Damage="GUN"
			Percent="0" />
		<Armor
			Damage="SNIPER"
			Percent="0" />
		<Armor
			Damage="PENALTY"
			Percent="100" />
	</ArmorTemplate>

In firehawk file:

			<StatusBitsUpgrade
				id="ModuleTag_StatusBitUpgrade"
				StatusToSet="SHIELDBODY_ENABLED">
				<TriggeredBy>Upgrade_FuelDepot</TriggeredBy>
			</StatusBitsUpgrade>
			<FireWeaponUpdate
				id="ModuleTag_FuelConsumptionEffect">
				<FireWeaponNugget
					WeaponName="FuelConsumption"
					FireDelay="0.1s"/> 
			</FireWeaponUpdate> 
		<Body>
			<!--<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="2700" />-->
<!-- never recharges cuz the no shield update -->
			<ShieldBody
				id="ModuleTag_Body"
				MaxHealth="2700"
				ShieldAmount="27000"
				ShieldArmor="FuelDamageArmor"
				ShieldRechargeIdleTime="1s" 
				ShieldEnabledFX="" 
				ShieldTakeDamageFX=""
				ShieldDepleteFX=""
				ShieldActiveModelCondition="USER_2" />
		</Body>

In lua's files:

		<ModelConditionEvent Name="LocomotorTaxiing">
			<Conditions>+LOCOMOTOR_TAXIING</Conditions>
		</ModelConditionEvent>
	<EventList Name="GDIFirehawkFunctions" Inherit="BaseScriptFunctions">
        <EventHandler EventName="OnCreated"	ScriptFunctionName="OnGDIFirehawkCreated" DebugSingleStep="false"/>
        <EventHandler EventName="LocomotorTaxiing"	ScriptFunctionName="OnGDIFirehawkLoaded" DebugSingleStep="false"/>
    </EventList>
function OnGDIFirehawkCreated(self)
	-- bomb load by default.
	ObjectGrantUpgrade( self, "Upgrade_SelectLoad_02" )
	ObjectGrantUpgrade( self, "Upgrade_FuelDepot" )
	ObjectHideSubObjectPermanently( self, "Plane04", true )
end

function OnGDIFirehawkLoaded(self)
	ObjectRemoveUpgrade( self, "Upgrade_FuelDepot" )
	ObjectGrantUpgrade( self, "Upgrade_FuelDepot" )
end

 

Share this post


Link to post

welcome to forums ;)

 

and the shield thing is a interesting angle.

 

it could be possible to give it a longer refuel time, by using a specialpower to trigger the upgrade and using prep time to dictate the refueling time...maybe even give it a immobile or busy fo duration atribute through specialability module so you cant force it to lift off inthill the special ability is complete (refueled)

Share this post


Link to post

I knew Jvmnck would come back! ^_^

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.

×