-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homicidal military kills all farm animals including the cat and dog. #146
Comments
You paying them enough? |
Are you sure they haven't been set to "Attack" behavior? That has been (at last) enabled with the last update, so squads which had been primed did not do their job previously. If you mean to say that they also killed animals which already were assigned to a pasture, that would be unintended. Mind that an animal might be on a pasture (but not belong to it), or have escaped a pasture, but still is assigned to it. |
Well, this was a brand new start, the game was unpaused, so no animals were in the pasture. My current workaround is to not form squads until the animals are pastured. At Sierra Online we would not classify this as a bug, but rather an undocumented feature. |
We will need to make sure that squads are initially configured as "passive". |
Don't like that solution. The problem here and question in general is should the military be able to attack and kill non-aggressive and farm animals. |
Yes, must be able to as they can as well count as pests (think exploded chicken farms etc., something apparently every player is bound to encounter eventually). Just must not do that as default, and just double check we don't kill tame animals. |
I have never had an exploding chicken farm but then again I always set a limit of three roosters. We could perhaps have an open hunting season for select animals that become a pest. Check Wild chickens and the guards will kill the wild chickens, but only if it is open season. With Gnomoria, I would put my extra bulls at the entrance early in the game, they would sometimes take out one or two of the goblins while my security was getting organized.
|
At first they assaulted a crowded pasture, went from +5 over limit to 0/22 After that they would occasionally kill on mass strays from a open pasture |
That's a bug in the "defend" behavior then. It's currently implemented as "attack targets if they can be reached without moving", but is lacking the prerequisite that the target should be hostile. |
I have this behavoir also, Have some cows and all of the sudden my squad that i set up with default "defend" settings started to kill all cows. |
I believe this problem is caused in Ingnomia/src/game/gnomeconditions.cpp Lines 303 to 306 in f578cf4
It seems that the only condition to attack when DEFEND option is selected is [EDIT] |
This logic here is missing the concept of "aggression" in general. The idea was to extend the instance of each monsters with a flag of "creature classes it's hostile to", defined by having attempted at least a single attack at that class or having received one. Without that logic, there is nothing which would define a creature as hostile at all. Aggression is part of the behavior tree after all. |
I think more robust solution would be to have to consist of sort of factions (fox faction, goblin faction, cow faction, tamed animals faction) and 2 types of agression
It would also allow for differentiation on behaviour based on just encountering hostile actor or encountering hostile actor that is in combat with friendly/allied actor etc. |
@gloowa Take a look at https://github.com/rschurade/Ingnomia/projects/4 , future AI improvements are being planed over there. Factions are superseded by that per-species stance system as is. Active hostility is what we actually need to be able to implement a "defend" option. I expect it makes most sense to flag the attacker as hostile towards the entire target species (counter with decay, not just boolean). In that case, "being flagged at all" makes you eligible to be counter-attacked from the Defend stance. Having a higher counter opens up more options in the behavior tree. |
Oh, i haven't checked the projects page. What is described there, is pretty much what i had in mind, just expressed way better. That looks awesome, i will be anticipating the changes. |
Expected behaviour
Rancher put animals in the pasture while military eliminates threats
Bad behaviour
The military went on a rampage and killed all farm animals.
The text was updated successfully, but these errors were encountered: