Jump to content

Recommended Posts

jxnv7Jcl.png

by

Rydygier & Gunter Severloh

 

What is Herne?

Herne is an ai hunter script, the script was written with two AI hunting codes merged into one.

The first code you can see demonstrated here:  VIDEO

The second code was taken from my mission: Desert OPS Run - Tactical Arena scenario.

 

The first code basically gives the ai knowledge of roughly where the player is, they will move, pursue, and search for the player

in the area they "know" where the player is without you needing to give them waypoints, if the player is seen or shoots,

the ai will engage, and follow.

 

The second code gives the ai knowledge of where the player is, but its main focus is engaging the player inside a buildings,

so if the player is hiding, or defending or had moved to a location inside a building of any type, the ai will most times

enter the building en-masse and locate and kill the player, almost like in cqb.

     Though the ai is not going to have a tactical prowess or some special forces techniques or tactics they will perform when they enter,

the normal vanilla ai skills will come into play, the script mainly gets the ai to the player's location and has them search.

 

Download the Script/Demo mission v1.1

https://www.dropbox.com/s/88p0p4mtun6sxfe/RYD_Herne_v1_1_demo.Altis.zip?dl=0

 

Spawn AI through a trigger that will hunt the player!

How to use the script in a scenario

In a  initServer.sqf or init.sqf put the following code:

call compile preprocessFileLineNumbers "Herne.sqf";

	{
	[_x] call RYD_CH_Herne;
	}
foreach [HuntingGroup1,HuntingGroup2];

Ingame Usage:

Give the enemy squad or unit a name in their group variable name box

not a squad's leaders or single unit variable box, the squad as a group, so using the Entity List (left panel)

click on the group itself and edit it,  then run the code from a initServer.sqf as seen above,

replacing or using HuntingGroup1 or 2 with your own name.

 

Optional Parameters

You also have optional parameters if you want to customize.

For the following adjust the code in your initServer.sqf or init.sqf:

 [HuntingParty,onlyKnown,distanceLimit,updateInterval] call RYD_CH_Herne;

onlyKnown: may be 0, 1 or 2.

0 - hunters will hunt the player regardless of knowledge about him.

1 - hunters will move as a group in the player's vicinity regardless of knowledge, but they must know about the player in order to enter into the building (default setting).

2 - hunters will not hunt unknown players.

 

distanceLimit: in meters. Only players closer than this from hunting group leader may be hunted by this group. Negative value (default) removes any distance limitation.

 

updateInterval: in seconds. How often hunting parties will reevaluate movement destination.

Note: if set too low, hunters may be stuck if their supposed to move far away, as path finding may take longer, than this value,

so before they find a path, new destination will make them start path finding a new path.

    IMO don't go below default, which is 60 seconds, in fact probably no reason to change that value anyway.

 

After executing, each hunting party will be stored inside RYD_CH_WildHunt global variable ( a single loop iterating through each hunting party each cycle/interval).

      Hunting group will move in the vicinity of closest player and if close enough (<100), members of this group may enter inside the building, if player is hiding in it.

 

wJDPbMBm.png

Edited by Gunter Severloh
Updated script/demo with version 1.1
  • Like 15

Share this post


Link to post
Share on other sites

Cool script guys, cool artwork too. :rthumb:

  • Thanks 1

Share this post


Link to post
Share on other sites

The name for the script is from Herne the Hunter

https://en.wikipedia.org/wiki/Herne_the_Hunter

https://www.hypnogoria.com/herne.html

https://mythopedia.com/topics/herne-the-hunter

 

In the code itself Rydygier uses names such as Wild Hunt which is part of the Herne the Hunter folklore/mythology.

  • Like 1

Share this post


Link to post
Share on other sites

I wonder, if anyone knows this:

 

 

  • Like 3

Share this post


Link to post
Share on other sites

Video added to the original post with a demonstration, configuration and setup.

The video shows the very basics of setup groups with Herne.

 

Idk if you guys ever seen this movie but its called The Ritual

its setting is in Sweden but basically the creature in this movie (just an assumption here) is called Moder Child of Loki

