Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (Pathmap problems)
New Topic New Poll Post Reply
Poster Message
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged

File: Obstacle problems.hold (1.3 KB)
Downloaded 23 times.
License: Public Domain
icon Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (+2)  
If you set an NPC to have Imperative Brain Pathmap Obstacle, and then do something to make said NPC die or disappear via scripting, it's then possible to walk through the tile it was on (duh, as it should be), but the Brain still regards that tile as an obstacle!

The attached hold demonstrates the issue. If you bump the NPC (which is pushable by weapon also if you want to move it around to experiment) it will disappear and die via scripting. But if you then open the door every brained roach movement will head to the east exit of the little box, even if Beethro is really close to the west end!

I strongly suspect the same thing would happen with an NPC's pathmap and those relevant commands, but have not specifically tested it. It MIGHT be interesting to allow something that's disappeared to still be an obstacle (so "only brains see it" and with a decent architect they'd have ghost display so the player knows where they are) but it DEFINITELY shouldn't still be an obstacle after it's died.

EDIT: I've discovered that the problem is even worse. With this "pushable by weapon" NPC, if you push him off of the tile he starts on but don't bump him to destroy him that tile is still treated as a brain pathmap obstacle, AND the new tile is NOT treated as a brain pathmap obstacle. This means the pathmap is not being properly updated on pushing a pushable character the way it is for normal pushables like mirrors and powder kegs, both of which do have the pathmap updated properly when pushed.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 01-23-2017 09:36 PM]
01-23-2017 at 09:28 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (0)  
Just going to bump this with a small, partial workaround: If something that's been set to "pathmap obstacle" has the "not pathmap obstacle" command applied to it before it moves off of whtaever tile it's on, that tile stops being marked as a pathmap obstacle. This still doesn't really at all fix the issue, but it's worth mentioning because it might make things better in a few cases.

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text

04-19-2017 at 09:59 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (+2)  
Posted a PR.

The following operation will now update the pathmap:
- Die and Die Special
- Appear, Appear At
- Disappear
- Move, Move Rel
- Turn into Monster
- Changing X and Y position with Set var

____________________________
My website | Facebook | Twitter
10-01-2020 at 07:31 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
disoriented
Level: Smitemaster
Avatar
Rank Points: 2379
Registered: 08-07-2007
IP: Logged
icon Re: Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (0)  
This sounds like it has the potential to break many demos; just a brainstorm.

____________________________
34th Skywatcher

Best to PM me, since I might miss your message on CaravelNet chat.
10-01-2020 at 07:37 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
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1527
Registered: 06-13-2015
IP: Logged
icon Re: Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (0)  
Well...The change doesn't seem like it should affect anything that doesn't use Imperative Brain Pathmap Obstacle, and once I was aware of this bug, I ensured any custom thingies I made that could move or get pushed just didn't use that Imperative. By the way, does this PR fix the issue with getting pushed too?

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 10-01-2020 07:47 PM]
10-01-2020 at 07:45 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (+2)  
> By the way, does this PR fix the issue with getting pushed too?

No but I just pushed a fix to that case too.

> This sounds like it has the potential to break many demos; just a brainstorm.

To be honest it was a very obvious bug - if someone depended on that behavior intentionally I am afraid they should've been prepared for it to be fixed one day.

____________________________
My website | Facebook | Twitter

[Last edited by skell at 10-01-2020 08:12 PM]
10-01-2020 at 08:10 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
disoriented
Level: Smitemaster
Avatar
Rank Points: 2379
Registered: 08-07-2007
IP: Logged
icon Re: Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (0)  
ok :thumbsup

____________________________
34th Skywatcher

Best to PM me, since I might miss your message on CaravelNet chat.
10-01-2020 at 08:22 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
kieranmillar
Level: Smitemaster
Rank Points: 2668
Registered: 07-11-2014
IP: Logged
icon Re: Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (+2)  
Have tried the following in 5.1.1.alpha.2020-10-16 with a character that was a brain pathmap obstacle:

- Die and Die Special - Works
- Appear, Appear At - Works
- Disappear - Works
- Move, Move Rel - Works
- Turn into Monster - Monsters are never brainmap obstacles so I guess this not blocking the pathmap is correct?
- Changing X and Y position with Set var - Does not work, the character appears to lose its ability to block the pathmap completely!
10-17-2020 at 05:35 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (+1)  
kieranmillar wrote:
- Turn into Monster - Monsters are never brainmap obstacles so I guess this not blocking the pathmap is correct?

Correct, Turn into monster creates a regular monster.

kieranmillar wrote:
- Changing X and Y position with Set var - Does not work, the character appears to lose its ability to block the pathmap completely!

Since Set var _MyX/_MyY uses Teleport To internally, it means both were broken. It was pathmap updating happening too early in teleportation process. PR

____________________________
My website | Facebook | Twitter
10-18-2020 at 12:23 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2668
Registered: 07-11-2014
IP: Logged
icon Re: Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (+1)  
Can confirm in 5.1.1.alpha.2020-10-18 that moving a brain pathmap visible object via set var or teleport to correctly updates the brain pathmap.
10-18-2020 at 03:27 PM
View Profile Send Private Message 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 : Disappearing/Dying NPCs remain in the pathmap AND Pushable NPCs do not update pathmap (Pathmap problems)
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.