Making a weapon doing structural dmg X% of the time?
- Arisaya
- Fleet Admiral
- Posts: 5535
- Joined: Tue Feb 05, 2008 1:10 am
- Location: At the VSS Shipyards in the frontier, designing new ships.
anyone know of how to allow a weapon to damage projectiles and ships just fine, but prevent it from doing structural damage on 100% of the hits? (Not sure if this is possible at the moment though)
(shpOrder gPlayership 'barrelRoll)
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
- AssumedPseudonym
- Fleet Officer
- Posts: 1215
- Joined: Thu Aug 29, 2013 5:18 am
- Location: On the other side of the screen.
Try adding this to the weapon: …Or at least that’s how I did it. Presumably you could throw some sort of RNG command in there to make the percentage something besides 100%.
EDIT: …D’oh. That works for stations/crates/shipwrecks, probably not for projectiles. Note to self: Coffee before posting next time… …There. That might do the trick.
Code: Select all
<Events>
<onDamageArmor>
(block nil
(if (eq (objIsShip gSource) nil)
(setq aDamageHP 0)
)
)
</onDamageArmor>
</Events>
EDIT: …D’oh. That works for stations/crates/shipwrecks, probably not for projectiles. Note to self: Coffee before posting next time…
Code: Select all
<Events>
<onDamageArmor>
(block nil
(if
(not
(and
(eq (staGetType gSource) nil)
(eq (objIsShip gSource))
)
)
(setq aDamageHP 0)
)
)
</onDamageArmor>
</Events>

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)
My mods on Xelerus: Click here!
Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
This is theoretical, but try combining blind7 with <OnDamageArmor>
shotObject should take regular damage, while shipObjects will take regular damage when shields are up (or use <OnDamageShields>, and then whatever is in <OnDamageArmor> when shields are down, while stationObjects will be completely unaffected because stations cannot be blinded and <OnDamageArmor> does not trigger on station hits.
shotObject should take regular damage, while shipObjects will take regular damage when shields are up (or use <OnDamageShields>, and then whatever is in <OnDamageArmor> when shields are down, while stationObjects will be completely unaffected because stations cannot be blinded and <OnDamageArmor> does not trigger on station hits.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