which is i think related to Herne as Herne was said to be folklore, mythology and or the God of the forest, anyways check it out

pretty freaky movie, but this video explains what the movie is about and goes into the creature.

I hope that it doesn't throw people off on the AI script as im mainly just referring being the lore

behind the name we used for the script. Cheers!

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites
On 4/3/2023 at 4:15 AM, Gunter Severloh said:

 

That guy picks all the wrong mountain cabin AirBnB's:

 

  • Haha 1

Share this post


Link to post
Share on other sites

Give Rydygier some likes he combined both codes and wrote the script, dont give me all the points, i just created the thread and the video

and helped make this available to the Arma community, seriously the man can do some amazing stuff with code.

  

You know you've played to much Arma when you can make the engine do what you want through code

that would be Rydygier's statement in my thread here 😄

 

  • Like 1

Share this post


Link to post
Share on other sites

Great script Rydygier and you came up with, i have been using the Hunt Player script in some of my SP games.

 

How does the Ai decide what player they are going to hunt if i use it in a MP game with about 4 players ?

 

Cheers Play3r

Share this post


Link to post
Share on other sites

If there are many players, each hunting group goes after the closest one (to the hunting group's leader). Depending on settings, ignored may be (or not) players unknown to given hunting group. Another optional limitation is certain distance limit, but it is disabled by default. Yet another option to exclude some player from being hunted is marking him like this on the server:

 

somePlayerUnitName setVariable ["RYD_CH_Protected",true]; 

 

or anywhere:

 

somePlayerUnitName setVariable ["RYD_CH_Protected",true,true]; 

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Hello, it's good to see two pioneers of the ARMA series, interacting with their works.
It really is an invaluable contribution to the community.
As a parent and with all the commitments that entails, I don't have the time I'd like to dedicate to this game.
Rydygier, from time to time you use your ARMA 2 DRAGONS 😊
I still can't afford to make a medley of medieval mods for wizards to use.😧
But, I just downloaded the sample mission, so I think I know how to get the most out of it.

  • Like 1
  • Confused 1

Share this post


Link to post
Share on other sites
27 minutes ago, elpreguntadoro said:

Hola, que bueno ver a dos pioneros de la serie ARMA, interactuando con sus obras.
Realmente es una contribución invaluable para la comunidad.
Como padre y con todos los compromisos que eso implica, no tengo el tiempo que me gustaría dedicarle a este juego.
Rydygier, de vez en cuando usas tu ARMA 2 DRAGONS 😊
Todavía no puedo permitirme hacer una mezcla de mods medievales para que los usen los magos.😧
Pero, acabo de descargar la misión de muestra, creo que sé cómo aprovecharla al máximo.

plz keep the forum in english..

Share this post


Link to post
Share on other sites

Sorry, I don't know what you mean, I use the google translator and then "paste" the text.
Maybe it's a browser effect

 

(I think it has been corrected)

Share this post


Link to post
Share on other sites
1 hour ago, elpreguntadoro said:

Rydygier, from time to time you use your ARMA 2 DRAGONS

 

The ones, Icewindo made to be used with my Rincewinder,  Combat Effective Magick System? Also there was some melee script involved. Well, old days (I didn't run A2 since A3 appeared...) and some cool memories of working on those. 🙂 BTW Rincewinder was ported to A3, can be found on Steam Workshop. No true dragons though, only choppers pretending them...

 

Still, here let's focus on Herne. 

Share this post


Link to post
Share on other sites
5 minutes ago, Rydygier said:

 

 

Aún así, aquí centrémonos en Herne. 

That's right, I want to test that script and then comment.
Greetings

Share this post


Link to post
Share on other sites

Hi guys, gunter here i'm on a flip phone.

Was a headache to get here and post this, anyways i wanted to let you know especially rydygier as we were working on something through pm that my computer is down.
 Tuesday my computer wouldn't boot nor get to the desktop, i learned that from a friend of mine over the phone and from some tests that my win 10 operating system is corrupted.

 

So currently im waiting for a cd with win 10 os on it to boot off of and reinstall the os on a new ssd i bought this morning from my friend who is a computer tech btw 😉

so i'm hoping by saturday afternoon i'll be back to normal, sunday the latest. No arma since tuesday 😞 be back soon!

  • Sad 2

Share this post


Link to post
Share on other sites

You know you've played too much Arma when it melts your gear back into the age of the Flip-Phones...

  • Like 1
  • Haha 3

Share this post


Link to post
Share on other sites

Ya, looks like i wont be back til after monday. Cd didnt arrive in today's mail :( dam fri, sat, and sun off from work and no arma.

Share this post


Link to post
Share on other sites

Nah i feel for ya man - happened to me overdoing SkyrimVR mods and animations - whammied my whole install and had to re-buy windows. In the long run im happiers with my fresh install but the waiting game sucks. Also -should be a USB stick not a CD ya Boomer ! 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for these scripts.

 

1) Any issues using this on MP dedicated server?

 

2) Is there a way to keep the AI from closing with the players beyond a certain distance? For example consider AI recon element tasked to shadow players, so in tight terrain, for this example, not close to within say 150m of a player?

