Enhance codes for (shpEnhanceItem...)

Freeform discussion about anything related to modding Transcendence.
Post Reply
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

In a previous post I suggested using (shpEnhanceItem...) to modify the parameters for an item. Here is the documentation for it:

(shpEnhanceItem ship itemListCursor enhanceCode)

This function currently only works with armor and shields, but you might call it inside a ship's OnCreate (like a Luminous drone) to randomly enhance a ship's armor/shields.

The enhanceCode is as follows (all numbers in hex, remember to prepend with 0x as in, "0x0101"):

010X +10% hp times X (e.g., 0101 = +10% hp, 0102 = +20% hp, etc.)

810X -10% hp times X (e.g., 8101 = -10% hp, 8102 = -20% hp, etc.)

0200 Regenerate (like Duralloy, only applies to armor)

8200 Decaying (like Transuranic, only applies to armor)

03YX Reflect damage type Y with X effectiveness (e.g., 0300 = reflect laser damage with 50% effectiveness, 0301 = reflect laser damage with 55% effectiveness, 030A = reflect laser damage with 100% effectiveness, 0310 = reflect kinetic damage with 50% effectiveness, etc.)

83Y0 Transparent to damage Y, applies only to shields (e.g., 8300 = shield does not absorb laser damage, 8310 = shield does not reflect kinetic damage).

050X Adjusts damage to armor/shield (e.g., 0500 = armor/shield takes 100% of damage; 0501 = 90% of damage; 0502 = 80% of damage, etc.)

850X Adjusts damage to armor/shield (e.g., 8500 = armor/shield takes 100% of damage; 8501 = 111% damage; 8502 = 125% damage; 8503 = 143% damage, etc.)

060X Adjusts energy damage (e.g., laser, particle, etc.) to armor/shield. % is same as 050X.

860X Adjusts energy damage to armor/shield. % is same as 850X.

070X Adjusts matter damage (e.g., kinetic, blast, etc.) to armor/shield. % is same as 050X.

870X Adjusts matter damage to armor/shield. % is same as 850X.

08YX Adjusts damage to armor/shield when damage is of type Y or of type Y+1. For example, 080X adjusts damage to armor/shield when hit by either laser or kinetic damage. % is same as 050X.

88YX Same as 08YX except % is same as 850X.

09YX Adjusts damage to armor/shield when damage is of type Y (e.g., 0901 = armor/shield takes 90% damage from laser; 0911 = armor/shield takes 90% damage from kinetic). % is same as 050X.

89YX Same as 09YX except % is same as 850X.

0AYX If damage is of type Y, adjusts damage with % same as 050X. If damage is of type Y+2, adjusts damage with % equal to 1.5 times 050X. (e.g., 0A05: For laser damage, adjustment is 50%; for particle damage, adjustment is 75%.)

8AYX Same as 0AYX except % is same as 850X.

0B00 Armor is immune to radiation.

0B10 Armor is immune to blinding.

0B20 Armor is immune to EMP.

0B30 Armor is immune to device damage.

0B40 Armor is immune to disintegration.

0C00 Armor is immune to blinding/EMP/device damage

8C00 Armor interferes with shields (like meteorsteel)

0D00 Armor regenerates near sun

0E00 Armor refuels reactor near sun

0F0X Shield consumes less power (0F00 = shield consumes 100% of rated power, 0F01 = consumes 90% of rated power, 0F02 = consumes 80% of rated power).

8F0X Shield consumes more power (8F00 = shield consumes 100% of rated power, 8F01 = consumes 111% of rated power, 8F02 = consumes 125% of rated power, 8F03 = consumes 143% of rated power).

EXAMPLE

(shpEnhanceItem gPlayerShip (scrGetItemListCursor gScreen) 0x0945)

09YX adjusts damage of type Y.

Y = 4, which mean ion damage.
X = 5 which means 50% adjustment.

Therefore, 0x945 means the armor only takes 50% damage from ion damage.
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Cool, I hadn't thought they were that structured. In an attempt to get the Anshar Guard shield working, is there a chance that an when <onShieldDown> event records any information about the type of damage that brought the shield down?
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Burzmali wrote:Cool, I hadn't thought they were that structured. In an attempt to get the Anshar Guard shield working, is there a chance that an when <onShieldDown> event records any information about the type of damage that brought the shield down?
Unfortunately, this is not that easy on my end. Let me think about it.
Sponge
Militia Commander
Militia Commander
Posts: 250
Joined: Sun Jan 28, 2007 7:51 pm

Sorry to bump this, but it's an awesome resource. Any chance we could get an update to include some of the new enhancements?
Post Reply