AtomicTorch Studio Forums

CryoFall => Modding info => Topic started by: f6292131 on February 14, 2020, 02:18:14 AM

Title: gold nugget
Post by: f6292131 on February 14, 2020, 02:18:14 AM
How change the amount of nugget
I found these two files
But the server didn't apply
Scripts\StaticObjects\Minerals\ObjectMineralStone.cs
Scripts\CraftRecipes\Manufacturing\Furnace\RecipeIngotGold.cs

From google translate

Title: Re: gold nugget
Post by: ai_enabled on February 14, 2020, 07:53:59 PM
Hello!

Please clarify what exactly you're trying to increase? The chance of finding a gold nugget when mining?
Title: Re: gold nugget
Post by: f6292131 on February 14, 2020, 10:07:59 PM
Yes Or change the amount of gold in the formula
Title: Re: gold nugget
Post by: ai_enabled on February 15, 2020, 11:02:09 AM
Ok, you need to change each of the mineral files in this folder "Core/Core.cpk/Scripts/StaticObjects/Minerals/". For example, see Iron mineral class, line 33:
https://github.com/AtomicTorchStudio/CryoFall/blob/master/Core.cpk/Scripts/StaticObjects/Minerals/ObjectMineralIron.cs#L33
the chance is 1/50.0 you can change it to any number you want. Please ensure you write it as 1/x.0 ΓÇö it's important to add ".0" to ensure the type is fractional otherwise you will get 0 probability due to how C# works when dividing integer by integer.

Regards!
Title: Re: gold nugget
Post by: f6292131 on February 15, 2020, 01:33:35 PM
Thank you :) :)