You are viewing a potentially older version of this package. View all versions.
explodingMods-LethalMoonUnlocks-2.0.3 icon

LethalMoonUnlocks

Permanently unlock moons or progressively unlock discounts. Make every run unique in Discovery Mode where you keep discovering new moons as you play. Progress from free to more difficult and expensive moons. Moon sales and more.

Date uploaded a month ago
Version 2.0.3
Download link explodingMods-LethalMoonUnlocks-2.0.3.zip
Downloads 2079
Dependency string explodingMods-LethalMoonUnlocks-2.0.3

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
xilophor-LethalNetworkAPI-3.2.1 icon
xilophor-LethalNetworkAPI

A library/API to allow developers to easily add networking to their mods.

Preferred version: 3.2.1
IAmBatby-LethalLevelLoader-1.3.10 icon
IAmBatby-LethalLevelLoader

A Custom API to support the manual and dynamic integration of all forms of custom content in Lethal Company. (v50 Compatible)

Preferred version: 1.3.10

README

LethalMoonUnlocks

Permanently unlock moons or progressively unlock discounts.
Make every run unique in Discovery Mode where you keep discovering new moons as you play.
Progress from free moons to more expensive and difficult ones.

  • Featuring custom moon groups, displaying tags in terminal, random moon sales and more

  • Well suited for modpacks with a lot of moons

  • Works with all custom moons (even those with special characters or whitespaces)

Credits for the original idea to Permanent Moons by BULLETBOT.

Why make LethalMoonUnlocks when Permanent Moons exists?

Unfortunately Permanent Moons is not maintained anymore and has some issues with certain custom moons (Atlas Abyss, Outpost-31, ..) due to their names.
This was really bugging me in my personal modpack where all the moon prices were balanced around permanently unlocking them.
So I took this as a learning opportunity.

Can I use my Permanent Moons savegame?

Yes, LethalMoonUnlocks automatically imports your Permanent Moons data from existing save files when you load into them.
Any data for moons that are not installed (or enabled) at the time or can't be matched for other reasons will be discarded.

You can uninstall Permanent Moons directly after installing this. There's no need to start the game with both installed once or anything like that.

All clients need to have this mod installed!

Report issues on GitHub: LethalMoonUnlocks

Dependencies
  • LethalNetwork API - Used for sending data between host and clients.
  • LLL - used for changing moon prices and visibility (discoverability), as well as adding tags to the moon catalogue.

If you don't use LLL, you don't have custom moons, so you can use Permanent Moons (link above) just fine.

Unlock Mode (Default)

Unlock mode is the default mode akin to the original Permanent Moons mod.

Learn more

In Unlock Mode you unlock paid moons by routing to them once. From that point on the moon will be free to route to.

There are config options available to customize your experience in Unlock Mode.
Read this section for more information.

(Optional) Unlocks Expire

You can set unlocks to expire. This means you can only make use of an unlock a limited number of times.
Once you unlocked a moon you can route to it for free. Every time you do your unlock comes closer to expiring.
After the set limit of uses has been reached, the unlock expires - resetting the moon to its original price.

Discovery Mode related

These options provide customization for when you're using Unlock Mode together with Discovery Mode.
For more information read the section about Discovery Mode.

Show discovery related options

(Optional) Unlocked Moons are Permanently Discovered

When a moon is unlocked it will be permanently discovered. That means it's added to the moons available in the Terminal's moon catalogue - on top of your base selection.
Essentially this will make it so any moon you've unlocked will always be available for travel in Discovery Mode.

(Optional) Reset Permanent Discoveries on Expiry

When the unlock for a permanently discovered moon expires it will also reset that moon's permanent discovery status making it disappear from the moon catalogue.

This is the only way permanent discoveries can vanish during a run making it useful to increase variety in the late game.

(Optional) Quota Unlocks

Quota Unlocks are a mechanic that rewards your for meeting the quota by granting random unlocks for free.

Quota Unlock Configuration
  • set the chance to trigger Quota Unlocks
  • set a min and max for the amount of moons to unlock when triggered
  • limit Quota Unlocks to moons up to a certain price
  • limit the total number of times Quota Unlocks can be triggered

