Thread: 2 Text fields in same ability
-
August 30th, 2014, 02:05 #1
2 Text fields in same ability
Is it possible to have 2 text fields for the same Ability?
top image is how it looks - the bottom is how I would like it to go...
Any suggestions/pointers?
-
August 30th, 2014, 02:37 #2
Sure you can. Add the control information to the <sheetdata> XML in the <windowclass> you use to populate your ability <windowlist>.
Trying to speak Aunglish for you....
The following all applies to FG control entries that are in the FG XML files.
Your ability list will be defined in a <windowlist> XML specification: https://www.fantasygrounds.com/refdoc/windowlist.xcp This will contain a <class> entry which is the name of the <windowclass> that is used to populate each line in the windowlist (see the <class> entry in the Definition section of the windowlist reference I've just linked).
Your <windowclass> definition (https://www.fantasygrounds.com/refdoc/windowclass.xcp) for the line of data within the list will contain a <sheetdata> entry that is where the controls are defined. You can add another stringcontrol in this sheetdata entry to hold your benefit information - copy/paste the ability control definition, rename it and change the control positioning/which control it is anchored to.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
August 30th, 2014, 09:30 #3
so my xml looks like this right now...
<windowclass name="char_ability">
<margins control="0,0,0,2" />
<sheetdata>
<genericcontrol name="rightanchor">
<anchored height="0" width="0">
<top />
<right />
</anchored>
</genericcontrol>
<button_idelete name="idelete">
<anchored>
<top offset="7" />
<right parent="rightanchor" anchor="left" relation="relative" offset="-5" />
</anchored>
</button_idelete>
<button_stringcycler name="attribute">
<anchored width="40">
<top offset="7" />
<right parent="rightanchor" anchor="left" relation="relative" offset="-210" />
</anchored>
<parameters>
<defaultlabelres>dash</defaultlabelres>
<labelsres>I|II|III</labelsres>
<values>I|II|III</values>
</parameters>
</button_stringcycler>
<string_textlistitem name="value" length="100">
<anchored>
<top offset="7" />
<left offset="5" />
<right parent="rightanchor" anchor="left" relation="relative" offset="-8" />
</anchored>
<multilinespacing>20</multilinespacing>
</string_textlistitem>
</sheetdata>
</windowclass>
Attachment 7362
I tried adding various permutations of another string_textlistitem without any success at getting a second field to display.
<string_textlistitem name="benefitvalue" length="100">
<anchored>
<top offset="7" />
<left offset="5" />
<right parent="rightanchor" anchor="left" relation="relative" offset="188" />
</anchored>
<multilinespacing>20</multilinespacing>
</string_textlistitem>
so in CoreRPG I find string_textlistitem in the following files:
\common\template_lists.xml
\campaign\template_char.xml
And they reference some lua files which seem to define movement and tab flow thru the elements and ordering etc..
So... back to the windowclass - these dont seem to be definedin any external doc?
eg looking at <windowclass name="charsheet_abilities"> I cant find charsheet_abilities any where else? not in my ruleset or in CoreRPG.
Same goes for <windowclass name="char_ability">... so Im not following your lead...
Unless it is for sheetdata which I do have corresponding entries under each windowclass...
So back again... to string_textlistitem and I dont know what Im doing wrong! I can add checkboxes and stringcycler but I cant seem to work out what to add for a second string field...Last edited by damned; August 30th, 2014 at 09:59.
-
August 30th, 2014, 09:58 #4
I eventually got <string_labeled> to work. but I didnt want a labeled string so I copied <string_labeled> in template_char.xml to <string_nolabel> and removed the <script> stuff and it works... well I believe it is...
Attachment 7361
Next will be that pesky weapon damage... but not today.
Today I have game to prep for....
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks