RiskOfBrainrot-MoreStats icon

MoreStats

MSU (More Stat Utilities) is an API mod for utilizing additional stats such as for jump count, barrier decay, shield regeneration delay, luck, execution, and more.

Last updated 3 hours ago
Total downloads 25
Total rating 1 
Categories
Dependency string RiskOfBrainrot-MoreStats-1.0.0
Dependants 2 other packages depend on this package

This mod requires the following mods to function

bbepis-BepInExPack-5.4.1801 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.1801

README

https://github.com/bbborbo/RiskierRain/tree/master/MoreStats

Join the discord ! https://discord.gg/yFRx3E6Yep

Overview

This mod adds stat hooks (think RecalculateStatsAPI) for a ton of vanillalike stats. Includes:

  • Barrier Freeze
  • Barrier Decay Modifiers
  • Barrier Generation
  • Jump Count
  • Ignite Chance On Hit
  • Shield Recharge Delay
  • Luck
  • Execution Thresholds

Are we missing any stats you want to use for your mod? Feel free to join our discord server and pitch them to us.

Info For Developers

MSU uses stat hooks very similar to those of RecalculateStatsAPI. To use MSU's stat's:

  • First, add "using static MoreStats.StatHooks" to your class
  • Then, subscribe to "StatHooks.GetMoreStatCoefficients" like you would with RecalculateStatsAPI.GetStatCoefficients
  • From there, you can access a variety of stats, including:
- barrierFreezeCount, add to freeze barrier decay above 0
- barrierDecayIncreaseMultiplier, multiply to increase the rate of barrier decay
- barrierDecayDecreaseDivisor, multiply to reduce the rate of barrier decay
- barrierDecayPerSecondFlat, add to increase the rate of barrier decay
- barrierGenPerSecondFlat, add to increase the rate of barrier generation
- jumpCountAdd, add to increase double jump count
- burnChanceOnHit, add to increase ignite chance on hit
- shieldDelayIncreaseInSeconds, add to increase shield recharge delay, subtract to reduce
- shieldDelayMultiplier, multiply to increase or reduce shield recharge delay
- luckAdd, add to increase Luck, subtract to reduce
- selfExecutionThresholdAdd, add to increase execution threshold additively
- ModifyBaseExecutionThreshold(float newThreshold, bool condition), a method to affect the execution threshold before additive effects, like in vanilla

Further, all stats in this mod are (of course) applied natively, so there's no need to worry about implementing them yourself.

Additionally, MSU also includes events for on-hit and on-jump effects. These are:

- MoreStats.OnHit.GetHitBehavior(CharacterBody attackerBody, DamageInfo damageInfo, CharacterBody victimBody)
- MoreStats.OnJump.OnJumpEvent(CharacterMotor characterMotor, CharacterBody characterBody, ref float verticalBonus)

As well as a few methods for stats and other useful information

MoreStats.StatHooks.GetMoreStatsFromBody(CharacterBody body) - returns processed stat information
MoreStats.OnJump.IsBaseJump(CharacterMotor motor, CharacterBody body)
MoreStats.OnJump.IsDoubleJump(CharacterMotor motor, CharacterBody body)
MoreStats.OnJump.IsLastJump(CharacterMotor motor, CharacterBody body) - last three are for use in OnJumpEvent subscribers, to determine which type of jump has been jumped

These events are intended for use with synergy effects, in order to reduce repetitive coding and potential conflicts. Using them isn't mandatory, but recommended.

FAQ?

Q: What does "MSU" Stand For?

A: More Stat Utilities, and nothing else

Q: I have a mod with a new item that adds a rechargeable jump effect that breaks this mod's hooks. How can I switch to have it use MSU instead?

A: Thanks for your concern! You can follow these instructions:

- Add "using static MoreStats.StatHooks" and "using static MoreStats.OnJump" to your class
- Subscribe a new method to "GetMoreStatCoefficients"
- In this method, get your count for each temporary jump buff, then add that to args.jumpCountAdd
- Subscribe another new method to "OnJumpEvent"
- In this method, optionally check IsDoubleJump, then check the body for your jump buff
- If the body has your jump buff, remove your jump buff, then subtract -1 from characterMotor.jumpCount

This should do the trick. If it doesn't, please get in contact with us, and we will be sure to help!

Have any more questions? Let us know!

https://discord.gg/yFRx3E6Yep

Made by Orange and Kiwi, with the encouragement of HIFU

RIP 2R4RStatUtils

CHANGELOG

1.0.0

- Release

1.0.0

- Release ver.