Battle Talent  V11
Battle Talent Documentation

Welcome to the Scripting Document

Hello, this is the scripting document, you can query these API, then use them in lua.

Quick Start to build the mods from this project

https://battletalent.github.io/community-docs/docs/tutorials/modtoolkit-overview

if you just want to try play this mod, you can download it from HERE

Commonly used classes

Basic Classes

GamePlay Related Classes

Lua Host Classes

For lua host script, check the LuaFunction in each class, that's the event they will receive.

For example, InteractTriggerX has luaCloseSkill, then it'll recive CloseSkill Event

exceptional case:

LuaFunction name actual event name
AwakeInit Awake
StartInit Start

For example, InteractTriggerX has luaAwakeInit, but it'll receive Awake Event instead of AwakeInit

Commonly used components

Basic Components Function More Details
InteractWeapon represent the entity of weapon
InteractTrigger / InteractTriggerX define how weapon works when player pressing trigger button https://battletalent.github.io/community-docs/docs/details/skill-system
StabObj define how your weapon penetrate others
RagdollHitInfoObj define how to calculate damage https://battletalent.github.io/community-docs/docs/details/hitinfo-and-collisioneffect
RagdollHitInfoRef it'll define a group of RagdollHitInfoObj as a whole, so that they won't hit multiple times
RigidbodyInit define intertia tensor and center mass, if it's zero, then it'll not take effect on the rigidbody
CollisionEffect simulate physics collision effect https://battletalent.github.io/community-docs/docs/details/hitinfo-and-collisioneffect
AttachLine / AttachPoint define how player grabs it
Mount Point define how player put it in the pocket
FlyObj / FlyObjX attached on Fly Object, such as bullet, magic https://battletalent.github.io/community-docs/docs/details/flyobject

Damage Pipeline

https://battletalent.github.io/community-docs/docs/details/damage-pipeline

Background Knowledge

Term Explaination
addressables by pressing the addressable toggle box to build resource into addressable resource, then rename the path to make it get loaded correctly in game. once you filled in correct addressable resources, then the game will load it on start
resources path Weapon Path: Weapon/
Script Path: LuaScript/
ICon Path:ICon/
Effect Path:Effect/
Audio Path: Audio/Sound/
FlyObj Path: FlyObj/

any resource's addressable name in the path above, can be loaded by the system without path included. for example, if an effect's addressable name is Effect/explosion, can be create by EffectMgr.Instance:PlayEffect("explosion")
entry point any lua script's addressable name is Entry, will become the entry point of this mod
components end with X means it's scriptable, such as FlyObjectX, InteractTriggerX
coordinate z is forward, x is right, y is up

DebugTools

Dev Environment Pros Cons
edit in Editor + debug in Windows Simulator 1. dosen't need a gaming PC
2. iterate very fast, because you don't need to put on headset
3. you can make use of shortcut to debug faster
1. the feeling is different from in VR
edit in Editor + debug in SteamVR 1. you can check the real size in headset
2. you can make use of shortcut to debug faster
1. need to install mod and put on headset everytime
edit in Editor + debug in Quest 1. you can check the real size in headset 1. need to install mod and put on headset everytime

Shortcut

Shortcut Function at Body Mode Function at Hand Mode
WASD walk walk
Shift run hand rotation
Alt switch to Hand Mode switch to Body Mode
Tab switch between your hand
Mouse Movement body rotation hand movement
Ctrl hand movement on Z axis
Shortcut Function
F12 open or close MainMenu
F11 open or close CheatMenu
F10 reload mods(not working for now)
F9 remove mods(not working for now)
F8 jump to test scene
F4 hide mouse
PageDown select next target
U kill target
Y stun target
PadNum target attacks
Home enable target's AI
End disable target's AI
K kill all
Space jump
G jump(no cooldown)
V dash(no cooldown)

Log Path

Log Log Path
Windows https://docs.unity3d.com/Manual/LogFiles.html
Quest read it on in-game console or using adb log command or using sidequest's adb window

Attributions