DM2 out of memory or corrupted Dungeon.dat?

Chat about "The Legend of Skullkeep", the true sequel to the original Dungeon Master.
This forum may contain spoilers.
Forum rules
Please read the Forum rules and policies before posting.
Post Reply
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

Hello. I used the tools of kentaro to make my own levels, I didn't do too much. On DM2GDED I added 2 floor ornaments, 6 creatures with their own new sprites and 2 weapons. With DMDC2 I expanded a little 2 existing maps and added new maps up to Map 50. When I start I get this and it freezes on beginning

http://i.imgur.com/N0ZPwAI.jpg

I wondered if the Graphics.dat had problems like I added the images that dont use correct game palette. But when I use original dungeon.dat and still my own graphics.dat, there is no such problem. Also when I start modifying and adding my own stuff to a fresh and original dungeon.dat, there is no problem. But when I finished all, this happens. I've tried added boxes of walls to make the maps 50 and there is no problem, so this corruption happens.. I noticed when I did not set properly 2 teleporters the game could freeze on start so I wonder if this is an error, or really out of memory.

DMDC2 needs badly an option like DM2GDED to import as .bin or copy-paste map if possible. I had to redo my whole dungeon.dat with all maps thinking this would fix it but it doesnt. I dont wanna remake whole maps again, copy-paste is really needed.

Oh and - do you know if I can add another landscape besides the void,cave,dungeon, grass? And since the Void is blank and uses Floor ornaments, how can I change the void to use another set of floor ornaments? what is the hex value that directs to use the blueish blob floor ornaments?
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

I redid the maps again with no other objects and it works fine, started adding some objects so far I don't get this freeze anymore. Though importing maps from file to file is good feature to add and knowing about the void 'ornaments'
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

Did you know, now it works if you add a new custom Dungeon which so far had to be up to 05. I added my own custom 06 07 and 08 in Graphics.dat and they work without a problem. Also I solved the question how to 'decorate' the Void. in the 00 under Dungeon Graphics there is an entry 6B 00 00 with the value 8028. 28 is also the hex code used for the void decoration that is found in 'Floor ornates'. I created a 51 or whichever next number in the Floor ornates and set the value of 6B 00 00 in the Void 2 (duplicated custom dungeon) into 8051 last 2 digits being the hex id in the floor ornate. Now I have the blue blob void and a new void.
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

I will be documenting a few more things, if I have a Q i will ask in a visible way

Hex Entry 00 00 00 (Weapons) in DM2GDED

Old version of DM2GDED had 'Flags' next to 00 00 00 and it was easier to understand you could set some properties there. Now this is just 'Word value'

old version's selections
Image

You can use these numbers to add properties and if you add e.g 1010 or 8010 or 9010 if you have 10 in the end, you will enable Light (emitting light). In the new version the value has to be a Sum of $'s from this picture. Not sure what $1000 and $8000 are for but an item that has Word value 11 in the end should be Drinkable and Light ($0001 + $0010). Some items have 9010 which is the selected you see.
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

Never mind the above, does anyone know what has to be set (hex edit or with dm2gded) to make a custom missile do damage? I made few custom missiles but when I set them in PA to that unused number e.g PA5 it deals no damage to enemies even if I change some stats within the Command of the weapon that will cast this missile (im clearly posting to myself here but in case..)
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by Gambit37 »

Hi! I think you're the only person here doing any active experiments with DM2. Sorry I can't help.

There were a couple of other developers looking at this stuff years ago but I don't think they are still active on the forum.
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

That is fine, I will leave this question open if they return. I'm having a Q only about missiles (http://dmweb.free.fr/?q=node/217#toc102 doesn't show me correct Hex code to add damage, until then I will use existing missiles or it seems Missile 01 is the only one that can do damage). And it would be good if their DM2GDED had the latest flags and findings because the 2014 version they added explanations to the missing values and to the 2015 version they added some list of creatures but did not include all the descriptions from the 2014 version, including flags. I will have some DM2 to mod, then I will be away also, this is not an active game and I used enough time on it :)
User avatar
Sphenx
On Master
Posts: 566
Joined: Sun Sep 09, 2001 11:23 am
Contact:

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by Sphenx »

