My game has several different characters in it starting with different items, such as:
<<set $playerInventory.micromecha = { name: "MiniRobo",
quantity:1,
charges: 20,
damage: 16,
description: "A mini-robot that helps protect the owner. While less damaging to enemies it's power charge capacity is smaller." }>>
<<set $playerInventory.machomecha = { name: "BigRobo",
quantity:1,
charges: 15,
damage: 25,
description: "A larger robot that helps protect the owner. It's power charge capacity is greater than the MiniRobo model." }>>
Now the issue is that in-game I want to eventually have them able to pick up replenishments / restorations to their items' charges.
However due to there being more than one character I won't know which one has the right maximum 'charge'.
So my question is, how do I have it so that when they pick up a replenishment / item it is going to be the right one? To basically have a set 'sub-variable' for the charges.
IE I have something along the lines of:
<<set $playerInventory.machomecha.charges to $maxmachomechacharges>>
???????
That way when it comes to pickups in the game they are at whatever the maximum is for that type of item.