[New] CustomizeIni version 1.2

Search, find and discuss about Mutators!
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

[New] CustomizeIni version 1.2

Post by Wises »

UPDATED 8/3/2015

Ok , have been nutting this one out for the last few weeks and I think I have a better version completed.
it has a couple of Qwerks , however should be functional to your needs.

Image Image Image Image Image

Version 1.2 details
==================================================
CustomizeIni version 1.2 created by wises 8/3/2015
==================================================

-= About =-

CustomizeIni is used to update Pre-loaded Mutators Settings before-Game-Start.
This Allows for pre-configured settings per GameType , all you need to do is load
Desired 'set' for whatever GameType is being loaded.

-= Requirements =-

CustomizeIni requires version 451 or XC_GameEngine in Order to Run Properly this
mainly effects dealing with Arrays[x]. It may still function on version 436 however.
Also NOT tested on Linux!!!

-= Features =-

Upto 128 Packages can be Defined per "Set"
Upto 128 Settings or (1024) characters can be defined per Package.
Upto 32 Sets can be Defined.
Arrays[x] can now be set.
Settings can be inserted onto 1 line separated by a (,).

-= Installation =-

Configure "CustomizeIni.ini" with Package.Class and Settings

see below for examples;

Code: Select all

[CustomizeIni.Set1]
bVerbose=False
; modify DeathMatch
cPackage[0]=BotPack.DeathMatchPlus
cSetting[0]=bUseTranslocator=False,MinPlayers=2,AirControl=0.350000,FragLimit=0,TimeLimit=10,bForceRespawn=True
;Modify CapturetheFlag
cPackage[1]=Botpack.CTFGame
cSetting[1]=TimeLimit=20,GoalTeamScore=0.000000,bUseTranslocator=true,FragLimit=0
;Modify ServerAdds
cPackage[2]=Serveradds.Serveradds
cSetting[2]=fDelay=15.000000,iGroupSize=1,iAddType=1,sLines[0]=CustomizeIni v1.2,sLines[1]=Created by wises 8/3/2015,slines[2]=Email: psychoservers@gmail.com,sLines[3]=or visit online http://www.ut99.org.
;Modify IPPolicies
cPackage[3]=Engine.GameInfo
cSetting[3]=IPPolicies[1]=111.111.111.111,IPPolicies[2]=111.111.111.112
* Depending on which "Set" you are using , configure your MapVote with Mutator=CustomizeIni.Set(X)
(X) = 1 to 32. ie; "Mutator=CustomizeIni.Set1"
* No Need for ServerPackages= as CustomizeIni is ServerSide only!!

* Be sure to load customizeIni as last Mutator in Mutator-Chain , else some settings will NOT TAKE EFFECT!

; NOTE: DO NOT USE (,) COMMAS INSIDE of "Strings" ie: cSetting[0]=First,"don't use (,) here",Third,fourth,fifth-setting.
; also note. Do-Not need "quotations" around Strings. and sometimes need to check caps for (True/False)
; furthermore: float-values ie; 10.000000 need to be entered with trailing .000000 (6 digits).
; any problems email: psychoservers@gmail.com
CustomizeIni-1.2.zip
CustomizeIni Mutator for UT99
(33.78 KiB) Downloaded 119 times
Version 1.0 details
+-------------------------------------------+
+ CustomIni Version 1.0 by Wises 27/02/2015 +
+-------------------------------------------+

Basically this Mutator will allow you to edit any other "Running-Mutators" .ini files.
- Why you may want to use this Mutator?
This Mutator will allow you to Edit any other Mutators .ini Settings , classic case
would be if you use a MapVote System with varying GameTypes which all share the same .ini
file.

for more info Google CustomIni site:ut99.org

------------------
+ Functionality: +
------------------

32 Configurable Packages , with 32 Configurable Settings. see CustomIni.ini for examples.
16 CustomIni's

------------
+ Install: +
------------

Drop CustomIni.u and CustomIni.ini into system folder.

Open CustomIni.ini and adjust Packages/Settings accordingly.
note the [Package.Class] header for each Configurable [CustomIni.CustomIni] Header.

!IMPORTANT: Place and the end of the Mutator chain (last Mutator to be loaded)

To use a specific CustomIni setting on your server simply add to Mutators=CustomIni.CustomIni[x]
That's about it.

-----------------
+ Known Issues: +
-----------------

I'm sure you'll find something.

---------------
+ Disclaimer: +
---------------

This Mutator Directly Modifies your .ini files!! , backup any/all .ini files into a .zip file
incase something 'Nasty' happens to them through the use of this mod.

Aside from that I hope that it does what you need ;)

Wises.

Download:>>
CustomIni.zip
CustomIni Mutator for UT99 and most likely any other UE1 Game out there.
(12.77 KiB) Downloaded 105 times
concepts thoughts etc
ok , there are alot of cool mutators out there ... however sometimes we want to use the same Mutator in 2-3 different gametypes with different settings for some mods , without having to recompile 2-3 versions of the same Mutator!?!

my theory here is based on the ConsoleCommand;

in short and for Example AutoTeamBalance , we often have scenarios where players all want to test something by going to the same team.. however ATB automatically switches players based on Strengths/etc to respective teams for balancing.

or other Mutators like UToolbox where we may want to customize weapons for one gametype and change these settings later for another?..

so I had a thought and was thinking ... is anyone able to zap up something which has some kind of array[0] for upto perhaps 20-30 configurations like so.

the mod would have an .ini file which would allow admins to enter in packages[0] and settings[0]..
these when loaded by the server could make small adjustments to other .ini files on the fly or PreGameStart for example.


Edit: perhaps there could be classes inside of "ChangeSettings" like ;

ChangeIniSettings.Setting1
ChangeIniSettings.Setting2
ChangeIniSettings.Setting3
ChangeIniSettings.Setting4

Code: Select all

Mutators=ChangeIniSettings.setting1
^ Mutators for mapVote

and ;

bDebug=True
bLogSettings=True

[ChangeIniSettings.Setting1]
Package[0]=autoteamBalance.autoteamBalance
.
.
.
Setting[0]="bBalanceTeams=True,param2=x,param3=y,param4=z"

Code: Select all

set ATB.ATB bBalanceteams=True
set ATB.ATB param2 x
set ATB.ATB param3 y
set ATB.ATB param4 z
// output changes to server.log
[ChangeIniSettings.Setting2]
package[0]=AutoTeamBalance.AutoTeamBalance
package[1]=ServerAdds.ServerAdds
.
.
Setting[0]=bBalanceTeams=False
setting[1]=bEnable=False

Code: Select all

Set AutoteamBalance.AutoteamBalance bBalanceteams false
Set ServerAdds.ServerAdds bEnable False
[ChangeIniSettings.Settings3]
Package[0]=
.
Setting[0]=

[etc.etc]

that could work..

classic example :
NogginBasher wrote: IMPORTANT: If you are running this mod for non-CTF games which have team scores (e.g. DOM and TDM), please set FlagStrength to 0. (Or 1 or 2 might be ok.) The mod was originally designed for CTF, where team scores are low, but in DOM and TDM, FlagStrength multiplied by the difference in team scores will be much larger. Setting it low will do no harm in any gametype; FlagStrength is just an attempt to compensate for errors in player strengths, by also looking at team success during mid-game balancing. The default is now 0 in my working copy, until I work out a CTF/non-CTF specific fix. More info
^^ note the underlined part.. therefore for TDM we could have ;

Code: Select all

set autoteambalance.AutoTeamBalance Flagstrength 0
sooo.. anyone up for the challenge?

EDIT: was based on this post by Adminthis @ UA
Adminthis wrote: function PreBeginPlay() {
if (Level.Title == "Niven Experimental Lab"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 12");}
if (Level.Title == "Facing Worlds"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 14");}
if (Level.Title == "The Last Command"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 14");}
if (Level.Title == "Coret Facility"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 16");}
if (Level.Title == "Dreary Outpost"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 12");}
if (Level.Title == "EternalCaves"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 14");}
if (Level.Title == "The Iron Gauntlet"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 14");}
if (Level.Title == "LavaGiant"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 18");}
if (Level.Title == "November"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 14");}
if (Level.Title == "Hall Of Giants"){
ConsoleCommand("set Engine.GameInfo MaxPlayers 20");}
} More Info
appended: another use could be for siegeIV profile changes ;)
Last edited by Wises on Thu Mar 12, 2015 2:17 am, edited 13 times in total.
User avatar
EvilGrins
Godlike
Posts: 9695
Joined: Thu Jun 30, 2011 8:12 pm
Personal rank: God of Fudge
Location: Palo Alto, CA
Contact:

Re: > Another mutator request lol [ChangeIniSettings]

Post by EvilGrins »

So, you want something that switches what aspects of a mutator can do depending on what environment it's in, be they different maps or different gametypes.

Sounds cool but problematic, because each time you decided you wanted to change what it did for an environment, you'd have to reset it.

A lot of, though not all, mutators have individual settings. I know I change the options on some mutators based on gametype or sometimes just on my mood. Would what you're proposing be changing the settings for each, both your personal settings as well as the ones for the mutators in question.
http://unreal-games.livejournal.com/
Image
medor wrote:Replace Skaarj with EvilGrins :mrgreen:
Smilies · viewtopic.php?f=8&t=13758
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: > Another mutator request lol [ChangeIniSettings]

Post by Wises »

this concept is more angled towards multiserver environments. where admins have a variety of gametypes ie;
DM
CTF
AS
LMS.. etc

now suppose we ran the mod UTToolbox which has an array of goodies from health regenerators to customizable weapons...

however for say DM we wanted to disable some pickups..
this can be done quite simply.

but.. if we wanted to have a different configuration for CTF we can't.. by cause there is only one Mutator with settings already configured for DM :/

IF we had something like ChangeIniSettings then we could configure individual settings of any mod on-the-fly ..

so GamePrefix="DM",mutators="mymod.mymod,ChangeIniSettings.Setting1"

GamePrefix="CTF",mutators="mymod.mymod,ChangeIniSettings.Setting2"

[ChangeIniSettings.ChangeIniSettings]
blog=true
[ChangeIniSettings.Setting1]
package[0]=mymod.mymod
.
setting[0]="Setting for DM only,other setting"

[ChangeIniSetting.Setting2]
package[0]=mymod.mymod
.
setting[0]="Setting for CTF only,Other settings"
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: mutator request >> Change .ini Settings

Post by sektor2111 »

Sounds like a string deal.

Code: Select all

DoStr="set"@ASet[0]@Value[0];
ConsoleCommand(DoStr);
And this probably can be linked with Game-Type and/or Map-Name. Level Title is a different thing. Sometimes has "Untitled".
Certain parameters are replicated to players, others... not sure what's the deal with them. In replication things that should be bNetInitial are for sure initialized once and won't be sent later - are part of initialization. Others are dynamic and each time when something is updated player feels that immediately. I cannot say many things because I'm not expert in replication but for sure if a custom replication is used into a mod that one will be in SERVERPACKAGES or called automated by that game-type native else player cannot deal with those values because doesn't know how to work with them and probably will serialize none things. Example a kind of WSRH is not accurate, weapon simply replicates animation and that's why somehow works but is not smoother since those values sent from server goes nowhere as long as client has nothing to match them and animations from default weaponry generally are sucks - spoken by LOGS Not by Me. Accelerating them will accelerate states with unexpected effects based on whatever timing lost in certain moment. Else the same version by Gust using mutator loaded in packages works better because has ROLE_SimulatedProxy, ticks and timers are not working in ROLE_DumbProxy see messed original projectiles...

For changing values related for a game-type things needs full testing to see what gets native replicated and what is messing up.

Example: Game-Speed. If Level has a dumb set native TimeDilation 3, using that in a server with GameSpeed 1 in Classic style, client will be messed up in movement. Client simply doesn't know what's was changed and when. It helps only if is set a small deviation *0.000001 else only in game admin command slomo 2 then slomo 1 will restore player movement properly... UNTIL is reconnected, and then is messed up again - he did not witnessed when server has changed game-speed if data changed has been lost at disconnecting moment. Such data improper transmitted or not transmitted either might badly screw client joined later which was not informed about any dynamic change.
The same subject is Music changed. Client joined will deal with music from Level not from a trigger which was previously changing clients already connected.
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: mutator request >> Change .ini Settings

Post by Wises »

Console configuration commands
GET <classname> <variablename>
Gets a configurable class parameter. <classname> may be a partial classname, such as "playerpawn", or a qualified classname such as "engine.playerpawn". The class must be loaded in memory, otherwise GET returns an empty string. <variablename> must be the name of a variable that is designated as configurable (either in UnrealScript using the "config" keyword or in C++ using CPF_Config). This returns the value of the configured variable, converted to a string. The value returned by GET reflects the class's default value (for scripted classes, this is the default value that was set for the class using its property sheet). At any time, zero or more instances of objects belonging to <classname> may be in memory, and may have modified values of <variablename>, and they don't affect the value returned by "GET".
SET <classname> <variablename> <value>
Sets the default value of a class's variable. If the class is designated as configurable (using the "config" keyword in UnrealScript or CLASS_Config in C++), and so is the variable, this function updates the Unreal.ini file to reflect the new default value. If any instances of objects belonging to <classname> are in memory, all of those objects are updated. When an object's config variables are updated, they are notified as follows:
The object's PreEditChange() function is called, basically saying "Get ready to be modified!"
The object's configurable variables are updated with the newly configured values.
The object's PostEditChange() function is called, saying "You've been modified, so validate and update yourself".
This procedure enables objects to validate their configurable properties and update themselves. For example, the audio subsystem's PostEditChange() function clamps the sound volume to a safe range of 0.0 - 1.0 (because the SET command enables users to set it to ridiculous values) and then updates the actual volume of the sound effects that are playing.

more info
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: mutator request >> Change .ini Settings

Post by sektor2111 »

Wises wrote: At any time, zero or more instances of objects belonging to <classname> may be in memory, and may have modified values of <variablename>, and they don't affect the value returned by "GET".
I was almost to show an image from editor's log related to Get Set Get - First value - Command - Second Value; but I couldn't upload a tiny picture...

Of course if you have a problem with an actor which is about to spawn just set it bStatic and it won't spawn - this might cause nasty troubles but for sure a bStatic won't be able to pop up.
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: [New] CustomizeIni version 1.2

Post by Wises »

ok.. been working on this one for the last few days and have made version 1.2 updated in first Post.

should be a bit better then the first attempt hopefully ;)
Unknown
Average
Posts: 48
Joined: Sun Mar 08, 2015 1:16 am

Re: [New] CustomizeIni version 1.2

Post by Unknown »

This is indeed very good, and a great idea Wises.
Just a question, does it change which mutators are active as well with preset lists? Or it only changes their configuration?
Say I want to play a Dark Match in Alien Mode and then change to Smart CTF with Flag Announcements and Nali Weapons, can I do that or do I have to go manually change the mutators and this just helps me changes their options?
If it does not, is there any mod that will help me so that?
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: [New] CustomizeIni version 1.2

Post by Wises »

not too sure there unknown.

I may be able to do something like that (in next version) however I think mapvoteLA already does this.
if however I think.. the Mutator has an option to enable/disable in it's settings (.ini) then possibly yes.

edit: Actually MapVoteLa13 will do everything you need I think.

also the way in which it updates Settings (may be able to do what this mod does)
not sure..

lol.
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: [New] CustomizeIni version 1.2

Post by Chamberly »

I really do not understand this at all. Is this just another mapvote? Or offline? I think we have wayyyy too many right now. Even the ones that doesn't work well for other. :P
Image
Image
Image Edit: Why does my sig not work anymore?
Unknown
Average
Posts: 48
Joined: Sun Mar 08, 2015 1:16 am

Re: [New] CustomizeIni version 1.2

Post by Unknown »

What I understood is that this changes the configuration of mutators with .ini files, so you can save some presets and change the configurations quickly instead of going to each option.
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: [New] CustomizeIni version 1.2

Post by Wises »

hmm ,ok.. simple example

use this Mutator with a MapVote System ie; MapVoteUltimate
and something like this: ServerAdds

>> which is used to write messages to players 'Chat / Consoles' in game.

now lets say that you want to Advertise Different Messages to players depending on which GameType they are playing..

>> This cannot usually be done because you can only configure "one group of settings" in the mod which when loaded relays to all GameTypes.

this is where CustomizeIni comes in to effect.

simply configure MapVote with CustomizeIni.Set(X) at the end of the mutator-chain; // (X) = 1 for the first instance.

^ do this for each gametype;

Code: Select all

DeathMatch , Mutators="<mutators>,CustomizeIni.Set1"
CaptureTheflag , Mutators="<mutators>,CustomizeIni.Set2"
MonsterHunt, Mutators="<mutators>,CustomizeIni.Set3"
now in the CustomizeIni.ini do the following settings;

Code: Select all

[CustomizeIni.Set1]
; Rules for Death Match
cPackage[0]=ServerAdds.ServerAdds
cSetting[0]=sLines[0]=Frag Everything in Sight!

[customizeIni.Set2]
;Rules for CTF
cPackage[0]=ServerAdds.ServerAdds
cSetting[0]=sLines[0]=somebody Get the Flag!

[CustomizeIni.Set3]
;Rules for Monsterhunt
cPackage[0]=ServerAdds.ServerAdds
cSetting[0]=sLines[0]=Kill the QUEEN!!

//note to self
//cPackage[1]-[Y], cSetting[1]-[Y] = may need a loop to wipe current entries. 
//end note
this is one example of its use.. hope tat helps.
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: [New] CustomizeIni version 1.2

Post by papercoffee »

It will only manipulate the server-side ini?
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: [New] CustomizeIni version 1.2

Post by Wises »

no any .ini for any Mutator loaded (which is why it needs to load last)
for example AutoTeamBalance.ini

;)
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: [New] CustomizeIni version 1.2

Post by papercoffee »

No ...what I did mean: It will not manipulate the ini of the client who is connecting to the server which uses this modification?

Why I'm asking ... I hold the opinion, that you should never screw with the clients ini.
Spoiler
And I ask also because I'm too inexperienced regarding any coding and scripts and can't check it for myself. :roll:
Post Reply