devilution icon indicating copy to clipboard operation
devilution copied to clipboard

Document Diablo's bugs

Open ghost opened this issue 7 years ago • 172 comments

Currently documented bugs: The DSF Buglist for Diablo v1.09 (Lurker Lounge)

The goal of this issue is to document any new bugs we come across while examining the code that are native to the original game. This will help us fix them later on when we make mods/ports.

New bugs discovered (last update 06/24/18)

  • When casting a town portal in a quest level, leaving, and then going down into the dungon, the town portal will be placed in the dungeon. For example, Chamber of Bone is quest level 2, so the portal would appear on dungeon level 2 at the same X/Y coordinate.
  • Diablo is supposed to be immune to the squelch radius, however, the game checks the AI for Diablo's monster type, thus always failing. monster.cpp -> ProcessMonsters

ghost avatar Jun 24 '18 15:06 ghost

Are these bugs going to be fixed in devilution after devilution development becomes stable or is the devilution source code gonna be a pure documentation update including leaving in the vanilla bugs?

fearedbliss avatar Jun 24 '18 18:06 fearedbliss

The Purpose section of the readme has the answer.

ghost avatar Jun 24 '18 18:06 ghost

Ah ok, I did read this like a week ago but I guess I forgot ;D.

fearedbliss avatar Jun 24 '18 18:06 fearedbliss

The pull request above is basically a copy of the text from the original posting with some Markup for formatting. Is something like this is what is being requested?

ttdonovan avatar Jun 26 '18 00:06 ttdonovan

We can definitely make use of your copy in case the original one goes down. However, this issue is to track new bugs that haven't been documented anywhere else, so that we can fix them in the future.

(Not Devilution of course, but mods based on)

ghost avatar Jun 26 '18 12:06 ghost

As a rule for any bug published can we have the save file for this? I would like to have something to make this more easy to replicate...

because I am thinking on looking at the TP sequence and the Chamber of bone locations... because Technically TP is working but it's not marking the chamber of bone as a different map , if I am not mistaken...

EDIT:

I am probably completely wrong on that one. The dungeon map array looks ok for the most part...

Perhaps the Portal setting and getting is wrong? Perhaps it's not specifying the correct map for special maps?

Ok . Which memory map (showing address locations) is the most accurate for the origional diablo? Do you have it ? All the addresses I am seeing appear to be inaccurate.

ghost avatar Jun 27 '18 19:06 ghost

@ApertureSecurity check Support/surgery.xls for a spreadsheet containing addresses.

Found another one while testing the world.cpp refactor. This bug is also part of vanilla.

EDIT: This bug was Devilution only https://s33.postimg.cc/w9y0yf6ov/doorflip.png

ghost avatar Jul 08 '18 00:07 ghost

Brevik himself talked about this bug in an interview once. The Caves were entirely hardcoded and many fixes added per-tile: cave bug

ghost avatar Jul 23 '18 07:07 ghost

@galaxyhaxz is this in the origional game or are we going to add this to our bug list?

ghost avatar Jul 23 '18 12:07 ghost

Well, it looks like the door issue mentioned above was devilution specific. However, these pieces are saved with the character so it becomes bugged when loading the character in a vanilla game. https://github.com/diasurgical/devilution/commit/ee5675108eb0b8e169b5f154ccc4dee8a11d4abe

ghost avatar Sep 10 '18 23:09 ghost

Well, it looks like the door issue mentioned above was devilution specific. However, these pieces are saved with the character so it becomes bugged when loading the character in a vanilla game. ee56751

Interesting find. This is good to know when validating bugs in the future against vanilla Diablo. Basically, we can use the same seed for dungeon generation when validation, but we can't use save files.

mewmew avatar Sep 10 '18 23:09 mewmew

There is an overflow bug in the dungeon algorithm of Cathedral that sometimes causes out-of-map pieces. Documented here.

I can confirm that Devilution works correctly (i.e. is bugged like vanilla). Current known seeds:

Cathedral:
2588
4743
7281
9345
15236

ghost avatar Sep 12 '18 16:09 ghost

Eldritch Shrine Bug

The Eldritch shrine (turns healing/mana pots into rejuvs and full pots into full rejuvs) uses the player's holding item buffer to temporarily store the rejuvs. What could possibly go wrong here?........ xD xD

If you click on the shrine and then pickup an item from your inventory/belt, the item you're holding will get overwritten. When you place it back down, it turns into a rejuv. BEWARE!

As a side note, this can be exploited for an extra rejuv, grabbing say 1 piece of gold or some junk item.

Bugfix

The routine for this in OperateShrine should use a temporary buffer local to the function or the global temporary buffer curruitem to fix this. :)

ghost avatar Nov 01 '18 01:11 ghost

As a side note, this can be exploited for an extra rejuv, grabbing say 1 piece of gold or some junk item.

Haha, great hack!

mewmew avatar Nov 01 '18 01:11 mewmew

Edit: actually the spaces in yellow are spots where there aren't any pixels in the .CEL, so the game never draws anything there. The function responsible for drawing the void fills them black. The only way to fix this is to edit the CEL map and create pixels in the empty spots. DIABLO_2019031337_061641 DIABLO_20190317_221850

ghost avatar Mar 17 '19 08:03 ghost

By chance I stumbled upon a broken tile on level 5. Here is the picture with seed and location: _seed_bug_lv5

ghost avatar Apr 04 '19 17:04 ghost

It's great. We are gonna be able to create a version of Diablo that fixes all known bugs. Of course, Devilution will contain all original bugs to stay true to its origin.

mewmew avatar Apr 05 '19 02:04 mewmew

Another bug where standing in certain spots overwrites the top left corner of the control panel: _tile_bug_lv1

ghost avatar Apr 07 '19 04:04 ghost

Another bug where standing in certain spots overwrites the top left corner of the control panel:

Is this in vanilla too? Never seen the panel being incorrectly rendered before.

mewmew avatar Apr 07 '19 06:04 mewmew

All your belt items also went invisible. Could be a miss calculated CelSkip/CelCap

AJenbo avatar Apr 07 '19 14:04 AJenbo

@mewmew Yeah it's in vanilla. You won't notice the bug unless you hover your mouse over that spot in the control panel, it overwrites the panel graphic. I rewrote the whole render and discovered this bug while testing. It's likely caused by DrawMain not blitting all parts of the screen all the time.

@AJenbo The belt items is just a side effect of the new render, not in vanilla. If you notice there's transparency! <3

Edit: attached save file so you can test it. Load the game and place mouse over top left corner. single_4.zip

Interesting is that this bug doesn't happen in the debug release or prior. So it was caused by something changed in the render in 1.00.

ghost avatar Apr 07 '19 14:04 ghost

@AJenbo had pointed this bug out awhile back, as it was thought to be caused by my render re-implementation. Actually, it's caused by the whole eflag system where for some reason, when walking south east, arches aren't drawn above the player. So the fix was to add separate drawing code outside of the render. I had to catch it mid action, but the spots in yellow are where eflag tiles are drawn. They overwrite the book case. IIRC this bug was fixed in the PSX version, since they ditched eflag entirely. DIABLO_20190428_063210

ghost avatar Apr 28 '19 06:04 ghost

Nice catch, my print screen has a delay so getting shots like this is a pain :)

The other yellow box is causing issues when we upgrade the render to have per-pixel transparency because it renders the tile twice, resulting in 75% opaqueness instead of 50%

AJenbo avatar Apr 28 '19 13:04 AJenbo

Here's another render issue: Caves

https://github.com/diasurgical/devilutionX/issues/111

AJenbo avatar May 16 '19 11:05 AJenbo

In the very tristram itself :) image

Zoomed: image

I'ts more obvious in tchernobog, that's what made me notice it :P

qndel avatar May 16 '19 18:05 qndel

@AJenbo I believe that issue is the same one I reported above. There's a broken tile that can occasionally spawn in the caves that does that.

Here is a list of seeds for Caves with that broken tile and the coordinate of it:

seed 24, x 28, y 10
seed 206, x 19, y 27
seed 265, x 27, y 6
seed 534, x 26, y 20
seed 1714, x 24, y 25
seed 1980, x 12, y 14

Here is code to fix the tile by brute force. It should be ran during DRLG_L3:

	for(j = 0; j < 40; j++)
	{
		for(i = 0; i < 40; i++)
		{
			if(dungeon[i][j] == 9 && dungeon[i - 1][j] == 13 && dungeon[i][j - 1] == 14)
			{
				dungeon[i][j] = 7; // set broken tiles to dirt instead of stalagmite
				dungeon[i][j - 1] = 7;
				dungeon[i-1][j] = 7;
			}
		}
	}

Additionally, here are seeds for Catacombs that contain the broken wall tile:

550
2346
2377
2992
5162
6365
6500
6711
7152
7155
7462

And the code to fix it:

			if(dungeon[i][j] == 15 && dungeon[i][j + 1] == 1) { /// add this check
				dungeon[i][j + 1] = 8; // change left wall to left corner
			}

Last but not least, some more seeds with the overflow bug in DRLG_L1 documented by @mewmew:

24627
29946
32559

ghost avatar May 16 '19 20:05 ghost

Hi all, the latest changelog for The Hell 2 had me raise an eyebrow:

Fixed in-game menu animations, they would stop after machine spent 49+ days without rebooting (a rare original D1 bug, but we fix them all anyways);

Were you guys able to find this in the cleanup?

ssjkakaroto avatar Jun 13 '19 22:06 ssjkakaroto

Yeah, tied to how the Windows API works, for DevilutionX it's instead 49 days after starting the game, so much less likely to happen. https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-gettickcount

AJenbo avatar Jun 13 '19 22:06 AJenbo

so much less likely to happen.

Not on my watch!

There is also another annoying time bug where once you hit the year 2038 the random function overflows and returns a value past 0x7FFFFFFF (a negative number) and thus all randomness ceases and dungeon is the same.

ghost avatar Jun 14 '19 12:06 ghost

There is also another annoying time bug where once you hit the year 2038 the random function overflows and returns a value past 0x7FFFFFFF (a negative number) and thus all randomness ceases and dungeon is the same.

Really? Have you tried it by setting the clock? Haha, would be a somewhat incredible way to cheat the PRNG :dagger:

mewmew avatar Jun 15 '19 05:06 mewmew