PDA

View Full Version : Setting GM ID in Preferences has issues



Spyke
September 20th, 2009, 21:17
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

Foen
September 20th, 2009, 21:35
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

Spyke
September 20th, 2009, 21:46
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

Spyke
September 22nd, 2009, 14:26
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:


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

Ikael
November 13th, 2009, 21:02
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.