From: MirceaKitsune Date: Sat, 9 Jul 2011 17:06:16 +0000 (+0300) Subject: Teach bots to fear / be courageous toward prey based on player size difference and... X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=01e00e0504738163fa539565e3356aad7e4a9926 Teach bots to fear / be courageous toward prey based on player size difference and stomach load --- diff --git a/data/botsVT.cfg b/data/botsVT.cfg index 83f3cdb5..aa4fa302 100644 --- a/data/botsVT.cfg +++ b/data/botsVT.cfg @@ -45,9 +45,9 @@ set bot_ai_bunnyhop_skilloffset 7 "Bots with skill equal or greater than this va set bot_ai_bunnyhop_startdistance 250 "Run to goals located further than this distance" set bot_ai_bunnyhop_stopdistance 220 "Stop jumping after reaching this distance to the goal" set bot_ai_bunnyhop_firstjumpdelay 0.5 "Start running to the goal only if it was seen for more than N seconds" -set bot_ai_vore_decide_pred 1.2 "How fast bots decide what to do with their prey, at lowest skill" -set bot_ai_vore_decide_prey 1.2 "How fast bots decide what to do with their predator, at lowest skill" -set bot_ai_vore_decide_swallow 0.2 "How often bots decide if to swallow someone" +set bot_ai_vore_decide_pred 0.9 "How fast bots decide what to do with their prey, at lowest skill" +set bot_ai_vore_decide_prey 1.1 "How fast bots decide what to do with their predator, at lowest skill" +set bot_ai_vore_decide_swallow 0.3 "How often bots decide if to swallow someone" set bot_ai_vore_fear 2 "How much bots will fear players more powerful than them and avoid them in some situations" set bot_ai_vore_teamhealabandon 0.75 "Probability (from 0 to 1) of the bot abandoning a team heal when seeing an enemy they can vore, at highest skill" set bot_ai_vore_stayinstomach 0 "When enabled, a bot will stay in a team mate's stomach even if he has no reason to and could willingly leave" diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index b8e7d308..83d8169c 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -136,6 +136,9 @@ void Vore_AI() fear += self.stomach_load; // the bigger our stomach, the less we want to put someone else in there decide_pred_time = cvar("bot_ai_vore_decide_pred") / skill / self.bot_vorethinkpred; + fear *= (prey.scale / self.scale); // predators fear larger prey and are courageous toward smaller prey + fear *= prey.stomach_load; // predators fear prey that have a large stomach + if(Swallow_condition_check_bot(prey)) { if(time > self.decide_swallow)