2 items

File information

Last updated

Original upload

Created by

Puff

Uploaded by

pufthemajicdragon

Virus scan

Safe to use

Tags for this mod

About this mod

The Loot Crate Mod Gotham Deserves.
Completely overhauls loot crate generation - now you can loot equipment, lostech, mechs, and fully customize loot crates in every way you can imagine! *

* Imagination not available in all areas. Subject to limitations. Some restrictions apply. Ask your doctor if Imagination is right for you

Share
Requirements
Permissions and credits
Changelogs
Donations
******************************************************************
* Stacked Loot Crates by Puff The Magic Dragon *
******************************************************************

===========
Description
===========
Completely overhauls the loot crate system. This does a lot so read on.
Version 6 is the latest version compatible with DLC 6


============
Features
============
Find weapons, equipment, and battlemechs to loot crates
Adds rare loot crates with high value and even lostech loot
Adds ultra-rare Star League caches! But watch out for the defenders!
Customize the probability and quality of any loot drop to your preferences
Stock vanilla "empty" crates, cantina job crates, and Objective Raid crates with loot
Customize detection and scan distance!
Customize scan time!
Automatically scan crates!
AI lancemates can detect and scan crates!
Add map markers for discovered crates!
Fully customize loot crate indicators with vanilla light towards or Immersive Loot Crate Smoke and custom brightness and colors!
And much much more!


============
More Details
============
This mod completely alters random loot generation to allow you to obtain not only weapons but also equipment and even mechs from random loot drops. The loot is completely regenerated at mission start or when you change options and settings.

Keeping up with documenting all of the options is too much work.


===========
Secret Sauce
===========
This mod works by editing the TreasureActor class blueprint, the actor that represents a loot crate, so that on BeginPlay a new function is called that generates completely new loot, ignoring the loot already generated by ScenarioGen. Based on weights assigned by the settings in the Mod Options menu, the new loot generation function will choose whether to generate a mech, equipment, or weapon. It then builds a list of valid loot, accounting for DLC, intro date, lostech, and difficulty level, and then randomly selects a random loot item randomly completely at random.

The list of valid loot is built using ALL valid Data Asset types of the given class - so mods that add mechs, variants, equipment, or weapons will have their assets show up in these loot crates. Even clan gear. No special action is required by you. The other mod creator only needs to ensure the asset's Intro Date, tech level, and tier are all set correctly, which they should be anyway, but I can't guarantee the quality of other modders' work.

This all happens during the BeginPlay event when you start a new mission. With version 3 or later there is a brief frame drop at mission start while the generator runs. This only happens once per mission or after changing game settings, and is only really noticeable when there are a lot of loot crates on the map. Loot crates that spawn when an enemy is destroyed should not cause any performance dips, since most of the RNG was done at mission start.


============
Requirements
============
BobbertModdert's Mod Options - https://www.nexusmods.com/mechwarrior5mercenaries/mods/537


============
Installation
============
Extract the files directly into your Mods folder.
Activate the mod in MW5
Go into Options > Mod Options and customize your settings. (I recommend saving the settings even if you make no changes. This ensures that Mod Options picks up the currect values before you load a mission.)

============
Update
============
Version 6.0 brings us into the DLC6 era.
Install it the same as you normally would, but make sure to enter the Options menu and check / confirm and save your Mod Options before loading your save game.
I recommend opening %localappdata%\MW5Mercs\Saved\Config\WindowsNoEditor\Game.ini in a text editor and removing just the section labeled "StackedCratesConfig" to remove any old options that might cause problems with newer versions. This will reset your configuration to defaults.


=======
Removal
=======
Deactivate the mod in MW5
Remove the StackedCrates folder from your Mods folder
Optional: Browse to %LocalAppData%\MW5Mercs\Saved\Config\WindowsNoEditor, open up Game.ini, and delete the section titled "StackedCratesConfig"


=============
Compatibility
=============
This mod only alters a single game component, the TreasureActor class associated with loot crates. It should be fully compatible with any other mod out there. It should also be compatible with mods that add new mechs, weapons, or equipment to the game as long as they were added correctly (including the correct object type, level, intro date, etc).

This mod is compatible with MercTech* and YAML.
* Some restrictions apply.


=========
Integration
=========
I have uploaded the source files if you want to integrate this mod's features into your own mod. If you use this in your mod, please credit and link back to here.
Please message me before making any derivative works.
Do not reupload this mod or its source to Nexus or any other websites.

Version 6.5 introduces a Campaign Instanced Actor to handle all of the heavy lifting. The CIA offloads most of the heavy RNG to game start, reducing the performance hit at mission start. Most of the modifications to TreasureActor are handled dynamically at runtime. There are a number of other custom assets to handle custom indicators and markers.

There is one overridden uasset, TreasureActor. The event graph for this asset is modified to ensure it checks in with the CIA.

This is a modder's resource only. If you are not a modder, don't download it. This resource is offered as-is with no support, warranty, or merchantability. Some restrictions apply. Not available in all areas. Side effects include sleep disruption, fatigue, dry eye, and carpal tunnel. Ask your doctor if modding is right for you.