Discount Mode

In Discount Mode instead of directly unlocking moons you will unlock a new discount rate each time you buy a moon eventually making it free.

Learn more

Discount Mode provides a middle-ground for when you think directly unlocking moons is a bit too easy or just doesn't fit your balancing.

There are config options available to customize your experience in Discount Mode.
Read this section for more information.

Discount rates

Moons will progress through a configurable list of discount rates. With each discount received the next rate is unlocked.
You can set up as many discount rates as you like and they don't necessarily have to go from low to high.

For example you could set up discounts so that moons are 50% off after your first purchase, 75% after the second and free after the third. That would be achieved by setting the discount rates config option to 50,75,100.

Typically the final rate would be 100 - making the moon free like a normal 'Unlock'.

(Optional) Discounts Expire

You can set discounts to expire. This means you can only make use of a fully discounted moon a limited number of times.
Once a moon is fully discounted you can route to it for free. Every time you do your discount comes closer to expiring.
After the set limit of uses has been reached, the discount expires - resetting the moon to its original price.

This option requires you to set up discount rates so that the final rate is free (100)

Discovery Mode related

These options provide customization for when you're using Discount Mode together with Discovery Mode.
For more information read the section about Discovery Mode.

Show discovery related options

(Optional) Discounted Moons are Permanently Discovered

When a moon is discounted it will be permanently discovered. That means it's added to the moons available in the Terminal's moon catalogue - on top of your base selection.
Essentially this will make it so any moon you've unlocked a discount for will always be available for travel in Discovery Mode.

(Optional) Reset Permanent Discoveries on Expiry

When the discount for a permanently discovered moon expires it will also reset that moon's permanent discovery status making it disappear from the moon catalogue.

This is the only way permanent discoveries can vanish during a run making it useful to increase variety in the late game.

(Optional) Quota Discounts

Quota Discounts are a mechanic that rewards your for meeting the quota by granting random discounts for free.

Quota Discounts Configuration
  • set the chance to trigger Quota Discounts
  • set a min and max for the amount of moons to receive a discount (rate) when triggered
  • limit the total number of times Quota Unlocks can be triggered

(Optional) Quota Full Discounts

Quota Full Discounts are a mechanic that rewards your for meeting the quota by unlocking the final discount rate for random moons for free.

Quota Discounts Configuration
  • set the chance to trigger Quota Full Discounts
  • set a min and max for the amount of moons receive the final discount rate when triggered
  • limit Quota Full Discounts to moons up to a certain price
  • limit the total number of times Quota Full Discounts can be triggered

Discovery Mode

In Discovery Mode you start with a limited selection of moons for travel. You will discover new moons as you play.

Learn more

The configuration options for this mode are plentiful.
Read this section for more information on Discovery mode.

General

Discovery Mode is all about exploration and progression and synergizes very well with having a lot of custom moons.

There are various ways to discover new moons - adding a completely new aspect to the game: Moon Progression New moons can be discovered regularly, as a reward, randomly - or any combination of those.

There's even support for moon group matching using custom defined groups. This means you can set up your own moon groups (galaxies, solar systems, tiers, etc.) and when you travel to a moon you might discover more moons of the same group.

But first let's start with the basics or rather - the base selections.

Base Selections (Moon rotation)

When you start a new game in Discovery Mode your selection of moons available for travel in the Terminal's moon catalogue are limited.
How many moons are available is determined by your moon base counts. There are three:

  • Free moons (every moon that has a original route price of 0 credits)
  • Dynamic free moons (every moon that currently has a route price of 0 credits)
  • Paid moons

You can configure the base count for each of those and you can also have them increase every time the current selection (or rotation) is shuffled.

Shuffling

By default every time a new quota begins the moon rotation will be shuffled i.e. the current selection is discarded and new moons will be randomly selected.
You have options to change this to shuffle every day instead or never shuffle at all.

Discovered moons (Discoveries)

