Change Def Value

Started by soltysek, April 06, 2015, 03:12:37 AM

Previous topic - Next topic

soltysek

Hi .

I have question to expirienced moders if its posible to change Def value from DLL  .
I'm not so exp. in coding but it will look like this ?:

public static void Method()
{
int a = 45;
DefDatabase<ThingDef>.getNamed("MyRock").mineableYield = a;
}

I do not want to write values to a file , only dynamically change the value of for eg. mineableYield while game is runing . I have the plan to generate a random value and change it every 1 sec , but i can't figure out hook to Def array . 

P.S. Sry for my eng. it's not my native lang.