Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Monsters using potions
New Topic New Poll Post Reply
Poster Message
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged

File: clone spider.PNG (33.3 KB)
Downloaded 60 times.
License: Public Domain
icon Monsters using potions (0)  
Note that the picture doesn't show the glitch in action, but instead shows the room I'm testing in. That picture will help make my desciption in the secret tag make more sense.


Normally, when a monster player role tries to move onto a potion, it treats it like a wall.

But I was surprised to see this topic. Wondering how Monkey got a spider to use a clone potion, I did some investigating.

I found out that, rather expectedly, when you playtest a room, with your start location on a clone potion, and turn into a spider on turn 0, you first turn into a spider, and then get to place the clone as a spider. But even though it was pretty obvious that it would work if done this way, in actuality, it shouldn't work. The spider should not activate the potion, and, instead, should treat it like when you start on a wall; nothing happens, and once you move off of it, you can't move back on.

As the game seems to have successfully changed my player role before placement, the NPC's Player Role command seems to take place before the clone placement screen. Therefore, you can prevent the potion from activating for the spider by simply having the game check the player role variable before potion script execution. Incredibly easy, or so I would think (I haven't looked at the source code, nor am I even sure it comes with the Demo version).

But if it is intentional that a potion can be activated by another player role in these rare occasions (which would be limited to screen exits, playtesting, and Level Entrances on top of potions), then it still is unintuitive how it works.

But I'll describe the placement difficulties in a Secret tag so that these don't take up space when the former solution (not allowing this situation at all) is the more likely choice:

Click here to view the secret text



EDIT: Oh, I just realized that I have never updated TCB, sort of due to the fact that I can't find out how, and I still have the demo version, so updates might not even apply to it.
Sorry if this was reported ages ago and already fixed.

____________________________
Also known as ExpHP everywhere else.

[Last edited by Kwakstur at 07-29-2007 11:11 PM]
07-29-2007 at 11:08 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Monkey
Level: Master Delver
Avatar
Rank Points: 190
Registered: 03-21-2006
IP: Logged
icon Re: Monsters using potions (0)  
Just to let you know, Kwakstur:
Stepping on a power token when you are a monster allows you to use the potions (mimic and decoy excluded).

____________________________
lurking

[Last edited by Monkey at 07-29-2007 11:25 PM]
07-29-2007 at 11:21 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Monsters using potions (0)  
Monkey wrote:
(mimic and decoy excluded).
Hmm. That sounds like a bug to me.

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
07-29-2007 at 11:22 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Monkey
Level: Master Delver
Avatar
Rank Points: 190
Registered: 03-21-2006
IP: Logged
icon Re: Monsters using potions (0)  
It's intended. Those potions are supposed to be used by Beethro only.

____________________________
lurking
07-29-2007 at 11:24 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Re: Monsters using potions (+1)  
Jatopian wrote:
Hmm. That sounds like a bug to me.
Not quite. If you place a decoy or a mimic, and then change player roles, they still look like Beethro. So that the same code for JtRH can be used in TCB, Decoys and Mimics (which, in JtRH, could only be Beethro) still only look like Beethro.

So monsters can't use those, because, why would a monster place something that looks like Beethro?

____________________________
Also known as ExpHP everywhere else.
07-29-2007 at 11:28 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Monsters using potions (0)  
Kwakstur wrote:
If you place a decoy or a mimic, and then change player roles, they still look like Beethro.
That makes sense for a decoy. Mimics should mimic the player. There's no reason only Beethro should be able to use potions.

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
07-30-2007 at 03:12 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
coppro
Level: Smitemaster
Rank Points: 1308
Registered: 11-24-2005
IP: Logged
icon Re: Monsters using potions (0)  
I think that it's a graphics issue more than anything else. No one wants to have to draw greenish-blue graphics for every single creature in the game. The engine could be redesigned to colorize the tiles similar to clones, but that removes some flexibility for tile designers. I can't think of any truly flexible way to do it. Maybe you could create a filter tile, but I'd rather leave mimicry the way it is.
07-30-2007 at 03:42 AM
View Profile Show all user's posts Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Monsters using potions (0)  
coppro wrote:
I think that it's a graphics issue more than anything else. No one wants to have to draw greenish-blue graphics for every single creature in the game.
And that wouldn't account for custom tiles. I suppose it would have to be a filter. I can't agree that it should be left as is, when fixing it would grant puzzle potential and flawless consistency.

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
07-30-2007 at 06:14 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Chaco
Level: Smitemaster
Rank Points: 3624
Registered: 10-06-2005
IP: Logged
icon Re: Monsters using potions (0)  
As they are currently, pre-placed mimics and decoys are a great way to give a non-sworded player role a sword, even if they look remarkably like Beethro.

