Jump to content

Recommended Posts

It must be a player on the server (where the code runs).

  • Like 1

Share this post


Link to post
Share on other sites

Too bad Genesis didn't take the time to incorporate this into VcomAI.

Share this post


Link to post
Share on other sites
7 hours ago, major-stiffy said:

Too bad Genesis didn't take the time to incorporate this into VcomAI.

 

Genesis had had enough of the many brick walls he was encountering trying to better Arma3's AI

Share this post


Link to post
Share on other sites

initServer.sqf

So this:

call compile preprocessFileLineNumbers "Herne.sqf";

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

Can get replaced by this? (optional params)

call compile preprocessFileLineNumbers "Herne.sqf";
[HuntingParty,onlyKnown,distanceLimit,updateInterval] call RYD_CH_Herne;

 

Share this post


Link to post
Share on other sites

Yes. Also you can:

 

call compile preprocessFileLineNumbers "Herne.sqf";

	{
	[_x,onlyKnown,distanceLimit,updateInterval] call RYD_CH_Herne;
	}
foreach [HuntingGroup1];

But if you have only one hunting group, using foreach loop gives you nothing. With multiple groups it can save you some typing basically. 

PS in the newest version onlyKnwon is still 0 by default, unlike 1.0, where it was 1. That means, in 1.1 beta 2, hunters will enter the building, where player is, even without any knowledge about the player's presence. 

  • Like 2

Share this post


Link to post
Share on other sites
On 4/16/2023 at 6:05 AM, Rydygier said:

 

The ladder? The ladder, I saw there, leads to the roof. And you said, you was not on the roof. Is there any other ladder? I ask, because I need to test same situation in order to analyze and then maybe to fix. Still, if I'll have time and free mind, I intent to try work bit more on this, as there's still room for improvements. Seems this exact building may be a good reference, as it may be properly challenging. The issues to overcome:

 

- currently the group moves cyclically from random house position to another house position. There's no consistency in building search. It's enough in small building, but if there's lots of positions and space to move, it may take ages for them to check everything with no warranty, it will even happen;

 

- also, because of size of the building, AIs may be sometimes redirected to other position before they manage to reach previous one;

 

- there's still the problem of vanilla AI, which I try to "tame" by certain behavior and combat mode, but AIs may still be sometimes not obedient anyway.

Not sure, if/when I would try to improve this though. 

Hello again, there is a wide staircase that leads from the lower level to the first floor and then to the second and so on.
Then on the top floor, behind a door, there is actually a ladder that takes you to the roof, but I wasn't talking about that ladder.

On the other hand, I saw something very interesting in the video:

 

getposalt player

 

Should this make the AI search based on how tall the player is?

Share this post


Link to post
Share on other sites

Yes, getPosATL takes the position over the terrain. It is already in use, once hunters have full knowledge about the player, they no longer search the building position after position (house positions also are ATL by the way), they rather all go directly towards the player. 

 

But watch this footage, that's how Herne works now:

 

 

Share this post


Link to post
Share on other sites
20 hours ago, Rydygier said:

Yes, getPosATL takes the position over the terrain. It is already in use, once hunters have full knowledge about the player, they no longer search the building position after position (house positions also are ATL by the way), they rather all go directly towards the player. 

 

But watch this footage, that's how Herne works now:

 

 

WOW, SUPER¡¡¡¡

Share this post


Link to post
Share on other sites
On 4/17/2023 at 11:43 PM, Gunter Severloh said:

Update

v1.1

From Rydygier

 

Most likely still some stuff to sort out, but main new points seem to work so far:

 

- Properly detects, in which building player is. Even, if on the roof;

- AI seem to not stuck as I saw before;

- Introduced kind of cohesion to the building search (here most likely some todos left), meaning now hunting group should search

the building not at random, but rather systematically, position-by-position, moving ladder-by-ladder from the ground level to the roof.

 

Maybe not quite specfor pro cqb, but bit closer to it, than before.

     From the other hand - it makes the hunters more predictable at house search.

Purple arrows indicate currently designated house positions, so you can monitor the intended search pattern.

In practice there are flaws (too long "stops" for example), but probably possible to improve. 

 

Code-wise script changed a lot, more complex. 

 

Great work! I'm testing it and it's so good to make the gameplay more inmersive and difficult.

 

Thank you so much both @Rydygier & @Gunter Severloh for this!

  • Like 3

Share this post


Link to post
Share on other sites

Was making a mission using WebKnight's zombie mod. I spawned a small group by enabling their layer via a trigger. I was driving a hunter vehicle. When I got out of the vehicle, it was blue when looking at the map screen. The group ran to the vehicle even though I was on the second floor of a building. It paid attention to the hunter and not me. Same shit happens in Pilgrimage. Not sure why BI or what ever makes them stay blue when we exit.

getMissionLayerEntities "tsk3grp1" params ["_objects"];
_objects apply { _x enableSimulationGlobal true; _x hideObjectGlobal false; };
sleep 1;
[task3grp1,1,-1,60] call RYD_CH_Herne;

Without the influence of the blue hunter they went for me in the building. Not sure this can be worked around but may want to advise people of this issue.

Share this post


Link to post
Share on other sites
2 hours ago, major-stiffy said:

Not sure why BI or what ever makes them stay blue when we exit.

 

