Page 1 of 1

[Not a bug] equiping objects with action

Posted: Mon May 26, 2008 12:07 am
by THOM
When you equip an object and want to have an action take place while equiping it, you have also to do a convert. Means: you cannot do just the action, you HAVE to do an conversion (i.e. to itself) to have the action working.
See some discussion about it here:

http://www.dungeon-master.com/forum/vie ... hp?t=27673

Posted: Mon May 26, 2008 11:06 am
by George Gilbert
The current behaviour is the correct and entirely intended behaviour.

The key to understanding this is thinking about what a "NULL" convert-to means. Does it mean don't convert, or does it mean convert to nothing?

If you think it through, it makes everything much simpler if, for those few items that have actions, you explicity say what you want the item to convert to (the same thing or something else) than than introducing a whole new set of conceptual questions about what things mean.

Posted: Mon May 26, 2008 11:17 am
by beowuuf
The problem is we have not found a way to create an action when you equiup/unequip an item except for using the convert to menu, and the additional action does not kick in unless the equpped object changes first

Eg - you equip a sword, and a sound is played, or a monster leaps out at you, or a 'cannot use left hand' symbol appears in your left hand, etc but you still want the original sword to be in the hand

Posted: Mon May 26, 2008 11:45 am
by George Gilbert
I'm still not quite sure what the problem is...

If you set the convert-to item to be the same as the item does it not work?

Posted: Mon May 26, 2008 12:46 pm
by THOM
It does work.

The only question for me was - is this behaviour intended. But you have answered this already.
Thanks. :-)

Posted: Mon May 26, 2008 1:44 pm
by beowuuf
Yes, but then you don't get the item back, you get another of the item type

If you had runes or a descriptive text attacked to a particular sword, then they get lost when you get a new version of the item, right? I seem to recall charges/strength carried across between items though when you convert, right?

Posted: Mon May 26, 2008 2:39 pm
by Gambit37
That last bit from Beo is the key bit we need to understand: what properties (if any) are retained when swapping or converting items?

This has been a real stumbling block for me.

Posted: Mon May 26, 2008 9:07 pm
by George Gilbert
beowuuf wrote:Yes, but then you don't get the item back, you get another of the item type

If you had runes or a descriptive text attacked to a particular sword, then they get lost when you get a new version of the item, right? I seem to recall charges/strength carried across between items though when you convert, right?
If you're converting from something of one type to something of the same type (which obviously includes converting to *exactly* the same type), then every property is carried over - if you find something that isn't, then it's a bug and let me know.

If you're converting between similar, or even completely different types, then the engine tries to carry over as much as possible making intelligent guesses where it can - for example, converting a potion into a monster will carry over the strength of the potion into the HP of the monster.

Posted: Mon May 26, 2008 9:21 pm
by Gambit37
Aaah... light bulb moment! :)

Posted: Mon May 26, 2008 9:21 pm
by beowuuf
Ah, then that's ok! I just didn't think the engine would convert things across that intelligently

Re: [Not a bug] equiping objects with action

Posted: Fri Mar 14, 2014 1:21 pm
by Chaos-Shaman
oh yes. now here comes a question I'd like answered and I have been trying to figure what is kept.

when swapping a monster say with 9000 health to another monster of the same type, does the monster health transfer to the newly swapped one? of course I am not clear on this.