Animals won't start fights - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Animals won't start fights (/Thread-Animals-won-t-start-fights) Pages: 1 2 |
RE: Animals won't start fights - Coruja - 01-28-2017 06:52 PM NPC AI is a bit complicated, like the "AI" word says itself, they have some artificial intelligence checks instead just attack everyone and everything, so there's some things that can make the NPC refuse start the attack (like flags, distance, notoriety, threat level, etc) here you can find how the attack sequence is called and everything that it checks for: https://github.com/Sphereserver/Source/blob/master/src/graysvr/CCharFight.cpp#L2344 PS: maybe the problem of guards NPCs refusing the attack could be also related to this same code RE: Animals won't start fights - Anarch Cassius - 01-30-2017 07:02 AM Ugh so I went in and turned on all my NPC Ai extras and it works fine as long as I leave Fight and Flee off. So 2 likely possibilities... NPC AI Extra makes certain things not work when Fight and Flee are active but is fine when they are off. Fight and Flee break certain things on their own. OR Fight and Flee DO allow combat but so intermittently I associated it with other changes that actually had no effect; NPC AI extra has no effect. Bottom line, if you want to control fights yourself turn off Fight and Flee. RE: Animals won't start fights - Coruja - 01-31-2017 01:31 AM try using this test build to check if it's working fine RE: Animals won't start fights - Anarch Cassius - 01-31-2017 07:55 AM Combat sort of works but monsters/animals still will not attack enemies of the same brain. You get the same declaration of attack (once) with no follow through. RE: Animals won't start fights - Coruja - 01-31-2017 08:32 AM probably this is related to NPC motivation to attack try disable MonsterFight on sphere.ini, or if do you want leave it enabled try using this event to prevent the NPC lower its motivation chance when attacking another NPC with the same brain/ID Code: ON=@NPCActFight RE: Animals won't start fights - Anarch Cassius - 01-31-2017 09:24 AM Okay. That makes sense. I figured it was motivation but couldn't figure out where to alter it with script, thanks for pointing me to NPCActFight. That said I am not sure how desirable the brain checking is, particularly with so many old brain types deprecated. It's basically monster and animal now, so MonstersFight is more like monster vs animals. |