Hi RPGmc72, there are quite a lot of questions :)
I need to check all of this before giving you precise answers.

For adding a spell, it is not that easy. What you see in graphics.dat is data related to hardcoded spells, so what you add in category 0D is not ready to be usable. The PA references that hardcoded table.
I worked for some time on Kentaro's SKWin to add a custom category (02) that holds data for spells.

By the way, you can get quite info by looking at the source code of DM2GDED and SKWin.

Keep in touch, I hope we'll be able to help you ;)
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

Hi and thanks for replying I know you're one of the heavy modders of this game. My original Q was a crash because I used teleporters on Map 0, I do not need to use such anyway. Now my only questions are for:

- why custom missile doesn't do damage and why potions also if you create a new one, it won't have any effect if you use Drink command. I wanted to have an ability from staff with some potion abilities (like anti-poison) but they only using command 'Drink' or such. I suppose all have the same explanation as you said more things are needed.

I can be around to look and update if you know something about these but dont sweat it too much, as I just have finishing things to do on this game.
User avatar
Sphenx
On Master
Posts: 566
Joined: Sun Sep 09, 2001 11:23 am
Contact:

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by Sphenx »

About the Anti Poison effect, you cannot currently do what you want with the DM2 retail version because of hard coded behavior.

First, the only existing castable spell is the Potion Creation Spell :

Image

There is not (yet) a spell directly executing the Anti Poison effect. That would need changes in skwin.

Secondly, the Potions effects are hard-coded depending on the Potion ID; It means that the DRINK command tests which ID of potion you are drinking to know which effect to apply; the effect is not indicated into the graphics.dat ...
In that case, it is only when you drink the Potion 0x0A (10) which is AntiVenin that you will trigger the Cure Poison effect.

I need to modify skwin to allow more flexible potion behavior.
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

I dont mind if I could make potion creation without having to click every rune which is why such spell is needed, at least is better than not able to create at all. This value 06 00 00 is for the item's animation i dont know how it shows as transform to potion. I tried duplicating an anti-poison potion but since the ID is not the same as the original potion, it doesn't detect it. I guess the same is for missiles, each missile has some ID to apply the damage. (the link above that I posted with which Hex code value is which item data, is only for DM1? I tried finding where such code that tells it what potion effect or missile damage but it may not be in the graphics file, im not a programmer to know exactly)

The original topic question - Ive placed not more than 10 teleporters and 15-20 activators/actuators but these activators are responsible for the freezes. It is like Dungeon.dat cannot accept more than a number of actuators or the game freezes on main menu and corrupts the Dungeon.dat. If not backing up all would have to be remade, cause even removing the corrupting actuator would not fix a corrupted file. With that, there isn't much room to do anything more than placing creatures, objects and maps, and only a few additional activators, all because of bad dungeon.dat structure. I cant even make a new shop like that cause at the first newly added activator, it freezes the game at the main menu, not because my values are incorrect :/ So just a little mroe with DM2, though if something new comes up with the items or spells or potions I could test.
User avatar
Sphenx
On Master
Posts: 566
Joined: Sun Sep 09, 2001 11:23 am
Contact:

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by Sphenx »

I did not try, maybe you can have a staff that triggers the "Create AntiVenin Potion", but I guess that would require to have an empty flask in hand to work. Have you tried that ?
The item itself (assuming of "weapon" category) won't turn into a potion which is a different type of item.
The "Create AntiVenin Potion" effect will search the Champion's hands for an empty flask to work.

