PDA

View Full Version : Skinning the FG2 Sidebar



Sunspoticus
May 12th, 2013, 11:34
Hi,

Trying to figure out how to overcome a problem with skinning the sidebar. As you will see in my example, I've cooked up a Star-Trekkie look for what, a Savage Worlds-based Star Trek campaign! Everything is groovy, except its clear other other modules and extensions are pushing things over onto the sidebar AFTER my skin extension is loaded by the table.

https://extraordinarygamers.org/sidebar.png

So my obvious question is, is there a way to skin items like these without hacking the ruleset/module/extension?

After using FG as both a player and GM for 6+ months now, one of the things I've noticed with gaming in this fashion... mood is paramount. So a decent skin/theme seems almost mandatory..

Anyway, any help/pointers/flames/etc would be appreciated, thanks!

Doswelk
May 12th, 2013, 15:33
You need to use the <loadorder> option.

This sets the order than extensions are loaded, you need to find the <loadorder> value for all the extensions you want to use and make your skin the last one.

Sunspoticus
May 12th, 2013, 17:26
You need to use the <loadorder> option.
Is this documented somewhere?

Trenloe
May 12th, 2013, 17:46
Is this documented somewhere?
https://www.fantasygrounds.com/refdoc/properties.xcp

Sunspoticus
May 12th, 2013, 17:49
https://www.fantasygrounds.com/refdoc/properties.xcp

AWESOME, exactly the document I was looking for! Thank you very much!

Trenloe
May 12th, 2013, 17:52
AWESOME, exactly the document I was looking for! Thank you very much!
No worries. :)

If you haven't found it already, the Rules Modification Guide gives some pointers too: https://www.fantasygrounds.com/modguide/

Both guides available under the library link at the top of the page.

Sunspoticus
May 12th, 2013, 20:59
It does appear as if SWFI registers its Calendar & Language Buttons by calling:


DesktopManager.registerStackShortcut("button_languages", "button_languages_down", "Languages", "languagelist", "languages")
in a function called renderLanguageTools() sitting in launcher.lua. The Calendar button is defined a call to the same method. Typing out loud here (I don't know LUA but I am a developer by trade) I should be able to create a similar launcher.lua and perform my own OnInit actions, right? Then I could stomp out SWFI's images for my theme's.. Or so I hope/think..

Trenloe
May 12th, 2013, 21:16
Yep, that's exactly right.

Just remember that any extension you make will overwrite the code/XML/functions of the base ruleset or previously loaded extensions. So, you need to make sure that any changes you are making keeps the base ruleset functionality intact. This usually results in you copying the relevant files from the base ruleset and just adding in the things you need.

As an example, if all you want to change the graphics for the sidebar buttons then you can change which graphics files (.png files) the relevant button names are referenced in graphics_sidebar.xml in the base Savage Worlds ruleset - so, an extension to do this would include the full modified graphics_sidebar.xml and the new button graphics files referenced by the button names in the registerStackShortcut command.

For example, for the characters button in graphics_sidebar.xml:

<icon name="button_characters" file="graphics/sidebar/button_characters.png" />
Either provide a replacement button_characters.png file in your extension or change the filename referenced in the XML.

There are a number of themes available for download on the forums - have a look at how some of these change the look and feel of the base ruleset.

Sunspoticus
May 12th, 2013, 22:17
Ok, I managed to pull it off. I added <icon> definitions for the offending sidebar items and viola! Now I have some color balance to work out, but now we're looking the way I want.. Thanks for pointers yous!

https://extraordinarygamers.org/sidebar2.png