FG Spreadshirt Swag
  1. #1
    Spyke's Avatar
    Join Date
    Jun 2005
    Location
    Yorkshire, UK
    Posts
    886

    Setting GM ID in Preferences has issues

    In Foundation and 3.5E there are issues with setting the GM identity using the text box in the Preferences. I'm sorry I can't be exact in this post, but I've been trying to nail them down for a while, and unfortunately I'm flagging a bit from jet lag!

    The rulesets initialise correctly, setting the GM label to whatever is in the Preferences.

    If you use /gmid before opening the Preferences everything is fine; the rulesets update both the GM identity and the label immediately and the correct values are set to the campaign registry.

    However, when you open the Preferences after using /gmid any change made by /gmid is not reflected, and the label is reset to whatever you had in Preferences before. If you immediately edit the name without closing Preferences then the label and GM ID update correctly. However, if you close Preferences, then open it again and update the name, these changes are not reflected in the label in the identity list, but the actual GM ID is changed, which you can see if you send text to the chat window.

    You'll see the same behaviour if you restart the ruleset and open Preferences immediately without using /gmid. As above, any change made to the Preferences text field is not reflected in the label, but the actual GM ID is changed, and text sent to the chat window reflects this.

    After making a change through the Preferences, /gmid no longer works. I think this is because the label in the identity list no longer matches the name associated with the GM ID.

    If you restart the ruleset you'll see the GM label changed to match the Preferences as before.

    If anyone can figure out where the bug is, please let me know!

    Spyke
    Free GURPS tools for Fantasy Grounds at www.spyke.me.

  2. #2
    Foen's Avatar
    Join Date
    Jan 2007
    Location
    Suffolk, England
    Posts
    2,007
    I'm not at all familiar with the Foundation preferences stuff, but if it uses the Lua registry, you might need to type /save to commit the changes.

    Just a thought,

    Stuart

  3. #3
    Spyke's Avatar
    Join Date
    Jun 2005
    Location
    Yorkshire, UK
    Posts
    886
    Quote Originally Posted by Foen
    I'm not at all familiar with the Foundation preferences stuff, but if it uses the Lua registry, you might need to type /save to commit the changes.
    Good thought, Stuart, but I've just tried it and the behaviour hasn't changed.

    I think the settings made in Preferences are getting saved OK, but the identity list GM label is not getting renamed. This then means that when the functions later search through the identity list and find the one where gmidentity is true part of the functionality works but the renaming fails.

    I'm going to have to sleep on it now.

    Spyke
    Free GURPS tools for Fantasy Grounds at www.spyke.me.

  4. #4
    Spyke's Avatar
    Join Date
    Jun 2005
    Location
    Yorkshire, UK
    Posts
    886
    I'm getting closer to this but I still haven't cracked it. Everything works fine until the renameGMIdentity function in identitylist.lua is called. When the source of this call begins from the Preferences it sometimes works, but more often the routine fails to enter the loop through the identitycontrols table:

    Code:
    function renameGmIdentity(name)
    	for k,v in pairs(identitycontrols) do
    		if v.gmidentity then
    			v.rename(name);
    			
    			identitycontrols[name] = v;
    			identitycontrols[k] = nil;
    			
    			return;
    		end
    	end
    end
    Debugging shows that it gets into the function but doesn't get into the loop. It looks as though the identitycontrols table isn't getting populated most of the time that the sequence is triggered from the related Preferences event handler.

    Spyke
    Free GURPS tools for Fantasy Grounds at www.spyke.me.

  5. #5
    Ikael's Avatar
    Join Date
    Jan 2008
    Location
    Finland/Joensuu
    Posts
    2,384
    I have also found this GM identity label preference troublesome (not with foundation but with my custom ruleset which uses the 3.5E preferenes). Seems like when the "user_gmidentity" preference registry is on, it does break the GmIdentityManager somehow. I made a test and took the "user_gmidentity" registry away from the base_preferences and everything seems to work well, but no when it's included and I have opened the preferences window at least once. Is this an issue? If it's the GM identity preferences seems to have a build-in feature somehow and it's buggy.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in