an 'item~equipment' system is not simple to design well, and requires a good bit of coding ability to create a good design. I still haven't accomplsihed this yet myself. However, here's some basic things you can do~use to help you:
-------
Cloning Objects:
http://docs.textadventures.co.uk/quest/ ... clone.htmlhttp://docs.textadventures.co.uk/quest/ ... bject.htmlhttp://docs.textadventures.co.uk/quest/ ... dmove.html-------
Sora's Stackable Library:
viewtopic.php?f=18&t=3515 (this library hasn't been updated, but maybe you can get ideas from it, if you can understand code)
Pixie's Shop Library:
viewtopic.php?f=18&t=2557------
for crafting better code designs, you need to learn List~Dictionary Attributes, and their useful applications (usage):
http://docs.textadventures.co.uk/quest/ ... lists.htmlhttp://docs.textadventures.co.uk/quest/ ... aries.htmlhttp://docs.textadventures.co.uk/quest/ ... reach.htmlhttp://docs.textadventures.co.uk/quest/scripts/for.htmlhttp://docs.textadventures.co.uk/quest/ ... tions.htmlhttp://docs.textadventures.co.uk/quest/scripts/http://docs.textadventures.co.uk/quest/scopes.htmlContains, (List~Dictionary)Contains, (List~Dictionary)Count, Scopes, AllObjects(), Got, GetObject, GetDirectChildren, GetAllChildObjects, etc etc etc
--------
in quest:
VARIABLES:
-> Attributes (global ~ 'save-able and thus load-able' ~ 'permanent', so long as the Object that it is: 'attached to; held~contained within', exists, of course): Object_name.Attribute_name = Value_or_Expression // an example: player.strength = 100
-> Variables (local ~ temporary, only can be used by the script block it is within, can *NOT* be used anywhere in the game's scripting, unlike Attributes, which can be): variable_string_name = Value_or_Expression // an example: strength = 100
-> Parameters (used by~in Functions and Commands)
----------
Attributes (a type of VARIABLE, see above):
about Integer Attributes, such as your question about a 'quantity' Integer Attribute:
in GUI~Editor:
'whatever' Object -> 'Attributes' Tab -> Attributes -> Add -> (see below)
(Object Name: whatever)
Attribute Name: quantity (or whatever you want to name~label the Attribute as: count, amount, capacity, number_of_potions, number_of_arrows, etc etc etc)
Attribute Type: int (integer)
Attribute Value: (whatever you want the initial amount to be)
an example:
'life_potion' Object -> > 'Attributes' Tab -> Attributes -> Add -> (see below)
(Object Name: life_potion)
Attribute Name: quantity
Attribute Type: int (integer)
Attribute Value: 0
in GUI~Editor's Scripting, an example:
run as script -> add new script -> variables -> 'set a variable or attribute' Script -> (see below)
set variable life_potion.quantity = [expression] 0
in scripting code, an example:
life_potion.quantity = 0
in 'creation' tag block code, an example:
<object name="life_potion">
<attr name="quantity" type="int">0</attr>
</object>
--------------------
some examples of scripting (actions~events) in your game:
'life_potion' Object -> 'Verbs' Tab -> Add -> (see below)
Verb Name: drink
run as script -> add new script -> scripts -> 'if' Script -> if [expression] life_potion.quantity = 0
-> then -> add new script -> output -> 'print a message' Script -> print [expression] "You can't drink what you have no more of, silly."
else
-> add new script -> variables -> 'set a variable or attribute' Script -> set variable player.current_life = [expression] player.current_life + 50
-> add new script -> variables -> 'set a variable or attribute' Script -> set variable life_potion.quantity = [expression] life_potion.quantity - 1
-> add new script -> output -> 'print a message' Script -> print [expression] "You drank a life potion, having 1 less quantity of life potions, but gaining +50 life back for drinking it."
in code:
if (life_potion.quanity = 0) {
msg ("You can't drink what you have no more of, silly.")
} else {
player.current_life = player.current_life + 50
life_potion.quantity = life_potion_quantity - 1
msg ("You drank a life potion, having 1 less quantity of life potions, but gaining +50 life back for drinking it.")
}
------
you can apply the above for all of your other features too of item~equipment usage: adding~removing 'quantities', moving Objects, transactions (buying~selling), and etc
-------
in the left side's 'tree of stuff'...
I'm not sure if you can copy and paste Objects in the GUI~EDitor (as I hardly work with it anymore, lol), but maybe you can literally highlight the Object, and then copy and paste it into whatever other (now highlighted) Object. I know you can click, hold, and drag an Object into another Object in the GUI~EDitor, to move that Object.
-------
you can directly do so in the code, but you got to know what you're doing, of course.