Skip to content

A modpack for "Risk of Rain 2", a utility modpack for modders and server administrators, using the bepinex modloader.

License

Notifications You must be signed in to change notification settings

8BtS-A-to-IA/Console-Overhaul

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

console overhaul

A utility modpack for Risk of Rain 2

This modpack is currently in beta! Do not create mods with dependencies to any of the mods yet!

Due to the size of of the modpack; it's impossible for a single person to bugtest all the mods and some refactoring is planned, hence the mod is not yet available on the thunderstore to avoid other modders from using the modpack as a dependency yet. Expect the mods to crash or have unexpected behavior constantly and please report any of this in the issues tab using the the correct formatting.

About

Console overhaul is a modding utility modpack for Risk of Rain 2. Made for modders and server administrators alike, by adding multiple new and powerful functions to the in-game 'command console', creating command specific mods, be it for managing players on a server or modding the game experience through only commands, or just using the console is now easier than ever.

Console Overhual currently boasts 3 main systems which work in tandem, 1 minor system and 2 extra command specific expceptions to massively improve upon the vanilla Console. The modpack may also, in the future, improve the look the console to give more of a sleek, less 'developer' feel.

This is the main repository of the modpack where the full stable package of the modpack, or each mod sperately, can be downloaded. Feel free to post any suggestions here.
If you want to support the development of the project, regardless of if you have any programming skill or not, refer to the suggestions in the developing segment.

Mods

Mod list:
Too Much Information (T.M.I.):
  • The T.M.I system is called either the "Too Much Information" system or the "Player Stats" API - this systems allows any mod and CC to retrieve virtually any supported information on a players' CharacterBody.
    And yes, before you ask, the name is pun name based off of the minecraft mods 'Not/Just Enough Items' (N/J.E.I.).

    The system uses a generic interface allowing retrieval of any data from just a single method called GetVariableFromString(), requiring only the name of the variable, the body to target and an object of the return type. To help with finding what the type of a specific stat is (dynamically), a method exists which allows you to retrieve the type of any of the fetchable data; GetVariableTypeFromString(), requiring only the name of the variable and the body to target.

  • As an alternative to GetVariableFromString(), you can use GetVariableObjectFromString() with just the variables' name, body and optionally the type if it's already known and it will return the stat in object form.
    It is, however, recommended to define the type if possible as the runtime will spend much less time searching for the object.

  • This system is planned to be extensible; meaning if you want to add a new type that can be retrieved/changed or any missed stat you can create an 'extension' mod which adds this functionality. This should be available sometime in late-beta/early-realease.
Multi-User Targeting (M.U.T):
  • The M.U.T system is called the "Multi-User Targeting" system - this system allows both console commands and other mods to be able to easily target multiple players' CharacterBodies with an extremely flexible targeting system.

    Almost all statistics that a characterBody has access to can be queried against to allow accurate targeting, instead of just a user's name - anything from their health to the amount of hitboxes their current character has can be queried thanks to the T.M.I system.

  • M.U.T. 'queries' can add to, or remove from, the list of CharacterBodies to get, allowing you to--for example--quickly target everyone but yourself with the simple query: "all&!me", which translates to "all players AND NOT the local player", or more powerfully; to target everyone with at least 10 items and not yourself: "all:itemcountany=>10&!me".
    There is no (soft) limit to the amount of 'additional queries' (&s) that can be made in a single query, you can--if you're so inclined--have a query with even 100 'additional queries'.

    Sadly, this is not extensible due to its complexity and there are no plans of making it extensible.
TSBind (Toggle/Simul-bind):
  • The 'Binding' system is a very simple alternative system to the "SimpleMacros" mod which allows you to bind any console command (CC) to any key unity supports, this mod has no UI and is controlled entirely from the console - enabling support with any mod.

  • Simply bind a key by doing COSimulBind [key] [command] in the console then press the key when the console is closed and the CC will automatically be sent.
    If the command is run multiple times with the same key, all commands defined when binding will run one after the other - all at once.

    You can also use CObind [key] [command]--similarly to COSimulBind when used multiple times--to preform the same action but each press will switch between calling one command then the next in the order of when it was bound, for example running CObind p 'timescale 0' then CObind p 'timescale 1' will set the timescale of the game to 0 when the p key is pressed then back to 1 when it is pressed again - looping back to 0 when pressed again.

    You can unbind the latest bind of the respective type by calling the command with no second parameter, for example: running COBind P will attempt to unbind the latest command bound to the p key. Alternatively you can use the COUnbind command with at least one argument to unbind a keybind at a specific index of the 'toggle' bind type, 2 arguments to unbind at an index of the specified bind type ('toggle' or 'simul') or 3 arguments (with the first argument being ignored) which will let you unbind the first found of the selected keybind.
