enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Bug: You can take over 12 bags into inventory


From: Ronald Lamprecht
Subject: Re: [Enigma-devel] Bug: You can take over 12 bags into inventory
Date: Wed, 25 Apr 2007 21:46:18 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Hi,

Markus Laire wrote:
> I just noticed a bug in Enigma 1.00.
>
> If first item in your inventory is a bag, then you can take another
> bag into the inventory, even if the inventory is full.

Yes that is an unwanted feature a.k.a. bug. It will be fixed in 1.01.

That should result in recursive bags :-)

I did introduce it when trying to avoid unresolvable recursive bags - a major problem of the 0.92 bags.

I just tested this a bit more, and it seems that if you pick-up an
empty bag, you won't get recursive bags, BUT if you pick up a bag
which has items with it, you will get recursive bag.

Example:
- Start game (inventory: extralife, extralife)
- Drop one extralife (inventory: extralife)
- Pick two bags (inventory: bag, bag, extralife) (A)
- Pick the extralife (inventory: bag[extralife], bag, extralife)
- Drop the bag with extralife (inventory: bag, extralife)
- Pick the bag with extralife (inventory: bag[???], extralife)   (B)
So at this stage I seem to have bag-in-bag situation. I can check it out:
- Drop the bag (inventory: extralife)
- Pick the bag (inventory: bag, bag[extralife], extralife) (C)
- Move the items with right-click (inventory: bag[extralife], extralife, bag)
- Drop the first bag (inventory: extralife, bag)
- Pick the bag (inventory: bag, extralife, extralife, bag)

Stage (A) doesn't result in recursive bags while stage (B) will.
I'm not sure if the extralife in stage (B) is in the inner or outer bag.

It is bag[bag[extralife]], extralife

Stage (C) is also interesting. It might be that the marble first
picked up a bag, then an extralife into that bag, and finally the
other bag. Or maybe the marble just picked up two bags, one which had
an extralife in it.

Here are the rules (that should be added to the reference manual):

1. Inventory and bag are limited to 13 items
2. Both are LIFO (last item picked up is first item out) - besides
   inventory rotation.
3. If you pick up any item besides a bag and your first inventory
   item is not a bag the item is added to the inventory
4. If you pick up any item besides a non-empty bag and your first
   inventory item is a bag the item is added to the first inventroy
   bag (this includes non-empty bags into bags!)
5. You empty a bag by picking it up with any item at the first
   inventory position but a bag. As many items as possible are taken
   from the bag and added to the inventory.
6. Empty bags are never put into other bags (this would cause
   unresolvable recursion problems - see below). They will always be
   added to the inventory.
7. If the touched bag cannot empty its contents to the inventory
   or a bag at the inventory position is full the bag is not picked up
   and keeps the remaining items.

The bug occurs in rule 6 where the empty bag in position 1 reports that it can take further items and the new bag is picked up but is redirected to the full inventory as the rule forbids to put into the first bag.

Now the question of the day - why is it forbidden to put an empty bag into a bag? You can make experiments with Enigma 0.92 where it was possible to do that:

- pick up an empty bag - an extralife - an empty bag
  (inventory: bag[bag, extralife])
- drop the bag
- pick up this bag: the inner bag is added - the inner extralife is
  added to this just added bag - the outer bag is added to the first
  bag (inventory: bag[bag, extralife])

You have no chance to ever resolve this "recursion" problem. You will never see again the extralife. You just invert the bags with their contents staying unaccessable.

I have to mention one "strange" feature of Enigma bags - valid for 0.92 and 1.00: if you just have bag in your inventory with out any other plain item all items you pick up will end up in the bag. You can not add them to the inventory as the bag is and remains the first item. You have to drop the bag and pick it up again to get items into the inventory for being able to rotate the inventory.

In Enigma 1.00 you can put filled bags into other bags as often as you like. There is just a limit of 13 empty bags due to the size of the inventory. If you rely on the Enigma 1.00 behaviour instead of the 0.92 behaviour please mark your level within the XML header as 1.00 compatible.

Be aware that in future versions we may have different images for empty, partially filled and full bags. Do not rely that these states are undistinguishable.

-- Ronald

P.S. The bug fixing was faster than the mail writing - it is r697 on branches/1.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]