Thread: Retrieving the last dice rolls
-
January 9th, 2019, 01:18 #1
Retrieving the last dice rolls
Folks,
Asking a wild question here.
Using script, is it possible to fetch the last dice roll results a player made?
If it's not currently possible, are there any ideas about how I might 'save' a roll result.
I *have* thought about using a character/NPC's sheet and saving it there and thus I can use the DB, or better, save against the campaign data?
Any thoughts, I'm off to the land of sleep, oh dear, gotta be up for work in 6 hours.
Cheers!Ruleset and much more content built for FGU.
Come join me on Twitter at: https://twitter.com/MadBeardMan to see what I'm up to!
-
January 9th, 2019, 01:49 #2
You are going to have to save it as a variable or save it into a new database field.
If this is to add damage bonus to your next roll send the value direct to the modifier stack instead.
-
January 9th, 2019, 01:59 #3
You'd need the rRoll table, which is not stored anywhere after the roll completes - it's passed as an argument throughout the action process.
Maybe have a script package that you can call to store it there - if it is needed outside of the individual client, then use OOB messaging from the player's side to the GM side, which stores the last rRoll table for each player. Or maybe have it as a file level variable in the relevant action script packages, which would store it at each client script - with OOB messaging functions so the GM can access the relevant variables (if it is needed at the GM level, if not it's easy to get within the same client global package). This second option would allow you to potentially get the last roll for each action type.
The main gotcha with the OOB messaging side is that I've had issues in the past trying to pass a LUA table within the msgOOB table. But I didn't investigate it too deeply as I just split out the variables with the table I needed. So you may have to split out what you need from rRoll to return in the msgOOB table.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