Zombie AI VS NPC AI semi working

Xyberviri

Valued Member!
so.... i wanted to see if i could keep loot rights and all and make npc's attack zombies and well i did... they kinda attack back if you get close enough otherwise they run like crazy and then protest at their spawn until they crash the server..


ah man i had a good one, this requires rmod to work, there is a test base at stary in the feild north of it. go there and you can go to the sat phone on the heli pad and then recruit npc units, those units will then slaughter all the zombies they see...

ah man this is great, this is the perfect basis to throwing away dayz ai and doing maybe a horde ai with groups and stuff.

the issue is a groups are limited to 149 before they dont create anymore however that isn't the cased here, my rpt log is almost 2mb with group deletion being 99% of the log. its cause i left it some diag uncommented.

at no point in time was there more than 40 zeds around me they stayed at the spawn eventually, i went out with my npc buddies and started harassing them.

this is very buggy code, im thinking its better to just throw away the spawn conditions for the zeds and just create map triggers with DAC, however the issue of zeds attacking is still present.

tomorrow im gonna work on looking at the suicide bomber scripts and see if i can use some of that to make zeds fearless, i belive i need to set the behavior since i converted them to full blow units, the nice thing is they clip stuff now.
 
I think i worked out the issue by setting behavior to careless , might need to set combat mode to red or yellow. Ill post a better file once i get the bugs worked out, therevis a massive issue in the server fsm that will kill it same with something in zed fsm.
 
Ill post some better code tonight that was a quick and dirty converson the zombie spawner system needs to be changed to account for zombie units instead of agents,
There was a million debug lines in my client log after 10 minutes.

Fractional im omw to work i can msg you in about a hour
 
so.... i wanted to see if i could keep loot rights and all and make npc's attack zombies and well i did... they kinda attack back if you get close enough otherwise they run like crazy and then protest at their spawn until they crash the server..

Does this mean there is a way to make it so the AI will kill the zombies?, but the loot rights won't exist? Without additional addons?

I wouldn't care if the loot persisted or not personally, for my current needs. <_<;

Also I was looking for a method to entirely remove the zombies, because I wanted to try an alternative. Is there a clean way to stop zombie spawns entirely?
 
If you dont care about looting corpses or being able to enter vehicles then you just need to use the following command : "WEST setFriend[CIVILIAN,0];" which will set the WEST to enemy when targeting civilian, however be advised that empty containers, dead bodies and some vehicles are considered civilian and the current rules don't allow one to open containers they are not friendly with.

If you want to stop them entirely then go to dayz_code\compile\player_spawnCheck.sqf end removes lines 46-70:
Code:
            if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
                if (dayz_spawnZombies < dayz_maxLocalZombies) then {
                    if (!_tooManyZs) then {
                        private["_zombied"];
                        _zombied = (_x getVariable ["zombieSpawn",-0.1]);
                        _dateNow = (DateToNumber date);
                        _age = (_dateNow - _zombied) * 525948;
                        if (_age > 5) then {
                            _bPos = getPosATL _x;
                            _zombiesNum = {alive _x} count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 10)]);
                            if (_zombiesNum == 0) then {
                                //Randomize Zombies
                                _x setVariable ["zombieSpawn",_dateNow,true];
                                _handle = [_x,_fastRun] spawn building_spawnZombies;
                                waitUntil{scriptDone _handle};
                            //} else {
                                //_x setVariable ["zombieSpawn",_dateNow,true];
                            };
                        };
                    };
                } else {
                    dayz_spawnWait = time;
                    dayz_spawnZombies = 0;
                };
            };

You may also want to remove line 10:
Code:
_tooManyZs = {alive _x} count (_position nearEntities ["zZombie_Base",400]) > dayz_maxLocalZombies;
 
According to this page:
http://community.bistudio.com/wiki/Mission_Export

mission.pbo files can be packed with addons, Ie the above mod i made could potentially be packed into a mission file. im going to play around with this later to see if i can make DayZ_Factions load via mission file.

unfortunately that means that some one will still have to download something because missions with addons included in the pbo are unable to download via joining the server.

this could actually be both good and bad in that people can't join your server to steal your pbo file, the pbo wont download if they don't have it and you could secure your mission pbo on your forums so only those that have it could actually join your server.

Supporting information:
https://community.bistudio.com/wiki/CfgVehicles_Config_Reference
https://community.bistudio.com/wiki/Config.bin#Many_configs.2C_same_pbo
http://community.bistudio.com/wiki/Modfolders
http://tactical.nekromantix.com/wiki/doku.php?id=arma2:beginner_editing_guide
 
Have you tried adding "_agent addrating -200000;" to the bottom of zombie_generate? That way players keep the ability to loot stuff/use vehicles and AIs attack zombies on sight.
 
Yuppers, that was the first thing i tried. I belive the issue is that zeds by default are not "units".

Add Rating did not work when i first tried it until i turned the zombies into units(from agents) which cause the server to talk ownership and it started lagging my server. they are having this issue in the more zombies thread because they moved the zombies to server side, with this implementation the zombies stay client side and my dev server stayed at 50fps.
 
hey, Xyberviri. i m very interest on ur MP Npc AI such as survivor and bandits (mod) and i know u re still working hard on it..but is there any chances u can give us a time when will it be release? i try to find these kind of stuff almost every forum related to dayz thank you very much
 
that was out a couple of days ago :D, full instructions can be found below on this page,
http://opendayz.net/index.php?threads/dayz-factions.7252/

Right now the bandits will be oppfor if you spawn them in with say like DAC or just place them on the map and setup patrol routes, the only thin you need to do is either Set the side relations or just import a file. let me know if you have any trouble.
Crash has been running them on two Project Awesome Servers and just with the small change its a big difference in the game.
 
If you dont care about looting corpses or being able to enter vehicles then you just need to use the following command : "WEST setFriend[CIVILIAN,0];" which will set the WEST to enemy when targeting civilian, however be advised that empty containers, dead bodies and some vehicles are considered civilian and the current rules don't allow one to open containers they are not friendly with.

If you want to stop them entirely then go to dayz_code\compile\player_spawnCheck.sqf end removes lines 46-70:

I'm currently being hosted through Dayz.st and they don't give access or allow change to dayz_code, is it at all possible to run player_spawnCheck.sqf through the mission file?
 
I'm currently being hosted through Dayz.st and they don't give access or allow change to dayz_code, is it at all possible to run player_spawnCheck.sqf through the mission file?
sorry i didn't notice this, but yes it is possible to do that via the mission file.
 
Back
Top