Page MenuHomeFeedback Tracker

[Feature Request] New scripting commands: loadContainer, setContainerLoad
Closed, ResolvedPublic

Description

Setter for the various loadVest, loadBackpack etc.
So this would be for setting given containers current load regardless of what is in it.
Would be a percentage of the container max load like the mentioned loadVest, loadUnifrom etc comands are.

(backpackContainer player) setContainerLoad 0.4; //set backpack carried load to 40% (regardless of what it was prior)
_ammobox1 setContainerLoad 0; //set ammobox load to 0% (regardless of what it was prior)

Additionally, there seems to be no way the get given ammobox/vehicle transport container loads, only reammo vehicle rearming ammocargo load.
And particular vest, uniform etc container loads.
So a generic getter for all containers, loadContainer (or additional syntax for the existing load which currently is just for the given soldier's carried load)

loadContainer <container>; //returns a number between 0 and 1

if (loadContainer _sack > 0) then {
    _sack setContainerLoad 0;
    hint "my sack is empty again";
};

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
Engine

Event Timeline

h- created this task.Jul 27 2020, 6:32 AM
h- renamed this task from [Feature Request] New scripting commands: loadContainer, setContainerLoad, setContainerMaxLoad to [Feature Request] New scripting commands: loadContainer, setContainerLoad.Fri, Aug 20, 12:19 PM
h- updated the task description. (Show Details)
BIS_fnc_KK added a subscriber: BIS_fnc_KK.EditedThu, Aug 26, 11:36 PM

I have a feeling that loadAbs is in ounces, and load is loadAbs / maxSoldierLoad

class CfgInventoryGlobalVariable
{

maxSoldierLoad = 1000;

};

1000 ounces - 28.3495kg, makes sense. Could you check if the whole system is indeed return
ounces?

BIS_fnc_KK changed the task status from New to Need More Info.Thu, Aug 26, 11:36 PM
h- added a comment.Fri, Aug 27, 7:38 AM

I was told the the mass of things like weapons is something arbitrary; I had a short discussion about this with Dedmen some months ago on arma discord community_wiki channel and the answer was "mass is a arbitrary unit, not a weight".
So I assume the formula that calcs the load is based on the arbitrary unit used for the mass of inventory objects, whatever that may be.

Ounce thing could be what has been used as the arbitrary value "base" because real life FN SCAR weights 7.25 pounds which translates into 116 ounces and for example the MXM in the game has a mass of 120 (they look pretty same hence the comparison).
Ditto for the AK-12. Not 100% match but it is quite close (game mass is 140, real life somewhere around 123 ounces (empty)).

BIS_fnc_KK added a comment.EditedFri, Aug 27, 2:53 PM

I think for simplicity one can imagine ounces, thus could be explained on wiki. Im still trying to weigh pros and cons of having max load setter

h- added a comment.Fri, Aug 27, 4:49 PM

Just read the discord discussion about this, a wee bit messy indeed.
So ounce is good I guess, although as the density is arbitrary then the ounce thing also gets messy I suppose.

In case of the AK-12 mass 1 = 0.88 ounces sort of (don't quite me on this, I can not math at all.. :( ) but that most likely will not hold for other types of objects.

The MAR-10 is quoted specifically on the Field Manual as weighing 4.4kg and has mass of 260 ingame. I don't think any other object or weapon has its weight specified anywhere, so it'd probably be the best baseline for any conversion to 'real' units.

h- added a comment.Sat, Aug 28, 7:53 AM

Apparently the mass value has nothing to do with weight (which is correct though because mass != weight), what a ex-BI dev said it's calced with something like model volume * some arbitrary object density value pulled out of thin air.

So that weight being mentioned is pretty much irrelevant :(
Also throws the ounce idea quite badly out of whack: 4.4kg is about 155 ounces, so the ingame weight is 105 too high if it was ounces.
And won't compare with other weapons because using that mass 1 = about 16.9g (assuming no-maths brain calculated it right), which would make the AK-12 mass completely wrong; more than 1kg low ¯\_(ツ)_/¯

The MAR-10 is quoted specifically on the Field Manual as weighing 4.4kg and has mass of 260 ingame. I don't think any other object or weapon has its weight specified anywhere, so it'd probably be the best baseline for any conversion to 'real' units.

It was added later in game, it is not unreasonable to think that the config value was just arbitrary figure that "luks o'aight"

This comment was removed by BIS_fnc_KK.

Additionally, there seems to be no way the get given ammobox/vehicle transport container loads, only reammo vehicle rearming ammocargo load.

Could you explain what you mean by this?

load, loadAbs extended rev 148140

h- added a comment.Tue, Aug 31, 4:51 PM

@BIS_fnc_KK
Really badly worded :D but tried to say that the only existing command to get info about vehicle carried stuff is the "rearm ammo cargo" an ammo vehicle carries (getAmmoCargo), no command to get what the vehicle carries in the "inventory".

NikkoJT removed a subscriber: NikkoJT.Tue, Aug 31, 4:55 PM
In T152952#2229063, @h- wrote:

@BIS_fnc_KK
Really badly worded :D but tried to say that the only existing command to get info about vehicle carried stuff is the "rearm ammo cargo" an ammo vehicle carries (getAmmoCargo), no command to get what the vehicle carries in the "inventory".

Ok thanks, now it is

NikkoJT removed a subscriber: NikkoJT.Tue, Aug 31, 10:23 PM

maxLoad, setMaxLoad rev. 148169

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Tue, Sep 7, 12:30 PM
BIS_fnc_KK changed the task status from Need More Info to Feedback.
h- added a comment.Sat, Sep 11, 10:42 AM

Seems to me that these are working fine, thanks once again :)

BIS_fnc_KK closed this task as Resolved.Sat, Sep 11, 3:55 PM