View Full Version : Debugging 3.5E Ruleset
Greygor
February 27th, 2013, 11:14
I'm getting this error when loading a Pathfinder Campaign I created
Script Error: [string "ps/scripts/manager_ps.lua"]:54: setValue: Database node type mismatch
Is it possible for me to debug the ruleset if I have an appropriate LUA IDE.
Greygor
February 27th, 2013, 11:33
Hmm, a little digging reveals this may be something to do with PartyManager.
Is it possible a corrupt character XML is causing it? So there may be an error in db.xml?
Sorry, I'm just guessing here as I've not done any coding with lua or rulesets before.
Greygor
February 27th, 2013, 12:01
Think I solved it, I had some errors with characters imported from PCGen.
Those were corrected and reimported.
However I'd dragged them onto the Party Sheet prior to correction.
The reimported character sheets opened fine, but the error I was getting with them was repeated when I opened the party sheet.
Removing the Party Sheet characters corrected the issue.
damned
February 27th, 2013, 13:00
is your head spinning yet?
Greygor
February 27th, 2013, 13:15
is your head spinning yet?
Well being a programmer for over 25 years helped me a little :)
Zeus
February 27th, 2013, 19:59
Well being a programmer for over 25 years helped me a little :)
Glad you got it sorted Greygor. Thankfully FGII's error messages are quite friendly and descriptive so its fairly easy to track down errors like this one. In your case it looks like your imported characters had fields with content of the wrong type i.e. a number where a string was expected or a string where a number was expected etc. etc.
The Partysheet maintains its own copies (subset) of PC stats, so this explains why you were getting the error message and why it resolves if you remove the offending PCs from the PS and re-apply (using correctly formatted PCs).
Trenloe
February 27th, 2013, 21:44
Is it possible for me to debug the ruleset if I have an appropriate LUA IDE.
I don't know if you've got a handle on this yet, but here is my view on accessing the ruleset - unfortunately, there isn't a way of actively debugging the code in an IDE. You have to run the ruleset code within Fantasy Grounds itself - and make use of debug commands to print info the console.
This is a very, very long thread used to walk a new user through customising a ruleset: https://www.fantasygrounds.com/forums/showthread.php?t=17909
Posts of interest are:
#6 gives some info on accessing the code in a ruleset and creating a development ruleset to mess with.
#41 (page 5) gives an idea of where to look in the 3.5E ruleset structure for specific functionality.
And, I've said it many times but I'll say it again, when you're looking at ruleset code and don't know what a certain template/label/name does - do a "Find in Files" (that's what it's called in Notepad++) across the whole ruleset to see where the label/template/name is defined or where it is used somewhere else and might give an idea of how to use it.
Greygor
February 28th, 2013, 01:04
I don't know if you've got a handle on this yet, but here is my view on accessing the ruleset - unfortunately, there isn't a way of actively debugging the code in an IDE. You have to run the ruleset code within Fantasy Grounds itself - and make use of debug commands to print info the console.
This is a very, very long thread used to walk a new user through customising a ruleset: https://www.fantasygrounds.com/forums/showthread.php?t=17909
Posts of interest are:
#6 gives some info on accessing the code in a ruleset and creating a development ruleset to mess with.
#41 (page 5) gives an idea of where to look in the 3.5E ruleset structure for specific functionality.
And, I've said it many times but I'll say it again, when you're looking at ruleset code and don't know what a certain template/label/name does - do a "Find in Files" (that's what it's called in Notepad++) across the whole ruleset to see where the label/template/name is defined or where it is used somewhere else and might give an idea of how to use it.
Cheers for that. I think I probably did the same sort of searching but with Agent Ransack which is my weapon of choice :)
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.