Page 1 of 1

element damages

Posted: Fri Dec 02, 2011 1:41 am
by dragon slayer
Okay i noticed we have ELEMENTRESIST=# # # #
do we have a damage type that will hit a area of the monster or npc
Like say

this Cat has 50 fire resist so i want a weapon to do 40 cold damage to him because he has no cold resist.

Posted: Fri Dec 02, 2011 4:39 am
by Xuri
It's a complex system, that makes use of element resistances (can be set on items or NPCs through the ELEMENTRESIST=# # # # tag, where the first number is heat resistance, the second is cold, the third lightning and the fourth poison), race-specific weaknesses to elements (set in races.dfn) and tags on weapons that make them do element-specific damage (heat=1, cold=1, lightning=1 or poison=1). I don't think they have any effect against targets that do not have a specific weakness against those elements through races.dfn though.

Example:
In the DFNs, find a bow and set both lodamage and hidamage to 15 (to make testing easier). Then add a tag saying HEAT=1

In races.dfn, add the following line to the first race-section (0):
HEATAFFECT

Now start UOX3, spawn the bow you added the HEAT=1 tag to earlier + some arrows, spawn a regular basic human NPC ('ADD NPC male) and attack him.

The basic male NPCs have no armor, but might get a few armorpoints based on the basic clothes they're wearing, so the damage would normally (before our changes) be reduced from 15 to something like 14. But because the NPC now belongs to a race that is affected by HEAT (through HEATAFFECT), and you're attacking with a weapon that has the HEAT=1 tag set, the NPC instead takes double damage from your attacks - i.e. around 28-30 damage.

In that sense, they work pretty much the same way as the "racial" weapons do (RACE=1 weapon does double damage against members of race 1), except they can get this bonus against multiple races at the same time (all races affected by HEAT will take double damage from a HEAT weapon).

Posted: Sat Dec 03, 2011 3:04 am
by dragon slayer
aw i understand now