Brynzananas-Brynza_API icon

Brynza API

Brynzananas API mod adding features for developers usage

Last updated 6 days ago
Total downloads 12082
Total rating 1 
Categories Libraries Seekers of the Storm Update
Dependency string Brynzananas-Brynza_API-1.6.0
Dependants 2 other packages depend on this package

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