The missile list (PA) is hard coded. Here it is:
0 - Fireball
1 - Poison Blob (not used)
2 - Lightning Bolt
3 - Dispell
4 - Zo Spell
5 - Fuse (not used)
6 - Poison Bolt
7 - Poison Cloud
9 - Push
10 - Pull
13 - Zo Spell 2 (?)
14 - Reflector
40 - Dust Cloud
48 - Thunder Bolt (normally triggered during a storm)
49 - Shock Lightning
68 - Fireball 2 (?)
100 - Explosion (?)
101 - (?)

The game engine rely on that list to know which effect to apply : effects are not in the graphics.dat

For your corrupted dungeon.dat, I would like to have it to check. You can PM me for that.
I wonder if you are using the special version of DMDC2 that extends the item category database (normally limited to 1022 per category) while using it with DM2 PC version which has then the limitation. That could be a reason.
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

I dont have 'transform flask to potion' spell or command to turn empty flask into anti-poison. Im saying in dm2gded the 06 00 00 value is for icon animation, it looks different on your image.

Ypu are saying the values in Dec, im saying them in Hex. 01 is single damage missile that can be used for custom missile. I was looking for another unused like that, that can also create a cloud like Poison Cloud or another Poison Bolt. If there was a hex value that can set a custom missile to deal the damage and effects (e.g showing cloud of poison cloud) basing the values on existing damage values, perhaps a custom missile could be set with the same effects, The idea is to add same type without replacing existing bolts and thunder. Maybe it cant be done yet.

The Dungeon.dat is biggest problem, it is not corrupted yet, unless I put another activator or alike. I use the version from here https://github.com/gbsphenx/skproject/releases, i dont use Unlimited mode. You can get the file from here. It has extra maps, custom dungeon data and creatures in graphics files but if you add in existing first maps, also can freeze the game at start. Im giving it without graphics file, you can try the game with it and after adding an actuator, the freeze will not be caused by the missing graphics files, as I have this problem when my graphics file is here.
User avatar
Sphenx
On Master
Posts: 566
Joined: Sun Sep 09, 2001 11:23 am
Contact:

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by Sphenx »

RPGmc72 wrote:Im saying in dm2gded the 06 00 00 value is for icon animation, it looks different on your image.
I was not showing a potion (category 0x13) but a custom spell definition (category 0x02). The 06 00 00 here tells the type of spell among four possible types : "create potion", "shoot spell", "summon creature" and "enchantment".
As a reminder, this custom category only works with SKWinSpx engine, not retail version. It aims at removing the hardcoded definitions towards graphics.dat; spell definitions and creatures AI/Infos currently are the 2 custom categories.
RPGmc72 wrote: Did you know, now it works if you add a new custom Dungeon which so far had to be up to 05. I added my own custom 06 07 and 08 in Graphics.dat and they work without a problem. Also I solved the question how to 'decorate' the Void. in the 00 under Dungeon Graphics there is an entry 6B 00 00 with the value 8028. 28 is also the hex code used for the void decoration that is found in 'Floor ornates'. I created a 51 or whichever next number in the Floor ornates and set the value of 6B 00 00 in the Void 2 (duplicated custom dungeon) into 8051 last 2 digits being the hex id in the floor ornate. Now I have the blue blob void and a new void.
Thanks for the info, I did not know that!
As a complement, 6A 00 00 entry tells that if you fall into a pit, it will send you randomly at one place among predefined locations.
These predefined locations are marked by the floor simple actuator (Category 2) value 0x5800. You have one in the cemetery and the other in the Dark Vexirks room.
RPGmc72 wrote:The Dungeon.dat is biggest problem, it is not corrupted yet, unless I put another activator or alike.
I had a look at this. I think the biggest problem is that you exceeded the limit of possible actuators (1022, structural limitation) as there were a 1023 and 1024. One was at the extended map 21 at south of the false wall.
But the removing function from DMDC2 does not really work on this at it keeps it in the data marked as unused. So standard limit is still exceeded and the DM2 engine does not like that.
I'm sorry I can't fix it now; I would need some time to build a feature to properly remove items.
Unfortunately, if you are starting from Skullkeep dungeon.dat, you can't really add actuators as they are already at max.
We did start some work for Extended Database, but I don't remember how far we were.
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

