Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I am doing a character generator for a roleplaying game in FM6, mainly for testing the randomizing features.

Using the Int(Random*6) I am able to simulate a normal 1d6 (one sixsided dice) roll with the mean value 3.5.

But I also want to be able to do the unlimited rolls (Un1d6 has the mean value 3.75). Unlimited throws works like when you roll a number 6, that dice + a new dice should be rolled again and the result should be added to the other dices.

I.e if you roll a Un3d6 and rolls 3.6.2 you take the middle dice (the 6) and rolls that one together with a new dice again and rolls (3.2.)3.4. The numbers inside the paranthese are the old dices, the very result will then be 12.

Any ideas on how to calculate this?

Thanks in advance!

  • 3 weeks later...
  • Author

I'll give you the C++ function for it then.

int Un(int n) //UnNt6 - t.ex. Un(3) = Un3t6

{

//Error handling! If you get a negative value anywhere, you'll know that

//something is wrong!

if (n < 0) return(-1);

//The very function

int temp;

if (n == 0) {

return(0); }

else {

temp = rand() % 6 + 1;

if (temp == 6) {

temp = Ob(2); }

return (temp + Ob(n - 1));

}

}

Anyone knowing how to script/calculate this or even - make a plugin that works as an external function for even easier scripting. Suggestions?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.