-
August 24th, 2015, 13:47 #1
- Join Date
- Apr 2007
- Location
- Germany
- Posts
- 42
How to enable a charsheet entry to accept a link (these red boxes)?
Hi,
I had just finished creating some modules for the "Das Schwarze Auge 4.1" Ruleset, when I found out that the ruleset does not support linking information entrys to skills / feats and such.
I took a look into the CoreRPG Ruleset, where there had been defined acceptdrop - which seems to be neccessary - and the "button_iedit" and "button_iadd".
I tried entering these lines of code - and could produce a new entry in the listing - of course without content - by dragging the library entry into the listing. But the button did not appear.
I searched through the whole CoreRPG files, but have not found andy definition for the button_iedit and button_iadd.
Can you tell me, where I can find the definition of these red buttons, where you can link the library entries to the existing lines?
Looks like this:
Attachment 10781
And I want such a buton in front of it:
Attachment 10782
Any Ideas where I can find a simple solution to add these reference boxes?
The Code in Question looks like this (it's part of the module DSA_DZ_4.1WE):
Code:<?xml version="1.0" encoding="iso-8859-1"?> <root version="2.9"> <windowclass name="charsheet_talente_kampf"> <!--<placement> <size> <width>252</width> <height>611</height> </size> </placement>--> <nodelete /> <sheetdata> <frame_char name="skillframe"> <bounds>15,0,470,-1</bounds> </frame_char> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetop</position> <offset>0,11</offset> </anchored> <center /> <font>sheetlabel</font> <static>Nahkampftalente</static> </stringcontrol> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>18,29</offset> </anchored> <font>sheetlabelsmall</font> <static>Nahkampfwaffentalent</static> </stringcontrol> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>302,29</offset> </anchored> <font>sheetlabelsmall</font> <static>eBe</static> </stringcontrol> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>360,29</offset> </anchored> <font>sheetlabelsmall</font> <static>AT / PA</static> </stringcontrol> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>417,29</offset> </anchored> <font>sheetlabelsmall</font> <static>Wert</static> </stringcontrol> <windowlist name="skilllist_kampf"> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>15,45</offset> <size> <width>435</width> <height>235</height> </size> </anchored> <datasource>.skilllist.kampf</datasource> <class>charsheet_skilllistitem_kampf</class> <allowcreate /> <allowdelete /> <!-- HERE I ADDED THE ACCEPTDROP --> <acceptdrop> <class>referencetext</class> <class>referencetextwide</class> <field>*</field> </acceptdrop> <script file="charsheet/scripts/charsheet_skilllist.lua" /> <!-- HERE I ADDED THE TWO BUTTONS FROM CORE RPG --> <button_iedit name="abilities_iedit"> <anchored to="skilllist_kampf" position="aboveright" offset="5,5" /> <target>abilities</target> </button_iedit> <button_iadd name="abilities_iadd"> <anchored to="abilities_iedit" position="lefthigh" offset="5,0" /> <target>abilities</target> </button_iadd> <!-- END OF MY EDIT --> </windowlist> <scrollercontrol> <anchored> <top> <parent>skilllist_kampf</parent> <anchor>bottom</anchor> <offset>2</offset> </top> <right> <parent>skilllist_kampf</parent> <anchor>right</anchor> <offset>5</offset> </right> </anchored> <target>skilllist_kampf</target> <button> <normal>button_scroller</normal> <pressed>button_scroller_down</pressed> <zoom>button_zoomer</zoom> <zoompressed>button_zoomer_down</zoompressed> </button> </scrollercontrol> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetop</position> <offset>0,304</offset> </anchored> <center /> <font>sheetlabel</font> <static>Fernkampftalente</static> </stringcontrol> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>18,322</offset> </anchored> <font>sheetlabelsmall</font> <static>Fernkampfwaffentalent</static> </stringcontrol> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>302,322</offset> </anchored> <font>sheetlabelsmall</font> <static>eBe</static> </stringcontrol> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>360,322</offset> </anchored> <font>sheetlabelsmall</font> <static>Attacke</static> </stringcontrol> <stringcontrol> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>417,322</offset> </anchored> <font>sheetlabelsmall</font> <static>Wert</static> </stringcontrol> <windowlist name="skilllist_fernkampf"> <anchored> <to>skillframe</to> <position>insidetopleft</position> <offset>15,340</offset> <size> <width>435</width> <height>82</height> </size> </anchored> <datasource>.skilllist.fernkampf</datasource> <class>charsheet_skilllistitem_fernkampf</class> <allowcreate /> <allowdelete /> <script file="charsheet/scripts/charsheet_skilllist.lua" /> </windowlist> <scrollercontrol> <anchored> <top> <parent>skilllist_fernkampf</parent> <anchor>bottom</anchor> <offset>2</offset> </top> <right> <parent>skilllist_fernkampf</parent> <anchor>right</anchor> <offset>5</offset> </right> </anchored> <target>skilllist_fernkampf</target> <button> <normal>button_scroller</normal> <pressed>button_scroller_down</pressed> <zoom>button_zoomer</zoom> <zoompressed>button_zoomer_down</zoompressed> </button> </scrollercontrol> </sheetdata> </windowclass> <!-- more stuff, cut for better viewability --> </root>
-
August 24th, 2015, 15:33 #2
button_iedit and button_iadd aren't the link buttons - they are buttons used as part of the edit process: to enter edit mode (button_iedit) and to add a new record (button_iadd) once in edit mode. See the + (button_iadd) and / (button_iedt) in the following screenshot.
The link you're looking for is a <linkfield> entry (in CoreRPG). For example, in the recrd_char_abilities.xml file, char_ability windowclass:
Code:<windowclass name="char_ability"> <margins control="0,0,0,2" /> <sheetdata> <genericcontrol name="rightanchor"> <anchored height="0" width="0"> <top offset="2" /> <right /> </anchored> </genericcontrol> <button_idelete name="idelete"> <anchored to="rightanchor"> <top /> <right anchor="left" relation="relative" offset="-5" /> </anchored> </button_idelete> <linkfield name="shortcut"> <anchored to="rightanchor" width="20" height="20"> <top /> <right anchor="left" relation="relative" offset="-5" /> </anchored> <class>ability</class> <description field="name" /> <readonly /> </linkfield>
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 24th, 2015, 17:25 #3
- Join Date
- Apr 2007
- Location
- Germany
- Posts
- 42
You're awesome, Trenloe. Found the right places to edit, took a look in some other rulesets regarding the linkfield, and I am not at this code:
Code:<linkfield name="shortcut"> <anchored> <left> <offset>110</offset> </left> <top> <anchor>top</anchor> <offset>3</offset> </top> <size> <width>15</width> <height>15</height> </size> </anchored> <!--<class>ability</class>--> <description field="linkfeld" /> <allowdrop /> </linkfield>
Attachment 10783
Thanks! Now I can adapt this method to all other areas I need these linkfields.
-
August 24th, 2015, 18:20 #4
Is this going to be the English translation of The Dark Eye?
Paul Grosse
PCGen BoD
PR Silverback
Autobackup Batch file, Always ALWAYS backup your data. Remember to follow the 3-2-1 rule!
-
August 24th, 2015, 18:32 #5
- Join Date
- Apr 2007
- Location
- Germany
- Posts
- 42
Nope. It will still be the german version of the "The Dark Eye" Ruleset, but with the possibility to attach library entries to your skills / feats / spells / etc.
When I'm done I will upload a "changelog" - so that you can modify the existing ruleset on your own to have the same functionalities.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks