Closed LucioMagno closed 5 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.
Is your feature request related to a problem? Please describe.
In the current state of CDDA, Bandit NPCs exhibit overly simplistic and unrealistic behaviors when engaging the player or being engaged. Specifically, they neither actively pursue the player in a realistic manner nor exhibit self-preservation tactics such as retreating or seeking cover when under fire. This lack of dynamic behavior undermines the realism and challenge of encounters, making engagements feel predictable and less immersive.
Solution you would like.
To address these issues, we propose the development and implementation of advanced engagement and evasion behaviors for Bandit NPCs. These behaviors would include seeking cover, attempting to break line of sight with the player, and employing more strategic approaches when deciding whether to engage or flee.
Engagement Tactics:
Aggressive Approach: When in groups or possessing superior firepower, Bandits should attempt to flank or encircle the player, using cover to their advantage.
Cautious Engagement: Single or outgunned Bandits should keep their distance, using hit-and-run tactics and avoiding direct confrontation.
Evasion and Retreat Tactics:
Seeking Cover: Upon taking fire, Bandits should immediately seek nearby cover, prioritizing obstacles that break line of sight with the player.
Retreating: If significantly injured or if the player is heavily armed, Bandits should attempt to retreat. Retreat behavior should also be triggered if a Bandit assesses that they are outmatched or outnumbered.
Breaking Line of Sight: Bandits should actively seek to break line of sight during retreats, making it harder for the player to land shots and allowing for potential ambush setups or clean escapes.
Implement an AI decision-making process that evaluates the current situation based on the Bandit's health, armament, number of allies, and the perceived threat of the player. This process will dynamically adjust Bandit behavior between aggression, cautious engagement, and retreat.
-Enhance Bandit NPCs' awareness of their surroundings, enabling them to identify potential cover, escape routes, and advantageous positions for engaging the player.
Describe alternatives you have considered.
A simpler alternative could involve static scripts for Bandit behavior based on health thresholds or fixed AI patterns. However, this approach would not offer the depth of realism and adaptability proposed here.
Additional context
The goal of implementing these advanced behaviors is to significantly enhance the player's tactical considerations during encounters, making each engagement with Bandit NPCs a unique and challenging experience. This improvement aims to contribute to the overall depth and immersion of the game world.
Here is a heavily simplified mock-up code that could represent how this would be implemented:
class BanditAI : public monster { public: BanditAI() : monster() { // Initialize Bandit NPC properties hp = 50; aggression = 0; morale = 100; engagement_range = 10; vision_range = 15; }
private: item weapon; bool is_fleeing = false; bool is_taking_cover = false; int engagement_range; int vision_range;
};