Jump to content

Recommended Posts

i will go with assumption that it is.

Comparing with life events I would speculate that lobbing 40mm grenades would do more harm then good for the attacker which

has lighter armored vehicle (anything but slammer, t-100 and Kuma) and would result in attacker's death due to alerting enemy tank

Exactly. In addition I doubt that 40mm grenades can even damage tracks of tanks.

I would like to see them engage only wheeled vehicles.

Share this post


Link to post
Share on other sites
I've recently found an AI detection issue, where AI become implausibly aware of the player's exact location when explosives or satchels are remotely detonated (or just explode due to timer). See feedback tracker report: http://feedback.arma3.com/view.php?id=24590

This bug was found and resolved a few years back in Arma 2 OA 1.62.

It has also been reported by some users earlier in Arma 3's life (without repro steps), and at that time I did try the Arma 2 OA repro method without being able to recreating the issue.

Oh no not this again. Ambush is one of Arma's coolest scenarios...

Share this post


Link to post
Share on other sites

I had that happen in Arma 2 - hid far from a forest road with satchels rigged to take out a convoy. After the blast any surviving AIs would engage me really accurately even if I hadn't moved at all and were prone. Totally ruined my mission

Share this post


Link to post
Share on other sites

One set of animations and behavior that is SORELY needed is that of AI confusion and distress. Say your in a tank that just blowed up and is on fire, your most likely not going to be able to just bail, land on your feet and nail an enemy in 2 shots like a boss.

Nothing overly dramatic, some sort of brief stun, maybe a fall like TPW's, and pointing at a perceived threat while scrambling -this would go a huge way to un-robotizing your AI

Share this post


Link to post
Share on other sites

knowsAbout value increase after explosives touch off is a long-time RV issue.

There might be a workaround: set knowsAbout of all opposing faction units for hostiles in radius relative to the center of the satchel that exploded.

Didn't try it this, needs to cover multiple scenarios, like objects blocking visibility and not depending on 2D linear distance calc.

Worth a shot I guess.

Share this post


Link to post
Share on other sites

The knowsAbout command is an overall mess anyway. If a unit spots you and you kill it instandly afterwards, the value doesn't go back to zero, that's a huge issue with stealth missions. It should immediately go back to zero.

Share this post


Link to post
Share on other sites
The knowsAbout command is an overall mess...

Yup, it's one in many things that go into the AI decision making about whether it actually knows about something and how much. It shouldn't really be used in mission making and even for testing it can be hugely misleading. Perhaps it would be better to forget about the command completely ;)

Saying that I'm also aware that there are only limited options how to get any info about AI's knowledge and detection by scripts.

Share this post


Link to post
Share on other sites

Are you working on any improvements to the AIs ability to know about a hidden opponent in scenarios such as the ones described above?

- OP

Share this post


Link to post
Share on other sites
Yup, it's one in many things that go into the AI decision making about whether it actually knows about something and how much. It shouldn't really be used in mission making and even for testing it can be hugely misleading. Perhaps it would be better to forget about the command completely ;)

Saying that I'm also aware that there are only limited options how to get any info about AI's knowledge and detection by scripts.

It would be nice to have some commands for getting and manipulating that knowledge. For example, it's very hard to make an AI "forget" a unit for custom purposes.

Share this post


Link to post
Share on other sites
Yup, it's one in many things that go into the AI decision making about whether it actually knows about something and how much. It shouldn't really be used in mission making and even for testing it can be hugely misleading. Perhaps it would be better to forget about the command completely ;)

Saying that I'm also aware that there are only limited options how to get any info about AI's knowledge and detection by scripts.

Why are you suggesting we set our knowsAbout to zero as regard to that command? How else can we test it? Also it is pretty imporatnt in many missions to have something along those lines...unless of course, you guys have come up with something new..?

Share this post


Link to post
Share on other sites
Why are you suggesting we set our knowsAbout to zero as regard to that command? How else can we test it? Also it is pretty imporatnt in many missions to have something along those lines...unless of course, you guys have come up with something new..?

I'd assume it's because it boils down a large chunk of data and behavior into a single nondescript number.

Share this post


Link to post
Share on other sites

^^^Therein lies a codex of knowledge I'd donate nether parts for^^^

Share this post


Link to post
Share on other sites
Why are you suggesting we set our knowsAbout to zero as regard to that command? How else can we test it? Also it is pretty imporatnt in many missions to have something along those lines...unless of course, you guys have come up with something new..?

Indeed.

The command knowsAbout is absolutely essential - at least to my own dirty needs. Then again, most of the time I'm using it to implement some ad-hoc event handlers that don't exist in the game, like detecting when a group spots an enemy (and which ones/how many/...) or is being spotted by some enemy, etc... So that might be a strong hint that we simply need those guys implemented natively instead - that is, some better query-commands that work on the group and single units too. And then sure, corresponding event handlers would be nice too, I guess. :cool:

For example I like to run the following guy (behind the spoiler) in the main loop of some of my group-AI FSM, to then handle the event of detecting or being detected by some enemy:

scriptName "RUBE3\functions\Groups\fn_groupKnowsAbout.sqf";
/*
Author:
 rübe

Description:
 returns max. knowsAbout levels between a given group and any
 enemies/targets within range (and group knows about!).

 This is the younger/smaller brother of RUBE_getEnemyContact.
 Feel free to compare both of them, and see what you need.

Parameter(s):
 _this: group (group)

...or:

 _this select 0: group (group)
                 If later down the text "us" or "our group" is 
				 used, then this is the group being refered to. :)

 _this select 1: range (scalar)
				 range to scan for targets (nearestTarget).
				 Defaults to "viewDistance" capped at 1000m, 
				 ...so probably 1000m.

 _this select 2: already detected enemy units (array of units, 
				 optional). These units will not be reported
				 as being detected by us (e.g. a second time),
				 yet they still might detect a unit of us - unless
				 their group is "blacklisted" too (see next param).

 _this select 3: enemy groups that already know about us (array 
				 of groups, optional). Enemies in such a group
				 wont be reported as having detected one of our
				 units.

Returns:
 an array [
	0: max. "group" knowsAbout any target/enemy (scalar)
	1: max. some target/enemy knowsAbout "group" (scalar)
	2: known targets/enemies (array of [
			0: knowsAbout (scalar), 
			1: unit (object)
		])
	3: detected units in "group" known to enemy (array of [
			0: knowsAbout (scalar), 
			1: unit (object)
		])
 ]

 [2] and [3] are sorted in ascending order by knowsAbout level (i.e.
 most important targets are listed last, to be easily popped off...).

 knowsAbout ranges from 0 to 4. Freshly Spotted units will have at 
 least 1.5, slowly decreasing when the target disappeared. Depends 
 on weather (sun/moon/clouds) and possibly equippment (e.g. nvg)
 See: https://community.bistudio.com/wiki/knowsAbout

 e.g.	if [0] > 1.5, then group knows about some enemies
		if [1] > 1.5, then some enemies know about group too!
					  (i.e. group has been detected/spotted)
		if [1] < 1.0, then group hasn't been clearly spotted/detected 
					  recently

		...and if both values are high (e.g. straight 4.0), then group
		is most likely in a firefight with targets already.

		Also note that the situation that enemies/target detected group
		while group has no idea about enemies/target can *not* happen, 
		or rather does not get reported by this function. Working with
		nearestTarget, only enemies/targets are considered that are 
		known to the group! If you need to know if group got detected,
		without them knowing about being detected, you might wanna use 
		a simple trigger instead.
*/

private [
"_group", "_range", "_units", "_n", "_leader", "_side", "_targets", 
"_weKnowAboutTarget", "_targetKnowsAboutUs", "_knownTargets",
"_knownGroups", "_detectedUnits", "_alreadyKnownEnemies",
"_alreadyEngagingEnemies"
];

_group = _this;
_range = viewDistance min 1000; // too much for a good default?

_alreadyKnownEnemies = []; // we already know about those guys (units)!
_alreadyEngagingEnemies = []; // they (groups) already know about us!

if ((typeName _this) == "ARRAY") then
{
_group = _this select 0;
if ((count _this) > 1) then
{
	if ((_this select 1) > 0) then
	{
		_range = _this select 1;
	};
};
if ((count _this) > 2) then
{
	_alreadyKnownEnemies = _this select 2;
};
if ((count _this) > 3) then
{
	_alreadyEngagingEnemies = _this select 3;
};
};

_units = units _group;
_n = count _units;
_leader = leader _group;
_side = side _leader;
_targets = _leader nearTargets _range;

_weKnowAboutTarget = 0;
_targetKnowsAboutUs = 0;
_knownTargets = [];
_knownGroups = [];
_detectedUnits = [];

{
/*
	_x (nearTargets)
		0: position (percieved/inc. errors)
		1: type (percieved)
		2: side (percieved)
		3: subjective cost (pos. for enemies)
		4: object (object type)
		5: position accuracy (radius in meters?)
*/
private ["_tside", "_tsideS", "_target", "_v", "_i"];
_tside = _x select 2;
_tsideS = format["%1", _tside];

// only consider targets with different (and not UNKNOWN)
// side
if ((_tside != _side) && (_tsideS != "UNKNOWN")) then
{
	// hostility check
	if ((_side getFriend _tside) < 0.6) then
	{
		_target = _x select 4;

		// what we (group) know about the target
		if (!(_target in _alreadyKnownEnemies)) then
		{
			_v = _group knowsAbout _target;
			_knownTargets pushBack [_v, _target];
			if (_v > _weKnowAboutTarget) then
			{
				_weKnowAboutTarget = _v;
			};
		};

		// keep ref. to enemy group to check if some of
		// our guys got detected (check below)
		if (!((group _target) in _knownGroups)) then
		{
			_knownGroups pushBack (group _target);
		};
	};
};
} forEach _targets;

// what some target knows about any of our group members
{
private ["_i", "_v"];
if (!(_x in _alreadyEngagingEnemies)) then
{
	for "_i" from 0 to (_n - 1) do
	{
		_v = (leader _x) knowsAbout (_units select _i);
		_detectedUnits pushBack [_v, (_units select _i)];
		if (_v > _targetKnowsAboutUs) then
		{
			_targetKnowsAboutUs = _v;
		};
	};
};
} forEach _knownGroups;

// sort known and detected targets/units
_knownTargets sort true;
_detectedUnits sort true;

// return max knowsAbout levels
[
_weKnowAboutTarget,
_targetKnowsAboutUs,
_knownTargets,
_detectedUnits
]

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers.

^^ From what I can tell there is no single event handler with respect to some knowledge of units (or groups/all units in a group). :rolleyes:

What else are you using knowsAbout for (in general terms)?

Would some kind of event handler that could be attached to either groups or a unit work for you?

On a related note, see for example: http://feedback.arma3.com/view.php?id=23880. Some "I'm under fire", or "ready to fire!", or "enemy spotted!" (or "I have been spotted, oh noes!") or what not... event handlers surely wouldn't hurt?

EDIT: Granted, my use case here could probably be handled with triggers (detected by et al., and linked to the group); at least to some degree.

Edited by ruebe
remark about triggers

Share this post


Link to post
Share on other sites
The command knowsAbout is absolutely essential - at least to my own dirty needs. Then again, most of the time I'm using it to implement some ad-hoc event handlers that don't exist in the game, like detecting when a group spots an enemy (and which ones/how many/...) or is being spotted by some enemy, etc... So that might be a strong hint that we simply need those guys implemented natively instead - that is, some better query-commands that work on the group and single units too. And then sure, corresponding event handlers would be nice too, I guess. :cool:

You may be able to hook directly into the danger.fsm for those purposes, though it kinda depends on what you want to do.

In any case, removing knowsabout would be a hassle for zombie-like mods, or pretty much anything else that has some AI governance script.

Share this post


Link to post
Share on other sites

Exatly, please don't remove knowsAbout until you replace it with something better.

Share this post


Link to post
Share on other sites
On a related note, see for example: http://feedback.arma3.com/view.php?id=23880. Some "I'm under fire", or "ready to fire!", or "enemy spotted!" (or "I have been spotted, oh noes!") or what not... event handlers surely wouldn't hurt?

I'd like a "combatModeChanged" or similar EH that fires when group/unit changes from say "AWARE" to " COMBAT" or w/e. Again, this can be tracked with loops/triggers, but native EH would be better.

Share this post


Link to post
Share on other sites

yea AI related EHs would be epic!

with the Raptor AI in Jurassic arma i used "nearTargets" and the accuracy values in its array. "knowsabout" was really shit for anything detailed anyways tbh. especially when it comes to reversed stuff like detecting if a unit does not know your location anymore. knowsabout pretty much turned out useless for that (might have changed but i doubt it). but it still has its prupose for simple switches. like using the 1.6, or whatever it was, as a trigger to detect full on combat mode for the first time liek for a stealth mission or something.

although handling of the "neartargets" array is probably not so fast. so just having the distance between perceived position and actual postion as one value you could pull or even an EH would be super useful. that's the only thing i ended up drawing out of the array anyways. that value reacts super fast and accurately. it's pretty much what you'd expect from something called "knowsabout" ;)

Share this post


Link to post
Share on other sites

Knowsabout is for checking how much a unit knows about another units side/type/class, and it is fine for that. Using it for other things would be odd. :p

EDIT: I guess knowsabout and neartargets are named a bit oddly for the information they provide, but changing it is going to be too much of a hassle for backwards compatibility, so i guess we will have to live with that. The EHs would be nice though.

Edited by NeMeSiS

Share this post


Link to post
Share on other sites

although handling of the "neartargets" array is probably not so fast. so just having the distance between perceived position and actual postion as one value you could pull or even an EH would be super useful. that's the only thing i ended up drawing out of the array anyways. that value reacts super fast and accurately. it's pretty much what you'd expect from something called "knowsabout" ;)

Would've comparing the actual position with getHideFrom been faster for that? Of course you'd still need to keep track of the possibly spotted enemies somehow instead of pulling them directly from neartargets.

