branchsbox-forsaken/maincancel
362 Commits over 304 Days - 0.05cph!
Undead can attack while walking (thanks Max for the screen share tutorial again ❤️)
NPCs will run logic if there are players in a specific radius
Add animation event for "attack" for undead. Add melee swing. Play swing sound, do actual attack when animation event is triggered
Add PoisonZone.DamageScalesToCenter. Change how poison is applied to count all zones the player is inside and scale damage accordingly
Added cough sounds - player will randomly cough while taking poison damage
Remove MoveToLocation stuff from BaseNPC let NPCs do pathfinding how they want
Refactor how enemies search for players / structures
Add PoisonZone with posion protection threshold / damage per second. Add protection property to ArmorItem + resource. Apply poison over time while player is in the zone.
Add hit sounds for wood, stone, metal
Play hit sounds when UpgradableStructure is damaged by melee
Do blood effects and flesh hit sounds when player is attacked by melee
Stop chasing / attacking target when target is dead - only attack solid stuff
Adjust attack rate
Undead actually do a melee strike causing some damage (10 for now) and initialize DamageTags on armor if not set
Give all armor items melee damage tag (protection)
Enemies will get as close as they can to their target, if a structure is in their way they'll try to break it down
Add option to CalculatePath to specify whether it must be a full path (start to end)
Navigation debug overlay only shows nodes the camera is looking near
Added Navigation.Update( position, radius ) to update walkability in an area
Update walkability when a new structure is placed
Added the ability for items to add their own tooltip info via overload on InventoryItem (AddTooltipInfo). This lets ArmorItem show its damage protection and which part it protects.
Persistence++
Added test DestroyStructure command
When a structure takes enough damage make gibs and delete it
When a foundation is destroyed, break any deployables on it and kill any walls and doors attached to it
When a doorway is destroyed gib and delete any doors attached
Remove old log
When pathfinding with A* limit path calculation per agent to 1 per second. Set target location and check in UpdatePath whether to generate yet.
Clear target location when path is finished
Disable collisions immediately when opening a door. Doors always open AWAY from the player that opened them. Remember that when serializing door state.
Continue if item resource has no unique id. Recompile items
Add Navigation class for A* offloading walkability map creation to separate thread. Only seems to crash when sweeping with a physics body (investigate that.)
Undead find targets quicker
Custom nav path optimize code (trim any intermediary segments if a future segment is not blocked by anything). Trim paths occasionally
Added Flee, Evade, Roam behavior. Improved Wander (turn around if we wander into a wall). Deer now use Evade steering behavior when attacked
Larger wander radius. Fixed climbing when seeking. Change state to random: Idle, Moving.
NPCs will try to unstuck themselves if they get stuck, fix separation behavior for foe
Implement flocking as separate behaviors (sep,coh,ali)
Some refactoring and improvements to behaviors
Simple trace alternative to move helper for basic AI
SteeringComponent / base steering
Friction + Gravity components for AI
AvoidanceBehavior and WanderBehavior
Start converting deer to steering behaviors w/ nav mesh assistance, convert other AI later
Undead will keep a minimum distance from the target player and attack every second
Implement flocking behavior for the enemy but only when target is visible
Armor can specify damage tags, damage protection in % and the hitbox that it affects
Start implementing night-time foe, but the AI sucks. Maybe use flowfields instead of navmesh
Switch all projectiles to use Projectile Data
Don't constantly run lag compensation for projectiles but instead do it once on intitialize and advance the simulation by the calculated number of ticks that it took between client sending the input and us receiving it
Randomly change pose. When a new path is given, set pose to default and allow a few seconds to "get up" before moving, unless the deer is panicked from a player attack in which get up and run immediately
Added deer poses and state machine (default, sitting, sleeping) thanks Max for teaching me the ways
Add LimitedSpawner.UseNavMesh
NPC can opt-out of move helper
Ignore all entities when moving deer until add agent hulls. Deer will randomly decide to start trotting
Tweaked weapon damages, deers move a bit slower
Structures take no damage (for now)
Can harvest killed deers for raw meat
Add deer + animations
Hit flesh sound
Max health etc floats
Rename PickupSpawner to LimitedSpawner and add ILimitedSpawner
NPC Refactor, add AnimalNPC / HumanNPC, add Deer
Don't create attachment model unless weapon is active in hotbar
Added ForsakenEvent.NavBlockerAdded and ForsakenEvent.NavBlockerRemoved
Fixed placing foundations within a No Build Zone if its connected to another foundation
Call weapon item ActiveStart/ActiveEnd
Structures, loot spawners, and deployables register nav blockers and update them/remove them as needed
NPCs will auto snap to nav mesh and update their paths if needed as/when nav blockers are added
FOV improvement + zoom out minimap further
Serialize structure HP
Added support for multile single door types (Wood, Metal)
Serialize last killed time this'll serve as a stat for longest survived time
Reduce threshold for low need stat
Add some simple placeholder icons for death screen
Add death screen to just show information about what/who killed you and with what (auto close for now)
Change starting need stats, increase respawn time to 5s, show death screen when killed
Added crafting indicator and generic ItemIcon class
Add high z-index to Hud overlay class (for now)
Added InventoryItem.OnTrySwap. Dragging an attachment directly onto a weapon will attach it