TALES of the VALIANT
  1. #1

    Is there a way to refresh values from inventory coins?

    Because I am having difficulty with adding a number field, I am using the coins node and adding a custom box called "PERC" for the selling percentage of items so they can be bought automatically. However, I notice that when I change the value, it doesn't seem to write it to db.xml until I close the character sheet. Is there a way to have the coin values auto write when a value has changed? Or is there another way around this?

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    34,090
    db.xml doesn't contain the values of the FG database at any exact moment in time, that is all stored in FG's memory. db.xml is just the copy used to load into memory when the FG campaign starts, it's auto saved every 5 minutes as a backup. You can force FG to write its current memory to db.xml with the /save chat command - but this will only be a copy of the memory at that one point in time. If you're not using the /save chat command then I imagine the exiting of the character sheet is just coincidence and it was the same time as the FG 5 minute auto save.
    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!

  3. #3
    Quote Originally Posted by Trenloe View Post
    db.xml doesn't contain the values of the FG database at any exact moment in time, that is all stored in FG's memory. db.xml is just the copy used to load into memory when the FG campaign starts, it's auto saved every 5 minutes as a backup. You can force FG to write its current memory to db.xml with the /save chat command - but this will only be a copy of the memory at that one point in time. If you're not using the /save chat command then I imagine the exiting of the character sheet is just coincidence and it was the same time as the FG 5 minute auto save.
    Ok thanks but I don't think that is correct, every time I close and reopen the CT it sets the correct value, so I think that triggers a write. I will try the /save command though, thanks.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    34,090
    Quote Originally Posted by alloowishus View Post
    Ok thanks but I don't think that is correct, every time I close and reopen the CT it sets the correct value, so I think that triggers a write.
    I'm not aware of any FG ruleset code that specifically triggers a write to the database, unless the code is using an undocumented API call. What ruleset are you using? Anyway, it doesn't really matter for this discussion, what I said is correct - the db.xml file is only an accurate representation of what is in FGs memory when the db.xml file is last saved,
    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 3 users browsing this thread. (0 members and 3 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
  •  
Cosmere RPG Beta Launch

Log in

Log in