(getposatl player) vectorDistance (enemy gethidefrom player)

Edited by Greenfist

Share this post


Link to post
Share on other sites
Knowsabout is for checking how much a unit knows about another units side/type/class. Using it for other things would be odd.

not sure what you mean tbh. what other things did i say i used it for? can you elaborate? maybe i have a wrong image about the command.

i was talking about how the value increases and how it only (supposedly) decreases based on large distances (viewdistance) and not actual line of sight or sound when you use it for units. i honestly never used it for sides or other stuff. talking about _unit1 knowsabout _unit2 output kind of thing.

i'm not advocating to remove knowsabout. i wasn't even reading the last page tbh.

everytime i debugged the value with two units it was total shit and useless. not dynamic at all. went up in seemingly fixed steps never really decreasing unless you create extreme conditions like large distance or death lol.

i just find it pretty shitty for unit specific stuff. maybe i'm missing something so pls enlighten me. this based on tests and all the similar discussions that popped up over the years about being able to reset the value and the general fact that it behaves suboptimal.

that's why i would love that perceived position thing a lot. _unit1 perceptionaccuracy _unit2 or something.

Would've comparing the actual position with getHideFrom been faster for that? Of course you'd still need to keep track of the possibly spotted enemies somehow instead of pulling them directly from neartargets.

oh wow. i never knew about this one. sounds pretty much like what i need. thx!

can't test it for quite a while but will do as soon as possible.

you are right about getting the enemies in the first place though probably. might require additional nearestobjects which would really suck for large distances.

still great to know about it. someone should link those with the knowsabout page on the wiki.

Edited by Bad Benson
spellsorzs

Share this post


Link to post
Share on other sites
oh wow. i never knew about this one. sounds pretty much like what i need. thx!

can't test it for quite a while but will do as soon as possible.

you are right about getting the enemies in the first place though probably. might require additional nearestobjects which would really suck for large distances.

still great to know about it. someone should link those with the knowsabout page on the wiki.

I can't believe you didn't know about it, especially when it's so descriptively named. ;)

You could just use the heavier nearestxxxx less frequently to get the possible enemies, and then use the much faster gethidefrom for the accuracy.

Share this post


Link to post
Share on other sites
everytime i debugged the value with two units it was total shit and useless. not dynamic at all. went up in seemingly fixed steps never really decreasing unless you create extreme conditions like large distance or death lol.

knowsAbout used to drop slowly over time in OFP, but since Arma 1 it stays constant, until the unit "forgets" about the target and knowsAbout resets to 0 after about 6 minutes without any contact.

The AI bug I reported above only occurs when the player has been forgotten about, so there may be something wrong with the AI forgetting mechanism.

Share this post


Link to post
Share on other sites
I can't believe you didn't know about it, especially when it's so descriptively named. ;)

You could just use the heavier nearestxxxx less frequently to get the possible enemies, and then use the much faster gethidefrom for the accuracy.

the thing is, nearestobjects is heavy and if i don't check often it's easy to miss someone standing on a hill totally visible eventhough further away. and if i use neartargets i might aswell use the values in there instead of cross checking with gethidefrom. not gonna get extra speed from that. what's also gret about nearTargets is that it let's the engine decide who and what qualifies as a target.

still gonna totally play around with it though when i can.

@ceeeb: yea. i don't get the talk about weird naming, atleast when it comes to knowsabout. what is knowsabout supposed to represent if not knowledge? i mean i get that someone might still know about you if you just vanished behind a large house.

but i never saw the value behave in a way that it would represent those nuances. so i'd be curious about how others actually use the output and what certain values mean to them. all i got from it was 1.6 = spotted.

when it decreased in older games, what was it based on? also only large distance or blocked line of sight too? i remember it always being not very reactive or dynamic. atleast not in a way that would represent anything human/realistic. that's why i'm curious about people's interpretation of its values.

Share this post


Link to post
Share on other sites
someone should link those with the knowsabout page on the wiki.

Consider it done. :cool:

I can't believe you didn't know about it, especially when it's so descriptively named. ;)

Hey, I didn't know about it either (I might have at some point...). :p

knowsAbout used to drop slowly over time in OFP, but since Arma 1 it stays constant, until the unit "forgets" about the target and knowsAbout resets to 0 after about 6 minutes without any contact.

...makes you wonder what ever happened here. :confused:

Is this just yet another bug that never got fixed? Or is this even part of a bug-fix (i.e. your ugly hack)?

when it decreased in older games, what was it based on?

Time, I'd guess. The basic idea is that you have knowledge that updates (or increases) on sightings (sparse/punctual), which then deteriorates slowly over time.

Edited by ruebe

Share this post


Link to post
Share on other sites

The knowsAbout value isn't constant. Last time I used it, it decrease really slowly.

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

×