PDA

View Full Version : Untested possible fix for character bug in SW ruleset...



Doswelk
April 9th, 2010, 14:30
I received this in my PM (I have not had a chance to try it myself yet):



It seems to lie in the desktop.lua script file.

If you look for the line:
DesktopManager.registerStackShortcut("button_chara cters", "button_characters_down", "Characters", "charactersheetlist", "charsheet");

you'll see it lies under the heading of -- Generic Tools. This menu option gets added to the side of the screen so players / gm's can click on it (I believe). The issue is that this only points to the GM characterlist - which doesnt have the options for creating new characters or 'becoming' that character.

you need to move this line to back under the --GM specific tools heading (I put it under this line :

DesktopManager.registerStackShortcut("button_tools ", "button_tools_down", "Tools", "sw_tools_gm");

and then delete it from where it currently is under the -- Generic Tools heading.

Now this is done, you need to add the following line under the --Player Specific tools heading :
DesktopManager.registerStackShortcut("button_chara cters", "button_characters_down", "Characters", "identityselection");

which creates the button for the players to choose characters.

If it works then Firtun is my new hero! :D

Firtun
April 9th, 2010, 15:37
Hi,
I've noticed a small mistake in the code I sent.


DesktopManager.registerStackShortcut("button_chara cters", "button_characters_down", "Characters", "identityselection");

has an extra space in it (seems to have appeared when I copied it from file). It should be :


DesktopManager.registerStackShortcut("button_characters", "button_characters_down", "Characters", "identityselection");

EDIT: it looks like the PM has inserted spaces in another line as well so the correct version to go in the --GM specific tools section is this:


DesktopManager.registerStackShortcut("button_characters", "button_characters_down", "Characters", "charactersheetlist", "charsheet");




Firtun

Doswelk
April 9th, 2010, 18:42
For your second ever post I am impressed!

For me at least you have fixed the most annoying bug that crept into FGII (SWEX)

THANK YOU!

umbralux
April 10th, 2010, 01:23
You guys are awesome! Thanks!

Velocinox
April 10th, 2010, 07:15
Again, worked for me as well. Thank you.

drahkar
April 10th, 2010, 14:58
I definitely recommend this get updated in the store based version of SW! That is a useful fix! Nice catch Firtun!

Oberoten
April 10th, 2010, 20:11
Someone bundle it into a extension?

- Obe

phantomwhale
April 11th, 2010, 22:37
Someone bundle it into a extension?

- Obe

Great idea - done : http://www.fantasygrounds.com/forums/showthread.php?t=12159

Oberoten
April 12th, 2010, 00:22
Eeeeexcellent. *rubs hands in glee*

- Obe

Doswelk
April 13th, 2010, 18:34
I have heard back from Asilva and we are in the process of testing his fixes along with the ones submitted so far. We hope to conclude this testing and release the updated version for SW this week sometime.
Whilst testing the version mentioned above I have discovered an "issue" can someone with a extension fix/manual fix see if you have the same "problem"

I can no longer drag PCs from the character selection to the combat tracker, I tend to use it when prepping a session, the fact it no longer works is a minor inconvenience and I would rather lose it and keep multiple PCs working if I had to choose!

phantomwhale
April 13th, 2010, 19:52
Tested as follows :

FG II v2.6.5 (Ultimate) + SW ruleset v3 (unmodified) + the unoffical SW patches extension enabled

Loaded as GM, created 2 characters, assigned them to combat tracker (dragging from character selection sheet) - this worked

Loaded as GM, loaded another windows as a player, created 2 characters and took control of both, then dragged to combat tracker (as GM) - this worked.

EDIT - I then spent 2 hours confusing myself by editing the wrong files. At this point, it seems like everything still works. Ended up clearing my cache folder out a few dozen times though to get to this realisation

sloejack
April 18th, 2010, 18:09
In your extension, what is the purpose of creating the charIndex and charIndexTable? Since neither of these are used in the base SWv3 I'm assuming it has something to do with some other customization you have done to your own ruleset.

phantomwhale
April 18th, 2010, 18:56
Ah, I used those variables to add a little clarity to the quite fragile button switching that the script does.

They are all local, so I presume they only exist for the lifetime of the function call. I'm certainly not using them elsewhere for anything else.

I am fairly new to Lua, so if anything I've done is "bad practice", please let me know !