BiomeTweaker icon indicating copy to clipboard operation
BiomeTweaker copied to clipboard

Basic arithmetic and getting variables

Open The-Fireplace opened this issue 7 years ago • 1 comments

Something that would be a huge leap forward for the scripting language is the ability to perform basic arithmetic and get the values of variables. This would allow numerous new possibilities, such as: Adding a value to the temperature of every biome in a set Dividing the humidity of each biome in a set by 2

If you want to do this some other way, that's totally fine, but my idea on what the syntax for this could look like: biomeSet.set("variable_name", "variable_name" + 0.25) biomeSet.set("variable_name", "variable_name" / 2.0) biomeSet.set("variable_name", "variable_name" * "other_variable_name")

The-Fireplace avatar May 08 '18 02:05 The-Fireplace

As a way to solve this easier you can use eval! https://stackoverflow.com/questions/2605032/is-there-an-eval-function-in-java

thetakodev avatar Sep 01 '18 21:09 thetakodev