============
Known Issues
============
- Looted mechs show up properly in the post-drop splash screen but the chassis / variant name does not show up in the objectives payout summary on the salvage screen (just a generic "battlefield loot"). Changing this would require making changes to blueprints that would break compatibility with other mods.
- Sometimes the salvage summary comms message doesn't show up, even when a crate contains valid loot. This is a debounce timer in the original comms dialogue system that I cannot fix.
- MercTech v2 adds "quirks" to mechs as an "EquipmentItem". Since Stacked Crates pulls a list of EquipmentItems for loot generation, these quirks can show up in lootcrates as rather useless equipment items or with names like "???". Since there is no easy way to fix this without either breaking compatibility with other mods or making a dedicated MT patch, this will probably not get fixed.


===============
Version History
===============
Version 1.0
- I FINALLY MADE SOMETHING THAT WORKS!
Version 1.1
- Improves lostech filtering for rare loot drops. Adds an option for time travel.
Version 1.2
- Improves quantity probabilities. Loot crates now regenerate if options are changed mid-mission. Some minor performance tweaks.
Version 2.0
- Adds "Mode" selection for automatic or manual configuration
- Adds ammo bin option
- Adds sensor bonuses
- Adds scan time option
- Adds automatic scan option
- Adds infinite range cheats (per request)
- Adds debug log output
- Cbill multiplier is fully dynamic
- Fixed bug that blocked mech drops
- Numerous other bugfixes and minor tweaks
Version 3.0
- Removes the "Mode" selection and adds more granular per-setting options
- All "mission related" crates (cantina job crates, targeted kill crates, objective raid crates) are now always "rare" crates
- Adds Star League caches
- Adds AI lancemate scanning
- Adds customizable mech/weapon tier options and other settings
- Returns customizable c-bill payout
- Fixed bugs for map markers in multiplayer
- Massive overhaul of the loot generation system to improve performance and support new options
- Numerous other bugfixes and tweaks
Version 3.1
- Fixed bug that prevents new loot from generating if DEBUG is disabled (derp)
- Changed chance for a rare crate that contains a mech to drop a higher tier mech from flat 10% to weighted based on rare crate chance
- Reduced the number of Star League Cache defenders from 1-(MaxRep) to 1-8, based on mission difficulty and cache contents
- Fixed bug that caused Treasure Hunter job mission-start map markers to not match custom colors
- Adjusted default spawn chances for mechs, rare crates, and SL caches
Version 3.2
- Fixed a bug where SL cache defenders only spawn if Debug is set to Advanced (oops)
- Fixed a bug that causes audio to glitch out if you switch mechs while auto-scanning (disabled mech switching during auto-scan, revamped auto scan code)
- Star League Cache objective map markers removed - replaced with map-only marker options
- Added optional map-only markers at mission start with customization
- Removed "Customize Loot Crate Indicator visibility, color, scale" option in Options menu - customization is now on by default (if you actually played with this disabled, let me know)
- Removed Ammo bins from standard loot drops (rare/lostech bins can still drop in rare/SL loot crates)
Version 4.0
- (PGI) New default colors for indicator emitters (light towers) - mod defaults updated accordingly
- (PGI) New "Intel" loot type
- New: Rearm/Reload options
- New: Mute Ryana option (WARNING: This will mute Ryana's callouts for story missions!)
- Fixed: (hopefully?) Bug that caused AI lancemates to shoot at loot crates
- Reordered some options in the Mod Options menu
Version 5.0
- More new options!
- More (hopefully) bugfixes!
Version 6.0
- New features!
- New options!
- Now includes Immersive Smoke! Many thanks to SankaraSamsara for sharing code and resources!
- New bugs for everyone!
- This version works great in singleplayer but I'm still having trouble getting multiplayer sorted out. Also still not compatible with DLC5 story missions.
- The file size is a little larger on this one because it's mid-refactor to try and fix co-op and DLC5 bugs.
Version 6.5
- Major code overhaul!
- New options and features!
- Vast improvements in performance!
- Improved compatibility with other mods!
- Improved MP compatibility (not perfect but it doesn't crash anymore)!
Version 6.6
- Fixes bugs in 6.5, incorporates bugfixes from 6.5.1 and 6.5.2
- Overhauls the loot validation code for improved performance and debug logging


==========
To-Do List*
==========
- Add "Supply caches" - the goal is to spawn a half dozen new crates in a single military base location, but it may just end up being a single crate with lots of extra goodies
- Add some fancy scripting so you can obtain mech upgrades (cantina career progress rewards) from loot crates - this is still WIP and annoyingly hard
- Decouple Cantina missions from mech upgrades entirely (this would most likely end up in a separate, but related mod, if I ever get around to it)
- Add an option for automatic pickup of loot crates when within range (for MechCommander mod compatibility) COMPLETE

*Due to other priorities, mostly real life taking up my time, I may never get to any of these. I will try to support bugfixes as much as possible, but new features will take a back seat to earning a paycheck.


===============
Credits goes to:
===============
Me for figuring out how to do this.
yrrot and czolee and all of the other modders in the discord who have helped me problem solve!
BobbertModdert for making Mod Options accessible to other modders.
PGI for making MW5!