PDA

View Full Version : A quick question as to Autofire


xorch
05-12-2013, 03:31 PM
Hello. I'm modding some light rapidfire cannons into Drox Operative. Relatively weaker than beam weaponry but as they take up the normally unused for weapons "light" slot I wanted to set them to be auto-targeting / firing as a further balance point. (Tougher to focus-fire... ect ect)

I've studied the workings of the flak family of missile defense but the exact mechanic that allows weapons to select their own targets and fire at will autonomously eludes me still. Have everything else working save for this and integrating the tech to where the other races will adapt and use the weapons but this is a genuine stumper. (Been trying to figure it out on my own so far mostly) I'll be most grateful for any assistance in this matter.

(Ps: Kudos again on this awesome game and engine Shadow!)


The relative specs balance wise in case anyone is curious or wants to adapt it themselves. More Dakka is always a good thing :)

//
// Autocannon Weapon Skills
//

BaseSkillAutocannonPerLevel
{
Base BaseSkillPerLevel

ProjMinDamage 0.5
ProjMaxDamage 1.0

Power 0.2
}

BaseSkillAutocannon
{
Base BaseSkillOffense

Power 1.5

ReuseTime 0.5
ReuseTimeBasedOnAttackTime 1

ProjMinDamage 0.5
ProjMaxDamage 1.5
DamageType Physical

MaxRange 400.0

CanMiss 1
}

joku
05-12-2013, 05:02 PM
It looks like you would want to add the following lines under "BaseSkillAutoCannon":
AutoUse 1
UseCheckChance 0.1

Those are the two lines under "BaseSkillMissileDefense" that appear to allow Flak Cannons to fire automatically.


As for auto-targeting, I don't know how possible that would be. Flak cannons have the line "AutoTargetMissiles 1" under "BaseMissileDefense" (MissileDefence.gdb). It's a hardcoded parameter that allows Flak Cannons to automatically target missiles but only missiles, not exactly useful for what you want. Perhaps you could try using the line "AutoTarget 1". It's a parameter used in systems.gdb to turn on auto-targeting globally; I don't know what effect (if any) it would have when used in the situation I suggested.

xorch
05-12-2013, 05:27 PM
Thanks for the advice Joku. I feel very slow that I'd overlooked that for a few hours! Just tried it out without any results unfortunately though the logic behind it is sound.

Tried

AutoUse 1
UseCheckChance 0.1

In both BaseWeaponAutocannon and BaseSkillAutocannon respectively and no dice.

Not quite willing to mess with systems globally just to enable a minor "flavor" function on a single weapon class and it seems that is what it would take short of a hidden functionality in the code.

Thank you much for the heads-up though! It was very well worth the try :)

Shadow
05-29-2013, 01:12 PM
Currently AutoUse only supports shooting at missiles.