PDA

View Full Version : Naming of library links on Hotkeys



phantomwhale
July 6th, 2011, 06:02
I've noticed that when I drag librarylink shortcuts onto my hotkey bar (in SWEX ruleset) it is displayed with the shortcut icon and the link name over the top of it.



<librarylink type="windowreference">
<class>reference_weapons</class>
<recordname>reference.lists.handweapons@SWEX Player Guide</recordname>
</librarylink>
<name type="string">Hand Weapons</name>


However, when I drag listlink shortcuts onto the hotkey bar, only the shortcut icon is displayed ?



<listlink type="windowreference">
<class>reference_weapons</class>
<recordname>reference.lists.rangedweapons@SWEX Player Guide</recordname>
</listlink>
<name type="string">Ranged Weapons</name>


https://i.imgur.com/M0L4l.jpg

It seems that librarylink, listlink, and hotkeys are all built into FG, so untouchable a ruleset authoring point of view. So I was wondering if it would be a simple patch to ensure listlinks get stored with there name ?

Or from a deeper level, are hotkeys untouchable ? I know 4E has complex dice rolling functionality that can make them less useful, and I've had an issue with them holding custom data before : https://www.fantasygrounds.com/forums/showthread.php?t=13939

I've saw a call to help with hotkey work last year sometime - but are we talking a ruleset level workaround (which I can look at, but feel it's avoiding a deeper issue ? Besides, I'd be looking at a SWEX ruleset workaround rather than 4E) or an underlying code fix (in which case I'm not sure I CAN help ?)

Cheers,
Ben (-PW-)

Moon Wizard
July 10th, 2011, 08:45
The hot keys actually use the draginfo.getDescription() function to get the text displayed in the hot key button.

Since listlink and librarylink are not basic control types, they must be templates within the ruleset. They probably have onDrag code that assigns the shortcut to the draginfo object, but one is slightly different. It would need to be updated in the ruleset code.

Which ruleset are you using? If you are using 3.5E or 4E, I can patch it on my end.

Regards,
JPG

phantomwhale
July 11th, 2011, 00:40
I'm using SavageWorlds ruleset.

A Text search on listlink only turns up that string within the modules, not in the XML / LUA ruleset code. Librarylink does appear in the library.xml file, as well as the modules.

But neither of them appear to be defined as templates ? Maybe it's something cleverer; can dig around the code if it's not an underlying thing (maybe they are just using some "default" meaning ?)

Moon Wizard
July 11th, 2011, 07:31
I'm not sure if I'm looking at the latest version of SW, but in the version I have, I see:

librarylink (library.xml)
* Type: windowreferencecontrol
* Has description tag using name field

listlink (reference_basicclasses.xml)
* Type: windowreferencecontrol
* Has no description tag

Given what you are seeing and what I have in my version, it looks like you just need to add a description tag to listlink.

Regards,
JPG

phantomwhale
July 11th, 2011, 07:42
Looking at my search history, I must have done a text search for "listlink " (e.g. with a space on the end) - which I kept using over and over looking for it, rather than retype it.

Yep, can see that windowreferencecontrol now. Thanks for doing my legwork here, MW :o I should be able to fix my own problem now !

Cheers,
Ben (-PW-)