Full Readme.txt in spoiler:
Spoiler
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;
DEMOS
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]
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;