Some digital games (assume I'm talking only about those for the rest of this post) with "board game / pen & paper" aesthetics represent die rolls by actually making rigid body physics objects and simulating them tumbling around from an initial (possibly player input determined, possibly not) transform + impulse, and then reading the result for "which face of this object is facing directly up?" to get the outcome. Other games more conventionally pre-calculate the result of the roll in code, and then play a canned animation of the die coming up with that value.
For the latter - at Irrational we called this "emulated" in contrast to the former "simulated", which I assume came from the Looking Glass lexicon - it's very easy to transparently apply any of the usual PnP / board game bonuses and penalties that your mechanics might feature to the result - eg a stat boost turning a straight D6 roll(1, 6) into a roll(1+bonus, 6) or roll() + 1, etc. The result is calculated instantly in code, and the appropriate canned visual is displayed to the player to give them the feeling of having just made the roll. Standard stuff.
What I'm wondering about is how you do this for the former case - for simulated die rolls where the result really is an emergent outcome of the physics sim. If you want to add a +1 bonus of any kind, does that put you back into predetermining the result territory, and faking that it was a real simulated roll for the player? Or do you actually add extra weight to the sides of the die that will produce the intended outcomes? Or do you run a bunch of simulations invisibly behind the scenes in a single frame / spread over a few frames until you get the result you want, and then play that for the player? Or do you somehow calculate what starting transforms and impulses for the die will or won't produce the intended result? And how do you handle any of those if player input is affecting the dice as the roll starts?
This isn't for an actual game I'm working on or anything, it's just a question that stuck in my brain because it didn't seem to have an obvious answer. Would love to hear about it if anyone has tackled this particular problem before!
So, this would be stupidly complicated, but you could definitely simulate a weighted dice in the physics engine that rolls how you want it. Unfortunately, with physics simulations being unpredictable and all that, there's still a non-zero chance that some other number could come out on top.
If I were somehow put into a situation where a game director insisted on simulated dice rolls that were still 100% predictable, I would uhh... paint the tape, to use a bit of stock market parlance. Let the player roll a blank die, then paint the number you want on the face pointing up. You could leave it at that, depending on the narrative context. For example, you could show the final roll as LEDs in a sci-fi game or as magic in a fantasy one. But per your suggestion, you could also simulate the entire roll with physics, then paint the numbers, and finally show the outcome as an animation for a truly spectacular piece of stagecraft that no player would ever appreciate.