Sphenx wrote: Thanks for the info, I did not know that!
As a complement, 6A 00 00 entry tells that if you fall into a pit, it will send you randomly at one place among predefined locations.
These predefined locations are marked by the floor simple actuator (Category 2) value 0x5800. You have one in the cemetery and the other in the Dark Vexirks room.
Thanks, I never knew how the void works and I thought pits have to be above other maps to fall into a possible place to fall, like it works with other pits, my map is thus above the cemetery. It had some weird things where some pits would open randomly at different location but I added floors to allow pit-free passages, it made it more interesting with the random pits, though. Also falls into the cemetery or the vexirks room, im fine with it.

That's ok if I can't add an anti-poison or other potion spell with the retail game, or new missiles. I did all I intended on this game anyway, i'll post a gif with some of the new custom places when I get some images as a showcase.


What is the most important things to do if possible, and I wonder if I can fix them with my Dungeon.dat (cause I wont be remaking things again this is my 3rd rmk:

1 - is there a way to make an item, for the cost of e.g 1 red gem (or other) when placed at the table for selling to shop keeper, (merchant) shop keeper to take the item + gem and return FULL CHARGED item. Maybe an ingredient way like the Cauldron at Vex's room - what is a way to item recharge? I tried once but didnt do it right. Someone posted that Thicket Thief when he steals items, they recharge but for DM2 PC they dont.

2 - Trying to make at least one more shop system - The thing is, even if I remove Actuators to 'free memory' - I did so by turning cross-scene teleporters into 1 teleporter to save their count but it seems once placed, it doesn't work to free space. Otherwise I could have removed some to make at least 1 shop but I think removing others does not help but i may be wrong. I needed mostly Actuators to do 1 Shop and it uses lots of activators - for Shop Exhibition, Item Recycler from Map 29, etc, I cant place them without the game freezing. If you know that it can be made work by removing some Actuators, I can try again. Otherwise having items that are near shop keeper makes it pointless,
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

Maybe I answered some part of Q-2, I removed some actuators and could add some of my own. But the shop is not working. I duplicated the magic merchant to make a custom merchant. added new items to him in graphics.dat, added all actuators used for a shop (map 29 an item recycler with new custom merchant right after the Magic Merchant), new teleport at map 29 to send it to, and thanks to this the items are not at the floor, he collected them. But he does some weird animation at the table and doesn't place items on the table. I added Shop exhibitions and all related actuators like in Map 18. I correctly set map locations for them. What's wrong with it? Are the items or his AI hard coded so custom items cannot be used for custom merchant and he only accepts regular items? Never mind that shop exhibition is showing wrong items (the weapons from the first shops)
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

Here is a new link. You can see Map 47 and Map 29, im doing shops with exact activators, only skipping the ones for fire trap switches.
RPGmc72
Novice
Posts: 20
Joined: Wed Jul 13, 2016 8:20 am

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by RPGmc72 »

If even that can't be made a custom shop keeper (duplicate magic merchanet) with added items in graphics.dat, added actuators in dm2 and placed items to work properly, I will just use some ingredient system like items at Cauldron to imitate a shop or recharge item when combined with gems. which is the other I needed. Afterall why use more time on such things, here is what changes I made and almost finalizations:

http://i.imgur.com/5WDRMzg.gifv
User avatar
Sphenx
On Master
Posts: 566
Joined: Sun Sep 09, 2001 11:23 am
Contact:

Re: DM2 out of memory or corrupted Dungeon.dat?

Post by Sphenx »

I like the screenshots; I can see we have some ideas in common for custom DM2 ;-) ....
I'm currently trying to see if I can solve the dungeon.dat corruption because of items limit.
Post Reply

Return to “Dungeon Master II: The Legend of Skullkeep (DM2)”