PDA

View Full Version : Default desktop locations



Fot5
March 9th, 2011, 15:57
I want to change the default location of the modifier box and dice tower on my FGII desktop. Which objects do I need to change if I want to create an extension that does this?

Griogre
March 9th, 2011, 20:48
Check out this thread for the the base of an extension to move the mod box: https://www.fantasygrounds.com/forums/showthread.php?t=14110

I'm not sure where the tower is off hand.

Zeus
March 9th, 2011, 21:25
If I recall correctly the dice tower position is coded in the utility_dicetower.xml file in the root of the ruleset. Well that's the name of the file in 4E. There is also a supporting LUA script in scripts/manager_dicetower.lua.

For 4E you will need to override the dicetower panel definition in order to change its default location.

wbcreighton
March 23rd, 2011, 05:27
I use a laptop and the standard d20_JPG rule set puts the mod box and the dice partially covering the chat input line. It makes checking your typing difficult. I recently realized that if I move my taskbar over to the left then arrange the dice, it clears up the problem. Funny how simple it was and how long it took me to figure it out.

Fot5
March 23rd, 2011, 13:45
Yeah, I learned about that one a while ago. My problem is that I like to pull the FG desktop across three monitors (two above and one centered below). This causes the mod box to be off of the lower screen, so I want to center it.

Fot5
March 24th, 2011, 15:44
My goal was to center the modifier box, which I did with the code below. Specifically, I included the following in a desktop_panel.xml file in the extension. When I do this, I get two modifier boxes (one on the left and one in the center). They both accept and correctly add modifiers to die rolls. However, modifier box on the left does not update to the current modifier number (it just retains the previously entered data after a roll). What do I need to do to either (a) remove the modifier box on the left or (b) have it update correctly? I'm not opposed to two modifier boxes, and I think that some of my players may prefer to have both, but if I include both, they should show the same (and valid) values prior to a roll.

<panel name="modifierstack" modes="host,client">
<class>modifierstack</class>
<bounds>
<anchored>
<bottom>
<anchor>bottom</anchor>
<offset>-63</offset>
</bottom>
<left>
<anchor>center</anchor>
<offset>0</offset>
</left>
<size>
<width>64</width>
<height>57</height>
</size>
</anchored>
</bounds>
</panel>

Zeus
March 24th, 2011, 17:54
I had a similar outcome when I updated the Dice Tower in 4E to position it on the right side of the desktop.

I ended up with two Dice Towers, however both were fully functional. It maybe that panels cannot be easily overridden and that FGII base code needs reviewing.

saithan
March 25th, 2011, 19:25
I had discovered through trial and error that the panels can not be over ridden by ext. I had to make changes to the panel in the main ruleset to get the effect needed when I expanded the modstack to 10 slots.

Urieal
January 26th, 2012, 21:11
I had discovered through trial and error that the panels can not be over ridden by ext. I had to make changes to the panel in the main ruleset to get the effect needed when I expanded the modstack to 10 slots.
And this answers my question...which actually sucks....because it does not allow an extension to override a ruleset, instead...the components are just "doubled stacked".

I've been spending hours trying to figure out why my custom modifierstack was being drawn twice...turns out that it is because an extension does not override objects from a ruleset.

I'm certain that I could write various LUA scripts that change panel values in the ruleset, but that's just too much trouble.

saithan
January 27th, 2012, 01:51
you can over ride objects in the ruleset, though the panel's dimensions will not be over ridden. that must be done in the ruleset.

Urieal
January 27th, 2012, 04:23
you can over ride objects in the ruleset, though the panel's dimensions will not be over ridden. that must be done in the ruleset.
Yeah, that's the rub :(

Hopefully it can change in future releases, I plan on contacting the devs (through post I guess) about it. It limits the abilities of .EXT files...that may be by design though...:(

Moon Wizard
February 4th, 2012, 18:52
It's already in the works for the next release. ;)

JPG

Urieal
February 4th, 2012, 21:07
It's already in the works for the next release. ;)

JPG
That's great news!!! It's really encouraging that the developers are cognizant of community concerns and supportive of requests. As a developer, I can tell you that this can be challenging (from a management standpoint), so I am certainly encouraged by this news.

Looking forward to your next release.