shpdamagearmor

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

There is no way to either directly set the current hitpoints of a piece of armor or damage armor that ignores resistances.

Xelerus incorrectly claims that calling shpdamagearmor with a damage type of 0 will damage without resistances, but calling shpdamagearmor with a damage type of 0 simply does no damage.

This prevents switchable armors from properly carrying over damage.

There is no way to get an armor's resistance to a specific damage type which would have allowed a workaround.

This will also create problems for alternate damage systems.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

so, what we would need is something like "armGetResistance" and "objGetShieldResistance" that should return an usable value (or list) of resistances of the item. :D

Thanks for testing the function, xelerus will be fixed soon.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

you can use objGetArmorDamage to get the amount of damage to an armor.
As for resistances that is static so if need be we can put that in static data. Of course if we can get it from code that would save alot of effort.
Crying is not a proper retort!
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Found a workaround. It's not pretty, though. Apparently shpDamageArmor cannot under any circumstances kill you. Calling it for insanely high damage won't kill and your armor, but will leave it at 0. HP can then be set with objRepairArmor, which works uniformly across all armors.

The side effects are a red flash and a bunch of critical damage warnings.

In the case of switchable armor one red flash and critical damage warning for each armor plate of the same type as the one activated. Not good, but no longer a complete blocker.
Post Reply