Morox AI - Sycosis Simple AI mod

Morox

Well-Known Member
I have heavily modified the AI and updated it for 1.7.7 as well - the original files are required for 1.7.7 then simply extract the new files into the scripts folder overwriting - also you can remove the wild_spawnZombies.sqf as it is now obsolete. I have not had time to thoroughly beta test this so let me know if you have issues.

Links:
http://dayz.zombiesurvivalonline.com/files/Morox-AI-1-7-7.zip

Along with the original features these are the new ones:

1. AI will as they enter towns and pass near buildings spawn their own Zombies.
2. Zombies will, on sight/hearing attack AI - not only run towards but actually damage and kill them.
3. Added a feature to create paths/waypoints in 2D Arma editor and convert it to my AI script, you can take an mission.sqm and convert it (only waypoints are used, [not tested with vehicles]), so if you want to define a bunch of custom paths for AI, mixed with random, this is now possible - Extreme Alpha....


Here are the files and the brief readme I have put together - let me know if there are any issues or questions. Note: this includes the original files as well, if you already have your own gearset's etc you will need to transfer them into these as all the files (except faction's) have been changed.

Links:
http://dayz.zombiesurvivalonline.com/files/Morox-Readme.txt
http://dayz.zombiesurvivalonline.com/files/Morox-AI.zip


Orignal Post with more information about this AI can be found here, to get around Char limit on posts.

http://dayz.zombiesurvivalonline.com/files/Orig-Post.txt

Regards

Morox
 

Attachments

  • add_unit_server.sqf
    16.5 KB · Views: 130
  • npc_alertzombies.sqf
    758 bytes · Views: 119
  • set_unit_faction.sqf
    298 bytes · Views: 97
  • unit_killed.sqf
    3.7 KB · Views: 93
  • wild_spawnZombies.sqf
    2 KB · Views: 101
  • zombie_generate.sqf
    3.3 KB · Views: 107
Nice i will have a look at this in a bit and test it out; some nice changes in there, how can i get the AI to see and engage players from further away as they're not very observant atm at lease with Sycosis original one there not?
 
I am currently working on getting zombies to kill AI.

I have not changed any of the core AI code in this. The Ai is controlled by the baseskill and potential skill variable
Which is a simple algorithm that Sycosis used

The main parts are as follows


_skillRemainder = _potentialSkill - _baseSkill;

_aiSkills = ["aimingAccuracy","aimingShake","aimingSpeed","endurance","spotDistance","spotTime","courage","reloadSpeed","commanding","general"];

for [{z = 0},{z < 10},{z = z + 1}] do {
_totalSkill = (floor(random _skillRemainder)+_baseSkill)/10;
_aiunit setSkill [_aiSkills select z,_totalSkill];
};


If you set base and potential skill to 10 you will get the highest skill ARMA allows, which is 1, if they are still to "weak" it will require modding the AI with a script like UPSMON.
 
As far as the Change-list goes

1. Added Orchthrashers NPC_alertZombie.sqf mod
2. Added wild_spawnZombie.sqf rating edit to allow for AI to attack zeds spawned by that script.

These are really the only "changes" I made to what Sycosis intended to do.

What I focused on was solving the issue of respawns - where the AI would not end up in the right place, with the right gear/skin, or on the right faction. This was caused mainly by the nature of how Sycosis was calling the unit_killed.sqf and the way that file handled the AI.

I tried to make his mod work like I thought it should work, I did not really add a feature-set to it, in the process some solutions presented two options, like the gearset thing and the position thing so I left them in as options rather than forcing one way or another.

So
3. Ability to respawn AI with his original gearset or the exact loadout he had when he died
4. Ability to respawn AI in the spot they died or 10 m from their original spawn position.

dEf, if you are really interested in the code level changes we can go into that, if you see something in the files and have a question just ask.
 
Have you played around with Sarges? I'm curious to know what the pros/cons of this when compared to Sarges.

I'm pretty sure both have their ups and downs, and it would probably be good if someone who has experienced both can give their take so the average person can make a choice based on their needs.

Morox, thank you very much for your time and effort on expanding Sycosis work as well as publicly releasing it. The Opendayz community is only getting larger and more talented... I'm curious to see where this game goes before standalones release
 
I have played with Sarge's and it is a fantastic mod it does far more than this does, the example I gave to Sarge when he asked, was about custom loadouts per AI - which he has since added a version of outside of weapons and ammo in the current release.

The use case I think of is, Let's say you wanted an AI called John who always had the same skin, always had the same weapon and always had the same gear and should always be standing in devil's castle - almost like an RPG NPC (the begginings of a mission or info giver) - if a player killed them you would want him there withing 60 to 120 sec or whatever - Don't really have a way to do this with Sarge's AI at the moment, with this it would be quite easy.
 
Appreciate the work you are putting in. I am running this on my server now. Seems to be working pretty well.
I should have time to thoroughly test it tonight, though. I am at work just monitoring the server right now.

You guys are welcome to check it out.
70.190.1.176:2312 of filter LostPower.com in Arma or DayZ commander.
 
I have played with Sarge's and it is a fantastic mod it does far more than this does, the example I gave to Sarge when he asked, was about custom loadouts per AI - which he has since added a version of outside of weapons and ammo in the current release.

