Predefined {lastRoll} Stat

A Stat named {lastRoll} that always contains the final result of the last die roll.

I would love one for the last three rolls for every character.

Among what I’m sure are countless other benefits, this would allow for a full-blown implementation of the various Narrative Dice systems that the more recent FFG games use (Star Wars, Genesys, L5R etc.)

1 Like

I was rereading the second part of this request, and it implicitly mentions something worth adding: the ability to query any number of rolls in the current action (not just the last one).

The OP says:

My Proposal: A syntax to check for preceeding rolls in the same action. The action message could look like:
My Attack Roll : !(1D20+8) {%1 >= 19 ? "Crit!" : ""}

Where %1 means first die roll in this action.

But we don’t have to limit the result to %1, but we would use %2, %3, etc.

Of course, this works if the rolls are all contained in the same action. While {lastRoll} could even be used, for example, in chat by a different player. At least potentially.

So while I’m not sure if these could be tagged as the “same” request, they certainly are related and it might be worth looking into.

PS: This could also be (ab)used as a workaround for the Query roll function request; where the GM could type !(1d0+7) to set a difficulty and the next player could roll for example !(5d10cs>={lastRoll}cf<=1) .


Because actions have the ability to roll multiple times this should be something more explicitly defined within the action.

Something like the ability to assign a roll result to a variable


My thought process behind this Request was that it could be implemented quickly, without having to build in the ability to store values in Stats.

Unfortunately “lastRoll” always being the last roll, or last roll of a user, can potentially break some functionalities in some systems.

For example, if you have both the attack and damage roll in an action, but later want to handle just the attack roll as the “last Roll” even though Damage was done last, how do you guarantee that? Some sort of “save as last roll” flag? Or, is the better option to provide a “last action roll array”?

1 Like

Hi! I need this for HârnMaster.
They have a clever way of saying “20% of your successes are critical successes, and 20% of your failures are critical failures” without making people do math.
the logic is roll d100. If the roll is below your skill threshold, then it’s a success. but if the ‘ones’ die is a zero or a five, it’s a critical success. Likewise if it’s above your skill threshold it’s a failure and a zero or five on the ones die means it’s a critical failure.

This could be accomplished with an implicit variable which just stores the most recent die role. Let’s call the variable “last_roll”

I could then express the Hârn logic as:

{!(1d100) =< {threshold} && {lastRoll} % 5 == 0 ? "critical success" : {lastRoll} =< {threshold} "success" : {lastRoll}%5== 0 ? "critical failure" : "failure"}

The output would be one of for possible: “critical success”, “success”, “failure”, “critical failure”

What about the idea of giving the user a set of custom variables they can define? This could even be added as a feature of paid accounts, say free accounts get one, paid get ten. Something like that. Probably want to limit it to prevent rare extreme cases causing DB overload.

Then add a function in the dice syntax to temporarily store integers or strings to var1, var2, etc. Each var would then be cleared after every roll.

Could even have global variables the GM could set on a per-campaign basis - again maybe 1 for free, 10 for paid, or something like that.

Custom variables, or assigning to Stats, is a separate Feature Request @nonplayer

This request is meant as a quick fix for the Devs, as it will take some major effort to make the changes necessary for assignment.

Voted. This would make Pathfinder 2e critical hits (generally, double the regular damage) much easier! Currently, I—and I tell my players to—specify attack actions with two sets of delayed-roll damage, one for a regular hit and one for a critical hit.

Currently, the Action takes the current values of referenced stats at the time the action is fired. In addition to being able to reference {LastRoll}, it would be great for the additional rolls to take their values from the stats when they are rolled.

Hi @gargoyd

I’m not sure I understand what you mean. You can use stats to modify rolls, or even as parts of rolls.

I would love to be able to do this in some form. I use Astral for playing Modiphius 2d20 Conan system. This would solve some of the “counting successes” mechanics, and even still allow for showing actual dice rolls (which I find to be a great part of the drama!).

So, yeah, count me in. (I would like to see multiple “past rolls”, probably to the tune of at least three, if not five. Either that or the ability to assign variable, even just temporary variables that only last while the action is being called - not stored for later use… And, yes, @LaMorte, I did see that custom variables is a separate feature request. :grin: )

The problem @gargoyd is referring to is that when the action is clicked, all {expressions} are evaluated before anything is executed. In other words, if you have an action that is

First Roll !(1d20+{stuff})
Delayed !!(1d20+{stuff}

then, if stuff is 5, when the action is clicked, this evaluates to

First Roll !(1d20+5)
Delayed !!(1d20+5)

If you manually change the stuff stat to 9 between rolls, the delayed roll still evaluates to !(1d20+5) because it was already set to that when the action was first clicked.

We’ve discussed this on discord before. It came up because someone (I suppose gargoyd, but it’s been a while) needed a roll to have a different number of dice based on the result of the previous roll. It was something along the lines of (but not exactly, and actually more complex) !({lastroll}d8).

The current workaround is to have 2 actions, which is fine, just not as elegant as most solutions in Astral.

I realize that this may not be the best place to ask this question, but it does stem from the above discussion: Is it possible to input a value into an action? For example, if I want the “stuff” above to be a value that is input at the point at which the action is initiated?

You mean, an input box that lets you type a value when you roll, then uses that value in the Action?

If so, there is a Feature Request for that here: Query roll function

@LaMorte When you click on your Action, it takes a snapshot of the values in your Stats that you are using in said Action. If you change a Stat on the character sheet used in a secondary roll, that roll will use the value of the Stat pre-change.

You cannot change a Stat value during a roll. As soon as you send the Action to Chat, the server automatically uses the current data. Nothing will ever change that.

Unless I’m totally misunderstanding what you are trying to get across.

Yes, that “Query roll function” is, more or less, what I was talking about. I do see some overlap between that request and this one. (And I already voted for that one a while ago… :slightly_smiling_face:)