____________________________
Quick links to my stuff (in case you forgot where it was):
Click here to view the secret text

07-30-2007 at 10:36 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged

File: Double Placement Graphic Fix.patch (717 bytes)
Downloaded 39 times.
License: Public Domain
icon Re: Monsters using potions (+4)  
For the record, it's a lot harder than you think to stop the potion from activating for the spider.

Beethro (and first turn placement in the room) acts before scripting. Potion drinking *and* removal is done at this time. This is necessary, because by the time we get to monster movement, we need the potion that Beethro is on to no longer be there, because it'd be an obstacle to many types of monsters otherwise. (As an example, a Guard player role can retreat to potions he can't drink but *can* step over and use them to protect himself from roaches. If Beethro tried that, he'd get eaten)

Mimic/Clone/Decoy placement takes place at the end of the turn. This is how it worked in KDD, and there's no sense in changing that now. The potion is already gone, so we really should *do* something with it. However, scripting has run by now, which means Player Role has just happened to change in-between. There's no easy way we could've predicted this before we "drank" the potion, so the only sensible thing to do is to allow the effects of the potion to be used as normal for this turn. Of course, the next time the player moves, the rules of the new player role take effect (either preventing movement onto a potion, or preventing the potion being consumed), but we simply couldn't do that at the start of the current turn.

The visual anomalies with placing the double are more of a concern though, so that's something we can work on.

EDIT: Well, that was suspiciously easy. I can't tell if there was a good reason it was using GetSwordsman to find the location of the swordsman to draw the lightning bolt for - that would only find the player if they were either Beethro or a Player Role that has lost stealth. Otherwise, it would find any NPC Beethro roaming around, and if it doesn't find that, it starts causing the graphical anomalies noticed in this thread.

So I just changed it to grab the player's co-ordinates directly. I can't think of any way those co-ordinates wouldn't at least return a sensible location in the room, even if the player had been moved by scripting or otherwise during the turn. I don't think potions can be activated without stepping on them, and the only way I can think of to move the player through scripting is to set Player Role to none and then turn a Beethro NPC into a monster - and that would just mean that the lightning bolt would find that instead. You could, of course, set the Player to None and run a cutscene, but that just automatically places the double where you were standing (which is a different sort of thing altogether). Of course, I may be missing something.

The persistent red squares, by the way, appear to be a symptom of the misplaced lightning bolt... or at least, they started working fine after I'd made the change.

Well, we'll see. Patch included for coders.

[Last edited by TFMurphy at 07-30-2007 06:31 PM : Renamed directories in patch just to be more sensible]
07-30-2007 at 02:38 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Re: Monsters using potions (0)  
Isn't it a bad idea to put stuff like this in a patch? As far as I know, a patch merely tells what bits have changed, and so if this stuff in that location of the code has been changed since the patch was made, the patch will mess stuff up. Maybe I'm wrong . . . autism may make me 10 years smarter, but that doesn't change the fact that I'm young.

I know, off-topic, but at least I'm hijacking my own thread instead of somebody else's.

____________________________
Also known as ExpHP everywhere else.
07-30-2007 at 06:12 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged
icon Re: Monsters using potions (0)  
Any of the coders who could possibly use this patch already know what kind of patch it is (diff patch) and how best to use it, and likely wouldn't even install it without checking it out first.
07-30-2007 at 06:18 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Monsters using potions (0)  
Yes, it's quite possible this could be an easy fix. We'll verify your patch when next we're fixing bugs.

