hostile humanity for each ai?

zombified

Member
I know the SAR_config.sqf has the SAR_HUMANITY_HOSTILE_LIMIT default set to -1500.

The question is... can anyone help me set humanity limits for each type of ai?

Example:
Bandit's kill everyone... no matter what their humanity. (Believe this is true today, so no change here.)

Survivor's consider a player hostile if humanity is -1500 or less.

Soldier's hostile limit set to extreme hero level... something like +15,000 or less is considered hostile.

With this config and only setting up a few soldier ai locations (like the airfields), will make the game (and in particular, my server) more interesting. :)

You may get tired of hearing it, but thanks again for the ai work.
 
its not going to work.

all players are of side "west" in Dayz

humanity differences bandit/survivor/hero.

to make a player friendly or unfriendly to an AI, there are 2 possibilities

a) the AI is on a different faction (e.g. east) - this means they will shoot any player due to them being west
b) the AI is on a friendly faction (west or resistance set to friendly) - this means they will NOT shoot any player, regardless of humanity by default.

for b), to make them shoot players, the players need to be switched to the faction "enemy". "enemy" means the player gets shot at by anything that can carry a gun and doesnt go "mooooo". There are no different "levels" of enemy, so once a player gets tagged as enemy, everyone shoots at him.

The problem here is the tagging - in theory, i could implement different humanity thresholds for different AI type - but at the end, they will only decide based upon this IF you are an enemy or not. and once you are tagged, you are tagged, so in your above example, a survivor AI will shoot at a near-hero that was tagged earlier by a soldier AI, regardless if the humanity for that near-hero would still be acceptable for the survivor AI.

Switching players "enemy" status back and forth will not work as well, as soon as you get soldier AI and survivor AI in one place you are screwed.

Sarge
 
Is there any way to specifically make the soldier AI hostile, ie, adding them to the same group as the bandits?

I'd love to only have survivor AI be friendly and the res tbe hostile. Likewise, I could then garrison areas with the soldier AI.

Do bandits kill other bandits as well?
 
Is there any way to specifically make the soldier AI hostile, ie, adding them to the same group as the bandits?

I'd love to only have survivor AI be friendly and the res tbe hostile. Likewise, I could then garrison areas with the soldier AI.

Do bandits kill other bandits as well?

Yes,

Go into your SAR_setup_AI_patrol and find this block of code

Code:
switch (_grouptype) do
{
    case 1: // military
    {
        _side = SAR_AI_friendly_side;
        _type = "sold";
        _ai_type = "AI Military";
    };
    case 2: // survivors
    {
        _side = SAR_AI_friendly_side;
        _type = "surv";
        _ai_type = "AI Survivor";
    };
    case 3: // bandits
    {
        _side = SAR_AI_unfriendly_side;
        _type = "band";
        _ai_type = "AI Bandit";
    };
};

and change the SAR_AI_friendly_side to SAR_AI_unfriendly_side. You can do this for the Survivors as well. This will effectively put them on the same side as the Bandits and they will no longer fight each other.
 
