You are viewing a potentially older version of this package. View all versions.
Brynzananas-Brynza_API-1.5.1 icon

Brynza API

Brynzananas API mod adding features for developers usage

Date uploaded 3 days ago
Version 1.5.1
Download link Brynzananas-Brynza_API-1.5.1.zip
Downloads 3118
Dependency string Brynzananas-Brynza_API-1.5.1

This mod requires the following mods to function

RiskofThunder-R2API_DamageType-1.1.7 icon
RiskofThunder-R2API_DamageType

API for registering damage types

Preferred version: 1.1.7
RiskofThunder-HookGenPatcher-1.2.9 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.9
RiskofThunder-R2API_Networking-1.0.4 icon
RiskofThunder-R2API_Networking

Networking API around the Unity UNet Low Level API (LLAPI)

Preferred version: 1.0.4
RiskofThunder-R2API_CharacterBody-1.1.0 icon
RiskofThunder-R2API_CharacterBody

API for adding various stuff to Character Body such as: Modded Body Flags

Preferred version: 1.1.0

README

BIG DISCLAIMER

IF YOU A MOD DEVELOPER IS PLANNING TO UNIRONICALLY USE THIS API FOR YOUR NEEDS THEN PLEASE CONTANCT ME IN RISK OF RAIN 2 MODDING DISCORD SERVER OR DIRECTLY @brynzananas. YOU WILL BE THE FIRST TO USE IT BESIDES ME. I WILL THEN TRY TO UPDATE THIS API TO BE MORE FRIENDLIER FOR OTHERS PEOPLE USAGE

ClientBuffs

  • Similar to regular buffs field, you can add non networked buffs. Use AddClientBuff(this CharacterBody characterBody, BuffDef buffDef, int count = 1) to add client buffs and use RemoveClientBuff(this CharacterBody characterBody, BuffDef buffDef, int count = 1) to remove them. You can set client buff count with SetClientBuffCount(this CharacterBody characterBody, BuffDef buffDef, int count) and get client buff count with GetClientBuffCount(this CharacterBody characterBody, BuffDef buffDef)

defaultConfigValues

  • Dictionary<ConfigFile, Dictionary<ConfigDefinition, string>> that will be populated on config read with default values from a config file. Similar to ConfigFile.OrphanedEntries

DontFadeWhenNearCamera

  • Use SetDontFadeWhenNearCamera(this ref CharacterModel.RendererInfo rendererInfo, bool flag) to set rendererinfo to not fade on camera proximity

BulletAttack BonusForce

  • Use SetBonusForce(this BulletAttack bulletAttack, Vector3 bonusForce) to set bonus force to bullet attack like with blast attack

LastJumpTime

  • Use GetLastJumpTime(this CharacterBody characterBody) to get Run.FixedTimeStamp that has been set on last jump

Loadout Sections

  • Adds sections selection for Loadouts tab

  • Use SetSection(string section) GenericSkill extension to move it to new section selection. GenericSkills with unset section and skin choice will be in Main section

  • Section string will be used as language token, so add language tokens for new section names for your desired languages

BulletAttack IgnoredHealthComponents implementation

  • BulletAttacks with ignoreHitTargets bool value set to true (Use SetIgnoredHealthComponents(bool flag) BulletAttack extension) will not be able to hit bodies more than once until the ignoredHealthComponentList list has been reset (Use ResetIgnoredHealthComponents() BulletAttack extension)

Language tokens addition method

  • Custom language tokens addition method, that adds tokens directly to base game language dictionaries. Adding the same token will update existing one with new string output

  • Use AddLanguageToken(string token, string output, string language = "en") method to add language tokens

IOnProjectileExplosionDetonate interface

  • Gives a method that runs on ProjectileExplosion Detonate method.

Wall Jumping

  • Bodies with non zero baseWallJumpCount int value (Use SetBaseWallJumpCount(int count) CharacterBody extension) will be able to jump set amount of times while sticking to walls

Strafing

  • Bodies with Strafing buff or strafing bool set to true (Use SetStrafe(bool flag) CharacterMotor extension) in Character Motor would be able to make sharp turns midair if move direction is perpendicular enough to horizontal velocity

Air Control From Velocity Add

  • Bodies with AirControlFromVelocityAddBuff buff or airControlFromVelocityAdd float set (Use SetAirControlFromVelocityAdd(float value) CharacterMotor extension) in Character Motor its air control will be increased by velocity magnitude

BunnyHop

  • Bodies with BunnyHop buff or bunnyHop bool set to true (Use SetBunnyHop(bool flag) CharacterMotor extension) in CharacterMotor will be able to keep horizontal velocity on jumping

Velocity Override

  • Character Motor will always move using Velocity Override vector if it is not zero

  • Use SetVelocityOverride(Vector3 vector3) CharacterMotor extension

Linked Skill

  • Generic Skill with set linkedSkill Generic Skill value will take its cooldownScale, bonusStockFromBody and flatCooldownReduction values

  • Use LinkSkill(GenericSkill linkSkill) GenericSkill extension

IOnGroundHitServer

  • Runs OnGroundHitServer(CharacterBody characterBody, CharacterMotor.HitGroundInfo hitGroundInfo) on server ground hit

IOnGroundServer

  • Runs OnGroundHit(CharacterMotor characterMotor, CharacterMotor.HitGroundInfo hitGroundInfo) on global ground hit

OnHitGroundServer event

  • Similar to OnHitGroundAuthorty event but runs on server

  • Use AddOnHitGroundServerDelegate(OnHitGroundServerDelegate hitGroundServerDelegate) CharacterMotor extension to add an event and use RemoveOnHitGroundServerDelegate(OnHitGroundServerDelegate hitGroundServerDelegate) CharacterMotor extension to remove it