Edit: I'd probably do something like this:
if (!this->pCurrentGame->GetSwordsman(wSX, wSY))
{
	//Get player coords for non-Beethro role.
	wSX = this->pCurrentGame->swordsman.wX;
	wSY = this->pCurrentGame->swordsman.wY;
}
ASSERT(this->pCurrentGame->pRoom->IsValidColRow(wSX,wSY));
(I don't have the code in front of me -- apologies if something's not exactly right.)
TFMurphy wrote:
Any of the coders who could possibly use this patch already know what kind of patch it is (diff patch) and how best to use it, and likely wouldn't even install it without checking it out first.
Yeah, exactly. BTW, I never blindly apply contributed patches to the official codebase. I always go through and manually enter changes by hand (possibly copy-and-pasting) so that I myself am fully aware of the context and scope of changes. Your English explanation of your patch fixes is very helpful. You might consider just including your reasoning for changes directly as code comments so they can go right into the codebase and dev posterity can be aware of why everything is as it is if these changes are applied.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 07-30-2007 07:05 PM]
07-30-2007 at 06:59 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged
icon Re: Monsters using potions (0)  
Hmmm... wouldn't that still have an issue if there were a Beethro NPC in the room when the Player Role was changed?

(Quick example: one visible Beethro NPC, one scripting command that changes Player Role on some condition (let's call it Turn 10), player drinks Clone Potion on same turn he changes, Beethro NPC ends up being asked to place a roach clone.)

Still, prettier than the current red blocks of death. And the above example is probably going to be *REALLY* rare (rarer than random Player Role changes, that's for sure).
07-30-2007 at 07:20 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Monsters using potions (0)  
TFMurphy wrote:
Hmmm... wouldn't that still have an issue if there were a Beethro NPC in the room when the Player Role was changed?

(Quick example: one visible Beethro NPC, one scripting command that changes Player Role on some condition (let's call it Turn 10), player drinks Clone Potion on same turn he changes, Beethro NPC ends up being asked to place a roach clone.)

Still, prettier than the current red blocks of death. And the above example is probably going to be *REALLY* rare (rarer than random Player Role changes, that's for sure).
You're right -- we wouldn't want that to happen. As long as the behavior is appropriate for cases like Player Role None being executed the same turn a double potion is quaffed, that's fine.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
07-30-2007 at 07:32 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
golfrman
Level: Master Delver
Avatar
Rank Points: 165
Registered: 07-10-2006
IP: Logged
icon Re: Monsters using potions (0)  
Jatopian wrote:
There's no reason only Beethro should be able to use potions.
and how does a roach open a bottle?

____________________________
Jesus is Lord and Messiah!
07-31-2007 at 06:05 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Re: Monsters using potions (+1)  
The same way Murray the Demonic Talking Skull got on top of that signpost:

Murray: Through sheer force of will. Actually, those whack voodoo kids thought I was real funny and just decided to stick me on this post.

Guybrush: What are you doing there, anyways?

Murray: Standing as a testament.

Guybrush: "Standing?"

Murray: Hanging as a testament. But, soon, I shall take over the world, and everyone shall know the wraith of Murray, the demonic talking skull!

Guybrush: Good luck with that.



Oh, man, I love that game.

____________________________
Also known as ExpHP everywhere else.
07-31-2007 at 08:01 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Banjooie
Level: Smitemaster
Avatar
Rank Points: 1645
Registered: 12-12-2004
IP: Logged
icon Re: Monsters using potions (0)  
golfrman wrote:
and how does a roach open a bottle?

Roach rams into it, smashes it, laps up the juice.
07-31-2007 at 09:36 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Re: Monsters using potions (+3)  
Actually, I'm starting to wonder how Beethro can open it. It's half the size of a tile, and therefore that bottle has a diameter of 2.5 feet.

So Beethro, without letting go of his sword, uncaps a 2.5ft x 2.5ft lid and drinks an amount of liquid that is 3/4 his height.

We need a Really Big Stomach.

____________________________
Also known as ExpHP everywhere else.
07-31-2007 at 08:05 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Monsters using potions (0)  
TFMurphy wrote:
Patch included for coders.
I've applied this patch. (Man, my game hanged when I tried out the buggy way first -- the returned player's position was way off in minus land. I'm glad we have this fix.)

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
09-08-2007 at 07:20 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Monsters using potions
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.