Every moon available for travel in the Terminal is considered a discovered moon - including the base selections.
However as mentioned before there are more ways to discover moons that that. Those will be added on top of your base selection. They will also vanish when the rotation is shuffled. That is unless.. you make them permanent.

Permanently Discovered Moons (Permanent Discoveries)

Permanently discovered moons are just that - permanent. Meaning they are added on top of your base selection but do not vanish on shuffle.
Moons can be permanently discovered in various ways and this ultimately depends on your configuration.

It could be

  • making discoveries permanent by unlocking them (or unlocking a discount)
  • making discoveries permanent by landing a set number of times
  • making discoveries granted by a certain mechanic permanent

Of course in the same way you can also permanently discover moons from the base selections.

Permanent discoveries allow you to pick moons from your current rotation and keep them around for the rest of the run.

Combined with the discovery mechanics below this allows for granting more and more additional discoveries as the quota progresses but in order to keep any of them, you have to purchase them. This can incentivize buying moons even several days into a quota. Especially when combined with Moon Sales

The only way permanent discoveries can vanish are the options associated with unlocks and discounts expiring.

This can enhance variety in the late game

(Optional) Quota Discoveries

Quota Discoveries are a mechanic that rewards your for meeting the quota by granting one or more moon discoveries.

Quota Discoveries Configuration
  • set the chance to trigger Quota Discoveries
  • set a min and max for the amount of moons discovered
  • make moons discovered this way permanent discoveries

(Optional) Travel Discoveries

Travel Discoveries are a mechanic that randomly grants moon discoveries as you route and travel to paid moons.

Travel Discoveries Configuration
  • set the chance to trigger a Travel Discovery
  • set a min and max for the amount of moons discovered
  • make moons discovered this way permanent discoveries
  • prefer discovering moons that belong to the same group as the one you've routed to (see Moon Groups)

(Optional) New Day Discoveries

New Day Discoveries are a mechanic that randomly grants moons when a new day begins.

New Day Discoveries Configuration
  • set the chance to trigger a New Day Discovery
  • set a min and max for the amount of moons discovered
  • make moons discovered this way permanent discoveries
  • prefer discovering moons that belong to the same group as the one you're currently located at (see Moon Groups)

Terminal Tags

LethalMoonUnlocks supports displaying various conditions directly in the Terminal's moon catalogue.

Learn more

Terminal Tags are disabled by default.
If you're using anything but unlocks it's recommended to turn them on.

Terminal Tags present you all information relevant to LethalMoonUnlocks directly in the moon catalogue.
Which tags are displayed depends on the current state of each moon and your configuration.

You can enable or disable every tag individually.

Here's an example where I tried to fit all tags on a single screenshot. Explanation for each tag below.

Example of LMU Terminal Tags

Looks too crowded? Check this out

There's a config option in the advanced section allowing you to control the maximum tag line length.
This can give the moon catalogue a more organized look at the cost of more scrolling.

More organized example of Terminal Tags

Tag Information
[IN ORBIT] Indicates the moon you're currently orbiting.
[UNEXPLORED] Indicates which moons you haven't landed on
[EXPLORED: X] Indicates which moons you have landed on and keeps track of your total landings.
[UNLOCK] Indicates the moon is unlocked.
[UNLOCK EXPIRES:X] Indicates how many times you can route to the moon for free before the unlock expires.
[DISCOUNT-XX%] Discount Mode: indicates the moon is on discount and shows the currently unlocked rate.
[DISCOUNT EXPIRES:X] Indicates how many times you can route to the moon for free until the discount expires.
[NEW] Indicates the moon has been discovered for the first time this run. Resets every day.
[PINNED] Indicates the moon has been permanently discovered - effectively pinning it in the moon catalogue.
[SALE-XX%] Indicates the moon being on sale and shows the sales rate.
[MoonGroups] For example [Zeekers Galaxy] or [VANILLA/FOREST]. Indicates the name(s) of the custom group(s) or LLL Tag(s) a moon belongs to. Only if moon group custom or tag matching is enabled.

