If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Looking for info on a bug - Imps will preference the DH to store gold and overload it

There's a bug that seems to exist even in vanilla DK2 where Imps will consistently prioritize dropping Gold off at the Dungeon Heart instead of a Treasury, even if the Treasury is closer. It can be a pretty severe bug as Imps will actually keep depositing Gold at the Dungeon Heart even if it's full, resulting in loose gold on the DH tiles similar to if you dropped Gold on a full DH or Treasury manually.

The problem is that the DH room tiles don't have the same special properties as the Treasury, properties that the Casino also shares. Gold on Treasury / Casino tiles seems to be hardcoded so that it cannot be picked up by anyone but Imps, and this is how the Casino functionality with the Rigged setting works essentially to prevent creatures from just picking the Gold back up. This actually results in another bug where if a creature is knocked unconscious on a Treasury or Casino Tile, they'll drop all their gold. So as a result of the Dungeon Heart not having those special properties, any creature, especially and most problematically a new creature as the portal is usually close by, can pass by and just pick up the gold. This is a pretty big bug that can go unnoticed, resulting in hefty losses of gold.

The bug seems to occur within specific Imps' AI, as I've had both Imps that act 'normal', preferencing the Treasury over the Dungeon Heart, and those that are 'special' or 'retarded' and will consistently drop gold off at the Dungeon Heart even if it's full. In my experience, killing off the bugged Imps seems to actually fix the issue. Additionally, it seems to be the same maps that have the issue. I can't name official maps as it's been so long since I've tried them, but in my remake of Level 11b within my balance patch / mod, the bug does seem to consistently occur. Most official maps also seem to give the player way, way more gold than necessary and vanilla DK2 creatures are cheap, so it's also easy for the bug to go unnoticed there.

So I'm basically looking for any information on this bug so I can figure out a way to work around it. For anyone who catches this bug, does it happen on the same map with a set of Imps or is it all Imps? Does sacking then replacing the bugged Imps make it better? Does it make a difference if sacked / replaced before and after a Treasury is built? Maybe the room they're spawned on? If you're a mapmaker, maybe try removing any starting Imps and see if that does anything. Any consistent pattern across bugged maps, like Dungeon Heart layout? Finally, what version do you use?

These questions also do reveal my current theory on what might cause the bug, but I haven't confirmed it yet so I still want to experiment. Maybe others can experiment as well. I'm not sure if version even matters because I've found a few bugs that exist across all versions, this could just be another thing that went unnoticed.

Re: Looking for info on a bug - Imps will preference the DH to store gold and overloa

Originally Posted by DBlac

Gotta tell you, over a decade of playing that game i've never seen that bug. Maybe it has something to do with a more recent community patch if youre using one?

I don't use anything that modifies the game files, only the level files, which is all what my patch does, basically. I did test it again on a map where I confirmed had the problem and reset all configuration changes back to default DK2. I did manage to reproduce it, although it was difficult because I don't really understand much about what causes the bug for sure. But it is there in vanilla DK2 too.

Thing is, I didn't know this glitch existed either and I played this game non-stop when I first got into it and kept playing it until, well I guess I'm still playing it although there were a few hiatuses. I only began to notice due to my patch ramping up the difficulty where decisions and resources actually mattered. That's when I started noticing strange instances where I seemed to have unreasonably low gold. I started paying attention to it more from then on.

Did you know about the Workshop Glitch? I guess it's more of a manufacture glitch. Basically, the first item you manufacture will set the precedent for all future manufacture items. Everything after it will have its manufacture cost overwritten by the first item manufactured, so you can increase your manufacture rate by building a Wooden Door or Barricade first, but also decrease it by building a Magic Door first. I never knew this glitch existed because in vanilla DK2, manufacture rates of creatures is relatively high, but I lowered it in the patch, so then I started to notice the problem. It exists in every version too, or at least in 1.3 and 1.7, so it's probably safe to assume every version.

Speaking of which, I still have no idea how researching works. Research values don't quite do what you'd think they'd do but they definitely do something, I just don't know exactly what. Found out about that because at one point the patch had Salamanders with a research value of 1, and while Warlocks had a research value of 10, a group of like 5-8 Salamanders researched much, much faster. Funny that.

Re: Looking for info on a bug - Imps will preference the DH to store gold and overloa

Wow. That game sounds like it's been programmed like the avarage present day Bethesda Studios title. In other word with duct tape and prayer. It is highly likely i havent noticed these bugs and theyve been happening to me. Being a developer now myself i cant help but think releasing a game with such glaring faults even at that time, no especially at that time is just shameful. These are things we get during this early stage in development in LoN and look to squash such bugs even now. How could this have ever gotten through?

Re: Looking for info on a bug - Imps will preference the DH to store gold and overloa

Originally Posted by DBlac

Wow. That game sounds like it's been programmed like the avarage present day Bethesda Studios title. In other word with duct tape and prayer. It is highly likely i havent noticed these bugs and theyve been happening to me. Being a developer now myself i cant help but think releasing a game with such glaring faults even at that time, no especially at that time is just shameful. These are things we get during this early stage in development in LoN and look to squash such bugs even now. How could this have ever gotten through?

I'm pretty sure DK2 was rushed / generally uncared for. There's a lot of crap like this. Like my favorite example to demonstrate the laziness of the programming is how the Barricade is literally just a door that defaults to locked and projectiles go through it completely (similar to an open door).

Re: Looking for info on a bug - Imps will preference the DH to store gold and overloa

MGR, for what its worth, I noticed that behavior patters are at least somewhat connected to the map layout itself. Similar to how imps will mindlessly dig on a gem deposit even if AI has already maximized treasury. As a result AI stales, and just digs gold, doesnt even build hatchery or layer.

I noticed that sometimes shifting shit around may be beneficial. I noticed that single patches of gold are treated poorly by the engine, but larger patches are recognized more easily. Also gold put on the border of the map is frequently ignored, but gold closer to the mid are is recognized rather well (except of the very center of the map, that is also somehow ignored).

I like the Swiss Cheese map, problably my all time favorite. It presents several issues: Green keeper never develops but runs for portals, and never digs out his gold. yellow develops fairly well, ignores mid, goes for portals. Blue turtles, and joins the portal rush last, and usually rekks both green and yellow. I remember messing around A LOT in SC, and I remember getting it to the state where all 3 AIs acted naturally, and the game was infinitely more fun to play. It was all in proximity: where gold is, how far portals are, etc. I changed layout through trial and error, and the game became much better. I even ended up losing once, which was an amazing surprise, as AI NEVER digs up to you first on that map.

Re: Looking for info on a bug - Imps will preference the DH to store gold and overloa

It would explain why I've seen the bug on particular maps but not quite others as much. I've always dreaded having to get this in depth working with the AI, but I guess that's really the next step to mapmaking. I noticed this myself a bit with the remake of Level 9, I had that intro cutscene with the Heroes battling a Keeper but the outcome would become significantly different if I ever did tweaks on the map and I'd have to rebalance the whole thing, it sucked.

Both Skarok and I also noticed differences in Keeper behavior based on who was playing. We'd run test to see what the AI does if the player has no input, and it was always the same thing for one player, but it would still be different for another player.

I'll have to keep a close eye on Imp behavior during tests throughout the production of new maps. It's still possible that there's specific ingame conditions / sequences triggering the bug that I just haven't managed to pin down.