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

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

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

Post by debilman69 »

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


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

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

Post by Buggie »

Find class which use this ini and call method SaveConfig() on object from this class.
User avatar
Barbie
Godlike
Posts: 2806
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 »

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: 45
Joined: Wed Sep 18, 2019 2:19 am
Personal rank: yes
Location: Canada,Montreal
Contact:

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

Post 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
ImageImage


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

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

Post 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.
User avatar
debilman69
Average
Posts: 45
Joined: Wed Sep 18, 2019 2:19 am
Personal rank: yes
Location: Canada,Montreal
Contact:

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

Post 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
ImageImage


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

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

Post 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.
Post Reply