Share this post


Link to post
Share on other sites

1) No issues known to me - not tested but also not expected. It should work fine as long kept server side, along with affected AIs. 

 

2) No. That would require quite different logic, more complex and hard to make reliably, I imagine. Covert following is out of scope here, probably also too specific for standalone script project. 

  • Thanks 1

Share this post


Link to post
Share on other sites

Hello again, I was testing the scripts.
Herne The AI Hunter Script, and the code Gunter shared.
I downloaded the test missions, but I made some modifications: I put the player's unit in a building, near the hospital in KAVALA; on the top floor.
Not on the roof, but on the top floor, inside.
The OPFOR units reach the building but with none of the scripts they go up to search.
Even when I do some shots in the air.
They only went up when I had the ASR AI3 mod active, but only after taking a few shots.
It's a pity, imagine a scenario, where you would have to escape after eliminating a target and go up to the last floor and wait and resist for a period of time to be rescued by air or receive reinforcements by ground

Share this post


Link to post
Share on other sites

Well, they should. If they don't do that in some case, there are various possible causes. If you provide vanilla repro - a mission, that doesn't require any mods or other scripts, where the problem occurs, there's a chance to determine, what's the exact cause and, if possible, to fix it.

Share this post


Link to post
Share on other sites

Was the building one of those?

Offices-1.png

 

If so, the probable cause is this line:

private _blds = nearestObjects [_prey, ["house"],10,true];

So the script looks for any house object in 2D radius of 10m around the player. But those searches are in relation to the ground level center of the building, not to any point of it. Hence, if building is large enough, there may be positions inside it, that are farther, than 10m from that center. So I went into that building and found positions at the edges, that are >11m away from the house center (distance in 2D). Result: no building to be searched found. 

So if you want, try such a change:

private _blds = nearestObjects [_prey, ["house"],30,true];

If that's the cause, it should help (in my tests with me closer to the center, AIs entered the building and found me eventually). 

So, why the radius is so small? Well, If you're in some large building close to the external wall, and just behind this wall is other building, very small, that small building may be closer to you, than the one, you're in. That's not good. But since 10m proven to be too little for some buildings, we probably need to accept some risk of that sort. 30 meters hopefully should cover (almost?) all cases - tested on Altis airport terminal building. I wouldn't go wider even, if there are larger buildings. 30m is already risky. 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

I'm going to test this in MP in a few weeks. Might you see an issue if used with VcomAI?

Share this post


Link to post
Share on other sites

Although never used vcom and do not know, what exactly it does an by what technical means, expected should be interferences with any AI mod, that tries to move AIs from place to place or manipulate its stance, behavior or combat mode. Simply imagine, what happens, when two different scripts tries to achieve two different things by manipulating in the same time the same unit... 🙂 Unless two AI mods are designed to work together or at least known to tolerate each other, universally good idea is to avoid mixing them. IMO best if hunter groups would be excluded from any other AI mod control, but of course feel free to experiment, who knows... 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×