Jump to content
roguetrooper

AI reports "out of ammo" (has enough+proper ammo)

Recommended Posts

My AI (editor) reports "out of ammo", although they have enough of the proper ammo for their weapons (custom loadout).

Is this a new bug?

Share this post


Link to post
Share on other sites

I guess you are giving the AI a weapon first followed by magazines? Try it the other way around.

Share this post


Link to post
Share on other sites

No. First the primary ammo (10 mags), then the primary weapon.

Order is: primary ammo -> primary weapon -> pistol ammo -> pistol -> unit selectweapon (primaryweapon unit)

Lol, I found out, this bug only appears when I add a pistol (with proper ammo).

Share this post


Link to post
Share on other sites

I have the same issue here.

Order is the same. Primary ammo -> primary weapon -> pistol ammo -> pistol weapon.

Share this post


Link to post
Share on other sites

This sentence is just too frequent.

Some mods have heavy & big magazines like 100 rnds for L7A2, but also 150 rnds for Zafir,etc.

 

If you have just 100 rnds in weapon and 100 rnds in backpack (very heavy with L7A2 mag), you're already "out of ammo".

 

It's probably because this sentence comes with the number of magazines instead the number of rounds.

Too bad!

Share this post


Link to post
Share on other sites

The entire voice system needs to be looked at. I have threads on here about friendly units and vessels being called out as enemies and no Devs ever respond.

I just disable sentences because it's maddening and I can't take it.

Share this post


Link to post
Share on other sites

Is there a way to disable just a type of sentence, I mean just "out of ammo" for a unit (player), instead of all sentences with enableSentences false?

Thanks

Share this post


Link to post
Share on other sites

I just stared a thread over in the scripting area about disabling sentences just for BLUFOR only (and also on Reddit) and the consensus is no, it's either universally disabled or universally enabled. Even when added to specific units only which is disappointing.

I'm sure if you're handy you could script something but AFIK nothing is easily available to accomplish this.

If you find any answer on that please share it here.

Share this post


Link to post
Share on other sites

You're right. I was trying to understand kbTell and other commands, but it's out of my scope.

One "sure" thing: enableSentences is supposed to be local (EL). I tried that and, it seems you can disable  the player's sentences like "out of ammo" (first good point), but also this works for all players (then I think is more a global effect than a local one).

I don't know what is the behavior for incoming (listened) sentences (from other units/players). I guess you shut off these sentences also, but only locally (your PC).

 

So, for what I try to obtain, a poor solution consists of tracking the event which could trigger this boring warning, and temporarily disable the sentences at this moment. I do that now for my backpack management in my addon and it works... as far as I know when magazines are off/in the bacpack.

Share this post


Link to post
Share on other sites

"enableSentences" has local effects, but that doesn't mean it just works for the player. It means that it disables (or enables) ai talk on the local machine.

 

There is a way to just mute player units, but it requires you to write a radio protocoll config where you remove all sentences. (you still have to put in a ton of classes just so this bad system doesn't choke on missing paths).

 

https://github.com/acemod/ACE3/blob/master/addons/common/CfgVoice.hpp

 

Then you can use "setSpeaker" to apply this radio protocoll to all players. It's really tricky because "setSpeaker" fails on unit init and is not JIP persistant. ACE 3 has this.

Share this post


Link to post
Share on other sites

"enableSentences" has local effects, but that doesn't mean it just works for the player. It means that it disables (or enables) ai talk on the local machine.

 

There is a way to just mute player units, but it requires you to write a radio protocoll config where you remove all sentences. (you still have to put in a ton of classes just so this bad system doesn't choke on missing paths).

 

https://github.com/acemod/ACE3/blob/master/addons/common/CfgVoice.hpp

 

Then you can use "setSpeaker" to apply this radio protocoll to all players. It's really tricky because "setSpeaker" fails on unit init and is not JIP persistant. ACE 3 has this.

ACE 3 disables sentences for the players only?

Share this post


Link to post
Share on other sites

"enableSentences" has local effects, but that doesn't mean it just works for the player. It means that it disables (or enables) ai talk on the local machine.

 

 

OK, to be more precise, I tested that with 2 PC on the same room. One hosted server, one client.  As far as I tried, enable sentence false worked on both PCs each time the local player with this code (enableSentences false) had to say something. We can say all machines are impacted in this way.

I guess it's an intended behavior rather than a piece of luck, because it will be a non-sense to mute the player locally but not what is saying remotely :blink: .

On the other end, all incoming sentences (from other players) are locally muted. So all players can hear conversations but not the local one with the code (the" local" behavior of .this command).

 

I don't know ACE3 because,on my mind, it's a too heavy mod (not weight but behavior). It changes Arma dramatically at a point we don't know if ACE3 is not compatible with other mods of ARMA or the contrary!

If so popular, it should be integrated more or less to Arma. Personally, I regret that so many topic suggest an ACE3 solution, even if efficient. I'm working on ARMA, scripting mods for vanilla. CBA doesn't interfere and no one ask me for this compatibility. ACE3 is a pain in the butt for many scripts (displays, menus) et questions about compatibilities are legions.

Share this post


Link to post
Share on other sites

ACE 3 disables sentences for the players only?

Yes

 

I guess it's an intended behavior rather than a piece of luck, because it will be a non-sense to mute the player locally but not what is saying remotely :blink: .

On the other end, all incoming sentences (from other players) are locally muted. So all players can hear conversations but not the local one with the code (the" local" behavior of .this command).

I think this might be because the players sentences are created on the players machine and then sent over the network. If you mute all sentences on a machine, all units local to that machine will be muted for everyone. That would be because the machine that owns the unit doesn't send any such messages anymore. I haven't tested this, but that would explain that.

Whether or not that means that "enableSentences" has global effects instead of local ones is up to debate if that's true I guess. The local-global dichotomy just doesn't work for everything.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks commy2. I like your analysis. That means all AI units in your group, when you lead, (as far as you are leader, they are local) are also "muted". Idem for AI vehicles crews.

Share this post


Link to post
Share on other sites

Yes

I think this might be because the players sentences are created on the players machine and then sent over the network. If you mute all sentences on a machine, all units local to that machine will be muted for everyone. That would be because the machine that owns the unit doesn't send any such messages anymore. I haven't tested this, but that would explain that.

Whether or not that means that "enableSentences" has global effects instead of local ones is up to debate if that's true I guess. The local-global dichotomy just doesn't work for everything.

Ok so I think you may have just solved an issue I have in the scripting thread.

Long story short I want to be able to hear the Iraq Syrian OPFOR battle cries but have all playable BLUFOR units muted.

So ACE handles this? If you don't mind, which module in particular needs to be added to my missions to accomplish the effect?

I was told this was impossible by several people without adding a custom script. If ACE can do this organically through your own coding how do I go about using your mod to get this going?

Share this post


Link to post
Share on other sites

You have to create a totally silent radio protocoll. This requires you to create a mod that every client has (not just the server), so a mission only solution is out of question.

 

The system is strongly integrated into the ACE event framework so it can work with all kinds of missions out of the box. Just think about how zeus, teamSwitch an respawn change the players controlled object - it all handles that.

 

https://github.com/acemod/ACE3/blob/master/addons/common/CfgVoice.hpp

 

basic functions to mute and unmute units:

https://github.com/acemod/ACE3/blob/e1403d567c98a93382454e616bfd683a1209bb2c/addons/common/XEH_postInit.sqf#L157

https://github.com/acemod/ACE3/blob/03f3b1084d4e9d14617f159db14a7086b1af8682/addons/common/functions/fnc_muteUnit.sqf

https://github.com/acemod/ACE3/blob/03f3b1084d4e9d14617f159db14a7086b1af8682/addons/common/functions/fnc_unmuteUnit.sqf

 

function to handle JIP:

https://github.com/acemod/ACE3/blob/03f3b1084d4e9d14617f159db14a7086b1af8682/addons/common/functions/fnc_muteUnitHandleInitPost.sqf

 

function to handle respawn:

https://github.com/acemod/ACE3/blob/03f3b1084d4e9d14617f159db14a7086b1af8682/addons/common/functions/fnc_muteUnitHandleRespawn.sqf

 

function to handle disconnected players (missions with "AI enabled" - we want the AI left behind to talk again)

https://github.com/acemod/ACE3/blob/master/addons/noradio/XEH_postInit.sqf#L4-L9

 

and the function to trigger this framework - modular so it can be disabled.

https://github.com/acemod/ACE3/blob/master/addons/noradio/XEH_postInit.sqf#L13-L24

Share this post


Link to post
Share on other sites

With a little more effort, the scripts will be so heavy that the engine has no more time to run any sentence. ;)

 

Oups a joke!

Share this post


Link to post
Share on other sites

With a little more effort, the scripts will be so heavy that the engine has no more time to run any sentence. ;)

What are you talking about? The is whole system is event based, which means there aren't any scripts running. There is practically zero calculation time. You show a severe lack of understanding on this matter. You can fool yourself, but please don't spread obviously false rumors.

Share this post


Link to post
Share on other sites

You have to create a totally silent radio protocoll. This requires you to create a mod that every client has (not just the server), so a mission only solution is out of question.

 

The system is strongly integrated into the ACE event framework so it can work with all kinds of missions out of the box. Just think about how zeus, teamSwitch an respawn change the players controlled object - it all handles that.

 

https://github.com/acemod/ACE3/blob/master/addons/common/CfgVoice.hpp

 

basic functions to mute and unmute units:

https://github.com/acemod/ACE3/blob/e1403d567c98a93382454e616bfd683a1209bb2c/addons/common/XEH_postInit.sqf#L157

https://github.com/acemod/ACE3/blob/03f3b1084d4e9d14617f159db14a7086b1af8682/addons/common/functions/fnc_muteUnit.sqf

https://github.com/acemod/ACE3/blob/03f3b1084d4e9d14617f159db14a7086b1af8682/addons/common/functions/fnc_unmuteUnit.sqf

 

function to handle JIP:

https://github.com/acemod/ACE3/blob/03f3b1084d4e9d14617f159db14a7086b1af8682/addons/common/functions/fnc_muteUnitHandleInitPost.sqf

 

function to handle respawn:

https://github.com/acemod/ACE3/blob/03f3b1084d4e9d14617f159db14a7086b1af8682/addons/common/functions/fnc_muteUnitHandleRespawn.sqf

 

function to handle disconnected players (missions with "AI enabled" - we want the AI left behind to talk again)

https://github.com/acemod/ACE3/blob/master/addons/noradio/XEH_postInit.sqf#L4-L9

 

and the function to trigger this framework - modular so it can be disabled.

https://github.com/acemod/ACE3/blob/master/addons/noradio/XEH_postInit.sqf#L13-L24

Thanks.

So just to be clear, adding ACE to the mission by itself will not solve my issue with creating my own silent radio protocol?

You said I needed to create the mod, but you also said ACE handles this out of the box.

Share this post


Link to post
Share on other sites

Yes, ACE mutes players by default.

What are the bare minimum requirements for ACE modules to be placed in the editor to accomplish this? Or is it enough to just launch it in the mods list? I'm assuming I'd need to add at least one or several ACE modules to get the required code in place.

Share this post


Link to post
Share on other sites

Nothing. All players are muted by default. No module has to be placed.

  • Like 1

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

×