Giter VIP home page Giter VIP logo

Comments (12)

frankieali avatar frankieali commented on September 6, 2024 1

Hey. Thanks for reporting this issue. I'll take a look and see what I can do.

from dice-box.

frankieali avatar frankieali commented on September 6, 2024 1

Fixed in version 1.0.11
You can roll just the percentile die with Box.roll("1d00") or Box.roll("1d%")
Using Box.roll("1d100") will now roll both the percentile die and the d10
The default dice set still uses a d10 with numbers from 1-10 instead of 0-9. However, there are other themes available that use the 0-9 numbers and they should calculate correctly.

from dice-box.

frankieali avatar frankieali commented on September 6, 2024 1

I think I'll build a d10 for the default set that goes from 0-9 as well. I think the 1-10 die is more rare than the 0-9. Remembering how to do all the steps in Blender may take me a minute though. I need to make a d6 with pips too, so I'll see if I can do this one at the same time.

from dice-box.

frankieali avatar frankieali commented on September 6, 2024 1

version 1.0.12 has been published

from dice-box.

carsonb avatar carsonb commented on September 6, 2024

Thank you so much @frankieali!

from dice-box.

carsonb avatar carsonb commented on September 6, 2024

I changed over to use the smooth theme, as that uses 00-99 and 0-9 dice.
Rolling 00 and 9 yields 9. Rolling 20 and 0 yields 20.
However, when 00 and 0 are rolled, the sum is 100. I think it should be zero.

from dice-box.

frankieali avatar frankieali commented on September 6, 2024

I was going to disagree with you on this. I always remembered a 00 + 0 meant a 100. However, I took a look at my Dungeon Masters Guide and noticed
magic-item-tables-145
and looking back at D&D 2nd edition from 1989
Screen Shot 2024-01-23 at 7 35 31 AM
So, I think you're correct on this. 00 + 0 = 00. It may mean 100, but the lookup tables still refer to 00.
Good catch. I'll make an update.

from dice-box.

carsonb avatar carsonb commented on September 6, 2024

If it helps, this comes up a lot for the RPG system I play called Mothership. It's a roll-under percentage system, so basically stats and skill checks are always expressed with a percentage chance of success. Folks ask about the 0 vs 100 outcome often enough due to how many times 1d100 is rolled.

I believe in the case when the dice are 1-10 & 00-90 outcomes should be 1-100, though. After all, a 10 was rolled.

I don't envy the complexity ahead regarding this, but I really appreciate how responsive you've been.

from dice-box.

frankieali avatar frankieali commented on September 6, 2024

It's actually a small change. It'll take longer to bump the version, rebuild and publish the change.

if (d10.value === 0 && d100.value === 0) {
d100.value = 100; // 00 + 0 is 100 on a d100
} else {
d100.value = d100.value + d10.value
}

from dice-box.

frankieali avatar frankieali commented on September 6, 2024

@carsonb The final values being returned are integers, meaning 00 becomes just a single 0. Is single 0 as an int acceptable or should it be '00' as a string value? I'm leaning towards all results being the same format, meaning integer, and displaying the double '00' is the responsibility of the parser that reads/interprets the final results object. What do you think?

from dice-box.

carsonb avatar carsonb commented on September 6, 2024

Oh, definitely return integers. Thanks for asking 🙂

from dice-box.

frankieali avatar frankieali commented on September 6, 2024

While working on this fix I found another bug. Very rarely, the d10 value is added to the d100 total twice. I think this has something to do with the physics engine putting a body to sleep and then waking it up again in the next frame before it can be immobilized. Either way, that's getting fixed as well.
I wouldn't have noticed this if I wasn't rolling hundreds of d100's to get those 0 results. Usually rolling 30d100 at a time, so 60 dice, triggering more possibility for that 1 frame interaction.

from dice-box.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.