RocketJumpComponent component

  • Applies velocity to filtered targets on projectile explosion using force

  • force: float value that controls the explosion push force

  • verticalForceReduction: AnimationCurve that reduces force the more angle between the explosion and the target

  • radiusMultiplier: float value that multiplies the explosion radius for rocketjump knockback

  • physForceInfo: PhysForceInfo to set force flags for rocket jump force

  • buffsWhileMidair: List<BuffDef> that will add added buffs on rocketjump and then remove them on landing

  • rocketJumpFiltering: enum that filters who are elgible for rocketjumping

    • Everyone: Everyone can rocketjumping

    • OnlyTeammates: Only characters with the same team index as the owner of projectile can rocketjumping

    • OnlySelf: Only the owner of projectile can rocketjumping

GuidedProjectilecomponent

  • Projectile rotates towards owner point of view or view direction if there is no point

  • rigidBody: set RigidBody of the projectile

  • projectileController: set RigidBody of the projectile

  • guidingPower: float value that controls how much degrees per second the projectile rotates

Sprint All Time body flag

  • Character will sprint all time

  • Activating skills will not prevent sprinitng

  • Entity states that can be cancelled by sprinitng will not be cancelled

  • Sprint crosshair will not replace standard crosshair

  • FOV will not increase while sprinting

  • Look sensitivity will not be lowered while sprinting

  • Sprint button will receive raw input

Immune To Void Fog body flag

  • Body will not receive Fog damage. Fog bonus damage will still increase

CHANGELOG

1.5.1

  • Fixed incompatibilities with SkinTuner, ChaoticSkills and PassiveAggression

1.5.0

  • Added ClientBuffs feature for CharacterBody

  • Added proper events for KeepVelocityOnMoving, Strafe, BunnyHop and AirControlFromVelocityAdd

  • Fixed RocketJumpComponent rocketjump for clients

  • Added IOnGroundHit interface

  • Added PhysForceFlags for RocketJumpComponent

1.4.0

  • Added IOnGroundHitServer interface

  • Added RemoveBuffsOnGroundHitServer component

  • Added defaultConfigValues Dictionary<ConfigFile, Dictionary<ConfigDefinition, string>>

  • Added NoWeaponIfOwner feature for BulletAttack

  • Added AirControlFromVelocityAdd feature for CharacterMotor

  • Added DontFadeWhenNearCamera feature for RendererInfo. Since DLC3 it works half time

  • Added BonusForce force feature for BulletAttack

  • Added LastJumpTime for CharacterBody

  • Added ForceIsOne force feature for DamageInfo (this has been done before official way of doing this so it probably no longer works, please use PhysForceFlags)

  • Added ForceIsOne force feature for BulletAttack (this has been done before official way of doing this so it probably no longer works, please use PhysForceFlags)

  • Added ForceIsOne force feature for BlastAttack (this has been done before official way of doing this so it probably no longer works, please use PhysForceFlags)

  • Added ForceDisableAiControl force feature for DamageInfo (this has been done before official way of doing this so it probably no longer works, please use PhysForceFlags)

  • Added ForceDisableAiControl force feature for BulletAttack (this has been done before official way of doing this so it probably no longer works, please use PhysForceFlags)

  • Added ForceDisableAiControl force feature for BlastAttack (this has been done before official way of doing this so it probably no longer works, please use PhysForceFlags)

  • Added PitchClipCycleStart and YawClipCycleStart for AimAnimator

  • Added List<BuffDef> buffsWhileMidair field for RocketJump component

  • Added and Removed Overheal Proctype feature (lol)

  • Added static float strafeMultiplier for strafe coefficient instead of hardcoded value

  • Made sprint button to take raw input if body has SprintAllTime body flag

  • Removed Sniper Hurtbox Tracker feature

  • Remade onHitGroundServerDictionary from Dictionary to FixedConditionalWeakTable

  • Remade RocketJump component to use RemoveBuffsOnGroundHitServer component instead of onHitGroundServerDictionary

  • Removed RocketJump applyStrafing field

  • Network RocketJump zero vertical velocity

  • Added default layer filter for RocketJump sphere search

  • Replaced all Unity Debug logs with Bepinex Debug logs

  • Made all hooks static

  • Fixed Loadout Section Selector flexible vertical scaling

  • Fixed buffs not properly registering in time

1.3.0

  • Added BulletAttack IgnoredHealthComponents feature

  • Added Sniper Hurtbox Tracker feature

  • Added Loadout Sections feature

  • Added Language Token addition method

  • Added Walljump feature

  • Updated and deprecated Network Configs feature (trying to setwork configs without affecting client config values is such a pain in the ass)

  • Guided Projectile component will get needed components on Awake if they are not set

1.2.0

  • Added Network Configs feature

  • Added ImmuneToVoidFog body flag

  • Added ChangeTimescaleForAllClients util

  • Added AddOrRemoveBuffAuthority extensions

  • Character Motor removes itself from OnHitGroundServer event on Disable

1.1.0

  • Added Strafing feature

  • Added Bunnyhop feature

  • Added Velocity Override feature

  • Added Linked Skill feature

  • Added IOnProjectileExplosionDetonate interface

  • Added Rocketjump component

  • Added Guided Projectile component

  • Added OnHitGroundServer event

1.0.0

  • Added SprintAllTime body flag

  • Added AddEntityStateMachine util

  • Added Generic Skill Awake fix