kidfearless / Foundry-TrueRNG

MIT License
6 stars 5 forks source link

Question/Inquiry #13

Closed karpana closed 2 years ago

karpana commented 2 years ago

While I use the TrueRNG module in my foundry VTT games, I know that not everybody does.

I'm in the process of building a module of PF1 enhancements, and rather than using the TrueRNG randomize function, what is the best and/or most appropriate "core foundry vtt" function that will work with TrueRNG (when it's installed) and without (when it is not)?

karpana commented 2 years ago

for context, this is the function I'm using (directly against TrueRNG) to simulate a d20 roll. Math.floor(TrueRNG.GetRandomNumber() * 20) + 1

karpana commented 2 years ago

Found the answer I was looking for from the foundry discord...

let dieRoll = await new Roll('1d20').roll()