PDA

View Full Version : 5E Extension - How To Query



ColinBuckler
December 11th, 2021, 23:39
Hi,

I am trying to add a 5th option to the Character Sheet skill proficiency option:


<template name="button_skillprof">
<buttonfield>
<anchored width="12" height="12" />
<state icon="button_prof" tooltipres="char_tooltip_prof_off" />
<state icon="button_prof_down" tooltipres="char_tooltip_prof_on" />
<state icon="button_prof_double" tooltipres="char_tooltip_prof_double" />
<state icon="button_prof_half" tooltipres="char_tooltip_prof_half" />
</buttonfield>
</template>

To become:


<template name="button_skillprof">
<buttonfield>
<anchored width="12" height="12" />
<state icon="button_prof" tooltipres="char_tooltip_prof_off" />
<state icon="button_prof_down" tooltipres="char_tooltip_prof_on" />
<state icon="button_prof_double" tooltipres="char_tooltip_prof_double" />
<state icon="button_prof_half" tooltipres="char_tooltip_prof_half" />
<state icon="button_prof_untrained" tooltipres="char_tooltip_prof_untrained" />
</buttonfield>
</template>

I can work out how to add code to the new "untrained" option to grant disadvantage as welll as adding a new icon/text to the cycler (I think).

Just not exactly sure how I override the template so it shows/cycles in the skill windows.

Any help is much appreciated.

damned
December 12th, 2021, 00:02
First you need to define an Icon button_prof_untrained and a String char_tooltip_prof_untrained

Then you start on the code.

ColinBuckler
December 12th, 2021, 04:26
I have created the string and added the icon - though still not sure how I get it to add:

<template name="button_skillprof">
<buttonfield>
<anchored width="12" height="12" />
<state icon="button_prof" tooltipres="char_tooltip_prof_off" />
<state icon="button_prof_down" tooltipres="char_tooltip_prof_on" />
<state icon="button_prof_double" tooltipres="char_tooltip_prof_double" />
<state icon="button_prof_half" tooltipres="char_tooltip_prof_half" />
<state icon="button_prof_untrained" tooltipres="char_tooltip_prof_untrained" />
</buttonfield>
</template>

Do I copy the above into an xml file and overload the template in some way - obviously missing something very basic here.

If its something thats not easy to explain - can you point us towards an extension that does this already?

damned
December 12th, 2021, 04:31
Your extension file has one minimum requirement and that is that it has an extension.xml file.
Either your changes go in that file or that file includes the filenames that your changes have been saved in.