Jump to content

Integer to double?

Pending 3.1.0

Wouldn't it be a cool idea to have the integers replaced by doubles so the values are more obsolete?
Instead of just doing flat numbers like 0, 1, 2, 3 u'd be able to do 0.10, 0,20, 3,20, 4,80
If you round it correctly.

I've been doing this from the start as it makes the "RP" have more value.

Share this comment


Link to comment

Hi,

Behind the scenes everything is double.


In the RustRewards.json config file you'll find Reward_Small_Increment and Reward_Large_Increment

By default these are set to 1.0 and 10.0,
but you could change them to 0.01 and 0.1, for example.

Share this comment


Link to comment

Hi @Steenamaroo

I've made a couple of modifications to the script myself already, and realized u can just pass whole numbers, and parse em as doubles.
I've already rewritten ServerRewards as it wasnt able to parse 0.10 values etc, would come with the conversion from int to double error.

Was just a suggestion though ^^

Share this comment


Link to comment

Rust rewards gives out ServerRewards in integers, since ServerRewards only supports whole numbers, as far as I know.
It gives out economics as double, though, since that plugin supports it.

If you've rewritten ServerRewards for double then you'd just need to change
(int)(amount) to amount twice, in the ServerRewards?.Call lines in RustRewards,
but there's not really a lot of point in me doing it publicly while ServerRewards only supports whole numbers.

 

What might be easier is just 10X or 100X your economy.
Increasing costs by 10 or 100 eliminates the need for decimals. 😉

Edited by Steenamaroo

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.6k

Customers

Total customers served.

80.8k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.