Brynza API
Brynzananas API mod adding features for developers usage
About this mod Author’s original text
BulletPatternDef
- Creare BulletPatternDef scriptable object and fill out Vector2 points. Use SetBulletPatternDef(this BulletAttack bulletAttack, BulletPatternDef). Current spread vector can be accessed with BulletPatternDef.GetAimRay(CharacterBody characterBody, Vector3 aimVector, float spread)
BlastAttack EndPosition
- Use SetEndPosition(this BlastAttack blastAttack, Vector3? endPosition) to turn BlastAttack from sphere explosion to capsule explosion
ProjectileImpactCapsuleExplosion component
- Derives from ProjectileImpactExplosion
- Set Vector3 positionAdd value to add position to transform position and use result as BlastAttack position
- Set Vector3 endPositionAdd value to add position to transform position and use result as BlastAttack endPosition
- Set ScaleEffectByAxis scaleEffectByAxis value to set which axis gets scaled for explosion effect
- Set Vector3 addRotationToEffect value to rotate explosion effect
EffectData additions
- Use SetScale(this EffectData effectData, Vector3? scale) to set scale of your effect as a vector
- Use EffectComponent GetEffectInstance(this EffectData effectData) to get effect object instance after spawning it. Works only if transmit is set to false
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> 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
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Dependencies
Install these first, or the mod will not work:
RiskofThunder-R2API_DamageTypeRiskofThunder-HookGenPatcherRiskofThunder-R2API_PrefabRiskofThunder-R2API_NetworkingRiskofThunder-R2API_CharacterBody