• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Gearlist substitute?

TCArknight

Well-known member
Howdy!

Is there a substitute for gearlist that includes the quantity of an item (stackQty) in the output?

If not, how does gearlist build the returned value? I'd like to create a procedure to return the list of items in a container with the number of them included (use stkName instead of just name in the return).
 
gearlist operates on holders, like backpacks, not containers (like adding a weapon power to a magic weapon in PF1).


foreach gear in [path to what you're checking] where "candidate expression"


If you're running it from the container, and just looking for all held gear, it'll just be:


foreach gear in this
somestring = splice(somestring, eachpick.field[stkName].text,", ")
nexteach
 
Ah, I did forget that there was really was a difference with using container.

I have a top_holder component.gear item called eqCargoSpace which is bootstrapped to a vehicle as a place to put gear for the vehicle (like spare ammo, tents, medical supplies, etc.).

If I had something like (2x) Tents, (300x) Ammo X in the cargo space, I could to something like this?

Code:
 foreach gear in this
somestring = splice(somestring, eachpick.field[stkName].text,", ")
nexteach

MyContainString = “Contains: “ & somestring

Where MyContainString would be “Contains: (300x) Ammo X, (2x) Tent” ?
 
That looks like it should work. Of course "somestring" was a suggestion to find a better variable name - something more specific to the usage.
 
Back
Top