ID:1696803
 
how do I make it so i can display stats in decimal form like 0.0005?

Should be as easy as outputting the value in decimal form. (Ex: HP/MaxHP = 50/100 = 0.5)

If you want a certain decimal point, or if you are getting a scientific notation out of it, look up num2text().

If you want to round off to a certain decimal point, you have two choices:

(1) Use round() and round to the nearest decimal point. Ex: if you want 3 decimal point, do: round(X, 0.001) which rounds to the nearest X.XXY value. (If the round off was 0.002, it would round the value to the nearest even decimal value. 0.005 = last value will be either 5 or 0, etc.)

(2) Or multiply the value until the decimal value becomes a whole number then round off.

For example: we want to round off after 2 decimal point, you would do: round(X/Y * 100) / 100

There should be no point of doing THIS method in BYOND since (1) is much easier and faster.
well i was trying to make a system where it would assign a rand decimal point to a stat like rand(0.005,0.009) and have the stat show up as whatever was picked
Not too sure why you want to do decimals with such low values but that's your choice.

rand() returns an INTEGER value - meaning whole numbers only, no decimals.

To resolve this for your end, you can do this: rand(5,9) / 1000 to get 0.005 - 0.009
is there any way i can have the number be shown and not come off as like 0.5-e09 or w/e if the decimal gets to high? I tried the num2text but it seems it wont work for certain amounts
Is there any particular reason why you are using such low values that must absolutely be displayed to the user?

It would be much easier for the user to see whole numbers and have your system designed to convert that to a decimal value for whatever reason (or have the number as a decimal already and multiply for the stat value the user can see).

I know that as a user I would not want to see 0.00000000008 as a stat, I would much rather prefer 8 or even 0.08 at most.

it is mostly for the factor that I wanted to leave more room for growth of displayable stats down the line without inaccuracies if the number gets to big and to slow down some stat gains
num2text() should work, but a 32-bit float can only go so far if you're using extremely large or small numbers.

Try num2text(N,99) where N is your number. 99 stands for the number of significant figures the number is trying to display (1000000 = 1 sig fig, the 1, will be shortened to 1e6 normally).