Better Auto Compete (B.A.C):
  • The B.A.C system is called the "Better Auto Complete" system; it's an alternative from "DebugToolkit" where this uses the TAB key to cycle through suggestions instead of the key, is extensible and gets the closest matching suggestion according to a levishtein sort.
    The name was made before DebugToolkit was even public...so...

  • This system can work seamlessly with any new CC from any mod as long as it follows the simple naming convention; in the name of the CC, have the order of identifiers be in the same order as the arguments for your CC.

  • If the user presses tab when there is no argument text then all items related to the identifier will be suggested in cycle--including M.U.T's "me", "all", "*", "alive", e.c.t special queries when cycling through the players if it's installed--otherwise the closest possible match will be suggested instead.

  • The identifiers may be any of the following: player, item, buff, equipment or team and is possible to have multiple identifiers in a single CC. This can be extended by other mods that have their own enumerable sets that their CCs can use may inject that enumerable into B.A.C. For example a mod may add a CC which only targets enemy NPCs, thus this specific CC would want to cycle through enemy NPC names/object-IDs - the mod can generate that list and inject it, along with a recognition token (a new ACRI), directly into B.A.C. allowing for any CC with that specific ACRI in its name to be able to cycle through the newly added enumerable.
    A mod can also create a 'special fill' extension where B.A.C. will only itterate through the injected enumerable on a specific set of console commands instead of the ACRI, like the CC "COBind" (from 'TSBind') will be the only case where all possible non-bound key-binds will be cycled through as it is specially filled to only ever run specifically on the "COBind" CC - unless changed by other mods.
Exceptions:
'not in mission' exception:
  • When creating a new ConCommand, you can use the method CheckIfInStage() at the head to force players to have a stage loaded for your command to be usable.

  • This is particularly useful if your command requires a player or structure to be loaded.
'One player targetable' exception:
  • When creating multiple new ConCommands, where some use M.U.T. and some must not, you can use the method GetPlayerBodyByName() instead of GetPlayerBodiesByName(), which will attempt to retrieve just one player's CharacterBody and stop a console command if the user is trying to target multiple players - producing a warning to the player that the command is incompatible with M.U.T.

  • This is particularly useful for cleaning your commands up while also handling users attempting to misuse the command.
  • other:
    Miscellaneous Console Commands (M.C.C.): Miscellaneous Console Commands (M.C.C.): - M.C.C. is an expansion mod for the console overhaul modpack which provides some debugging commands both specifically for M.U.T, B.A.C. and TSBind, and general modding.

    Installation

    This mod requires BepInEx to be installed.
    Simply extract the contents of the CO.zip into the BepInEx\plugins folder, though for the sake of simplifying the use of the exporter helper tool you should create a new folder for the modpack. As the mod does not exist on the thunderstore yet, this is the only method of installation.

    Wiki

    The wiki is being built.
    Refer to the wiki for how:

    • To use the T.M.I system effectively.
    • To implement M.U.T into your commands.
    • To create non-inlined & inlined-extensions for B.A.C.
    • Use bind directly within your mod.

    and what:

    • The call hierarchies of M.U.T. and inline-extensions for B.A.C are.
    • The data structures the mods use.
    • methods are publicly exposed and how to use them.

    Developing

    How can I develop for this project?

    Do not clone this repository if you intend to develop on a mod. This page does not contain any development files.

    After cloning the mods' repository you want to develop in, and ensuring you have any version of VS 2017/2019 installed, you should be able to simply open the .snl file to open the project in VS.
    Make sure to read the "developing" section on the mods' page for its merge request requirements and compile instructions.

    So what exactly is this page for then?

    This page is the main modpack page, purely for storing the latest stable(-ish) build of all the mods in the pack - for the development packages, go to the mods own specific page.

    How can I help without any programming 'know-how'?

    Simply install the mod/modpack and play. If you encounter any issues make sure to log it and provide as much relevant detail as possible in the relevant mods' issue page--or the main page if you don't know which mod is the problem--after checking if the same issue has not already been encountered, you can use the formatting guide to help with this.
    Don't worry about if you predict the wrong mod as the cause, it's more important to just have the report out there.

    Legals:

    • This projects license is an MIT license, this means you may use the code in this project freely in commercial and non-commercial projects as long as proper accreditation is used.
    • Font used in title. An awesome dontaionware font, which can be used commercially or non-commercially.
    • This project makes use of the levinshtein sort for 'Better Auto Complete'.

    Changelog

    V1.0.0:

    alpha changelog

    About

    A modpack for "Risk of Rain 2", a utility modpack for modders and server administrators, using the bepinex modloader.

    Resources

    License

    Stars

    Watchers

    Forks

    Packages

    No packages published