Brynza API
Brynzananas API mod adding features for developers usage
模組介紹 作者原文
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
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
前置依賴
下面這些內容需要先安裝,否則該模組不會生效:
RiskofThunder-R2API_DamageTypeRiskofThunder-HookGenPatcherRiskofThunder-R2API_PrefabRiskofThunder-R2API_NetworkingRiskofThunder-R2API_CharacterBody