-
January 6th, 2025, 01:06 #1
- Join Date
- Feb 2021
- Posts
- 449
Trying to send a /save command via code
I know this has something to with the manager_chat.lua script, as an example of something similar I see this:
Comm.registerSlashHandler("w", ChatManager.processWhisper, "[charactername] [message]");
but nothing regarding adding support for "/save". Any ideas? Thanks!
-
January 6th, 2025, 02:05 #2
- Join Date
- May 2016
- Posts
- 616
Comm.activateSlashCommand("save");
Discussed here:
https://www.fantasygrounds.com/forum...l=1#post548481Last edited by jharp; January 6th, 2025 at 02:09. Reason: added link to prior discussion.
-
January 6th, 2025, 21:43 #3
-
January 6th, 2025, 22:00 #4
I'm curious - FG saves the database held in memory to the campaign db.xml file automatically every 5 minutes, what's the use case to force this 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!
-
January 6th, 2025, 22:40 #5
- Join Date
- May 2016
- Posts
- 616
Well for me, FoWEnhanced makes use to save FoW data.
-
January 7th, 2025, 03:18 #6
- Join Date
- Feb 2021
- Posts
- 449
I have a lot of experience with this, it seems that for my purposes, it does NOT go to memory first, it goes to the disk. I wrote some custom code that auto applies spell effects and the way I achieved this is by adding a node to the combat tracker for the creature being targetted. This all works fine when i test myself, however, when players are connected it seems to go all haywire and only works periodically. The only thing I could pin it down to was the fact that it was not writing to the disk in time. Saving seems to work.
-
January 7th, 2025, 05:50 #7
FG doesnt read from disk during the game - it only writes to the disk. Once the table has loaded all ruleset, extension and database are loaded into memory and run from there.
Is it possible its a database permissions issue? Where in the DB are you writing the data to?
-
January 7th, 2025, 20:14 #8
- Join Date
- Feb 2021
- Posts
- 449
Yes, I have run into that too, but the fact that /save seems to solve the problem makes me think that it reads from the disk, or something, I don't know, but writing nodes and reading from them in a short amount of time otherwise is VERY flaky. I have been testing this for quite a while too.
Thread Information
Users Browsing this Thread
There are currently 4 users browsing this thread. (0 members and 4 guests)
Bookmarks