|
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
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). Working on - |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,505
|
Are you talking about the container function (also in a few other places)?
Last edited by Duggan; December 2nd, 2021 at 03:02 PM. |
#2 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
Quote:
Working on - |
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,238
|
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 |
#4 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
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 Working on - |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,238
|
That looks like it should work. Of course "somestring" was a suggestion to find a better variable name - something more specific to the usage.
|
#6 |
Thread Tools | |
Display Modes | |
|
|