MGame v3.0 Release


Okay... I know what I said when I released v2.0 of MGame, but this is the ACTUAL LAST major update I'll end up doing for this mod most likely. This update virtually recodes the ENTIRE MOD, cleans up all code and adds in hundreds of essential features! If you're currently running on v2.0 of MGame, it's very highly recommended to spend the time to upgrade to v3.0, even though any maps that were made with v2.0 may take a bit of time to port. Anyway, I'd borderline consider this version of the mod a complete remaster due to how much more polished it is.

Something that's important to note is the very first changelog below: descriptions in the source code. This essentially provides a way for anyone else who isn't me to look at the source code and figure out what each actor/object is supposed to do. The descriptions will tell you what the actor/object does and the requirements to get it to work, as well as a feature list (if that applies). There's also a good amount of comments throughout the source code which may help you when learning this mod.


If you don't want to check out the massive changelogs below, I'll give you a super simplified version of it:

- 27 new actions + tons of fixes

- 24 new console commands + tons of fixes for all console commands

- 7 new actors (3 managers)

- A global data system with slots that supports an "infinite" amount of data

- Virtually all coding inconsistencies, syntaxing and bugs have all been fixed



Changelogs

 - Re-formatted ALL CODE so that the syntaxing is consistent across all objects, as well as adding more comments and a description for each object

 - Added 27 new actions:

  - Debug -- This action is essential for debugging/developing any map. You can have it DisplayMessage, Announce, Log, Warn or just have the action do nothing and have the comment variable serve as a comment for your script. You can also add multiple phrases that gets replaced with a TransferProp's data (known here as a ReplacePhrase)

  - DropCarryingActor -- Drops (or destroys) the currently held actor for whichever pawn with the specified tag

  - PlayMusic -- Plays a music track with a customizable fade time. Can have a song randomly selected and can stop all songs

  - ChangeCondition -- A macro for setting a condition to either be true or false (without toggling). Very helpful for when you don't want a condition's value to be toggled and for when you don't want to use a SetProp each time for that

  - IfActorTouching -- Returns true if the specific actor is touching a specific actor

  - IfActorInRange -- Returns true if the specific actor is within the range (spherical radius) of another actor

  - IfPossessedByController -- Returns true if the specified actor is currently possessed by the specified controller

  - IfInState -- Returns true if the specified actor in the the specified state

  - FadeView -- Fades the view of the screen to either fade in or out (or partially)

  - FadeActor -- The same as FadeView, but applies for any actor

  - SaveLoadGame -- Saves or loads a game. Can save or load to the current save slot

  - SaveLoadInventory -- Saves or loads an inventory from global data

  - LocalizeData -- Takes external data and converts it to a TransferProp onto an actor

  - ManageAntiCheat -- Manages whether M.A.C. is enabled or not (if M.A.C. is in the current map)

  - SetGlobalData -- Sets a value to a slot of global data without using SetProp (TransferProp). Can also reset all global data

  - SetGameState -- Sets current game state or can TransferProp the current game state

  - LerpToPoint -- Takes a pawn and lerps/moves its location to the LerpTo target. This works much like moving the camera in cutscenes, but isn't designed for the camera

  - IfCurrentMap -- Returns true if the current map is expected

  - IfGameState -- Returns true if the current game state is expected

  - SwitchControlTo -- A more sophisticated way of switching control of players

  - ChangeLevel -- An all-in-one action that provides the best way to change to a different level

  - BouncePawnTo -- Bounces a pawn to a specified point, just like a bounce pad would

  - Teleport -- Teleports an actor to a specified point. Usually works even if the spot is partially blocked

  - LockCamTo -- Allows the toggling of lock-on targeting with a specific actor

  - EnemyRunAway -- A simple way of making enemies run away

  - FollowPawn -- Makes a pawn start or stop following another pawn

  - SetPropPlus -- The same (or roughly the same) as SetProp back in MGame v2.0

 - Added 7 new actors (3 managers)

  - MConversationManager -- A manager that randomly plays conversations you create for it (can have the audio localized to whoever is speaking as well). Supports multiple managers provided you turn them on and off manually and only have 1 active at a time

  - MAntiCheat -- An non-invasive anti-cheat against commonly-used cheats. The user can very easily turn this off on any map with the console command "AntiAntiCheat"

  - MOnSaveLoadGame -- Fires an event when a save game or load game occurs, allowing for the creation of custom events upon said events

  - MDevKitPatcher -- Contains 5 patches that can be injected into the current map that allow for not needing to run cutscenes on each map startup to fix certain glitches

  - MLifeDrainVolume -- While you stand inside this volume, your health will constantly drain

  - MNoteExtra -- For the users who borderline need to write a manual inside the map's file, here you go

  - MTriggerLight -- A light that can be turned on and off via events, as well as can be moved via movers

 - Added 6 new controller states

  - PlayerCanWaterJump -- Allows the player to jump out of the water

  - PlayerCanAirJump -- Allows the player to jump while in the air with no restrictions (no limit to the amount of air jumps)

  - PlayerCanAirJumpLimited -- The same as PlayerCanAirJump but the player can only air jump a limited amount of times. The default amount of air jumps is 1 and can be changed

  - PlayerAlwaysTripleJump -- The player will always be able to do a "glitched" triple jump

  - PlayerCannotDoubleJump -- Blocks the usage of double jumping

  - PlayerCannotPunch -- Blocks the usage of punching

 - Resurrected 2 broken console commands from the original CheatManager

  - LockCamera -- Fixed to actually lock the camera

  - SetCameraDist -- Fixed to actually set the camera distance

 - Added 24 new console commands

  - ListStaticActors -- Lists all static actors

  - SloMoSave -- Acts like the original SloMo command (check console command improvements section)

  - UnCauseEvent -- Un-causes an event

  - TPBack -- If the player has used the TP command, teleports them back to where they were originally

  - ChangePhysics -- Changes the player's physics to a certain physics state. Takes an integer and converts it to a physics enumerator

  - AntiAntiCheat -- Disables the anti-cheat actor added in this update permanently (provided the current level has it enabled)

  - WaterJump -- Makes the player jump out of the water

  - AirJump -- If falling, makes the player jump off of the air

  - AirJumpLimited -- The same as AirJump but has a configurable amount of maximum air jumps

  - AddHealth -- Adds to the player's health

  - SleepFor -- Waits for the time provided, then executes a console command. Adding "+" between additional console commands will allow multiple console commands to be ran

  - PlayASound -- Plays a 2D sound

  - PlayADialog -- Plays a dialog from your player's mouth

  - PlayAMusic -- Plays a song

  - RefreshJumpVars -- Re-runs the calculations for what your jump variables should equal. Can be used for when your jump variables are incorrect or need to account for a new gravity

  - SetGameState -- Sets the GameState to one of the 6 available

  - GetGameState -- Gets and prints the current GameState

  - DropCarryingActor -- Drops the currently held actor onto the ground. If "true" is added after the command, the carried actor will be destroyed as well

  - SetPotions -- Sets the amount of potions the player has

  - SetCoins -- Sets the amount of coins the player has

  - SetBoth -- Sets the amount of coins and potions the player has

  - SetAll -- Sets the amount of health, coins and potions the player has

  - AddAll -- Adds the amount of health, coins and potions the player has

  - FullDebug -- Turns on both notable debug features

 - These console commands below have been improved

  - Fixed all "Array accessed out of bounds" errors throughout many different console commands

  - If TP or TPBack fails, the TP will be retried multiple times to see if there's a valid TP location nearby. The amount of retries can be configured, but higher values may impact performance

  - SetSpeed now correctly sets the run speed (takes a run speed instead of a multiplier), however, KW systems will still overrule this in some cases

  - God now correctly sets god mode

  - SloMo now no longer persists its SloMo speed by default. Use the new console command SloMoSave to do this

  - SetJumpZ now takes an optional boolean after it, which if true, changes your double jump height instead

  - ChangeState now takes an optional boolean after it, which if true, will use the context of the player's pawn instead of the player's controller

  - God, ShowAINodes, Invisible, NoTarget and FullDebug are no longer toggle functions, and instead are set to either be on or off through the use of the given boolean return value. Example: "NoTarget True"

  - SetProp and GetProp no longer log their actions into the log file and now have the ability to have the keyword CurrentPlayer be used to target the current player (not case-sensitive)

  - SetProp now allows for strings with spaces in them to be accepted as a value

  - Fixed a potential crash with the WriteStrings command

  - Amphibious sets the underwater time to the highest possible value

  - AnnounceSettings has now been split into 2 console commands, that being AnnounceTime and AnnounceColor

  - ListDynamicActors now actually shows only dynamic actors like it should've originally

  - WhoAmI now uses your pawn's name instead of your pawn's tag, as well as returns the pawn's name

  - SetHealth and AddHealth now flash the health bar each usage, kill the player if the player's health goes to 0 or below, plays a sound depending on whether the player was healed or not and deals knockback (even if in air) to the player if the health is negative (all except flashing is configurable)

  - Fixed 2 console commands to make all code reachable

  - Fixed all boss cheat commands to not strictly rely on the pawn tag for finding the pawn (compatibility)

  - Fixed FreezeFrame's code to not be in-efficient and also removed its pointless logging

  - Removed redundant code from within certain console commands

 - Added 13 new console command aliases

  - BC (BossCheat)

  - MV (MGameVersion)

  - UCE (UnCauseEvent)

  - AH (AddHealth)

  - AB (AddBoth)

  - AA (AddAll)

  - SH (SetHealth)

  - SP (SetPotions)

  - SC (SetCoins)

  - SB (SetBoth)

  - SA (SetAll)

  - FD (FullDebug)

  - AAC (AntiAntiCheat)

 - The Warn() function is now properly used instead of only using Log() for warnings

 - All obsolete triggers now work just like normal triggers, instead of only working from event calls

 - SetProp is now a simplified version of SetProp from MGame v2.0 (and with this change, SetPropPlus has all the features of SetProp from MGame v2.0)

 - Save Data is now renamed to Global Data and has been completely overhauled. This feature was originally in SetPropPlus and capped to 6 slots of data, but now supports an "infinite" amount of slots of data (also renamed MSaveData to MGlobalData for clarity) and is accessible in more places than just SetPropPlus

 - Global data can now be easily externally viewed and/or modified. The data file is located in ..\System\MGlobalData.ini

 - All actions that had any form of getting the player's pawn data have now been fixed so that if the player is in a cutscene that the action won't fail to run

 - Virtually every action (that works for this) now has a new keyword for the actor tag: CurrentPlayer. If this keyword is used, it gets the current player's data and uses it appropriately. Important: this keyword is case-sensitive!

 - Renamed Jump to ForceAction, now works without requiring a possession and can now force many more different actions

 - Renamed PlayLocalSound to PlaySound as it now supports both 2D and 3D, PlaySound can now have mouth movement toggled on or off and can now play the sound from other actors

 - SetPropPlus now has an option to Get/Set a specific value from/to location and rotation, allowing for making conditions based on a single axis from those variables, the SetPropPlus action code has been simplified significantly and the ability to reset global data has been moved to SetGlobalData

 - OverrideCutsceneMessage is no longer an under-worked macro action and is now relatively independent (overrides should be much more consistent now)

 - Fixed a major backend issue with IfGetProp and IfGetProp now has an option to make its condition based on a Get from a specific actor (meaning you can now compare 2 different Gets), as well as it can pull a Get from global data

 - PlayerConsoleCommand and DestroyActors now have an option to pick a random entry from its entire list to use. This is helpful for when you want simple quick randomness

 - SetFOV now has an option to add or multiply the player's FOV and now takes a time and ease type

 - WaitForRandomTimer has now been renamed to WaitForTimer (it's no longer strictly random) and now has the ability to pull a pause time from a TransferProp

 - PlayerConsoleCommand can now pull console commands from a TransferProp, as well as having the ability of replacing phrases with TransferProps (similar to Debug's ReplacePhrases)

 - IfHasCoins no longer fails to work properly if the console command "UpdateInv" isn't ran each time before running this action

 - Simplified the variables for certain actions

 - MasterController (Crosshair) now has 2 console commands exclusive: SetCrosshairVisibility <bool> and SetCrosshairDistance <float> (Aliases: SCV or SCD)

 - Added 4 extra variables into MData (2 of each commonly used variable instead of 1)

 - Fixed a silly typo in MDestroyTrigger which caused half of the variables to appear in the wrong property tab

Files

Master's Editor Utility Pack.zip 230 kB
Nov 29, 2022

Get Master Pack (MPak) [v11.0] -- Shrek 2 (PC) Mod/Library

Leave a comment

Log in with itch.io to leave a comment.