Making a weapon doing structural dmg X% of the time?

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Arisaya
Fleet Admiral
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!>
User avatar
AssumedPseudonym
Fleet Officer
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:

Code: Select all

		<Events>
			<onDamageArmor>
				(block nil
					(if (eq (objIsShip gSource) nil)
						(setq aDamageHP 0)
					)
				)
			</onDamageArmor>
		</Events>
 …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…

Code: Select all

		<Events>
			<onDamageArmor>
				(block nil
					(if
						(not
							(and 
								(eq (staGetType gSource) nil)
								(eq (objIsShip gSource))
							)
						)
						(setq aDamageHP 0)
					)
				)
			</onDamageArmor>
		</Events>
 …There. That might do the trick.
Image

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!)
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

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.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
Post Reply