[SOLVED] startAmount unitsSold and licencePrice format

I was working on the MoreGrapple mod and for the platforms code i used TZPack as a reference then i realized that the startAmount unitsSold and licencePrice use a weird format like

startAmount:1.3,
unitsSold:7E1,
licencePrice:5E5,

I was wondering why this is? and how real numbers would be written in this format???

2 Likes

E1 means 1 zero (10^1)
E5 means 5 zeroes (10^5)
So 7E1 = 70 and 5E5 = 500000
And you don’t need to write numbers like that in your mod :slight_smile:

I’m pretty sure the cause of this is the obfuscator/compressor they use to make the code smaller and harder to read.
Edit: Or maybe they just prefer this way?
Edit 2: Also, in case you don’t know how powers work there could be decimals before the E, and in that case the number after the E represents not only the zeroes but every digit except the first one.

4 Likes

Oh thanks

E1 means 1 zero (10^1)
E5 means 5 zeroes (10^5)
So 7E1 = 70 and 5E5 = 500000
And you don’t need to write numbers like that in your mod smile

I’m pretty sure the cause of this is the obfuscator/compressor they use to make the code smaller and harder to read.
Edit: Or maybe they just prefer this way?
Edit 2: Also, in case you don’t know how powers work there could be decimals before the E, and in that case the number after the E represents not only the zeroes but every digit except the first one.

And I thought I knew how to speak gibberish…

3 Likes

Math is much more annoying than it should be, right? :stuck_out_tongue:

3 Likes

Lel

Somehow I always know it’s you when I get a notification right after posting something lol

2 Likes

xD
EDIT: @Darkly is the 400th person to like a post of mine

2 Likes

The mods can now close this thread

1 Like

Great thread! Many thanks @Darkly for offering advise :clap:

1 Like
1 Like