WALLITEM bug

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
TheMormegil
Adept
Posts: 213
Joined: Thu Apr 10, 2003 10:23 am
Location: Wales

WALLITEM bug

Post by TheMormegil »

I have been trying to create a mechanism using new objects cloned
from WALLITEM_AMALGAM and WALLITEM_AMALGAM_BURNT etc
but it does not work, and only ever displays the first new wallitem.
All my new wallitems display properly on thier own but as soon
as I try to get one to appear after another ala amalgam -> burnt amalgam it just leaves the first item there.
Is this a bug or am I doing something wrong?
I can get my new wallitem to turn into a burnt amalgam, but not a cloned
burnt amalgam with a new front bitmap.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

The propertiews that cause the burnt amalgum mechanism are inherent wallitem properties, not anything to do with that specific instance (i believe!)

so you don't need to clone it specifically, any wallitem to get the new graphics will do, what you do need to do is set all the parameters as the original wall item puzzle in DM

Gambit will be sharper with this than me, but i think this is correct...
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Blimey, Fuzzface, you still keeping an eye on us even while you're away/ That's dedication for you!

TheMormegil, have you checked the TXT file for DM ORIGINAL? Look at items 7503-7507. You need to ensure that:

Items are laid down in the right order.
The triggering object is the top most object and is VISIBLE
Your triggering wall item needs an OPBY and an ACTION
The action should target itself so that the item becomes invisble (you may need to use a relay)
The action should target the object you want to make visible.
If you also want to do other stuff at the same time, such as open a door, just target any other specific IDs

I could go into a lot more detail, but if you study the objects listed above I'm sure you'll see how it works!

