PDA

View Full Version : Where is the AC.totals.general calulated



Gheist
November 20th, 2013, 22:51
If I wanted to create an additional field called dr.totals.general (Damage Reduction) how do I get the Armor to add to that field instead of the AC field? I have the field on the character sheet, but nothing will add to it.

<number_chartotaldr name="dr" source="dr.totals.general">
<anchored>
<to>touchac</to>
<position>belowleft</position>
<offset>0,8</offset>
<size>
<width>32</width>
<height>20</height>
</size>
</anchored>
</number_chartotaldr>
<label_charac>
<anchored>
<top>
<offset>136</offset>
</top>
</anchored>
<static>Dmg Resist</static>
</label_charac>

I have searched but just can't find where the formula is located.

Trenloe
November 20th, 2013, 23:16
Assuming you're talking about the 3.5e ruleset?

The totaling of the various AC fields are done in the templates in charsheet\template_charsheet_combat.xml. The summing of the various fields is done in the XML. For example, the "number_chartotalac" template sums a bunch of fields using the <op>+</op> tag:

<template name="number_chartotalac">
<number_chartotalwithability>
<description>
<text>AC</text>
</description>
<modifierfield>ac.sources.temporary</modifierfield>
<source>
<name>ac.sources.armor</name>
<op>+</op>
</source>
<source>
<name>ac.sources.shield</name>
<op>+</op>
</source>
...
...


So, in your code you have specified the "dr" field to be based on a "number_chartotaldr" template. Make this template similar to the "number_chartotalac" (portion of which shown above) and include all of the database fields that need to be added in each <source> section.