-
May 27th, 2023, 14:14 #11
- Join Date
- Sep 2018
- Posts
- 14
So you are saying use addNode on charsheet, then use setValue to the player name, then setPublic to false
If so that would allow me to avoid making a whole new file entirely. Something I create on init and then export will do the rest for me.
If this is what you are talking about this is brilliant and I greatly appreciate it.
-
May 27th, 2023, 14:26 #12
You don't need to set public to false. @damned's reference to a "hidden field" was saying don't display it in the FG GUI.
You really only need one command. For example, if you have the character node (stored in nodeChar) and the player name (stored in sPlayerName), you only need one command to create a new field within the character database called "playername":
Code:DB.setValue(nodeChar, "playername", "string", sPlayerName);
Last edited by Trenloe; May 27th, 2023 at 14:28.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
May 27th, 2023, 15:22 #13
- Join Date
- Sep 2018
- Posts
- 14
Perfect... simplified everything for me...
Code:chars = DB.getChildList("charsheet"); for i,v in ipairs(chars) do DB.setValue(v, "playername", "string", v.getOwner()) end
-
May 27th, 2023, 16:51 #14
Good stuff!
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks