SBReplacer

Search, find and discuss about Mutators!
Post Reply
User avatar
Barbie
Godlike
Posts: 2839
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

SBReplacer

Post by Barbie »

Looking for beta tester!
SBReplacer wrote:With this Mutator you can replace or remove Actors in a map, except Actors that have the property "bStatic" or "bNoDelete". It can be done in an unique map, a group of maps or all maps. It also can be done for a single unique Actor or all Actors of a class.
The Mutator itself is ready so far; now I'm creating the documentation.
The documentation how it is given so far in the code

Code: Select all

/******************************************************************************
Version 0, Released 17 May 2024


Replaces in a map all Actors given in the array *MapInfos*.
* The array members are treated in ascending order.
* Upper or lower case does not matter for any entry.
* Leading and trailing white chars are removed.

- *MapName* contains the name of a map name:
	* if it specifies a single map, add the full mapname with extension, eg. "MH-Canyon.unr"
	* if it specifies a group of file names, use '*' and/or '?' as wildcards
	* if *MapName* is empty, the replacement will be done in ALL maps

- *ActorOut* is either the name of a specific Actor in a map or a class name:
	* It MUST be given and MUST NOT designate an Actor with bStatic=True nor with bNoDelete=True nor an abstract class (they cannot be changed by default).
	* If it may be a class name, and then MULTIPLE replacements may happen. The package name MUST be given (e.g. "UnrealI.StoneTitan" or "MH-Canyon.Pupae123").
	* If *ActorOut* is the name of a specific Actor in a map only ONE replacement will be done. You may need the Unreal Editor to obtain the correct name. The package name of the Actor may NOT be given because all Actor's names are already unique (e.g. "StoneTitan4" or "MH-Canyon.Pupae123").

- *bActorOutIsClassName*:
	Specific Actors always have digits at end (e.g. "Pupae123"), class names usually not (e.g. "StoneTitan"). Because this is not always true (see class 'botpack.minigun2' for example), the flag *bActorOutIsClassName* must be set accordingly to TRUE or FALSE.

- *ActorReplaceWith* (replaces what given in *ActorOut*):
	* it MAY be given, must NOT name an Actor with bStatic nor an abstract one
	* it must contain Actor's package name (e.g. "UnrealI.StoneTitan") ("botpack" package may be omitted)
	* if *ActorReplaceWith* is empty, *ActorOut* is just removed
	* to be visible on net clients, *ActorReplaceWith*'s package must be in section "ServerPackages" of UT server

Examples:
MapInfos[0]=(MapName="TestMap.unr",ActorOut="Botpack.Translocator",bActorOutIsClassName=TRUE,ActorReplaceWith="")
This rule matches only map "TestMap.unr" and will remove all Botpack.Translocator.

MapInfos[1]=(MapName="TestMap*",ActorOut="Botpack.SuperShockRifle",bActorOutIsClassName=TRUE,ActorReplaceWith="DangerW.ZencoderShockRifle")
This rule matches for all maps which name starts with "TestMap" and will replace all Botpack.SuperShockRifle with DangerW.ZencoderShockRifle.

MapInfos[2]=(MapName="MH-*",ActorOut="Nali0",bActorOutIsClassName=true,ActorReplaceWith="UnrealShare.SkaarjScout")
This rule concerns ALL MonsterHunt maps (they start with "MH-") and will replace the "Nali0" a 'UnrealShare.SkaarjScout'.

MapInfos[3]=(MapName="",ActorOut="",bActorOutIsClassName=TRUE,ActorReplaceWith="WhatEver")
This rule is invalid because *ActorOut* is empty.


== Other INI settings ==
LogLevel: use one value of these: LOG_None, LOG_Error, LOG_Warning, LOG_Info, LOG_Verbose, LOG_Debug, LOG_All
bUseLogTimeStamp: Add a timestamp in front of log messages? Values=TRUE|FALSE
bActive: you can temporarily disable this mutator with this. Values=TRUE|FALSE


SeriousBarbie AT barbies DOT world
******************************************************************************/
I added an example INI file "SBReplacer-ReplaceOldUnrealWeaponsAndAmmo.ini" for replacing old Unreal weapons and ammo with the UT ones.   
Auto merged new post submitted 6 minutes later
I just noticed that the description for *ActorOut* is wrong - this will be corrected and kept in sync with the documentation in HTML format.
Attachments
SBReplacerV0.u
(28.52 KiB) Downloaded 16 times
SBReplacer-ReplaceOldUnrealWeaponsAndAmmo.ini.zip
(805 Bytes) Downloaded 16 times
"If Origin not in center it be not in center." --Buggie
User avatar
Hitman
Adept
Posts: 289
Joined: Mon Aug 16, 2010 11:01 am
Location: Sweden
Contact:

Re: SBReplacer

Post by Hitman »

Will this work on all game-types? COOP for ex?
User avatar
sektor2111
Godlike
Posts: 6423
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: SBReplacer

Post by sektor2111 »

To mention something...
Actors that are "bStatic" or "bNoDelete" can be a bit... ruined in a more or less "ugly" stage.
Stage 1) means normal UT compiler unable to do things that are doable. In this case whatever "static" can be hidden/disabled - except Navigation Points that first need "released" from connections with the rest of data. Actor "bNoDelete" can be moved into void and also disabled from "event" "tag" whatever is needed.

Stage 2) means getting over restrictions and doing logic tackling of evil actor that is unwanted. Here I did a lot of removals without any issue concerning network play - you can even change movers to work as you want.
User avatar
Barbie
Godlike
Posts: 2839
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: SBReplacer

Post by Barbie »

Hitman wrote: Sun May 19, 2024 12:58 pm Will this work on all game-types? COOP for ex?
Yes.
"If Origin not in center it be not in center." --Buggie
Eternity
Skilled
Posts: 177
Joined: Sat Nov 30, 2019 10:56 pm

Re: SBReplacer

Post by Eternity »

Very interesting...
But i would like to know how to get an evil actor(s) (that are unwanted) a bit ruined... even if in a more or less "ugly" way, if they are of the class 'Engine.LevelInfo'...
To give a last chance to a Runtime Patcher, before a "crooked" map is considered as a "must get edited/fixed".
User avatar
Barbie
Godlike
Posts: 2839
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: SBReplacer

Post by Barbie »

Eternity wrote: Thu May 23, 2024 6:14 am
But i would like to know how to get an evil actor(s) (that are unwanted) a bit ruined... even if in a more or less "ugly" way, if they are of the class 'Engine.LevelInfo'...
'Engine.LevelInfo' is bStatic, so it cannot be removed (and I never got the idea to replace that :twisted: ).
My intended aim for this Mutator was to answer questions like "how can I get weapon xy into the map" or "can the Supershockrifle in map xy be removed".
"If Origin not in center it be not in center." --Buggie
Post Reply