-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request Extra Reroll Options - Old/New Roll & Kept #17942
Comments
What is the use case or rules application? This seems entirely extraneous. |
It would be entirely for modules, I don't really think there is anything regarding rules that this would apply to. The main purpose is for modules to have a an easy way to know the old results and what was kept when a reroll happens. When you reroll a dice nothing is really kept around regarding the old roll if it keeps the new roll, or the new roll if it keeps the old roll nor does it provide information on what roll it decided to keep. When the old chat message is deleted there is no indication as to why it's being deleted, after that the system recreates the chat message using whatever roll is kept. There is an indication that the new message was because of a reroll but you have no easy way from a module perspective on how the kept roll compared to the roll that was dropped. The Since the roll options are just bits of string and is already being used to notate that a reroll happened or if a hero point was used, it would make sense to also store a bit of information about the reroll process there as well. It would be around 3-5 lines of extra code and would require no maintenance unless there was a major re-write to how rolls and rerolls are handled. A lot of modules are listening to the |
I’ll leave it for a code lead to assess, but adding extra code to the system and adding more to the data model without a use case other than “maybe a module might use it some day” isn’t normally a priority or something that the leads would likely want to add. It’s some work for, at this point, literally nothing. |
I don't really think there is anything to add to the data model. Unless I am missing something getting the roll options from an ItemPF2e or an ActorPF2e returns a As for a use case, I am wanting to add this kind of functionality to PF2e Assistant so that it can undo anything it did when a reroll happens incase it needs to do something else. Or figured out that it doesn't need to do anything since the results of the roll didn't change. |
I'm leaning against no. For your use case, I'm thinking storing the previous result in the message flags is probably a better solution. Perhaps there might be a use case for an options based solution with some sort of remove after roll upgrade. I recall there being effects that are consumed when it would change the result. A solution that can handle that would probably be ideal, since what you're looking for would be a subset of that. |
Storing it in the message flags is fine as well, as long as there is a way to get the previous results easily than I am happy. Only reason I suggested roll options is because some stuff is getting added there for rerolls. |
Any reason the hooks aren't sufficient? |
The hooks provide no context about the rolls, nor a way to link them to what chat message is being re-rolled. |
There doesn't appear to be an easy way to determine information about the discarded roll when re-rolling, before discarding the old roll completely would it be possible to add something like the below to the roll options to make it easier.
The text was updated successfully, but these errors were encountered: