Henit3 / DramaMask

Enables masks to be worn to hide from enemies by blending in with the Masked and adds a safe mask, Drama!
https://thunderstore.io/c/lethal-company/p/necrowing/DramaMask/
MIT License
0 stars 0 forks source link
lethal-company-mod

Release Version Thunderstore Version Thunderstore Downloads

Stealthy Masks

Enables masks to be worn to hide from enemies by blending in with the Masked! Also adds a new type of mask, Drama, which is not haunted unlike its Tragedy and Comedy counterparts, allowing you to use this feature safely!

They can also be attached to players' faces, allowing you to look identical to Masked enemies and spook your friends! To balance this mechanic out, there is a stealth meter that is used while attempting to hide.

Compatibility

Works with no other known incompatibilities; supports controller and LethalCompanyVR (though without UI)!

LC Version Mod Version
v45 <= 2.0.0
v50 2.0.1 - 2.1.2
v56 2.1.3 <=

Formerly known as DramaMask

Config Options

FAQ

Where can I find the Drama mask?

The Drama mask can be found as scrap with its spawn locations and rates matching that of the Comedy and Tragedy masks (detailed in the table below). This can be adjusted to match your preferences with the base spawn rate multiplier (applied on the default rates) and custom spawn config settings (for granular customisation per moon). Special values for this include [All, Vanilla, Modded] in line with what is provided by LethalLib, and all values are evaluated left to right (for overriding).

Moon Spawn Chance
Assurance 3
Rend 40
Dine 40
Titan 40
Artifice 40
Modded 40

To also make it available in the store, check out @megapiggy's BuyableDramaMask mod.

What enemies are supported with hide from all enemies?

While the Masked are the main targets to hide from, proper support for other enemies has been added as of 1.4.0 (detailed in the table below). Some of these enemies can be considered to have their own agenda, so they have been classified as "Not Natural". Players will not be hidden from these enemies if the "Enemies Hidden From" config is set to "Natural". For example, Hoarding Bugs would not discriminate against a """Masked""" if they decide to start stealing from their nest.

Extra overrides for these can be specified using the "Enemy Hiding Overrides" config to enable or disable for specific enemies using their names in the code (exclusions prioritised).

Enemy Status
Masked Supported - Always
Thumper Supported
Spore Lizard Supported
Coil-Head Supported
Earth Leviathan Supported - Not Natural
Forest Giant Supported
Baboon Hawk Supported - Not Natural
Hygrodere Supported
Bunker Spider Supported - Not Natural
Jester Supported
Bracken Supported
Circuit Bee Supported - Not Natural
Ghost Girl Supported - Not Natural
Snare Flea Supported
Nutcracker Supported
Hoarding Bug Supported - Not Natural
Butler Supported
Masked Bee Supported - Not Natural
Old Bird Supported - Not Natural
Tulip Snake Supported
Kidnapper Fox Supported
Barber Supported
Eyeless Dog No
Manticoil No
Roaming Locust No
Company No
Turret Supported
Modded Compatibility Dependent

Which modded enemies are supported? / How can I make my custom enemy support hiding?

The current method of hiding depends on references to StartOfRound.allPlayerScripts being patched to only include entries of visible (and pre-existing invalid) players, when the base methods for detecting players in EnemyAI are called. Vanilla enemies that make use of their own methods for player detection are additionally patched, so they may also be invoked by custom enemies. References to PlayerIsTargetable are also patched for calls made outside MeetsStandardPlayerCollisionConditions, if the "Increased Custom Enemy Compatibility" setting is enabled. Any storage or cross-referencing done with an index to allPlayerScripts (like in ButlerEnemyAI) should instead make use of playerClientId on the player, since the position in the array may be affected by this mod's patches.

Enemies can also be added to DramaMask.Config.EnemyTargetHandler.NaturalExceptions to stop them being hidden from if the "Enemies Hidden From" setting is "Natural".

Aside from this, explicit patches for custom enemies will not be provided by this mod.

Why can I not use items with a mask attached?

This is intentional behaviour and is currently integral to how the mod's mask attaching features work. Changing this could mean rewriting the entire codebase to accomodate this, so it is currently not supported. This is feasible though, and may be considered for an update in the distant future.

Roadmap (development to be paused)

Credits

Made on request from @tkcool and @pedro9006.

Feature Proposers:

Bug Finders:

Contact

For requesting new features or highlighting issues/bugs found, please post them in the mod's Dedicated Discord Channel on the Official Lethal Company Modding Discord.