The Stackables Library

I am trying to use Pixie's Stackables Library again with the lasted Quest version. On desktop.
I have never had it work in the past and am now searching the forums for the solution to why it acts as it is not bring used. It just places multiples of the same item in inventory. There are many references to this same problem on the forums, but the treads are unanswered and dead.

I had given up in the past on trying to get it to work but I am determined to see it through this time.

Using Pixie's StackLib

Game Script

<!--Saved by Quest 5.8.6836.13983--> <asl version="580"> <include ref="English.aslx" /> <include ref="Core.aslx" /> <include ref="StackLib.aslx" /> <dynamictemplate name="DefaultSpeakTo">You get no response.</dynamictemplate> <game name="Equipping System 5-13-20"> <gameid>ac896f77-268d-4e18-912b-bf01791b129e</gameid> <version>1.0</version> <firstpublished>2020</firstpublished> <feature_lightdark /> <feature_limitinventory /> <feature_annotations /> <feature_advancedwearables /> <feature_advancedscripts /> <feature_devmode /> <allowlookdirections /> <start type="script"> </start> </game> <object name="room"> <inherit name="editor_room" /> <isroom /> <object name="player"> <inherit name="editor_object" /> <inherit name="editor_player" /> <attr name="torch_stack" type="string"></attr> <object name="short_sword"> <inherit name="editor_object" /> <one_handed_weapon /> <equipped type="boolean">false</equipped> <attr name="can_equip_left" type="boolean">false</attr> <attr name="two_handed_weapon" type="boolean">false</attr> <one_handed_item /> <attr name="one_handed_defense" type="boolean">false</attr> <attr name="two_handed_item" type="boolean">false</attr> <attr name="two_handed_defense" type="boolean">false</attr> <displayverbs type="stringlist"> <value>Look at</value> <value>Take</value> </displayverbs> <inventoryverbs type="stringlist"> <value>Look at</value> <value>Drop</value> <value>Equip</value> </inventoryverbs> <attr name="is_weapon" type="string"></attr> <alias>short sword</alias> <originalalias>Short Sword</originalalias> <listalias>Short Sword</listalias> <take /> <usestandardverblist /> <volume type="int">2</volume> <changedequipped type="script"> if (this.equipped = True) { list add (this.inventoryverbs, "Unequip") list remove (this.inventoryverbs, "Equip") this.listalias = this.listalias + " (equipped)" } else { list remove (this.inventoryverbs, "Unequip") list add (this.inventoryverbs, "Equip") this.listalias = this.originalalias } </changedequipped> <equip type="script"> ClearTurn if (GetBoolean (this, "equipped")) { msg ("It is already equipped.") } EquipOneHanded (this) </equip> </object> <object name="long_sword"> <inherit name="editor_object" /> <two_handed_weapon /> <equipped type="boolean">false</equipped> <volume type="int">3</volume> <take /> <alias>long sword</alias> <listalias>Long Sword</listalias> <originalalias>Long Sword</originalalias> <inventoryverbs type="stringlist"> <value>Look at</value> <value>Drop</value> <value>Equip</value> </inventoryverbs> <usestandardverblist /> <equip type="script"> ClearTurn if (GetBoolean (this, "equipped")) { msg ("It is already equipped.") } EquipTwoHanded (this) </equip> <changedequipped type="script"> if (this.equipped = True) { list add (this.inventoryverbs, "Unequip") list remove (this.inventoryverbs, "Equip") this.listalias = this.listalias + " (equipped)" } else { list remove (this.inventoryverbs, "Unequip") list add (this.inventoryverbs, "Equip") this.listalias = this.originalalias } </changedequipped> </object> <object name="shield"> <inherit name="editor_object" /> <damage>1d5</damage> <equipped type="boolean">false</equipped> <one_handed_defense /> <one_handed_item /> <inventoryverbs type="stringlist"> <value>Look at</value> <value>Drop</value> <value>Equip</value> </inventoryverbs> <is_shield /> <listalias>Square Wooden Shield</listalias> <originalalias>Shield</originalalias> <take /> <usestandardverblist /> <volume type="int">3</volume> <alias>square wooden shield</alias> <is_defense /> <equip type="script"> ClearTurn if (this.equipped = True) { msg ("It is already equipped.") } EquipOneHandedShield (this) </equip> <changedequipped type="script"> if (this.equipped = True) { list add (this.inventoryverbs, "Unequip") list remove (this.inventoryverbs, "Equip") this.listalias = this.listalias + " (equipped)" } else { list remove (this.inventoryverbs, "Unequip") list add (this.inventoryverbs, "Equip") this.listalias = this.originalalias } </changedequipped> </object> <object name="fist"> <inherit name="editor_object" /> <alias>fist</alias> <visible type="boolean">false</visible> <equipped /> <attr name="is_one_handed_weapon" type="string"></attr> <scenery /> <drop type="boolean">false</drop> </object> <object name="shield1"> <inherit name="editor_object" /> <damage>1d5</damage> <equipped type="boolean">false</equipped> <one_handed_defense /> <one_handed_item /> <inventoryverbs type="stringlist"> <value>Look at</value> <value>Drop</value> <value>Equip</value> </inventoryverbs> <is_shield /> <listalias>Round Wooden Shield </listalias> <originalalias>Shield</originalalias> <take /> <usestandardverblist /> <volume type="int">3</volume> <alias>round wooden shield</alias> <is_defense /> <equip type="script"> ClearTurn if (this.equipped = True) { msg ("It is already equipped.") } EquipOneHandedShield (this) </equip> <changedequipped type="script"> if (this.equipped = True) { list add (this.inventoryverbs, "Unequip") list remove (this.inventoryverbs, "Equip") this.listalias = this.listalias + " (equipped)" } else { list remove (this.inventoryverbs, "Unequip") list add (this.inventoryverbs, "Equip") this.listalias = this.originalalias } </changedequipped> </object> </object> <object name="torch"> <inherit name="editor_object" /> <inherit name="childstack_object" /> <equipped type="boolean">false</equipped> <take /> <attr name="is_torch" type="string"></attr> <alias>torch</alias> <listalias>Torch</listalias> <originalalias>Torch</originalalias> <inventoryverbs type="stringlist"> <value>Look at</value> <value>Drop</value> <value>Equip</value> </inventoryverbs> <attr name="feature_switchable" type="boolean">false</attr> <feature_lightdark /> <lightsource type="boolean">false</lightsource> <lightstrength>strong</lightstrength> <volume type="int">1</volume> <life type="int">50</life> <price type="int">1</price> <state>brightly</state> <usestandardverblist /> <stackparent type="object">torch stack</stackparent> <look type="script"><![CDATA[ msg ("A thick wooden stick. The end is wrapped with some kind of material soaked in animal fat.") if (this.lightsource = True) { msg ("<em>This one is burning " + this.state + " and will last " + this.life + " turns.") } else { msg ("<em>This one is not lit.") } ]]></look> <changedlightsource type="script"> if (this.lightsource = True) { list add (this.inventoryverbs, "Snuff") list remove (this.inventoryverbs, "Light") this.listalias = this.listalias + " (lit)" this.burned = True this.price = 0 msg ("You light the torch with your flint and steel, and hold it out in front of you.") } else { list remove (this.inventoryverbs, "Snuff") list add (this.inventoryverbs, "Light") this.listalias = Replace(this.listalias, " (lit)", "") msg ("You snuff out your torch.") } </changedlightsource> <everyturn type="script"> if (this.equipped = True) { torch.life = torch.life - 1 if (torch.life = 25) { this.state = "moderately" torch.listalias = torch.alias + " (dimming)" if (torch.parent = player.parent) { msg ("{color:Red:Your torch is dimming and will burn out in " + this.life + " turns!}") } } if (torch.life = 15) { this.state = "dimly" torch.listalias = torch.alias + " (dim)" if (torch.parent = player.parent or torch.parent = player) { msg ("{color:Red:Your torch will burn out in " + this.life + " turns!}") } } if (torch.life = 0) { msg ("Your torch flickers and burns away to nothing.") destroy (this) } } </everyturn> <changedequipped type="script"> if (this.equipped = True) { list add (this.inventoryverbs, "Unequip") list remove (this.inventoryverbs, "Equip") list add (this.inventoryverbs, "Light") this.listalias = this.listalias + " (equipped)" msg ("You equip your torch.") } else { list add (this.inventoryverbs, "Equip") list remove (this.inventoryverbs, "Unequip") list remove (this.inventoryverbs, "Light") this.listalias = this.originalalias this.lightsource = False msg ("You snuff out your torch and put it away..") } </changedequipped> <lightit type="script"> if (this.equipped = false) { do (this, "equip") this.lightsource = True } else if (this.lightsource = True) { msg ("It is already lit.") } else { this.lightsource = True } </lightit> <snuffit type="script"> if (this.lightsource = False) { msg ("It is already out.") } else { this.lightsource = False } </snuffit> <equipit type="script"> ClearTurn if (this.equipped = True) { msg ("It is already equipped.") } else { EquipTorch (this) } </equipit> <unequipit type="script"> ClearTurn if (this.equipped = False) { msg ("It is not equipped.") } else if (this.lightsource = True) { msg ("You snuff out your torch and put it away.") } else { msg ("You put away your torch.") } if (player.left_hand = this) { player.left_hand = null } if (player.right_hand = this) { player.right_hand = null } this.equipped = False </unequipit> <ontake type="script"> ClearTurn </ontake> </object> <object name="torch1"> <inherit name="editor_object" /> <inherit name="childstack_object" /> <equipped type="boolean">false</equipped> <take /> <attr name="is_torch" type="string"></attr> <alias>torch</alias> <listalias>Torch</listalias> <originalalias>Torch</originalalias> <inventoryverbs type="stringlist"> <value>Look at</value> <value>Drop</value> <value>Equip</value> </inventoryverbs> <attr name="feature_switchable" type="boolean">false</attr> <feature_lightdark /> <lightsource type="boolean">false</lightsource> <lightstrength>strong</lightstrength> <volume type="int">1</volume> <life type="int">50</life> <price type="int">1</price> <state>brightly</state> <usestandardverblist /> <look type="script"><![CDATA[ msg ("A thick wooden stick. The end is wrapped with some kind of material soaked in animal fat.") if (this.lightsource = True) { msg ("<em>This one is burning " + this.state + ".") } else { msg ("<em>This one is not lit.") } ]]></look> <changedlightsource type="script"> if (GetBoolean(this, lightsource)) { list add (this.inventoryverbs, "Snuff") list remove (this.inventoryverbs, "Light") this.listalias = this.listalias + " (lit)" this.burned = True this.price = 0 msg ("You light the torch with your flint and steel, and hold it out in front of you.") } else { list remove (this.inventoryverbs, "Snuff") list add (this.inventoryverbs, "Light") this.listalias = Replace(this.listalias, " (lit)", "") msg ("You snuff out your torch.") } </changedlightsource> <everyturn type="script"> if (this.equipped = True) { torch.life = torch.life - 1 if (torch.life = 25) { this.state = "moderately" torch.listalias = torch.alias + " (dimming)" if (torch.parent = player.parent) { msg ("{color:Red:Your torch is dimming!}") } } if (torch.life = 15) { this.state = "dimly" torch.listalias = torch.alias + " (dim)" if (torch.parent = player.parent or torch.parent = player) { msg ("{color:Red:Your torch is about to burn out.}") } } if (torch.life = 0) { msg ("Your torch flickers and burns away to nothing.") destroy (this) } } </everyturn> <changedequipped type="script"> if (this.equipped = True) { list add (this.inventoryverbs, "Unequip") list remove (this.inventoryverbs, "Equip") list add (this.inventoryverbs, "Light") this.listalias = this.listalias + " (equipped)" msg ("You equip your torch.") } else { list add (this.inventoryverbs, "Equip") list remove (this.inventoryverbs, "Unequip") list remove (this.inventoryverbs, "Light") this.listalias = this.originalalias this.lightsource = False msg ("You snuff out your torch and put it away..") } </changedequipped> <light type="script"> if (this.equipped = false) { do (this, "equip") this.lightsource = True } else if (this.lightsource = True) { msg ("It is already lit.") } else { this.lightsource = True } </light> <snuff type="script"> if (this.lightsource = False) { msg ("It is already out.") } else { this.lightsource = False } </snuff> <equip type="script"> ClearTurn if (this.equipped = True) { msg ("It is already equipped.") } EquipTorch (this) </equip> <unequip type="script"> ClearTurn if (this.equipped = False) { msg ("It is not equipped.") } else if (this.lightsource = True) { msg ("You snuff out your torch and put it away.") } else { msg ("You put away your torch.") } if (player.left_hand = this) { player.left_hand = null } if (player.right_hand = this) { player.right_hand = null } this.equipped = False </unequip> <ontake type="script"> ClearTurn </ontake> <stackparent type="object">torch stack</stackparent> </object> </object> <turnscript name="torchturnscript"> <script> torch.life = torch.life - 1 if (torch.life = 10) { torch.listalias = torch.alias + " (dimming)" if (torch.parent = player.parent) { msg ("{color:Red:Your torch is dimming!}") } } if (torch.life = 5) { torch.listalias = torch.alias + " (dim)" if (torch.parent = player.parent or torch.parent = player) { msg ("{color:Red:The torch is about to burn out.}") } } if (torch.life = 0) { torch.listalias = torch.alias + " (burned out)" torch.lightsource = false torch.price = 0 list remove (torch.inventoryverbs, "snuff") torch.lightsource = false DisableTurnScript (torchturnscript) torch.cannotswitchon = "You cannot light the torch, it has burned up." if (torch.parent = player.parent or torch.parent = player) { msg ("Your torch flickers and dies.") } if (room.dark = true) { msg (It is too dark to see!) } } </script> </turnscript> <verb> <property>light</property> <pattern>light</pattern> <defaultexpression>"You can't light " + object.article + "."</defaultexpression> </verb> <turnscript name="objects"> <enabled /> <script> foreach (object, AllObjects()) { if (GetBoolean(object, "equipped")) { if (HasScript (object, "everyturn")) { do (object, "everyturn") } } } </script> </turnscript> <verb> <property>snuff</property> <pattern>snuff</pattern> <defaultexpression>"You can't snuff " + object.article + "."</defaultexpression> </verb> <verb> <property>equip</property> <pattern>equip</pattern> <defaultexpression>"You can't equip " + object.article + "."</defaultexpression> </verb> <verb> <property>unequip</property> <pattern>unequip</pattern> <defaultexpression>"You can't unequip " + object.article + "."</defaultexpression> </verb> <object name="holding"> <inherit name="editor_room" /> </object> <object name="Stack Containers"> <inherit name="editor_room" /> <object name="torch stack"> <inherit name="editor_object" /> <inherit name="homo_stack_container" /> <displayverbs type="stringlist" /> <inventoryverbs type="stringlist"> <value>Drop</value> </inventoryverbs> <attr name="how_many" type="int">1</attr> <alias>torches</alias> <listalias>Torches</listalias> <take type="boolean">false</take> <attr name="not_all" type="boolean">false</attr> <light type="script"> DoStackVerb (this, "light") </light> <snuff type="script"> DoStackVerb (this, "snuff") </snuff> <equip type="script"> DoStackVerb (this, "equip") </equip> </object> </object> <function name="EquipOneHanded" parameters="object"><![CDATA[ if (player.right_hand = null) { msg ("You equip your " + GetDisplayAlias(object) + " in your right hand.") } else if (player.right_hand <> null) { msg ("You put away your " + GetDisplayAlias(player.right_hand) + " and equip your " + GetDisplayAlias(object) + " in your right hand.") } object.equipped = True player.right_hand = object player.right_hand.equipped = True player.right_hand_category = "holds_one_handed" if (player.left_hand_category = "holds_two_handed") { player.left_hand_category = null player.left_hand.equipped = False player.left_hand = null } ]]></function> <function name="ClearTurn"> ClearScreen ShowRoomDescription </function> <function name="EquipTwoHanded" parameters="object"><![CDATA[ if (player.right_hand = null and player.left_hand = null) { msg ("You equip your " + GetDisplayAlias(object) + ", gripping it in both hands.") } else if (player.right_hand.category = "holds_two_handed") { msg ("You put away your " + GetDisplayAlias(player.right_hand) + " and equip your " + GetDisplayAlias(object) + ", gripping it in both hand.") player.right_hand.equipped = False player.left_hand.equipped = False } else if (player.right_hand <> null and player.left_hand = null) { msg ("You put away your " + GetDisplayAlias(player.right_hand) + " and equip your " + GetDisplayAlias(object) + ", gripping it in both hand.") player.right_hand.equipped = False player.right_hand_category = "holds_two_handed" } else if (player.right_hand = null and player.left_hand <> null) { msg ("You put away your " + GetDisplayAlias(player.left_hand) + " and equip your " + GetDisplayAlias(object) + ", gripping it in both hand.") player.left_hand.equipped = False player.right_hand_category = "holds_two_handed" } else if (player.right_hand <> player.left_hand) { if (player.right_hand <> null and player.left_hand <> null) { msg ("You put away your " + GetDisplayAlias(player.left_hand) + " and " + GetDisplayAlias(player.right_hand) + " and equip your " + GetDisplayAlias(object) + ", gripping it in both hand.") player.left_hand.equipped = False player.right_hand.equipped = False player.right_hand_category = "holds_two_handed" } } player.right_hand = object player.left_hand = object object.equipped = True ]]></function> <function name="EquipOneHandedShield" parameters="object"> if (player.left_hand = null) { player.left_hand = object } else if (player.right_hand = null) { player.right_hand = object if (player.left_hand.is_defense = True) { msg ("{once:{color:silver:The hint system has detected you have equipped a defensive item in both hands. This is acceptable, but please realise you you can only use the item in your right hand for offense, IE, attacking (bashing) with a shield.}}") } } object.equipped = True </function> <function name="EquipTorch" parameters="object"> if (player.left_hand = null) { player.left_hand = object } else if (player.right_hand = null) { player.right_hand = object } else { msg ("Your hands are full.") options = NewStringDictionary() dictionary add (options, "left_hand", GetDisplayAlias (player.left_hand)) dictionary add (options, "right_hand", GetDisplayAlias (player.right_hand)) ShowMenu ("Which object would you like to unequip?", options, true) { set (player, result, equip.object) object.equipped = True } } object.equipped = True </function> <function name="UnequipTorch" parameters="object"> if (GetBoolean (object, "lightsource")) { msg ("You snuff out your torch and put it away.") } else { msg ("You put away your torch.") } if (player.left_hand = object) { player.left_hand = null } else if (player.right_hand = object) { player.right_hand = null } object.equipped = False </function> </asl>

Has the Stackables Library ever worked for anybody?


Well, anyway, if you are looking for a way to stack items in your inventory, onimike has a Youtube video showing his way to do it.

Use this link


Log in to post a reply.

Support

Forums