Mod:製作一個自定義敵人
跳至導覽
跳至搜尋
此頁面的內容需要被翻譯。
你可以幫助我們來翻譯此頁面。至於翻譯的話請遵守本Wiki的翻譯準則。
基礎 |
---|
入門 • 基礎 • Lua腳本 • Data.wak • 實用工具 |
製作指南 |
音頻 • 敵人 • 生物群系 • 天賦 • 法術 • 精靈表 • 材料 • 圖像放射器 • 特殊行為 • CMake使用 |
組件/實體 |
組件文檔 • 枚舉 • 特殊標籤 • 所有標籤列表 |
Lua編程 |
Lua API • 實用腳本 |
其他信息 |
法術和天賦的ID • 聲音事件 • 魔數(Magic Numbers) |
WIP
如果英文wiki更新了記得幫這個也更新了-->鏈接
此頁面介紹了用於創建新敵人的基礎知識。(WIP)
常見組件和標籤
Component | Purpose |
---|---|
AnimalAIComponent | Determines enemy behaviour and attacks. |
DamageModelComponent | Allows the enemy to be hurt, determines their damage multipliers and material weaknesses. |
PathFindingComponent | Allows the enemy to path-find through terrain and to other entities. |
PathFindingGridMarkerComponent | Affects path-finding grid in some way, limited documentation. (To be researched.) |
faction, food-chain rank and more. | |
CharacterPlatformingComponent | Determines the enemy's movement capabilities. |
CharacterDataComponent | Affects enemy collision, physics and more. |
HitboxComponent | Determines enemey's hitbox for incoming attacks, ect. |
CameraBoundComponent | Controls the distance from the camera where the enemy should be unloaded. |
SpriteComponent | The enemy's sprite graphics. |
SpriteAnimatorComponent | Updates the enemy's current sprite animation when doing certain actions, i.e. idling, walking, attacking. |
AudioComponent | Determines the audio to be played upon certain events. |
Tag | Purpose |
---|---|
mortal | Multi-purpose tag for living creatures and entities that can be destroyed. (To be researched.) |
hittable | Enemy can be hit. |
enemy | Enemy is an enemy. |
flying | Enemy is a flying enemy. |
boss | Enemy is a boss. |
miniboss | Enemy is a mini-boss. |
human | (To be researched.) |
prey | Enemy may be targeted by predators. |
homing_target | Enemy can be tracked by homing projectiles. |
destruction_target | Enemy will be targeted the Destruction spell. |
teleportable_NOT | Enemy cannot be teleported. |
polymorphable_NOT | Enemy cannot be polymorphed. |
necrobot_NOT | Enemy cannot be revived by enemies like Necrobot. |
glue_NOT | Enemy cannot be glued. |
curse_NOT | Enemy is immune to venomous curse? Grants no immunity to curse damage. |
touchmagic_immunity | Enemy has immunity to Touch of spells. |
AnimalAIComponent.ai_state Enum Values
The AnimalAIComponent::ai_state
has values 1-21, which correspond to the following states:
local states = {
"RandomMove",
"Wandering",
"Eating",
"RaisingHead",
"PreparingJump",
"MoveNearTarget",
"Peeing",
"Defecating",
"Alert",
"Landing",
"TakingFireDamage",
"EscapingPrey",
"AttackingMelee",
"AttackingMeleeDash",
"AttackingRanged",
"AttackingRangedMulti",
"Escaping",
"JobDefault",
"JobGoto",
"JobHelpOtherEntity",
"GoNearHome",
}
These can be printed out like so:
local animal = GetUpdatedEntityID()
local state = ComponentGetValue2(
EntityGetFirstComponentIncludingDisabled(animal, "AnimalAIComponent"), "ai_state"
)
print(states[state])