One more question, (because I'm all about the work around) is it possible to run a second AI folder?

In other words, currently there is the "addons" directory where I could leave the bandit and soldiers with hostile humanity 15,000. Deploy no survivors.

Create a second folder "addons_2" and deploy only survivors with the default hostile humanity -1500. (Of course adding to the init.sqf and description.ext lines with the path to "addons_2" directory.)

I know the mission file would be HUGE, but would it work? In theory it sounds logical.

If it did work the next question would be... what can I strip out of the code to make the download smaller? (Using the cherno map only, as an example.)

Thanks for all the great information, SARGE and DR NO.

SARGE... I can't tell you enough how much I love the ai's. Thank you again!
 
Unfortunately Zombie,

No. You could sort of in theory do it but you would be renaming way more than just the addons folder. You would need to go into every Array, Argument, Functions, and a slue of other stuff I can't think of while I am at work, renaming each and everything so one file doesn't call anything from the other. I'm betting even then you would still have collisons in the code. SARGE could probably do it, cause he's just that pro, but I wouldn't hold my breath. Best thing I can tell you to do is to learn how to utilize the AI outside of SARGE's framework. You could place regular AI on the map through the mission file and use their INI fields to get them where you might want them, but doing this without using UPSOM will limit you somewhat. The AI are part of the game. SARGE has just made us this wonderful way of easily configuring them without knowing a whole lot of code. And thank god for that... lol
 
I figured there were embedded links in the code somewhere. :(

Thanks for the suggestion tho. It's something to look into.
 
Its never going to work.

It's not only about links to files, that's the easiest thing, and can be adjusted even in 1 or 2 files. (so changing the folder from /addons to /myaddons isn't a big hassle.

BUT

a) if you read and understand my above explanation, the limit is the available number of factions in Arma 2 and the way enemy handling happens.

b) deployed AI runs in the server instance, regardless from where called - all of them. That's the reason why you can't mix AI mods and scripts in most of the cases.

c) the only way that i can think of you could achieve what you want would be to switch players into factions, depending on their humanity. and there is a) not enough factions for that, and b) you mess severely with Dayz base code then (spawn/respawn/skin change (which actually is a rewspawn) ) etc.

d) I did intentionally not modify/use the mission file, i kept the files that need to be changed of the standard server and mission package as small as possible. Otherwise every update will be a major nightmare.

Sarge
 
one more thing -

bandits dont kill bandits. Wouldnt work, as soon as you spawn a bandit group they would shoot each other.

Sarge
 
Almost gave up… but now you tweaked my interest once more.

Before I continue, I have to say, I really appreciate you taking the time to reply.

You mentioned earlier factions and being tagged as an enemy, if we ignore the fact about being “tagged” and we focus on the factions for a minute. (Don’t roll your eyes, just hear me out with an open mind.) :)

“We” are all “west” faction… players and AI’s (bandits, survivors and soldiers), right?

Here is where my head is at, leave the players and soldiers alone as west faction with hostile humanity adjusted to say… 15,000 (super hero). If you get shot at by soldier AI’s fortifying a position, as near super hero, you are not worthy and are now tagged as enemy to everyone (I assume if you die and respawn, you are no longer tagged enemy.)

With this in mind, we should be good from a player/soldier relationship (pending your humanity). Don’t approach soldiers unless you are worthy or pay the price of getting shot.

Now for, bandit and survivor ai’s and their faction/alignments, switch bandits to resistance (enemy to all) and survivors to east (friendly to west). I’m not sure how the alignments work, but I hope I make my point with the friend/unfriendly stance.

My thinking:
- bandits shoot at everyone
- survivor ai’s will not shoot players or soldiers, (unless player is tagged enemy as previously mentioned)
- players with super hero status of 15,000 humanity will not be attacked by soldiers, but hero with 14,999 will be engaged and tagged as an enemy (until they die and respawn)

I like this approach, but can it be done?

More importantly can it be done with the AI Framework you created? With little to no adjustments to mission.sqm, init.sqf, etc.? Even if there is a little, I can keep it documented to re-apply after updates, which you hinted at.

Sorry if I won’t let this go, but you got me thinking and I’m stubborn sometimes seeking a solution. I appreciate the detailed replies as well.

Thank you and forgive my persistence.
 
:) I give you a hint - before delving into such deep discussions, get your facts sorted :)

check which type of AI has which faction now in SARGE AI .-)

Sarge
 
hmmm... if I'm reading this right:

Bandits AI = EAST
Players (real person) = WEST
Survivor/Soldier AI = RESISTANCE

Assuming I am right... Bummer! :(

But I'm not giving up yet... just need to think of a different work around. LOL

Thanks again for being patient with me.
 
Correct statik. All players are in a different faction then the bandit ai (east and west)
The limitations are within Arma not Sarge
 
Back
Top