Skip to content

[Feature] ComboDice Modifier#2061

Open
WBHarry wants to merge 8 commits into
mainfrom
feature/combo-dice-modifier
Open

[Feature] ComboDice Modifier#2061
WBHarry wants to merge 8 commits into
mainfrom
feature/combo-dice-modifier

Conversation

@WBHarry

@WBHarry WBHarry commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Solved ComboDice functionality by adding a new Modifer. I made a BaseDie class that overrides Foundry's basic dice so that it can be used on any roll.

I set it up so that the basic 2d4c will run the standard logic of continuing to roll d4s aslong as the latest roll was higher than the one before it
image


I also added so that 2d4c1 will run the upgraded behavior from Compounding
image
Additional info on the modifier has to be a number, so I just went with 1. Maybe something smarter could be chosen. 🤷

image It's possible the above could be improved. All the shown dice are the d4 dice, eventhough the third dice in this example was a d6 that rolled a 5. This happens because the `Die` class has a single denomination used for all the dice inside of the expression. Will have to check on this more.

@CarlosFdez

Copy link
Copy Markdown
Contributor

I guess two things:

  1. Is there a use for 2d4c? Could the functionality of 2d4c1 become 2d4c?
  2. Let me know when you fix the die icon issue. That seems like it might be pretty important.

@WBHarry

WBHarry commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

2d4c is the base rule for combo dice. 2d4c1 is the modified rule you get if your character uses the Martial Artist stance Compounding, so both need to exist.

@WBHarry

WBHarry commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

I guess two things:

  1. Is there a use for 2d4c? Could the functionality of 2d4c1 become 2d4c?
  2. Let me know when you fix the die icon issue. That seems like it might be pretty important.

I managed to solve 2. The dices are excluded from the normal DiceSoNice flow and instead rolled in place in the comboDice handling.

@WBHarry

WBHarry commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

I changed so that we now have two registered modifiers:
c - ComboDice. The normal logic. 2d4c
cc - Compound ComboDice. The adjusted compound logic. Ex: 2d4cc

Both go into the same handler and just pass a different bool. I think this is a lot more logical than the previous 2d4c1

@WBHarry

WBHarry commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

I guess two things:

  1. Is there a use for 2d4c? Could the functionality of 2d4c1 become 2d4c?

Ah, yeah now I get what you meant by 1.
Yeah we could either omit it entirely and just have people use foundry's exploding dice functionality here.
Or we could keep the 2d4c as a shortcut that rewrites itself to the exploding dice formula, potentially.

@WBHarry

WBHarry commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Although the commonly suggested roll formula doesn't work correctly:
/r 1d4x1x2x3x4
image

The above shouldn't have gone beyond 2 dice since the second dice wasn't higher than the first 🤷
It also makes the dice get rolled one by one and waiting on each one. Currently I didn't set up our implementation to do that as I found it annoying.

@Psitacus

Psitacus commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The formula gave the right result though

IMG_2132

“…if the value of the second roll is EQUAL TO OR GREATER THAN your first roll…”

@WBHarry

WBHarry commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Ah, equal or greater, right-ho.

@WBHarry

WBHarry commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

I really dislike Brawler. Silly one-note severe damage machine 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants