Page MenuHomeFeedback Tracker

magazinesDetails is not exploitable
Reviewed, WishlistPublic

Description

magazinesDetail command does not return anything (empty array) if i'm inside a vehicle (tested on kajman attack helicopter east side).

if I use it on a soldier it returns something like this:

["6.5mm 30Rnd Caseless Mag(30/30)[id:10924]","6.5mm 30Rnd Caseless Mag(30/30)[id:10925]","6.5mm 30Rnd Caseless Mag(30/30)[id:10926]","Smoke Grenade (Red)(1/1)[id:10927]","Smoke Grenade (Purple)(1/1)[id:10928]","Chemlight (Red)(1/1)[id:10929]","Chemlight (Red)(1/1)[id:10930]"]

This command is interesting for me because I can use it to manage magazines in vehicles. This is my use case:

I make players pay with a points based system for dangerous magazines like AT missiles/rockets in attack helicopters and the rest of the magazines is free to take anytime (cannon, countermeasures).

When players want to rearm their vehicle with "non-dangerous" magazines I use the "vehicle setvehicleammodef 1" command that completely rearms a vehicle including what I call "dangerous magazines". Then I remove the dangerous magazines from the vehicle.
This way of doing is problematic at the moment because if the players want to rearm their vehicle only with the non-dangerous magazines they will lose any dangerous magazines they havent used yet.

But if I have a command that tells me what are the current magazines in the vehicle with the number of rounds in each of it then I can do:

  • store the dangerous magazines state with the "magazinesDetail" command
  • use "vehicle setvehicleammodef 1"
  • remove dangerous magazines (added by the previous command)
  • restore the dangerous magazines state that was stored in first step

So the magazinesDetail command should also work for vehicles but also return the data in a more easily exploitable format:

  • this is what it does at the moment

["6.5mm 30Rnd Caseless Mag(30/30)[id:10924]","6.5mm 30Rnd Caseless Mag(30/30)[id:10925]","6.5mm 30Rnd Caseless Mag(30/30)[id:10926]","Smoke Grenade (Red)(1/1)[id:10927]","Smoke Grenade (Purple)(1/1)[id:10928]","Chemlight (Red)(1/1)[id:10929]","Chemlight (Red)(1/1)[id:10930]"]

  • this is what would be more easy to use

[["30Rnd_65x39_caseless_mag", 30, 30, 10924], ["30Rnd_65x39_caseless_mag", 30, 30, 10925], ... ]

Details

Legacy ID
140366126
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Scripting

Event Timeline

d3nn16 edited Steps To Reproduce. (Show Details)Jul 24 2013, 11:07 PM
d3nn16 edited Additional Information. (Show Details)
d3nn16 set Category to Scripting.
d3nn16 set Reproducibility to N/A.
d3nn16 set Severity to None.
d3nn16 set Resolution to Open.
d3nn16 set Legacy ID to 140366126.May 7 2016, 3:39 PM

It works for me for vehicles. Spawn Kamysh in editor name it tank

hint str magazinesDetail tank

works like a charm

d3nn16 added a subscriber: d3nn16.May 7 2016, 3:39 PM

Tested again and it works on the kajman helicopter. But the output is still not exploitable as mentioned in the case.

I guess what you want is magazine detail return as usable array rather than string. You should edit your ticket it is very confusing.

I agree, given the lack of proper string manipulation functions in Arma 3, the output of the magazinesDetail command is next to useless. You would have to write functions to parse out the output of the function into usable bits.

d3nn16 removed a subscriber: d3nn16.Dec 21 2020, 2:17 PM