TWiki Home Tharsis . Design . StackObjects Tharsis webs:
Design | Guilds | Combat | Website
Design . { Home | Changes | Index | Search | Go }
Stack objects are such things that can be split into parts, but that not normally have one object for each unit. Much like stacks of coins work at the moment. They have to be able to be splitted when you move only a part of them.

It can include: liquids, sand, hay, grain, and other generic items like pebbles. (what about other generic large objects, like a barrel with fish?)

If picked up normally, you only get a small portion, as hands can not carry them effectively.

You need methods to move them around (*must be movable):

Technical detail:

To deal with being able to split itself, a stack object needs to be a container. When you need to move a part of the stack object, you clone a new stack object to the container, and move that one, thus you must know in advance, before you move, how much you can move. This is decided either by the method or the target container. By calling the container with data on how much that wants to be moved, it can clone an appropriate object. If the move fails, the new object will be reinserted.

Alternative: make a stack a container, and base its properties on the stack objects inside it, so that you can stack grain and water together in the same stack, and get porridge...! Problem is to make the container catch all its properties from the objects inside it.
I Prefer the other option. -- FantoM - 09 May 2003


The cloning of the new object can possibly be accomplished by saving the object, then loading that savefile on a new clone, and changing the appropriate data, mainly weight, as that will be the decisive factor of the size of the stack. In this way you will not need any special transfer methods of data.

Important data:

-- PumaN - 29 Apr 2003

Topic StackObjects . { Edit | Attach | Ref-By | Printable | Diffs | r1.3 | > | r1.2 | > | r1.1 | More }
Revision r1.3 - 10 May 2003 - 09:36 GMT - PumaN
Parents: WebHome > MudLib
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding Tharsis? Send feedback.