Hi all,
seems some people work on the same things at the moment. I am working on AI logic for the last 3 weeks now, although took a different approach (not using the setside versus Zeds), what i achieved on my version is:
a) no clientside changes needed
b) no rmod needed
1) Survivor AI (shooting bandits and zeds)
2) Bandit AI (shooting survivors, player bandits, zeds and military AI)
3) military AI (shooting player bandits and AI bandits, could shoot zeds but that leads to endless firefights, while i want them to patrol the areas)
4) zeds not aggroing any AI (it is possible to manually add AI units to the Zeds target array, but the damage model of zeds damage is afaik not applyable to AI ... still researching on that one).
5) having patrol helicopters that check e.g. the spawn coasts and hunt down bandits only (auto refuel, auto reammo)
6) any AI will need to have an auto reammo EH running, otherwise they sinply run out of ammo at some point
7) vehicles in AI groups need to have an EH to be refueld automatically
8) if you spawn in vehicles for AI groups, make sure AI does not leave them. If a player tries to get into an abandonned, spawned in vehicle, the server_cleanup.fsm will kill him on entering.
9) destroyed AI vehicles that were spawned in will be cleaned up by server_cleanup.fsm as well.
10) the workaround for the above 2 issues is either to adjust the server_cleanup.fsm (be CAREFUL, if you simply comment that logic out, anyone can spawn in vehicles without being punished), or to set the object variables in a way that is similar to the one in the DAyz logic - but that means these vehicles will be put into the objects array and will be maintained by that - e.g. saved to DB etc ...
11) i use another way to control who aggroes whom. My AI bandits are side east, everything else is handled via the addrating logic.
12) running addrating over all zeds on the map is bad and shouldnt be done
13) instead, use a function on every AI that checks in an intervall for entities close to that AI, and based on the class sets the rating.
14) by this you can check for players as well, and depending on their humanity value set the corresponding rating.
15) spawning in AIs should only happen when a player is closeby ... no use and heavy impact on the server if theres a map full of AI, and one player .... Rocket had the same problem with the Zeds, and decided to spawn em when players are close.
16) I recommend to run an AI monitor, by this you are able to control number of AI / groups and can handle respawns / deletions etc.
17) - AI driving through rubbish - the reason is simple. AI is being generated and controlled on the server. Rockets additional rubbish on the roads is only generated clientside. So AI dont see these.
18) I recommend the following to optimize AI and handling: UPSmon, SHK_pos and ASR_AI.
19) Teamkill - AI shooting the teamkiller - as long as there is no switch to the bandit side, i think there is no way to achieve this. players (regardless if bandit or survivor) are classed as west in Dayz - which is the case for friendly AI as well. You would need to modify the Killed EH of the player object, which is handled on the clientside afaik.
20) end of wall of text
Maybe i'll release my version someday, still optimizing and testing. Open for any discussions though.
cheers
Sarge