PDA

View Full Version : How do I modify the 10 in the AC field



Gheist
November 20th, 2013, 22:48
I am trying to modify the 10 in the AC field on the charsheet_combat.xml to a different value "0". Any idea where the 10 is stored?

Thanks

<number_chartotalac name="ac" source="ac.totals.general">
<anchored>
<to>acframe</to>
<position>insidetopleft</position>
<offset>105,28</offset><!--105,28-->
<size>
<width>32</width>
<height>20</height>
</size>
</anchored>
</number_chartotalac>

Trenloe
November 20th, 2013, 23:23
I think you need to be aware that the "number_chartotalac" used here is not a name for the section but it is a template that is used to specify a lot of the functionality of the window. Look for this template name (use an editor that can do "find in files") and you will find it in template_charsheet_combat.xml. Also be aware that templates are frequently based on other templates.

In the "number_chartotalac" template there is a <script> section with a function tied to the onSourceUpdate() event. This has a line of code as follows: setValue(10 + calculateSources() + nAbility); - this is where the base 10 is coming from. Note the calculate Sources() call is needed to trigger the relevant arithmetic on the <source> entries in the template (which I mention in reply in another one of your threads).