Tags are added to the moon catalogue using an event provided by LLL and will also show with TerminalFormatter!

Moon Sales

Moons have a random chance to go on sale.

Learn more

Each moon has a random chance to go on sale every time the sales are shuffled.
Moon Sales are multiplicative with other price reductions like discounts from Discount Mode.

You can configure the chance as well as minimum and maximum sale rate.
They can either be shuffled every quota or every day.

Shuffling Moon Sales daily can incentivize buying moons even days into a quota.

Moon Groups

LethalMoonUnlocks supports matching moons by group. This is relevant for certain discovery mechanics.

Learn more

In Discovery mode all new discoveries are randomly selected. With moon group matching LethalMoonUnlocks will prefer selecting from group matches instead of all moons.

This is always in reference to a matching moon. For Travel Discoveries that is the moon you've routed to and for New Day Discoveries it's the moon you're currently at.

Moon group matching can be disabled individually for each of these mechanics.

There are multiple group matching methods available.

Price, PriceRange, PriceRangeUpper

All of these methods use the moon's original prices to match them into groups.

Price matches all moons that share the exact same price.

PriceRange matches all moons within a configurable +- price range.

PriceRangeUpper same as PriceRange but only considers equally or more expensive moons.

Tag

Selects a random LLL content tag and matches all other moons sharing that tag.

Custom

Custom allows you to define fully custom groups. A group is defined by name and a list of members (moons).

A moon will always match with all members of the same group.
If a moon is member of multiple groups, a random group will be selected for matching.
When all members of every group are already discovered a random moon will be chosen instead.

The group name will be displayed in various locations in-game e.g. Autopilot discovered new moons during travel to Zeekers Galaxy.

Other stuff

Cheap Moon Bias

Learn more

In Discovery Mode moons will be randomly selected (as new discoveries) e.g. when a the paid selection is shuffled. Cheap Moon Bias will increase the odds of cheaper moons being selected.

Makes it less likely - especially in the early game - to only discover moons you can't afford yet.

The bias value is configurable. The bias in its entirety can be enabled or disabled for each applicable discovery mechanic.

Compatibility

Learn more

LethalConstellations

Planned!

TerminalFormatter

Tags are shown in TerminalFormatter moons node. Thanks @mrov!

LethalQuantities

Advanced config option to prefer LQ risk levels in moon catalogue.

Malfunctions

Advanced config option to enable interpreting Malfunctions' Navigation malfunction as routing to a moon.
If it's a paid moon LethalMoonUnlocks will see it as buying the moon - even though you didn't pay.

All mods displaying alert messages

LethalMoonUnlocks uses a queue for sending alert messages.
Alerts from other mods and the vanilla game are added to the same queue to avoid overlapping and missing messages.

Example configurations

In this section I provide some ideas of what's possible using all the different config options.

Only showing settings that are not default.

Simple Discounts
Display tags in terminal = true
Discount rates = 50,75,90,100
Discounts expire = 3
Enable Quota Discounts = true
Quota Discount trigger chance = 33
Maximum discounted moon count = 2
Enable Quota Full Discounts = true
Quota Full Discount trigger chance = 10
Moon Sales = true
Shuffle sales daily = true

Simple setup with slightly modified discounts, rewards on Quota completion and Moon Sales.

Progression focused
Display tags in terminal = true
Unlocked moons are permanently discovered = true
Enable Discovery Mode = true
Free moons base count = 99
Paid moons base count = 3
Enable Quota Discoveries = true
Quota Discovery trigger chance = 100
Maximum quota discovery moon count = 3
Enable Travel Discoveries = true
Travel Discovery trigger chance = 50
Travel Discovery group matching = true
Enable New Day Discoveries = true
New Day Discovery trigger chance = 50
New Day Discovery group matching = true
Group Matching Method = PriceRange
Price range = 500

All free and unlocked moons are always available for travel.
3 paid moons available which are shuffled every quota. Additionally discover new moons on completing the quota, new day and travelling. Buy them before the quota ends and you keep them, don't and they will be lost with shuffle.
Repeat every quota and grow your catalogue.

