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

External tools, software and sites for creating or editing UT99 resources.
User avatar
debilman69
Average
Posts: 38
Joined: Wed Sep 18, 2019 2:19 am
Personal rank: yes
Location: Canada,Montreal

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

Post by debilman69 » Tue Jan 11, 2022 4:33 am

:tongue: how to generate a .ini from a .u :!: :confused2:

Buggie
Godlike
Posts: 1483
Joined: Sat Mar 21, 2020 5:32 am

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

Post by Buggie » Tue Jan 11, 2022 7:59 am

Find class which use this ini and call method SaveConfig() on object from this class.

User avatar
Barbie
Godlike
Posts: 2393
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

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

Post by Barbie » Tue Jan 11, 2022 12:11 pm

Maybe helpful if you give a download link or name for that u file, so others could have a look.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
debilman69
Average
Posts: 38
Joined: Wed Sep 18, 2019 2:19 am
Personal rank: yes
Location: Canada,Montreal

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

Post by debilman69 » Wed Jan 12, 2022 4:38 am

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

Buggie
Godlike
Posts: 1483
Joined: Sat Mar 21, 2020 5:32 am

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

Post by Buggie » 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.

User avatar
debilman69
Average
Posts: 38
Joined: Wed Sep 18, 2019 2:19 am
Personal rank: yes
Location: Canada,Montreal

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

Post by debilman69 » Thu Jan 13, 2022 2:26 am

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

Buggie
Godlike
Posts: 1483
Joined: Sat Mar 21, 2020 5:32 am

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

Post by Buggie » Thu Jan 13, 2022 5:11 am

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.