The use case I think of is, Let's say you wanted an AI called John who always had the same skin, always had the same weapon and always had the same gear and should always be standing in devil's castle - almost like an RPG NPC (the begginings of a mission or info giver) - if a player killed them you would want him there withing 60 to 120 sec or whatever - Don't really have a way to do this with Sarge's AI at the moment, with this it would be quite easy.

Hey Morox and Manatee,

i would say Morox is right with his statement. My framework does a lot more than these scripts here, and this is not needed for some simple cases. With my dynamic spawn system you generate a complete new game, with all the impacts of having to decide if you kill survivor/soldier AI and get hunted by any AI on the server, or play friendly and only need to care about bandit AIs.

The heli patrols and the possibility to spawn configurable static infantry AI (extended by vehicle patrols & convoys, just finished them) are another huge factor in complexity.

My AI is optimized for combat behavior, things like throwing smoke grenades, stealing player cars, flanking and sharing of targets is afaik only available in my framework.

So my recommendation would be:

If you are barely experienced with adding mods/scripts to your server, and want some basic AIs, go with Sycosis/Morox scripts. If you want more functionality, are experienced with server modding and want to invest some time to understand how all works together, try my framework.

Another point that might need to be considered is the server performance on high-pop servers. I have seen slowdowns on these with my framework, trying to get more feedback and optimize that, not sure if that happens with Moroxs' as well, would need to setup comparable AI volumes for this.

cheer, Sarge
 
I've been to lazy to find out how exactly to only exlude your specific instance of the code, instead of just exluding all uses of the code, but if someone else knows how, I will add it to the tutorial.

--> send me an extract of your scripts.log and i'll adjust the scripts.txt.

Changing the 5 to a 1 is a bad idea, it was there for a reason. Put in an exclusion, that's way more elegant. Like i said, i can help out (if you promise to learn to understand how BE filters work .-) )

cheers, Sarge
 
Yeah that was direct from the Sycosis post, as you and I have seen earlier today Sarge on the other thread, even simple BE config explanations sometimes are misunderstood, I run with my script's excluded only not the entire line.

So It would be

Code:
5 addWaypoint !"\"addWaypoint\"," !"scripts\add_unit_server.sqf"
 
5 addWeapon !"\"addWeapon\"," !"addWeaponPool" !"addWeaponCargo" !"addWeaponCargoGlobal" !"player addWeapon \"Loot\";" !"player addWeapon \"Flare\";" !"raddWeapon = 'addWeapon'" !"raddWeaponcode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addWeapon.sqf')" !"raddWeaponCargocode = compile PreprocessFile (BIS_PathMPscriptCommands + 'addWeaponCargo.sqf')" !"if (_isOK) then {\nplayer addWeapon _x;\n};\n} forEach _wpns;\n};" !"if (_item == (configfile >> \"cfgweapons\" >> (configName _item))) then {_unit addWeapon configName _item;};" !"if (isClass (configfile >> \"cfgweapons\" >> (_item))) then {_unit addWeapon _item;}" !"scripts\add_unit_server.sqf"
 
RoyalCuppa,

you can use setIdentity, but it is a little tricker than that as the idents have to be defined in your description.ext file as shown below, I was using the name John as an example, though I am working on this as well.

Code:
class CfgIdentities
{
    class John_Doe
    {
        name = "John Bartholemew Doe";
        face = "Face20";
        glasses = "None";
        speaker = "Dan";
        pitch = 1.1;
    };
};

and then do

Code:
_aiunit setIdentity "John_Doe";
 
To reply to Sarge's post about the use of the AI, I would also recommend using Sarge's AI for almost every use case - even if you are new to modding, especially now that Tiger, has created a simple video tutorial on the installation and config of Sarge's mod, found here:

http://opendayz.net/threads/sarge-ai-framework-public-release.8391/page-42#post-34634

As I stated, I have a very specific use case for this, it is the first step in a long list of base mods that need to be in place to build my primary mod, the example I gave of a mission giver is not far off, I have conversation eventhandles etc that are attached to specific AI which always have to have specific gear to give you at very specific places for all the players, so I need this fine grain functionality, in-fact I may use this for those cases and Sarge's for roving patrols of AI which his mod handles far better.
 
Is there anything i can do so when the AI's die they despawn? I have a hardcore server and dont like the fact that my players can gear up very well by killing AI's.
 
Samirocks123,

Do you want them to go away as soon as you kill them or after sometime, do you also want to make it a random occurance or always?
 
As soon as you kill them would be nice, and maybe like 9/10 would dissapear or something, if not possible just always then.
 
Here you go, I have made the chance of them vanishing 90% but it is editable in the file, all I am doing is the equivalent of hide body right when they die.

I am currently working on allowing customizing the loot drops, so they can run and fight with one set of gear but when they die they can have different/less things on them. I like them having what they are running around with but I understand it allows for loot farming.
 

Attachments

  • unit_killed.sqf
    3.9 KB · Views: 15
Thanks a bunch morox! Also, excuse me for asking such a stupid question, so does all your code run of AI's added through the 2d editor? Like i added groups and added waypoints etc, so does that code affect those AI's? Do i need to add any init expressions? I didnt see anything in the tutorial to adding it, and i just want to make sure thats how it goes.
 
Back
Top