Page 1 of 1

Need help !!! how to generate a .ini from a .u

Posted: Tue Jan 11, 2022 4:33 am
by debilman69
:tongue: how to generate a .ini from a .u :!: :confused2:

Re: Need help !!! how to generate a .ini from a .u

Posted: Tue Jan 11, 2022 7:59 am
by Buggie
Find class which use this ini and call method SaveConfig() on object from this class.

Re: Need help !!! how to generate a .ini from a .u

Posted: Tue Jan 11, 2022 12:11 pm
by Barbie
Maybe helpful if you give a download link or name for that u file, so others could have a look.

Re: Need help !!! how to generate a .ini from a .u

Posted: Wed Jan 12, 2022 4:38 am
by debilman69
Buggie wrote: Tue Jan 11, 2022 7:59 am Find class which use this ini and call method SaveConfig() on object from this class.
call the SaveConfig () method on the object of this class. you have an example I start in the field

Re: Need help !!! how to generate a .ini from a .u

Posted: Wed Jan 12, 2022 6:57 am
by Buggie
For example if I have class:

Code: Select all

class RegenAmmo expands Mutator config(RegenAmmo);

var() config int MinAmmo;
var() config float AddRatio;
And want make RegenAmmo.ini file, I can i some other place (code of another actor) spawn RegenAmmo and call SaveConfig:

Code: Select all

Spawn(class'RegenAmmo').SaveConfig();
Then call this code in game and get .ini file.

Re: Need help !!! how to generate a .ini from a .u

Posted: Thu Jan 13, 2022 2:26 am
by debilman69
Buggie wrote: Wed Jan 12, 2022 6:57 am For example if I have class:

Code: Select all

class RegenAmmo expands Mutator config(RegenAmmo);

var() config int MinAmmo;
var() config float AddRatio;
And want make RegenAmmo.ini file, I can i some other place (code of another actor) spawn RegenAmmo and call SaveConfig:

Code: Select all

Spawn(class'RegenAmmo').SaveConfig();
Then call this code in game and get .ini file.
Spawn(class'RegenAmmo').SaveConfig(); where do you mark code in ut? in the console

Re: Need help !!! how to generate a .ini from a .u

Posted: Thu Jan 13, 2022 5:11 am
by Buggie
Not in console. Inside another class which you compile.

If you not want compile code for each class, you can make general mutator, which accept classname in mutator command and work on general way.

So you call some mutate command while mutator loaded and it call SaveConfig() for produce ini file.