AdvancedMutator v2r1 <Mainly for developers>

Search, find and discuss about Mutators!
User avatar
PrinceOfFunky
Godlike
Posts: 1040
Joined: Mon Aug 31, 2015 10:31 pm

AdvancedMutator v2r1 <Mainly for developers>

Post by PrinceOfFunky » Sun Sep 25, 2016 4:51 am

AdvancedMutator provides the means to extend Mutators through the use of sentinels which constantly check the objects values and call the callbacks within modules.

Full Readme.txt in spoiler:
Spoiler
Show
Name: AdvancedMutator
Version: 2r1
Author: Francesco Biscazzo
Date: 2016-2019
Description: AdvancedMutator provides the means to extend Mutators.

NOTE: Thanks to Feralidragon and CacoFFF to have helped me understanding replication.

Module callbacks:
- All the standard Mutator callbacks (except for "PostRender");
- Key event;
- An object called its Tick() event;
- An object is about to become None;
- An object variable value changed;
- An object variable value stayed unchanged;
- An actor picked up a Inventory item;
- An weapon's Fire() or AltFire() function is called;
- A projectile has spawned;
- An actor jumped;
- An actor changed weapon;
- The game is reccomenging which weapon to use to an actor;
- An actor is selecting the next activable item;
- The game is asking if to reduce a damage;
- An actor is prioritizing an armor;
- An actor put its head underwater;
- An actor put its head out of the water;
- An actor got triggered;
- An actor got untriggered;
- An actor changed zone;
- An actor changed state;
- An actor is aiming with a weapon;
- An actor hit the wall;
- An actor is landing;
- An actor is touching another actor;
- An actor stopped touching another actor;
- An actor changed base;
- An actor was encroached by another actor;
- An actor went in the void;
- A TCP connection has been denied;
- A TCP connection has been accepted;
- A TCP message has been sent;
- A TCP connection has been closed;

Instructions for mappers:
- CanvasSensor.calibration: Determines the tollerance between the lastRender time and the Level.timeSeconds;
- CanvasSensor.bFloorCalibration: Floors both lastRender and Level.timeSeconds after the calibration;
- AdvancedMutatorModuleRegister.moduleClass: If not None a module of the specified class will be spawned and added to the modules chain;

