Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
LC GiftBox Config
Configure gift boxes / presents, such as having store items / scrap / another present / nothing, weighting of item selection, spawn rates, etc.
| Date uploaded | a year ago |
| Version | 1.2.0 |
| Download link | DBJ-LC_GiftBox_Config-1.2.0.zip |
| Downloads | 10624 |
| Dependency string | DBJ-LC_GiftBox_Config-1.2.0 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100Evaisa-FixPluginTypesSerialization
Fix custom Serializable structs and such not properly getting deserialized by Unity.
Preferred version: 1.1.1README
LC_GiftBox_Config
Configure gift boxes / presents, such as having store items / scrap / another present / nothing, weighting of item selection, spawn rates, etc.
Config Options
Contained Item Type
- Store Item Chance (Selection Weight)
- Scrap Item Chance (Selection Weight)
- Gift Box Chance (Selection Weight)
- Empty Chance (Selection Weight)
- Unmodified Chance (Selection Weight)
Contained Scrap Item
- Scrap Value Minimum
- Scrap Value Maximum
- Scrap Value Influence (%)
- Spawn Weight Minimum
- Spawn Weight Maximum
- Spawn Weight Influence (%)
- Spawn Weight Can Be Zero
Contained Store Item
- Price Minimum
- Price Maximum
- Price Influence (%)
Contained Scrap Value
- Inherit Gift Box Value Chance (%)
- Addition Chance (%)
- Addition Minimum
- Addition Maximum
- Multiplier Chance (%)
- Multiplier Minimum
- Multiplier Maximum
Gift Box Spawn Weight
- Addition Chance (%)
- Addition Minimum
- Addition Maximum
- Multiplier Chance (%)
- Multiplier Minimum
- Multiplier Maximum
Gift Box Spawn Anomaly
(An anomaly that causes additional gift boxes to spawn into a level, separately from the standard scrap pool mechanics)
- Anomalous Spawning Chance (%)
- Minimum Gift Boxes
- Maximum Gift Boxes
Gift Box Behaviors
- Empty Gift Box Eggsplosion Chance (%)
- Position-Based Randomness Influence (%)
Compatibility / Debugging
- Disable All Mod Mechanics
- Disable Gift Box Duplicate Sounds Bugfix
- Disable Gift Box Setting Tool Scrap Value Bugfix
Credits
- Mom_Llama (@mamallama on LC Modding Discord) for creating this LC Modding Template & Tutorial
- malco (@Malcolm-Q on GitHub) for creating this IL Transpiler Helper, which inspired the design for the ILStepper class I created for this mod + future mods
- RedCrowbar (@landonk89 on GitHub) for creating this Reflection Access Helper, from which I learned how to use reflections and implement it within the ILStepper class
CHANGELOG
CHANGELOG
v1.2.0
- Moved internal libraries into external utility packages
- Added "Spawn Weight Can Be Zero" config value that must be explicitly set to true for scrap items with 0 rarity to be selectable by the gift box
- Added "Must Be Buyable" config value that determines if store items must be accessible through the terminal to be selectable by the gift box
- Added "Position-Based Randomness Influence (%)" config value that modifies the amount of influence the gift box's spawn position has on its randomness
- Improved gift box selection behavior to be more robust against incompatibilities / situations where scrap / item selection fails
- Fixed RoundManager's scrap value multiplier not being applied to scrap (lmao)
- Improved value/rarity multipliers logic to use rounding instead of truncating, and fixed maximum multiplier value being impossible
v1.1.1
- Improved mod compatibility by using branch instructions instead of return instructions, as to no longer prevent postfixes from running on modified methods
- Modified RoundManager patch behavior to result in a warning, rather than an ArgumentOutOfRangeException and a softlock, when another mod causes the RoundManager's spawnableScrap list to be mismatched with the scrap spawn weights array
- Minor code improvements
v1.1.0
- Added more detailed reasoning to credits section of readme
- Updated Eggsplosion logic to use RPC so it will not desync
- Improved compatibility with other mods (namely Scarlet Devil Mansion)
- Fixed gift boxes not correctly retaining modded behavior when loading one from a save file
v1.0.6
- Added missing v1.0.5 changes to the changelog
- Improved readme formatting for Gale mod manager
v1.0.5
- Fixed Eggsplosion chance not using the Eggsplosion Chance config
- Fixed potential desync of Eggsplosion Chance
v1.0.4
- HUGELY IMPROVED config value names (old config values will be automatically migrated)
- Fixed description newlines not displaying correctly in published package md files
- Fixed "x Addition" config descriptions referring to a multiplier rather than an addition
- Added config options for modifying a gift box's scrap value and rarity
- Added config options for anomalously spawning gift boxes within a level, separate from the level's natural scrap pool mechanics
- Added bugfix to prevent the giftbox from playing duplicate sounds when opened + added config specifically targeting this bugfix
- Fixed
libs.ProbabilityGetRandomWeightedIndex()using>=instead of>which could result in probabilities with 0 weight being selected - Updated changelog and readme
v1.0.3
- Changed
libs.ProbabilityGetRandomWeightedIndex()error message to say "list" rather than "array" - Added giftboxBehavior check to
Start()transpiled method to properly handle error case of no behavior selected - Fixed
Start()transpiled method applyingRoundManager.Instance.scrapValueMultipliertoo early - Fixed
Start()transpiler process not usingPlugin.spawnGiftBoxChance.Value - Fixed
Start()transpiler process using filtered list.Clear()method directly instead of setting tonull
v1.0.1
- Updated icon, description, and changelog
- Added
LICENSE.mdfile to libs.Probability - Changed all
LICENSEfiles toLICENSE.md - Small code cleanup
- Added mod category tags
v1.0.0
- Released