(I moved this to editing as it's not a bug).
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Just to confirm; there is indeed nothing special about the amalgam series of wallitems.

In gnereal as well, there's hardly anything special about any item. There are however a few exceptions of objects you cannot clone; in each case there is no conceivable reason why you'd want to (I believe) as they have no graphics or properties that cannot be modified on a per item basis (but please let me know if you think differently). The ones off the top of my head are:

FLOORITEM_TELEPORTER
FLOORITEM_TRIGGER
FLOORITEM_END_OF_GAME
FLOORITEM_DAMAGE
FLOORITEM_WALL_MOVABLE
FLOORITEM_WALL_FAKE
FLOORITEM_GENERATOR_MONSTER
FLOORITEM_TEXT
WALLITEM_COUNTER
WALLITEM_RELAY
User avatar
TheMormegil
Adept
Posts: 213
Joined: Thu Apr 10, 2003 10:23 am
Location: Wales

Post by TheMormegil »

Gambit : Yes I did look at the DM txt.
I cut and pasted the relevant item sequence from there and then
started to alter it. Thing is, when the sole alteration is changing
WALLITEM_AMALGAM/BURNT/EMPTY to my new wallitems with
new graphics it fails to work completley. Thats what makes me
think there must be some bug there.
I can alter the OPBY items that trigger the mechanism, and alter the released item as long as I keep the WALLITEM_AMALGAM/BURNT etc but any attempt to use new wallitems causes it to fail to work.

I have managed to achieve what I wanted to do by instead of making
new items, REPLACEing the bitmaps for the AMALGAM series of wallitems.
However this is far from ideal as this limits the images in the sequence to 3, and eventually I want 4 or maybe more.
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I think you've missed the point of cloning ;-)

In your first approach I think you assumed that the AMALGAM had some inherent properties; they don't. They are just names used to refer to a static bitmap. It's the mechanism behind them you need to pay attention to. You could have cloned any other wallitem and the results would be the same.

Your second approach is the correct approach, and you're not limited to 3 objects: you can have as many as you want. You just need to define the bitmaps for them and give them unique names. But you have to ADD bitmaps for this to work, you can't REPLACE. You can then refer to them by name anytime you want to use them in the dungeon. Here's an example:

First, you define the bitmaps to be used (must exist as external files) and the objects that use the bitmaps. In this case, we'll clone the manacles as they are are simple static wallitem:

Code: Select all

[New - Bitmaps]
ADD	BITMAP_MYIMAGE_STAGE1_FRONT	FILE=(imagestage1_front.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)
ADD	BITMAP_MYIMAGE_STAGE2_FRONT	FILE=(imagestage2_front.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)
ADD	BITMAP_MYIMAGE_STAGE2_FRONT	FILE=(imagestage3_front.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)
ADD	BITMAP_MYIMAGE_STAGE2_FRONT	FILE=(imagestage4_front.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)
ADD	BITMAP_MYIMAGE_STAGE2_FRONT	FILE=(imagestage5_front.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)
ADD	BITMAP_MYIMAGE_STAGE2_SIDE	FILE=(imagestage1_side.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)
ADD	BITMAP_MYIMAGE_STAGE2_SIDE	FILE=(imagestage1_side.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)
ADD	BITMAP_MYIMAGE_STAGE2_SIDE	FILE=(imagestage1_side.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)
ADD	BITMAP_MYIMAGE_STAGE2_SIDE	FILE=(imagestage1_side.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)
ADD	BITMAP_MYIMAGE_STAGE2_SIDE	FILE=(imagestage1_side.bmp)	SIZE=(x,y)	POSITION=(x,y)	SCALINGS=(1)	TRANSPARENT=(FALSE)

[New - Objects]
ADD	MYOBJECT_STAGE1		CLONES=(WALLITEM_MANACLES)	NAME=(whatever)	BITMAPS=(FRONT:BITMAP_MYIMAGE_STAGE1_FRONT,SIDE:BITMAP_MYIMAGE_STAGE1_SIDE)
ADD	MYOBJECT_STAGE2		CLONES=(WALLITEM_MANACLES)	NAME=(whatever)	BITMAPS=(FRONT:BITMAP_MYIMAGE_STAGE2_FRONT,SIDE:BITMAP_MYIMAGE_STAGE2_SIDE)
ADD	MYOBJECT_STAGE3		CLONES=(WALLITEM_MANACLES)	NAME=(whatever)	BITMAPS=(FRONT:BITMAP_MYIMAGE_STAGE3_FRONT,SIDE:BITMAP_MYIMAGE_STAGE3_SIDE)
ADD	MYOBJECT_STAGE4		CLONES=(WALLITEM_MANACLES)	NAME=(whatever)	BITMAPS=(FRONT:BITMAP_MYIMAGE_STAGE4_FRONT,SIDE:BITMAP_MYIMAGE_STAGE4_SIDE)
ADD	MYOBJECT_STAGE5		CLONES=(WALLITEM_MANACLES)	NAME=(whatever)	BITMAPS=(FRONT:BITMAP_MYIMAGE_STAGE5_FRONT,SIDE:BITMAP_MYIMAGE_STAGE5_SIDE)
Then you can use your objects anywhere in the dungeom, and assign any number of OPBYs OR ACTIONS to them, for example like this:

Code: Select all

[Items]
100	MYOBJECT_STAGE1	X,Y,Z,f STATE=(VISIBLE) OPBY=(MISC_COIN_GOLD) ACTION=(TOGGLE) TARGET=(100,101) OPTIONS=(DISABLE_SELF,DESTROY_ITEM)
101	MYOBJECT_STAGE2	X,Y,Z,f STATE=(INVISIBLE) OPBY=(MISC_COIN_GOLD) ACTION=(TOGGLE) TARGET=(101,102) OPTIONS=(DISABLE_SELF,DESTROY_ITEM)
102	MYOBJECT_STAGE3	X,Y,Z,f STATE=(INVISIBLE) OPBY=(MISC_COIN_GOLD) ACTION=(TOGGLE) TARGET=(102,103) OPTIONS=(DISABLE_SELF,DESTROY_ITEM)
103	MYOBJECT_STAGE4	X,Y,Z,f STATE=(INVISIBLE) OPBY=(MISC_COIN_GOLD) ACTION=(TOGGLE) TARGET=(103,104) OPTIONS=(DISABLE_SELF,DESTROY_ITEM)
104	MYOBJECT_STAGE5	X,Y,Z,f STATE=(INVISIBLE) OPBY=(MISC_COIN_GOLD) ACTION=(TOGGLE) TARGET=(104,105) OPTIONS=(DISABLE_SELF,DESTROY_ITEM)
105	DOOR_IRON_DENTED x,y,z	STATE=(CLOSED)

The example above will display MYOBJECT_STAGE1 as a wallitem (i've simplified the code a bit to avoid all the x,y stuff). If you stick a gold coin in it, it'll TOGGLE itself so that it becomes INVISIBLE and also TOGGLE the next object (101) to VISIBLE. If you follow the sequence, you'll see that each time you add a coin, the new graphic is made visible and the old one is made invisible. After 5 coins are entered, the door is opened.

You could also make this setup using counters and relays but I think this should help you with your problem.

Finally, avoid using the AMALGAM as a cloned object. It has strange behaviour because it has no side view.
User avatar
TheMormegil
Adept
Posts: 213
Joined: Thu Apr 10, 2003 10:23 am
Location: Wales

Post by TheMormegil »

Thanks for taking the time to try and explain it Gambit.
However I am pretty sure I haven't missed the point of
cloning and that there is something wierd going on.
I copied out you code, removed the errors and spaces,
created some simple bitmaps for it, and it does not work.
Maybe its something wrong with my PC or my installation
of RTC, I don't know. Anyway I'll email the files to you
and you can see if it works for you. Hope thats ok with
you :)
User avatar
TheMormegil
Adept
Posts: 213
Joined: Thu Apr 10, 2003 10:23 am
Location: Wales

Post by TheMormegil »

..or at least I would if I had your email address!
User avatar
TheMormegil
Adept
Posts: 213
Joined: Thu Apr 10, 2003 10:23 am
Location: Wales

Post by TheMormegil »

Well I finally managed to make it work as I wanted.
I noticed that when it wasn't working sometimes some
manacles would strangely appear. So I forced an error
on the bitmaps part of the new object definition and
saw that there is a FRONTALT bitmap. I set that to the same
bitmap as FRONT, and then everything worked perfectly.
Very very frustrating.
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Yeah, sorry about those errors; forgot to edit after copying and pasting!

I haven't used any objects that required a FRONTALT definition, so I'm not sure why this would make a difference. ALT images are normally used for images that are flipped, though I'm not sure under what circumstances it's used. George would be best to ask about this.

For future reference, just click the Email button under any of my posts to send me an email!
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

walls for example which would look the same on bothleft and right side so when it was flipped the illusion of going forward would not happen as the appearance of the walls would be exactly the same.

The alternate walls have their lines slightly offset and some chips in diferent places. This gives you the illusion of moving forward.

So, when ever you have something that is symmetrical in your dungeon it's best to have an alternate image.
User avatar
TheMormegil
Adept
Posts: 213
Joined: Thu Apr 10, 2003 10:23 am
Location: Wales

Post by TheMormegil »

Gambit : There is no email button under your posts!
Is the msn messenger entry in your profile your email address?
User avatar
cowsmanaut
Moo Master
Posts: 4378
Joined: Fri Jun 30, 2000 12:53 am
Location: canada

Post by cowsmanaut »

well, it certainly isn't for Messnger since I just tried adding him.. Say's "this person does not use MSN messenger."
Post Reply