Feature #2014

Extend weapons and magazines manipulation capabilities

Added by zGuba almost 6 years ago. Updated about 2 years ago.

Status:Assigned Start date:06/11/2009
Priority:Normal Due date:
Assignee:Dwarden % Done:

50%

Category:Scripting: New command
Target version:-
Affected ArmA II version: First affected ArmA II version:
Reproduced by another DH user:No Single / Multi Player?:
I am using some Mods:No BIForumURL:
I am using: NGUrl:
Reproducible for you:No WIKIurl:
Related to content of DLC:

Description

We're missing some important commands:

1) Adding and removing certain turret's/driver's weapons
  • addWeaponTurret
  • removeWeaponTurret
2) Returning unit's and turret's magazines with their ammo count

(currently it needs some black scripting magic as the only information returned is string)


I believe it could be possible to return magazines with their round counts like this:
[["Stanag",30],["Stanag",16],["SmokeShell",1]]

and given weapon's loaded magazine index number.

Then it should be possible to set magazine's type and count. This should be foolproof to prevent crashes - if there's no such magazine in the config or the number is out of possible values, then refuse to proceed.

Why
This way we could script magazine conversion, ammo belt linking and jams very easily.
Plus we can use it in the AI so it will know when it needs to reload and rearm more briefly as it could count bullets separately from grenades.


Related issues

related to ARMA2 Community Issue Tracker - Feature #9663: Add scripting command: AddWeaponCargoGlobal and AddMagazi... Closed 03/18/2010
related to ARMA2 Community Issue Tracker - Feature #2109: Query crate and vehicle inventory Closed 06/17/2009
related to ARMA2 Community Issue Tracker - Bug #1720: Rearming vehicles: Can only rearm 1 magazine Closed 06/02/2009
related to ARMA2 Community Issue Tracker - Feature #2962: Add scripting command: addWeaponTurret and removeWeaponTu... Assigned 07/22/2009
related to ARMA2 Community Issue Tracker - Feature #2980: Able to treat Weapons and Magazines as Object for further... Assigned 07/23/2009
related to ARMA2 Community Issue Tracker - Bug #3538: "Magazines" won't return the magazines of the BRDM2_HQ_Gue. Closed 08/10/2009
related to ARMA2 Community Issue Tracker - Feature #11383: Magazines should be proxies within weapon P3Ds. Assigned 06/21/2010
related to ARMA2 Community Issue Tracker - Bug #59248: Extend "addMagazineTurret" by analogy with "addMagazine a... Assigned 10/18/2012
related to ARMA2 Community Issue Tracker - Feature #71101: Extend scripting commands AddMagazineCargo and AddMagazin... New 02/26/2013

History

Updated by zGuba almost 6 years ago

  • Affected ArmA II version changed from 1.01.57751 to 1.02.58134

Updated by kju over 5 years ago

  • Status changed from New to Assigned
  • Affected ArmA II version changed from 1.02.58134 to 1.03.58627

Updated by Dwarden over 5 years ago

  • Assignee set to Dwarden

Updated by zGuba over 5 years ago

  • Affected ArmA II version changed from 1.03.58627 to 1.04 BETA

Updated by zGuba over 5 years ago

  • Due date set to 10/10/2009

Updated by zGuba over 5 years ago

  • Affected ArmA II version changed from 1.04 BETA to 1.04.59026

Updated by Fireball over 5 years ago

  • Due date changed from 10/10/2009 to 01/19/2010
  • Reproduced by another DH user set to No
  • CPU set to Please specify!

Updated by kju over 5 years ago

  • Due date deleted (01/19/2010)

Updated by zGuba about 5 years ago

  • Affected ArmA II version deleted (1.04.59026)
  • Maxmem parameter deleted (Not set)
  • Difficulty deleted (Not set)
  • CPU changed from Please specify! to n/a

Updated by BigDawgKS almost 5 years ago

While using arrays like zGuba suggested could work, it might make things a little cleaner if we just had the ability to reference magazines as seperate objects. Ex:
_mags = magazines player
Returns an array of magazine objects. Then you can perform operations on it, for example:
if(ammo (_mags select 0) < 5)then{(_mags select 1) setAmmo 30}

It'd probably require quite a redesign of weapon/magazine handling though, so perhaps wait until a later iteration of the engine (game after ArmA 2?) and for now just using arrays of classnames and ammo count would at least provide more flexability.

Updated by zGuba over 4 years ago

Well, in my opinion having just VBS "magazineEx" and cargo commands family in ArmA would be enough.

Updated by zGuba over 4 years ago

  • % Done changed from 0 to 50

Updated by Dwarden over 3 years ago

  • Status changed from Assigned to Feedback

Updated by zGuba over 3 years ago

  • Description updated (diff)
  • Status changed from Feedback to Assigned
  • CPU deleted (n/a)
  • Audio card deleted (Please specify!)
  • Size of OS swap file deleted (Please specify!)

Updated by zGuba over 2 years ago

  • Description updated (diff)
  • Language deleted (Please set for missions)

Updated by zGuba over 2 years ago

Updated due to addition of UNIT unit addMagazine [STR type, INT count]

Updated by Xeno over 2 years ago

A command like magazinesEX from VBS2 is still missing.
The new gear commands introduced in rev 93945 only work when the gear dialog is open.

Updated by kju over 2 years ago

  • Description updated (diff)

Updated by Xeno over 2 years ago

Not to forget commands like
addMagazineCargoEx
http://resources.bisimulations.com/wiki/addMagazineCargoEx
and getMagazineCargo

(and a global variant)

Updated by kju over 2 years ago

  • Category changed from Scripting: Problem to Scripting: New command

Also available in: Atom PDF