Perhaps because it is still "added" to your group. Or not about that...

 

There is: https://community.bistudio.com/wiki/leaveVehicle

 

But don't know, if/how leaving would affect zombie behavior. Zombie mod author may know more. 

Share this post


Link to post
Share on other sites

I'll give it a shot.  (Hunter not added to any group.)

Doesn't happen on all vehicles, I'll try others.

 

Edited by major-stiffy
(Hunter not added to any group.)

Share this post


Link to post
Share on other sites

I suppose we should check which building to use in our missions. Thoughts?

 

 

 

Share this post


Link to post
Share on other sites

This is not vanilla building, right? At this stage I would recommend to focus on vanilla buildings. Custom ones can cause all sort of AI path finding/house positions etc. issues depending, how are made and configured (errors, bad design, exotic ideas, technical incompletion, ported from older Arma titles, so not up to A3 standards...). So when you run a wip code on such a buildings and encounter problems - you don't know, if the problem is with the script or rather with the building. Once we're confident, Herne works reliably on vanilla assets, we may try it with modded buildings. Then we would know, encontered problems are most likely due to the building problems.

If however the problems occur in the vanilla assets, we may assume, the script may need adjustements. Although even vanilla ones in theory can cause troubles on their end tbh. 

Share this post


Link to post
Share on other sites
6 hours ago, Rydygier said:

At this stage I would recommend to focus on vanilla buildings.

 

That was kind of my point and should probably be noted in the OP.  At the same time we can learn a bit about the pathing of various buildings.

I'm not sure if your script will become final before I finish my mission but I plan to change some lines if necessary.

_debugThing = createSimpleObject ["Sign_Arrow_Pink_F",ATLtoASL _newPosition,true];

Will be changed to:

_debugThing = createSimpleObject ["Land_HelipadEmpty_F",ATLtoASL _newPosition,true];

 

On a side note:

I plan on making a MP mission for two of us using those zombie mods out there and using your script. I learned that WebKnight's zombie mod gets broken when the simulation is disabled.

 

Thanks for making great scripts for the community.

Share this post


Link to post
Share on other sites

_debugThing  is only for debug visualisation of course. Herne will work without it but yeah, easier to make it invisible than properly remove it from the logic (three lines to remove, one to change). Still, to avoid spawning unnecessary objects, you can instead do:

 

_debugThing = objNull;

  • Like 1

Share this post


Link to post
Share on other sites

Editor placed object in Altis.

Tanoa asset
Land_CoalPlant_01_MainBuilding_F

 

Typical BI AI just being where they are not to be. 🙄

 

One AI of two separate vanilla groups spawned made it to the roof. I'm trying to find a vanilla asset that we can fight enemy off as they move towards us. Not just the small buildings. I'll keep testing.

 

 

 

Share this post


Link to post
Share on other sites

I heard some stuff about Livonian buildings, but not sure, if related to this topic. Also curious if there's any difference for AI pathfinding for native terain building versus editor-placed one. Anyway, when I'll have some time, I'll run some tests using this one, may be informative as I see... I assume, they just are staying there around a single house position? And this is same building, not separate, small building?

Share this post


Link to post
Share on other sites
2 hours ago, Rydygier said:

Also curious if there's any difference for AI pathfinding for native terain building versus editor-placed one.

 

I just tested Land_i_Barracks_V2_F in VR. If I spawn on the roof of this barracks building the AI does not respond or move. But if I put my player inside on second floor, the AI will move inside. I will test other buildings by spawning INSIDE and not on ROOF.

3 hours ago, Rydygier said:

I assume, they just are staying there around a single house position? And this is same building, not separate, small building?

 

I used a hide terrain module under and around that building so they stayed in that room which is part of the building.

Share this post


Link to post
Share on other sites

All right, apparently what I heard about Livonian buildings is true. I checked this building, it looks spacious, but that's mostly "a fake". Main body is not enterable, there's no interior modelled. The only house positions are located in two small rooms - the only enterable space, and on the external staircase. No positions on the roof BTW. This pic shows all the house positions and shows, how "interior" looks like:

 

liv-1.png
 

Still, they don't go up that stairs, I wonder, why...

 

Share this post


Link to post
Share on other sites

Staircase positions seems unreachable for the AI pathfinding (AI gets desitination on them, but fails to climb). Still, tests might be useful, I see one potential logic improvement. 

Share this post


Link to post
Share on other sites

As a result: Herne 1.1 beta 3.

Changes:

 

- applied one fix to the logic (it was flawed);

- integrated debug arrows and hintSilent as debug mode switched by the new, fourth parameter (false by default). The hint now refreshes only once per hunters orders update, so less frequent, and if multpile hunters groups are active, it will in practice monitor the last one with its prey (previous hunter group hints will be overwritten on screen by the last hint basically);

- "only known" mode is now 1 by default (hunters follow prey unknown tho them, but will not enter the building if prey is not known), but in the demo mission this parameter is set as 0, same, as it was by default in beta 2. 

 

As a side note, sadly, building search part rely on the proper building model and config, so it should be properly "searchable" by AI, which requires modelled interior, properly defined house positions and working path finding. The Livonian example above proves, even "official" buildings may be not up to that standard. Not much can be done about that. 

 

That's all for now. 

  • Like 2

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

×