StackLib not working in 5.8

So I'm gonna provide an example game (I dunno how to upload files so this is the best you're gonna get) for this, but basically, here's what happens: The stacks ain't stacking. For some reason, even when I do exactly what Pix says on his wiki page for StackLib, the objects just behave as if I weren't using the library.

For this specific example, I just have the player in a room with an item that contains "things." By using a verb on the item, it one "thing" at a time in your inventory. The intended behavior is for the things to stack as "Things" followed by the number of things, but what ACTUALLY happens is, they just show up one by one in the inventory as "Thing." Here's the source code for the whole game:

<asl version="580">
  <include ref="English.aslx" />
  <include ref="Core.aslx" />
  <include ref="StackLib.aslx" />
  <game name="EX">
    <gameid>2ed2fc07-0587-4e70-b4f5-b67b0fa736dc</gameid>
    <version>1.0</version>
    <firstpublished>2019</firstpublished>
  </game>
  <object name="room">
    <inherit name="editor_room" />
    <isroom />
    <object name="player">
      <inherit name="editor_object" />
      <inherit name="editor_player" />
    </object>
    <object name="bag">
      <inherit name="editor_object" />
      <alias>Bag of things</alias>
      <displayverbs type="stringlist">
        <value>Look at</value>
        <value>Take thing</value>
      </displayverbs>
      <takething type="script">
        CloneObjectAndMove (thing, player)
      </takething>
      <object name="thing">
        <inherit name="editor_object" />
        <inherit name="childstack_object" />
        <stackparent type="object">stack</stackparent>
        <alias>Thing</alias>
      </object>
    </object>
  </object>
  <object name="stacks">
    <inherit name="editor_room" />
    <object name="stack">
      <inherit name="editor_object" />
      <inherit name="homo_stack_container" />
      <alias>Things</alias>
    </object>
  </object>
  <verb>
    <property>takething</property>
    <pattern>take thing</pattern>
    <defaultexpression>"You can't take thing " + object.article + "."</defaultexpression>
  </verb>
</asl>

Log in to post a reply.

Support

Forums