You are viewing a potentially older version of this package. View all versions.
JacobG5-SimpleCommands-1.5.0 icon

SimpleCommands

Easy to use host commands for Lethal Company

Date uploaded 2 weeks ago
Version 1.5.0
Download link JacobG5-SimpleCommands-1.5.0.zip
Downloads 875
Dependency string JacobG5-SimpleCommands-1.5.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
JacobG5-JLL-1.8.0 icon
JacobG5-JLL

Jacob's Lethal Libraries - For Jacob's Mods

Preferred version: 1.8.0

README

Simple Commands

The general idea for this mod is to add some basic game manipulation stuff for hosts to use if needed. For example, if you purchase items, leave the game, and reload your save your money will be gone, but the items will never arrive. With a mod like this, you can run a command to refund your lost money.

This is not a host-only mod. Every player requires it to join.

I did this so it hopefully won't be used as just a host cheat. It also allows things like syncing weather changes to apply properly.

It's simple for a reason

I designed this to be very basic for debugging and stuff. If you want or need more advanced functionality other mods would suit you better like Imperium. There's also some basic API functionality for other commands to register their own simple commands if they want.

How to use Simple Commands

The basic structure goes as follows:

/(cmd name) (parameter) (parameter)

Type a command into the in-game chat. By default, only the host can run commands, but this can be changed in the mod's configs. Also, command parameters aren't case sensitive so don't worry!

You can also add flags to the end of a command by adding "|" followed by the flags you want. One example of a flag is the "hide" keyword which stops the command from sending a chat message upon completion.

Here's an example of a command with a parameter:

/pay 700 | hide

This command would add 700 credits to the terminal and not announce it to chat.

Lastly, you can run multiple commands in a single message. It just works!

Here's an example of two commands in one message:

/stamina | hide /god

This command would give you infinite stamina and invulnerability. It would also hide the stamina message but still display the invulnerability message to chat for all players to see.

Relative Position Operators

There are several commands that may allow you to input coordinates [x] [y] [z] to do something at that position. You can use the /pos command to retrieve the player's position at any time.

Otherwise, I have some useful operators you can use to make a position relative to a location.

You can use '~' at the start of a number to signify a relative position similar to a Minecraft command.

Ex: ~ ~5 ~

Otherwise, you can use '^' at the start of a number to signify the position is relative to where the player is looking. When a command is executed a raycast is fired to determine the position the player is looking.

Ex: ^ ^5 ^

Command Prefix CAN be changed in mod configs to prevent conflicts with similar mods.

List of Commands (Will probably add more in the future)

/help Lists all registered Commands & how to use them.

Use Cases:

/help

/help [page]

/help [cmd] Shows info about specified command.

/help [cmd] [page]

/help [cmd] (flags) Shows valid flags for command.

/help [cmd] (flags) [page]

/clear Clears all messages from chat & clears the Display Tip queue.

Use Cases:

/clear

/list Lists all players currently in the lobby.

Use Cases:

/list

/list [page]

/pay Add or remove money from your terminal.

Use Cases:

/pay Gives 100 credits.

/pay [value] Can be negative.

/weather Changes the weather of the selected moon when inside the ship.

Note: Only works between games not in the middle of games as of now.

Use Cases:

/weather (clear | dusty | foggy | rainy | stormy | eclipsed) Sets moon weather to whatever you want.

/heal Heals the player either to full or a specified amount.

Use Cases:

/heal Fully heals self.

/heal [value]

/heal [target] Fully heals target.

/heal [target] [value]

/damage Damages the player a specified amount.

Use Cases:

/damage Removes 10 HP

/damage [value]

/damage [value] [damageType]

/damage [target] Removes 10 HP from target.

/damage [target] [value]

/damage [target] [value] [damageType]

/god Toggles invulnerability.

Use Cases:

/god Toggles self invulnerability.

/god [target] toggles target invulnerability.

/stamina Toggles infinite sprint.

Use Cases:

/stamina Toggles self infinite sprint.

/stamina [target] toggles target infinite sprint.

/charge Fully charges target's held equipment.

Use Cases:

/charge Charges the item you are holding.

/charge [target] Charges the item the target is holding.

/extend (Experimental) Extends days until quota.

Note: Increasing this beyond 3 days can break the game in many ways.

Use Cases:

/extend Extends quota 1 day.

/extend [days]

/items Lists IDs of all the available items in the game.

Use Cases:

/items

/items [page]

Tags:

store Filters to only show buyable items.

scrap Filters to only show scrap items.

/item Spawns the specified item at the target's feet or defined position.

Use Cases:

/item [item] Spawns item at your feet.

/item [target] [item]

/item [item] [x] [y] [z]

/tp Teleports player to the specified location.

Note: teleporting the player inside/outside the facility should set the player as inside or outside the facility correctly, however using custom coordinates or JPOI locations may not. To get around this you can add the tags inside or outside respectively to override the player's state.

Use Cases:

/tp [destinationPlayer]

/tp (ship | breaker | apparatus | main | exit{#} | {JPOI}{#})

/tp [targetPlayer] [destinationPlayer]

/tp [targetPlayer] (ship | breaker | apparatus | main | exit{#} | {JPOI}{#})

/tp [x] [y] [z]

/tp [targetPlayer] [x] [y] [z]

Tags:

animate Teleports after playing the ship teleport animation.

inside Sets the teleported player inside the facility.

outside Sets the teleported player outside the facility.

/terminal Sends Object Codes to the Terminal. Useful for opening doors / disabling hazards from within the facility.

Use Cases:

/terminal [code]

/prefabs Lists spawnable prefab objects.

Use Cases:

/prefabs

/prefabs [page]

/prefab Spawns a registered prefab object.

Use Cases:

/prefabs [name] - Spawns object above the player.

/prefabs [name] [x] [y] [z] - Spawns object at position.

/pos Displays player position & rotation data.

Use Cases:

/pos - Displays player position and rotation data.

/explode Explodes a player.

Use Cases:

/explode Explodes self.

/explode [damage]

/explode [target] Explodes target.

/explode [target] [damage]

/enemies Lists IDs of all the available enemies in the game.

Use Cases:

/enemies

/enemies [page]

Tags:

indoor Filters to only show indoor enemies.

outdoor Filters to only show outdoor enemies.

/spawn Spawns the specified enemy at the target's feet or defined position.

Use Cases:

/spawn [enemy] Spawns enemy at your feet.

/spawn [target] [enemy]

/spawn [enemy] [x] [y] [z]

Mod Support

WeatherRegistry /weather now works when WeatherRegistry is installed.

When WeatherRegistry is detected a new command is registered called: /weatherregistry

/weatherregistry lists the IDs of all weathers registered through WeatherRegistry which can be used in /weather

Credits

Programming by JacobG5 (Me)

ko-fi

CHANGELOG

v1.5.0

  • /tp has new special tp locations: breaker - The breaker box if available. apparatus - The apparatus if available.
  • A special location requested to /tp that can't find its destination now throws an error saying it can't be found instead of throwing the unknown player error.
  • /tp can now be used to teleport to JLL POIs. This behaves like teleporting to a special location and you can use numbers at the end of the name (similar to exits) to define which point to go to when there are multiple.
  • The networking component is now added to the JLL network prefab instead of its object.
  • Replaced some code to trigger equivalent JLL methods instead.
  • LethalLib is now a soft dependency.
  • Various code cleanup.
  • Readme Fixes.

v1.4.0

  • Updated to JLL 1.7.5
  • Commands that request a Vector3 coordinates can now have decimal inputs.
  • Commands requesting Vector3 coordinates can now be given a '^' at the start of a number similar to '~' for relative position. This character will signify to use a position raycasted from the player's camera direction. Example: ^ ^5 ^ will execute 5 units upwards from where the player is looking.
  • Changed a bunch of things about how command parameters work under the hood.
  • Added /enemies and /spawn which can be used to spawn enemies.

v1.3.1

  • Fixed bug causing some commands to not work on joined clients.

v1.3.0

  • Added /pos command which can be used for getting global XYZ and rotation values which can be useful for modding.
  • Added an IsClient() method to SimpleCommands for easy use.
  • /heal now clamps health to prevent over 100 HP.
  • Added /damage which can be used to damage players a specified amount.
  • Heal command has been reworked.
  • Made all the exceptions static.
  • Removed cached terminal from simple commands. Now uses the cached terminal from JLL.
  • Teleporting with /tp now can be given flags inside or outside to give the teleported player the correct skybox. Inside or outside when flags aren't present is determined by whether the player sending the command is inside or outside. Certain special locations like ship override this and set the teleported player to inside or outside correctly. Teleporting to main or any exit# after setting an inside or outside flag will teleport the player to the side of the flag specified.
  • Added /explode which is funny.
  • Simple Commands now uses JLL logging levels. Allowing you to turn down or increase the amount of logs present in the console.
  • Fixed issue when spawning simple prefabs that had network objects spawning a duplicate for the non-host.

v1.2.2

  • Simple Prefabs can now be used to spawn map hazards. Both vanilla and ones registered through LethalLib.
  • Simple Prefabs now do the same check item and player names allowing you to type incomplete Prefab names.
  • Simple Prefabs are no longer case sensitive.
  • Capitalized cruiser prefab to Cruiser.
  • /prefab can now take a player target as a parameter to spawn the object at the target's position. /prefab [target] [name]
  • Fixed some naming convention violations.
  • Removed unnecessary checks for the PlayerModification component.

v1.2.0

  • Fixed issue with /tp [target] (ship | main) returning a player not found error.
  • Item names and any player username parameters now check the start of name to see if it matches anything allowing you to type incomplete names and still attempt to complete the command for you. If multiple items have matching starting characters the tie is broken by the shortest name.
  • Scrap items spawned with /item now spawn with randomized scrap values rather than a scrap value of 0.
  • Throws an error when attempting to change the weather in the middle of the round rather than doing nothing.
  • SimpleCommands now caches the terminal rather than searching for it when running a command that requires the terminal.
  • Fixed error setting up Netcode when soft dependencies were missing.
  • Changed how command results are logged.
  • /tp can now be used to teleport to any fire exit. /tp exit{#} Example: /tp exit1 Remember that /tp exit0 will teleport you to the main entrance similar to /tp main
  • Fixed some command help instructions.
  • Updated README accordingly.
  • Also I forgot on an old changelog that I added two flags for /items. Store will filter only to show buyable items from the terminal. Scrap will filter only to show items marked as scrap items.

v1.1.2

  • Updated to JLL 1.3.0
  • Fixed issues with god mode.

v1.1.1

  • Fixed an issue where commands could not be used after a lobby reload.
  • Fixed Incorrect Version Number in BepinEx.
  • /tp now defaults as instant. Flag with 'Animate' for the old behavior.
  • Updated README accordingly.

v1.1.0

  • Updated to v60
  • Added LethalLib as a dependency in BepinPlugin
  • Added support for changing weathers through WeatherRegistry
  • Added command for when WeatherRegistry is loaded to view modded weather names
  • Added /terminal which can be used to activate terminal objects like doors and turrets. Example: /terminal c2
  • Updated README.
  • Fixed other misc minor issues.

v1.0.0 Release

  • Initial Release