Need input on how to make ships with targetable sections.

ok, so it will only be quasi-targeting. In HW all ships had weapon's emplacements and engines that coud be taken out individually. I don't think sins ships have anything similar, however I was thinkinh that some weapon systems be tied to special abilities and those abilities would only be able to be activated if the ship is above a certain  health%. Then as the ship takes more damage more weapon systems would go down, and eventually at say 30% health, the stardrive would shut down and the ship would be immobile(I am thinking of having the advent ship immobilzation ability turn on/target the affected ship, when the ship takes a lot of damage). Does anyone know a reliable way to set up a system of triggers like this on cap ships?

 

This along with somehow changing the entity types of all ships to fighters so they wil move and strafe. plz any input would b appreciated.

16,681 views 20 replies
Reply #1 Top

"OnlyautocastwhendamagexceedsPerc".

 

I'd say make it an immobilization effect that also significantly boosts shield regen and mildly boosts armor regen; the engineers shut down the engines for repair if the ship is critically damaged. You can do it manually, but it only does it automatically if the ship takes X damage.

 

And no, you can't "Force" the ship to use this power. In order to do something like that, you'd need to create an "AoE" effect; either an artifact or an emission from a planet like how stars boost antimatter; that generates the immobilization upon injury, and then have it tied to every star/planet in the game.

Reply #2 Top

hmmm, can't set to target self upon "OnlyautocastwhendamagexceedsPerc"? Or does that effect have no effect on friendly targeted units? can't change the only to an always?

Reply #3 Top

alwaysautocastwhendamageexceedsperc

 

 

Reply #4 Top

if I make the engine shut down ability but hide the icon and set it to always on, then players won't be able to deactivate the autocast function.

Reply #5 Top

The best one to check is "AbilityRepairDroids".

aiUseTime "Anytime"
aiUseTargetCondition "HullDamageExceedsAmount"
onlyAutoCastWhenTargetHullDamageExceedsAmount //Here's the key bit;
    Level:0 150.000000 //The ability triggers when a target has lost at least 150 hps.
    Level:1 0.000000
    Level:2 0.000000
isAutoCastAvailable TRUE
isAutoCastOnByDefault TRUE

 

This makes it so it will autocast when a target has taken at least 150 hull damage in the AoE. (This is because the buff repairs about 200 over its span IIRC) What you want to do is give an ability with this condition to a star/planet that will target ships in the gravity well. Now, this will have major issues in line with ships with different HP totals, and there's one way to help solve those, if you look at the other section of the AbilityRepairDroids file:

 

targetFilter
    numOwnerships 1
    ownership "Friendly"
    numObjects 3
    object "CapitalShip" //You'll want to cut this part out, and then make a seperate version with Capital-scale HP loss.
    object "Frigate" //And this one, of course, you'll keep for the one with Frigate-scale HP loss.
    object "PlanetModule"
    numConstraints 2
    constraint "NotSelf"
    constraint "HasHullDamage"

 

Unfortunately I have yet to get ship abilities to work for planets. But if someone on here has, then you can use their advice, and the information you can glean from these files, to get it working. If you already know, good luck.

(The only reason you can't tie this to the ships themselves is because then the player could just disable them at-will. So either it needs an incentive to use, or it needs to be attached to an outside source.)

 

 

Edit:   That works. Use the AbilityRepairDroids as a basis(exchanging the effects), and if you can hide the icon so it cannot be disabled, you'll be set. Now you just have to steal an ability from the capital ships and give them each a version tailored to their HPs, and then do the same to the frigates.

Reply #6 Top

The code I'll need to work good syntax into for shutting down the engines:

AlwaysPerform

HullDamageExceedsAmount

ApplyBuffToSelf

 

BuffBlackout (this will put the ship in lockdown for a bit,but it won't be actively targeted either.)

OnBuffFinish

RestoreHull

 

For the weapon systems shutting themselves down:

AlwaysPerform

HullDamageExceedsAmount

EnergyWeaponCooldown (increase)

WeaponCooldown (increase)

 

For Cloaking Field:

ApplyBuffToSelf

ChanceToBeNotOptimallyTargetted

 

gonna try to use these bits of code to make ships move around:

OnWeaponFired

ForceAttackersToRepickAttackTarget

MatchTargetVelocity

LinearMaxSpeed
LinearThrust

AngularThrust

ForceAttackersToRepickAttackTarget

OnAbilityUsed

ForceAttackersToRepickAttackTarget

OnAbilityUsed

CapitalShipAngularThrustAdjustment

WeaponRangeAdjustment


WeaponRateOfFireAdjustment

 

Reply #7 Top

now i just need a snippet of code to cause the ship to increase distance from target also when weapon fires, anyone know what that code may be?

Reply #8 Top

and on the

ForceAttackersToRepickAttackTarget

I'm not sure if that will affect my ship or their ships, there should be a parallel snippet of code to selfchangetarget but i don't see it in the list.

 

Reply #9 Top

The only Issue I have with that is that it uses up ability slots (or am I wrong?). Since frigates only use 1 or 2 abilities it would work for them. Cap ships would just have to remain stationary.

Reply #10 Top

I have to code the distance ai into each weapon hardpoint, and modify the abilities to do multiple things at once, then even the caps will move. Since many of those snippets are ability conditions, it just adds extra triggers to each ability use.

 

so basically when the cap ship uses the targeting uplink or whichever ability it may have, it will switch targets and move towards the new target... Then when the weapons fire similar concept.

Reply #11 Top

Personnaly...I would prefer if cap ships stay stationary all the same! Their too bulky and slow to have any impact on moving anyhow!

Just my personnal opinion ;)! Which we all know aint worth much ;)

Reply #12 Top

Isn't targeting uplink a passive ability? Would that still work?

 

If so, that would be cool because all my Caps in my mod will have passive abilities.

 

I agree with you somewhat Justin. It might be better to just leave them as is. Since they are so big they might get sloppy. Who knows till we try it though.

Reply #13 Top

Why only somewhat...something I say you dissagree with..Im sure I can convince you *takes out a monkey wrench:D so how perfect was my idea ;) LOOOOOL!

And yes Targeting Uplink is a passive ability for those who wanted confirmation!

Reply #14 Top

lol, I was just sayong that because it was the only ability that popped into my head when I was typing. I am gonna attach that trigger to all the abilities on every ship I can. You're right though, even in HW2 the caps didn't move that much.

Reply #15 Top

but it should work whether or not it is a passive ability, because it is a triggered on activation code and not a triggered upon striking target code.

Reply #16 Top

Good news.

 

You're doing a HW mod?

Reply #17 Top

Exactly!

Reply #18 Top

yeah, I am trying to gather up models from random HW mods and convert them into sins and add in some more depth, all at the same time busting my chops trying to get more resources for the sins of alethia/battlestar galactica mod.

Reply #19 Top

Hey I'm also in Sins of Althea mod!!! Only theirs been no activity for sooooo long :(!!!

Well off to work now..see you all later!

Reply #20 Top

yeah it sux that nobody seems to be doing werk, but I managed to get access to a bunch of new 3d models/meshes, so that should speed us up quite a bit. I also got the full version of xsi7 and 3dstudiomax so converting them from format to format shouldn't b toooo tough. ***keeps fingers crossed***