Full exploration
Display tags in terminal = true
Enable Discount Mode = true
Discounts expire = 3
Enable Discovery Mode = true
Never shuffle = true
Free moons base count = 1
Dynamic free moons base count = 0
Paid moons base count = 2
Enable Travel Discoveries = true
Travel Discovery trigger chance = 100
Travel Discovery group matching = true
Enable New Day Discoveries = true
New Day Discovery trigger chance = 50
Maximum new day discovery moon count = 2
New Day Discovery group matching = true
Group Matching Method = Custom
Custom moon groups = ...

Assumes fully set up custom moon groups

Start with only 1 free and 2 paid moons. Never shuffle the base selection. Instead discover new moons mainly by travel and on new days. Due to moon group matching you'll discover moons group by group.
Fully discover a group and you'll discover moons from other groups. Add Quota rewards to preference.

Depending on the amount of custom moons you have, a setup like this would probably require modifying quota steepness.

Special Thanks

CHANGELOG

v2.1.9

Added

  • Terminal Scrolling: Added an option to smooth terminal scrolling and avoid skipping moons when you have a lot visible at once.
    • Disabled by default. Toggling requires game restart.
    • Can be configured in Advanced config section.
    • This is the same patch used by StoreConfigRotation and TerminalFormatter. Don't use more than one or the effect will multiply!
    • Currently has no effect when AdvancedCompany is installed.
    • Thanks @pacoito123 for the transpiler patch!
    • Thanks BULLETBOT for making me aware of the skipping moons issue!
  • Quota Discovery: New Match cheapest constellation option
    • Use this config setting to change the behaviour of Match cheapest group to discover the next cheapest undiscovered constellation instead of the one that has the cheapest undiscovered moon.

Changed

  • Quota Discovery: Chat message will now print the group name similar to other chat messages.

Fixed

  • Fixed an issue where disabling Discovery Mode and loading an existing savegame that previously had it enabled would not show all moons.

v2.1.8

Fixed

  • An issue where certain moon names could break the moons catalogue.

v2.1.7

Added

  • WeatherTweaks: Added a compatibility workaround to ensure WT's custom weather types are displayed on terminal until a better solution is found.

Changed

  • Alert messages: removed redundant alert messages when an entire LethalConstellation or custom group was discovered on Quota Discovery with Match cheapest group enabled.

Fixed

  • An issue with Reset permanent discoveries on .. expiry config settings resetting the discovery status more often than they should.
  • An issue where the new day discoveries are permanent discoveries config setting was not respected.

v2.1.6

Changed

  • Group tags (custom groups and LethalConstellation) will now show on terminal regardless of whether they are used for any discovery mechanic group matching..
    • .. as long as the respective group matching method is selected and the tag itself is enabled.

Fixed

  • Fixed/changed a few chat messages being sent even if chat messages were disabled.

v2.1.5

Fixed

  • An issue where group tags wouldn't display when using custom groups and Quota Discoveries match cheapest group was the only group matching option enabled.
  • An issue where Quota Discovery match cheapest group wouldn't correctly match moons under certain conditions.

v2.1.4

Added

  • Terminal Formatting: Customizable font size config for the moons catalogue.

Changed

  • LethalConstellations: Ensured the default constellation is set correctly for better integration.
  • Terminal Formatting: Attempting to prevent some inconsistent ugly line breaks in the moons catalogue.
    • LLL changes the font size depending on the numbers of moons visible.
    • LMU now overrides that behaviour and enforces a constant font size.
    • The max line width config was changed accordingly to allow for longer lines when using smaller font sizes
  • Group tags: All Custom groups and LethalConstellations tags are now displayed in uppercase for visual consistency with the LethalConstellations page and other LMU terminal tags.

Fixed

  • Minor bugs, inconsistencies and config descriptions.

v2.1.3

Changed

  • LethalConstellations:
    • Removed LethalConstellations patch.
    • Subscribed to the new RouteConstellationSuccess event (thanks @darmuh!)

