Skip to content

NPC pathing update

Chris Davidson requested to merge Shibari/t-engine4:ShoveFix into master

(NPC SHOVE BEHAVIOR): Currently the AI is incredibly bad at moving towards a player if another NPC is in the way because it prioritizes attempting to shove them in the majority of cases even if a sidestep would work. Additionally, the shove algorithm factors things like size. This does not make sense.

  • Shove pressure no longer exists

  • Shoving now only compares ranks and always works if greater, else always fails

  • Shoving will now attempt to move the target aside but if it fails will swap positions with them instead. This favors a "spreading out" by default but makes sure that the biggest threats can advance through lesser ones in tight quarters

  • Shoving no longer costs the shoved any turn energy

  • New move script "move_astar_advanced". This always checks actor blocking but doesn't block if it could successfully swap or shove them. This is autoassigned to randbosses

  • move_astar now calls ActorAI.moveDirection instead of Actor.move allowing it to potentially shove allies

  • Fixed ActorAI.aiSeeTargetPos not checking for invalid target location guesses the first turn it doesn't see the target directly

  • Randbosses can now open doors and move others

Merge request reports