Page 1 of 1

[Fixed for V0.44] Health of swap monster

Posted: Tue Aug 29, 2006 3:13 pm
by Tonari
When swap is done, monster will be able to succeed health?
When monster receives various influences and the action pattern is changed, I think that that is natural.
However, when swap is done, monster seems to be calculated again referring to health of default.
With this, it recovers every time monster changes the action. It looks
unnatural.

Posted: Tue Aug 29, 2006 4:23 pm
by George Gilbert
Yes, that's a current limitation of the SWAP mechanism - namely that you are swapping an existing item for a new one and therefore you lose any data associated with the old object.

Of course, this could easily be viewed as being a good thing too!

Posted: Tue Aug 29, 2006 5:38 pm
by beowuuf
Actually I would like to be able to swap_memory or whatever - you can alter a weapon to a new status (Say a semi-broken fury which could snap) but it still has the same charges

Or a monster, as tonari says - you can weaken it with spells (speed/damage wise you have variants of the monster) but is otherwise still the same critter (with the same health)

Or curse a potion - it is still the same strength potion, but now it has an added effect (like saps your water level for that strength too)

I must admit I had assumed the swap kept the assosiated value (health, charge, strength)

Posted: Tue Aug 29, 2006 5:44 pm
by Gambit37
Not having played with SWAP I didn't realise it had this limitation. I think that's a big problem and would certainly welcome some kind of 'swap rememered item' feature...

Posted: Tue Aug 29, 2006 8:44 pm
by Sophia
SWAP_GLOBAL_FAST will preserve the HP but it'll probably preserve a bunch of other crap you don't want.

Posted: Tue Aug 29, 2006 9:09 pm
by beowuuf
And crash everything apparently and cause the apocalypse!

Posted: Tue Aug 29, 2006 9:33 pm
by George Gilbert
If I changed the behaviour of SWAP to preserve monster health / standard item charges - would this cause any backwards compatibility problems with existing dungeons?

Sophia - I think you're the only one that's currently using the SWAP action, but if anyone else is, please let me know.

Posted: Tue Aug 29, 2006 9:36 pm
by beowuuf
that's why i suggested a new 'swap_memory' action and leave the old swap action alone :)

Posted: Tue Aug 29, 2006 9:37 pm
by Sophia
The only dungeon that I have that uses SWAP in extensively odd ways is Dark Portal, and it doesn't really have a combat system to speak of, so monster hp is completely irrelevant.

I do a lot of swapping of monsters for clouds and pickableupable objects (that's how you "kill" them), and I think a bit of the other way, so as long as that's taken into account, it should be all good.

Posted: Tue Aug 29, 2006 9:38 pm
by Sophia
beowuuf wrote:that's why i suggested a new 'swap_memory' action and leave the old swap action alone :)
SWAP_MEMORY_LOCAL, SWAP_MEMORY_GLOBAL, SWAP_MEMORY_TILE_INFRONT, etc.... lots more actions cluttering up the list!

I've made a post on this topic too. ;)

Posted: Tue Aug 29, 2006 9:46 pm
by beowuuf
Oops, true!

Posted: Tue Aug 29, 2006 9:46 pm
by George Gilbert
Actually - looking through the code; this is just a bug. Charge strength is preserved on a swap, but the value for monster health is being corrupted in some cases in such a way that the logic decides to give them the default value. Now fixed for V0.44.