Fixed

  • Resolved warnings and errors that occurred when LethalConstellations was not installed.
    • This was due to an interaction between Linq compiler magic and referenced types that are not present, along with runtime reflection.
  • Fixed a bug where attempting to route to an unaffordable constellation was incorrectly interpreted as purchasing the constellation's default moon.
  • Corrected an error when LethalConstellations was selected as the group matching method but was not installed.

v2.1.2

Fixed

  • Addressed an issue where the assembly was missing from the v2.1.1 release package.

v2.1.1

Fixed

  • Hotfix for the moon catalogue breaking when LethalConstellations was not present.

v2.1.0

Added

  • LethalConstellations compatibility:
    • Introduced a new group matching method for LethalConstellations.
    • In Discovery Mode, constellations are discovered when at least one moon is discovered.
    • The number of discovered moons is displayed in the LethalConstellations Terminal screen ([optionals] in your LethalConstellations config)
    • Terminal tag (shares 'Group tag' config)
    • Show alerts when discovering new constellations.
    • Config option to override constellation prices with the cheapest discovered moon, applying unlocks and discounts to constellations.
  • Quota Discovery: New option to match the currently cheapest not fully discovered group (custom group or LethalConstellation).
  • Fallback options: Added fallback options for group matching in all additional discovery mechanics.

Changed

  • Cheap Moon Bias:
    • Now applies to Quota Unlocks, Quota Discounts, and Quota Full Discounts.
    • Separate toggle and bias values for each applicable mechanic.
    • Added an option to ignore price changes.
  • updated in-game messages

Fixed

  • Corrected some incorrect logs and other minor issues.

v2.0.3

Added

  • Alert Messages Networking: Improved alert message handling across the network.

Changed

  • Discovery Mode Safety Check: Now considers moons on the whitelist.
    • Added several fallbacks for better reliability.
  • Whitelist Verbosity: Enhanced error messages for incorrect entries in the whitelist.

Fixed

  • Resolved issues with alert messages not displaying on clients.
  • Fixed a bug where a moon was incorrectly added to the rotation when both free and dynamic free base counts were set to 0 but a whitelist was used.

v2.0.2

Fixed

  • Corrected the display of terminal tags, which were shown with default settings.

v2.0.0

Note: This is a major update. Please refer to the README and configuration for detailed information on new features and options. It is recommended to delete your existing config for optimal performance.

Added

  • New Unlock Mode Mechanics:
    • Unlocks can expire.
    • Introduced Quota Unlocks.
  • New Discount Mode Mechanics:
    • Discounts can expire.
    • Added Quota Discounts and Quota Full Discounts.
  • Discovery Mode:
    • Base selections and shuffling mechanics.
    • Introduced Quota Discoveries, Travel Discoveries, and New Day Discoveries.
    • Added Cheap Moon Bias
    • Added Moon Group Matching (including custom groups).
    • Automated ship rerouting on deadlines and after shuffles.
    • Extensive configuration options for all features.
  • Terminal Tags and Formatting:
    • Improved compatibility with LethalQuantities (LQ risk level preference).
  • Alert Messages:
    • Implemented a queue system for alerts, with compatibility for other alert sources.
  • Malfunctions Compatibility: Navigation malfunction can be handled as buying a moon.

Changed

  • Code Rewrite: A significant portion of the old code was rewritten to improve functionality while maintaining existing features.

The behavior of LethalMoonUnlocks in default configuration remains unchanged.

Fixed

  • Resolved a bug where purchasing equipment after routing to a free moon was incorrectly counted as buying the moon.
  • Fixed several smaller bugs from v1.0.1.

v1.0.1

Changed

  • Code Optimization: Refactored and optimized code related to original prices.
    • Always retrieve original prices from LLL and restore them on disconnect.
  • Updated chat message on new quota unlock.
  • Updated various logs.
    • Consolidated excessive logs from development.
  • Minor performance and stability improvements.

Fixes

  • Corrected issues with discounted prices not reflecting changes to moon prices (e.g., via LLL config) when loading existing saves.
  • Fixed incorrect log data during saving.

v1.0.0

  • Initial Release