Configurable settings (AdvancedMutator.ini):
- AdvancedMutatorManager.bTCPMessagesEnabled: If true enable the TCP system to run to call TCP callbacks on modules;
- AdvancedMutatorManager.maxNoneTimes: The times an ObjectInfo can exist without a realOwner before to be destroyed;
- AdvancedMutatorManager.bDebug: Set it to true for debug purposes;
- AdvancedMutatorMaster.bCustomGameTypeMutator: If true the AdvancedMutatorMaster will be placed as second mutator in the mutators chain (NOTE: In that case "PostRender()" won't be called). If false it'll be placed as first one;
- TCPMessagesManager._port: The initial port that the TCPMessagesManager thread will try to bind to. NOTE: Use actualPort to get the actual open port;
- TCPMessagesManager.bUseNextAvailablePort: If true bind the first free port found starting from _port;
- TCPMessagesManager.bLogs: If true logs every TCP action;

TCP messages NOTES:
- The banned IPs won't be able to communicate with modules;
- When a connection is accepted a response is sent, this response contains the current ingame AdvancedMutatorManager's class and name and the same is done for all the current ingame modules;
- Sending a message starting with "TARGET_MODULE <InGameModuleName>"(where "<InGameModuleName>" is the name of a spawned ingame module) will set the TCPConnection's targetModule to the specified module, this can be useful for modules that want to know if they are the target of the message they just received;

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! !!
!! !! IMPORTANT !! !!
!! "AdvancedMutator v2r1" must be added to the mutator list before to start a match to make modules work! !!
!! !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Classes descriptions:
- AdvancedMutatorMaster: Sets itself as first mutator of the chain and routes its callbacks to the manager;
- AdvancedMutatorManager: Checks every actor to give it an OI and routes the callbacks to the modules;
- ObjectInfo: Sets itself as ownerWeapon's affector and route all the callbacks to the manager. Also manage the associated ObjectInfoPickup;
- ObjectInfoPickup: Sets itself as first item in the owner's Inventory and route all the callbacks to the manager;
- AdvancedMutatorModule: Process the manager callbacks;
- AdvancedMutatorModuleRegister: When an object of this class(or its subclasses) comes with the map itself, a module of the class specified in moduleClass will be spawned and added to the modules chain. NOTE: This can also be useful for configuring a module within a map;
- CanvasSensor: Senses if a PlayerPawn is looking at the specified scriptedTexture;
- ClientCanvasSensor: Tells the server the last time scriptedTexture has been rendered on the client;
- KeyBinder: Binds each key (254) to "MUTATE IK_<KEYNAME>";
- TCPMessagesManager: Manages the TCP connections that want to send messages to modules. NOTE: The IPs which are banned from playing are also not allowed to send TCP messages through this manager;
- TCPConnection: Manages the connection connected to this TCPLink.;
- ValueRegister: Register a propertyName and a value with an associated object, or get the value from the associated object's variable of which name is <propertyName>;

Mappers notes:
If you are a mapper and you want to customize your map with a AdvancedMutatorModule you can place an AdvanceMutatorModuleRegister in your map and set its moduleClass to the module class you want o be spawned in your map, or if the module already has an AdvancedMutatorModuleRegister subclass you can place it insead, in this last case a subclassed module register may have additional settings to better fit your needs.
NOTE: The AdvancedMutatorModuleRegisters won't work if the AdvancedMutatorModuleMaster isn't added as mutator when starting a match!

Changelogs:
[v2r1]
- Replication fixed for CanvasSensor;
- Keybindings and CanvasSensors can now work when spectating;
- PostRender() callback has been removed;
[v2]
- Major bug fixes;
- Major changes;
- Most of the classes that managed actors now manage objects too;
- AdvancedMutator are now modules that need AdvancedMutatorMaster to be added as mutator when starting a match to work;
- A manager called AdvancedMutatoManager has been added that routes most of the callbacks to the modules;
- A CanvasSensor class has been added, it senses when a specified ScriptedTexture is being drawn on a PlayerPawn's canvas;
- An AdvancedMutatorModuleRegister class has been added as module aliases to treat modules as mutators. They can also be placed directly in a map to let modules be spawned even if the module register wasn't added as mutator before to start the match;
- Keybindings are added everytime a match starts to every PlayerPawn so that modules get the key event callbacks;
- TCP system has been added to call TCP module callbacks;
Download:
AdvancedMutator_v2r1.7z
(38.86 KiB) Downloaded 16 times
DEMOS
Show
FunStuff_v5r1.7z
(7.52 KiB) Downloaded 9 times
[FunStuff]
What you can do using "Mutator For Fun" in a match is:
- When shooting with a BIO rifle, the player/bot will shoot translocator discs using Fire(Left mouse button) or shoot rocks using AltFire(Right mouse button), in this last case they also get bigger depending on the loadr;
- When shooting a Player/Bot/Monster with an enforcer, it will be "locked in a barrel"(if the barrel will be detroyed, the "locked victim" will die). (If you get locked in a barrel, you can suicide);
- Projectiles will slow down while moving until they'll stop;
- Players/Bots/Monsters who are being aimed by someone, will get fatter;
- When viewing a Bot, it can be possessed moving its ViewRotation with the mouse;
- If a Player/Bot/Monster is not moving for 30 seconds, it will get hurt;
- Shooting a light will make it blink and a sound will be heard on that location, shooting it a second time will turn off it. (Works better with TriggerLight's);
- Jumping will increase your jumping rate of 50 units. (It gets resetted if the Player/Bot/Monster dies);
- You can insert the working command "makemeapirate" through the "Tab" console. Also everytime you type a character that is not present in the command "makemeapirate" you get hurt;
SpookyPainting_v1r1.7z
(83.36 KiB) Downloaded 11 times
[SpookyPainting]
What you can do using "SpookyPainting" module in DM-SpookyPainting is:
- If you look at both the "eyes" of the subject in the painting you'll get hurt;
- You can also tweak the "spookyLevel" from within the SpookyPaintingRegister in the map;
Last edited by PrinceOfFunky on Thu Jul 04, 2019 8:16 pm, edited 72 times in total.
Image

User avatar
PrinceOfFunky
Godlike
Posts: 1040
Joined: Mon Aug 31, 2015 10:31 pm

Re: AdvancedMutator v2b

Post by PrinceOfFunky » Mon Sep 26, 2016 5:05 pm

* UPDATED TO VERSION 2 BETA *
Image

User avatar
UnrealGGecko
Godlike
Posts: 2204
Joined: Wed Feb 01, 2012 11:26 am
Personal rank: GEx the Gecko
Location: Kaunas, Lithuania
Contact:

Re: AdvancedMutator v2b

Post by UnrealGGecko » Mon Sep 26, 2016 5:37 pm

Isn't there already a mutator called AdvancedMutator? :noidea

Anyway, gonna check it out during the weekend (sorry for testing it that late)

User avatar
PrinceOfFunky
Godlike
Posts: 1040
Joined: Mon Aug 31, 2015 10:31 pm

Re: AdvancedMutator v2b

Post by PrinceOfFunky » Mon Sep 26, 2016 6:25 pm

UnrealGecko wrote:Isn't there already a mutator called AdvancedMutator? :noidea

Anyway, gonna check it out during the weekend (sorry for testing it that late)
Well I didn't find any actually, but why saying sorry? /o\ lol
I should mentioned that all those testing logs shown every millisecond hide other logs.
Image

User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: AdvancedMutator v2b

Post by Wormbo » Mon Sep 26, 2016 8:55 pm

Regardless of whether such a mutator might exist already, you might want to pick a more unique name. (Yeah, yeah. Coming from the guy who released "EnhancedItems"...)

User avatar
PrinceOfFunky
Godlike
Posts: 1040
Joined: Mon Aug 31, 2015 10:31 pm

Re: AdvancedMutator v2b

Post by PrinceOfFunky » Mon Sep 26, 2016 10:25 pm

Wormbo wrote:Regardless of whether such a mutator might exist already, you might want to pick a more unique name.
I guess I'm still in time for that :D I'll try thinking at a new name today.

EDIT: Oh and anyway, it doesn't work at all since I forgot to change the version inside the INI. I'll reupload it with the correct INI file.

EDIT2: I'll make a lil poll on here to decide this mutator name, who will be interested in reading the topic, will see the poll and hopefully vote for an option :D
I wanted to put "Putator", where "Pu" stands for Pickup, but it seemed a bit ambiguous.
Image

User avatar
Gustavo6046
Inhuman
Posts: 804
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Finite
Contact:

Re: AdvancedMutator v2b [+ POLL to decide a more unique name

Post by Gustavo6046 » Mon Sep 26, 2016 11:04 pm

Do you mean, a mutator where you can detect stuff in player info and you can subclass it so that these do something, like give jump boots if entering lava?
AWEsome

User avatar
PrinceOfFunky
Godlike
Posts: 1040
Joined: Mon Aug 31, 2015 10:31 pm

Re: AdvancedMutator v2b [+ POLL to decide a more unique name

Post by PrinceOfFunky » Tue Sep 27, 2016 12:36 am

Gustavo6046 wrote:Do you mean, a mutator where you can detect stuff in player info and you can subclass it so that these do something, like give jump boots if entering lava?
AWEsome
Yeah lol. Some of the stuff I already thought to do thanks to this mutator are:
- Letting players to scream if they are falling and reached the terminal velocity(like calculating the speed and see if a hit on the ground would "leave a small crater" XD).
- Play sounds like dogs barking when the player shoots.
Image

User avatar
SilverSound
Adept
Posts: 282
Joined: Fri Nov 06, 2015 10:12 am
Personal rank: Curious
Location: St. Cloud, Florida

Re: AdvancedMutator v2b [+ POLL to decide a more unique name

Post by SilverSound » Tue Sep 27, 2016 12:51 am

This reminds me of an item in QuakeLive. It's a key. When you hold it specific things in the level are accessible. Like a door that only opens if the player is holding the key. Would you be able to implement such a check?

I'd say it would require a new trigger type and an item that acts like a relic (when you pick it up it's held)
"Woah what?! I wish I was recording that...."

User avatar
PrinceOfFunky
Godlike
Posts: 1040
Joined: Mon Aug 31, 2015 10:31 pm

Re: AdvancedMutator v2b [+ POLL to decide a more unique name

Post by PrinceOfFunky » Tue Sep 27, 2016 1:34 am

SilverSound wrote:I'd say it would require a new trigger type and an item that acts like a relic (when you pick it up it's held)
Everything can be a trigger, I rly would need to know what that key did. Did you need to select that key, or to bring up that key? Difference stays in what happens when you select it. Like pickups can be selected and activated(automatically on UT), weapons are brought up when selected and are automatically activated.
Not that a mix is impossible. Anyway, I mostly supposed all of it, since I didn't study the whole weapon code.

EDIT: I'm attaching a fun mutator on this post.
p.s. For those who don't look at the code, play a match with bots and try using a BIO rifle.

EDIT-2: *UPDATED TO VERSION 3 BETA*

EDIT: Moved the attached mutator to the first post.
Last edited by PrinceOfFunky on Tue Sep 27, 2016 8:36 pm, edited 1 time in total.
Image

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

Re: AdvancedMutator v3b [+ POLL to decide a more unique name

Post by sektor2111 » Tue Sep 27, 2016 6:24 am

Now go get some sleep and cap poll nonsenses at a normal point:
- UniqueMutator is a sick idea with no logic - you might see more unique mutators which later were "developed" - LIKE you said already;
- NewMutator - it's dumbness in pure format - next year won't be new :loool: ;
- AnotherMutator - another Funky will do the same generic name causing only mismatches and headaches - READ FORUM related to stupid generic names problem which more people are using because they are "UNIQUE";
- You might want to pick other names after getting some rest.
I was looking at first version - it's mainly a tester-tool because it's just another spammer useless in game-play, yes, good name FunkySpammer mutator. The rest of cheats which you can implement inside, probably won't be loved by Pro players as long as idiots admins might use such lousy things for noobs on drugs. Example: I can make a small mutator allowing fly and ghost and everything making game a mess. Yes, it's not cheating, it's Mutator (as a bullshit excuse).

User avatar
SilverSound
Adept
Posts: 282
Joined: Fri Nov 06, 2015 10:12 am
Personal rank: Curious
Location: St. Cloud, Florida

Re: AdvancedMutator v2b [+ POLL to decide a more unique name

Post by SilverSound » Tue Sep 27, 2016 7:32 am

PrinceOfFunky wrote:
SilverSound wrote:I'd say it would require a new trigger type and an item that acts like a relic (when you pick it up it's held)
Everything can be a trigger, I rly would need to know what that key did. Did you need to select that key, or to bring up that key? Difference stays in what happens when you select it. Like pickups can be selected and activated(automatically on UT), weapons are brought up when selected and are automatically activated.
Not that a mix is impossible. Anyway, I mostly supposed all of it, since I didn't study the whole weapon code.

EDIT: I'm attaching a fun mutator on this post.
p.s. For those who don't look at the code, play a match with bots and try using a BIO rifle.

EDIT-2: *UPDATED TO VERSION 3 BETA*
You just need to have it on you. When you die you drop it.
"Woah what?! I wish I was recording that...."

User avatar
PrinceOfFunky
Godlike
Posts: 1040
Joined: Mon Aug 31, 2015 10:31 pm

Re: AdvancedMutator v2b [+ POLL to decide a more unique name

Post by PrinceOfFunky » Tue Sep 27, 2016 8:16 pm

SilverSound wrote:You just need to have it on you. When you die you drop it.
I guess this is what you are looking for :D

And * UPDATED TO VERSION 4 *. (FunStuff is updated to version 2).

EDIT: I moved the "Quake Key" mutator to first post under the section "Examples".
Image

User avatar
OjitroC
Godlike
Posts: 1078
Joined: Sat Sep 12, 2015 8:46 pm

Re: AdvancedMutator v4b + Examples [+ POLL]

Post by OjitroC » Tue Sep 27, 2016 9:47 pm

The name of the mutator needs to give an indication of what the mutator does\what its purpose is - otherwise, if you want people (other than those visiting this site) to use it, you are relying only on their curiosity for them to download, install and try out something whose purpose is unknown.

User avatar
SilverSound
Adept
Posts: 282
Joined: Fri Nov 06, 2015 10:12 am
Personal rank: Curious
Location: St. Cloud, Florida

Re: AdvancedMutator v4b + Examples [+ POLL]

Post by SilverSound » Tue Sep 27, 2016 9:59 pm



This shows what the key does in game. there can only be one and only one person can have it
"Woah what?! I wish I was recording that...."

Post Reply