[Feature/Dev] Improving the Mobv2 development experience #10163
Labels
Group: Tool
For editor tools, conversion tools, any type of tool that does a automated function for you in a de
Type: Discussion
For tickets for discussing / deciding.
Type: Feature
This label covers feature requests, i.e. things that are not in the game, but might be good to have.
Type: Refactor
These issues refer to current code that be overhauled or refactored.
As of right now, we have a pretty solid and good structure for creating advanced mobs on HealthV2 that can also be playable by other players thanks to the efforts of I and Bod; However, the sheer amount of power we gave ourselves came with a slight pinch of complexity and made the approach to V2 mobs not an easy thing to get into from the perspective of outsiders who have not touched V2 mobs before.
This issue aims to list down a few tasks and discussions to help make working with MobV2s a lot easier and quicker with less chances of creating mistakes by newcomers or other current developers.
Prerequisite info: How do MobV2s function?
MobV2
s are prefab varients ofPlayer_V4(Unet)
Mob
component that defines things such as their name and character sheet, because MobV2s are spawned as NPCs, not players, so they require a special component to initialize important info about them for thePlayerScript
component.NotImportantMind
flag which disregards them as NPCs.Prerequisite info: How does the AI for MobV2s function?
MobAI
andBrainMobAI
.MobAI
allows mobs to have more than one state active at the same time, allowing complex behaviors; such as running and gunning at the same time, without creating monolithic components that handle more than one behavior at the same time.Update
andFixedUpdate
call on theUpdateManager
EnterState
,ExitState
andHasGoal
andTick
functions, names are self-explanatory.HasGoal
can be used to tell other states that a state is not aimless and has a clear objective to follow. (Example: An NPC sees a hostile player in sight, and it has an active goal to attack the player. If there is no player, theHasGoal
returns false)Issues / Required Features
MobAI
and makeBrainMobAI
the primary way of handling AIs on mobs.PlayerSprites
and make it its own component.TilePush
.Nice to haves
The text was updated successfully, but these errors were encountered: