Distorted dt1 tiles in game

Post here for all aspects of map making and level design. Click here to visit the Keep's official map site, Diabolic Cartography.

Moderator: Paul Siramy

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Distorted dt1 tiles in game

Post by FIGURE- » Tue Jul 31, 2012 6:52 pm

Not expecting a reply, but posting just in case.
Recently edited the Northhouse1.ds1. This is one of the ds1s used in the frigid highlands. I edited the dt1mask to make it compatible with Harogath's building tiles.

Image

As you can see in the picture, the editor recognizes the building, but in game it looks like this:

Image

I don't understand it. I made sure the dt1mask is set to the right value, and I can tell it worked because the editor recognizes the tiles after I fixed the dt1mask, yet still it doesn't show up ingame.

Any help/suggestions?

Thanks!

User avatar
mirecek
Dark Alliance Beta Test
Arch-Angel
Posts: 1218
Joined: Sun Sep 11, 2005 10:04 am

Re: Distorted dt1 tiles in game

Post by mirecek » Wed Aug 01, 2012 12:05 pm

The green tiles appear because you use a tile that doesn't have a visual graphics loaded to that level. You need check your dt1 mask in lvlprest.txt (the mask is calculated from columns in lvltypes.txt).
"Each of those few chords separated by complete silence feels like a knife wound to the heart"

There is no greater sorrow than to recall happiness in times of misery. Draconian

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Wed Aug 01, 2012 12:38 pm

It should though, In lvlprest I'm sure I did everything right...

Image

I added the the buildingses ds1 to lvl prest and changed the dt1 mask as shown in the SS.
I added the dt1 to lvltypes in file 32. The dt1mask is calculated correctly too.

Image

I don't know what's up. I've done this before with the rogue encampment and it worked.
I don't know why it isn't working now though....

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Australia

Re: Distorted dt1 tiles in game

Post by Drac0 » Thu Aug 02, 2012 4:16 am

Actually, your Dt1Mask may be wrong. If you're just setting it to use file 32 it would be 2147483648, and to use all 32 files listed it would be 4294967295. Hope that helps.

Cheers

EDIT: copy & paste without copying first, real smart.....thanks BE.
Last edited by Drac0 on Thu Aug 02, 2012 7:10 am, edited 1 time in total.

User avatar
HarvestWombs
Senior Moderator
Arch-Angel
Posts: 1019
Joined: Wed May 25, 2011 11:50 pm
United States of America

Re: Distorted dt1 tiles in game

Post by HarvestWombs » Thu Aug 02, 2012 4:28 am

Drac0" wrote:Actually, your Dt1Mask may be wrong. If you're just setting it to use file 32 it would be 2147483648, and to use all 32 files listed it would be 2147483648. Hope that helps.

Cheers
Dt1Mask should be, 4294967295, if using all 32.
Official Phrozen Keep Discord
Common Modding tools: link
My Resource Packs: link

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Thu Aug 02, 2012 9:20 am

hmm... the original dt1mask is 404596787 so 4294967295+404596787 would be 4699564082
which doesn't work. I'm almost certain you have to add the 2, and just 4294967295 doesn't work either. Am I forgetting something?


Edit: okay, weird... I looked and the original lvltypes only used 12 files including mine
instead of 32 files. So the dt1mask should now be 4095+404596787 which is
404600882. Problem is, it still doesn't work...

User avatar
HarvestWombs
Senior Moderator
Arch-Angel
Posts: 1019
Joined: Wed May 25, 2011 11:50 pm
United States of America

Re: Distorted dt1 tiles in game

Post by HarvestWombs » Thu Aug 02, 2012 9:25 am

No, no, no. To get the Dt1 Mask multiply each column by 2, starting at 1.
So... 1, 2, 4, 8, 16, 32. and so on. However these are then added together.
Lets say you have 7 files but column 5 is left blank, 1, 2, 4, 8, 0, 32, 64, 128
Your end result is 1+2+4+8+0+32+64+128 = 239

You can also download the Dt1 Mask Calculator from the file center it will calculate exactly what I have given you.
Last edited by HarvestWombs on Thu Aug 02, 2012 10:06 am, edited 1 time in total.
Official Phrozen Keep Discord
Common Modding tools: link
My Resource Packs: link

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Australia

Re: Distorted dt1 tiles in game

Post by Drac0 » Thu Aug 02, 2012 9:49 am

Check the LvlTypes.txt file guide in my signature for details on correctly calculating the Dt1Mask.

User avatar
HarvestWombs
Senior Moderator
Arch-Angel
Posts: 1019
Joined: Wed May 25, 2011 11:50 pm
United States of America

Re: Distorted dt1 tiles in game

Post by HarvestWombs » Thu Aug 02, 2012 10:08 am

Drac0" wrote:Check the LvlTypes.txt file guide in my signature for details on correctly calculating the Dt1Mask.
:facepalm: yes i just explained this here. Also Purerage's example doesnt seem to work for me on certain numbers, like the example i posted above.
Official Phrozen Keep Discord
Common Modding tools: link
My Resource Packs: link

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Thu Aug 02, 2012 10:26 am

That IS the logic I'm using. The cell I'm using in lvltypes has files 1-12 being used including the dt1 I added for the building. That would mean that the dt1mask would be 1+2+4+8+16+32+64+128+256+512+1024+2048 which would equal 4095. The original dt1mask in lvlprest is 404596787, so if I read correctly in Paul's tutorial you would then have to add 4095 to 404596787...

User avatar
kingpin
Retired Admin
Cherub
Posts: 10954
Joined: Sat Jan 11, 2003 12:51 pm
Sweden

Hand-picked

Re: Distorted dt1 tiles in game

Post by kingpin » Thu Aug 02, 2012 10:43 am

32 bit mask would be: 4294967295, so what's told is correct.

Now, there is a limit how large mask you can use, and game don't allow use all 32. Have forgot what the cap are but you should even get a error message if I remember right, or in your d2log file.

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Australia

Re: Distorted dt1 tiles in game

Post by Drac0 » Thu Aug 02, 2012 10:51 am

FIGURE-" wrote:That IS the logic I'm using. The cell I'm using in lvltypes has files 1-12 being used including the dt1 I added for the building. That would mean that the dt1mask would be 1+2+4+8+16+32+64+128+256+512+1024+2048 which would equal 4095. The original dt1mask in lvlprest is 404596787, so if I read correctly in Paul's tutorial you would then have to add 4095 to 404596787...
You don't add to the existing mask, you need to replace it. So for the 12 files the mask is 4095, that's it. It's not added to anything else.

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Thu Aug 02, 2012 11:21 am

You don't add to the existing mask, you need to replace it. So for the 12 files the mask is 4095, that's it. It's not added to anything else.
Yeah I tried that already. Doesn't work either. Must be something else...

User avatar
mirecek
Dark Alliance Beta Test
Arch-Angel
Posts: 1218
Joined: Sun Sep 11, 2005 10:04 am

Re: Distorted dt1 tiles in game

Post by mirecek » Thu Aug 02, 2012 11:31 am

kingpin" wrote:Now, there is a limit how large mask you can use, and game don't allow use all 32. Have forgot what the cap are but you should even get a error message if I remember right, or in your d2log file.
Yeah, I remember reading somewehere about maximum of 27 (28?) tiles.
Drac0" wrote:You don't add to the existing mask, you need to replace it. So for the 12 files the mask is 4095, that's it. It's not added to anything else.
he HAS TO, if he wants to keep existing tiles AND to have new ones included in the ds1 he's opening
"Each of those few chords separated by complete silence feels like a knife wound to the heart"

There is no greater sorrow than to recall happiness in times of misery. Draconian

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Thu Aug 02, 2012 11:33 am

Ok, thought of an alternative. Instead of adding a dt1 and changing the dt1mask, can I instead just
swap an existing dt1 with the new one?

User avatar
Drac0
Retired staff
Angel
Posts: 589
Joined: Tue Sep 24, 2002 2:24 am
Location: Nowra NSW, Australia
Australia

Re: Distorted dt1 tiles in game

Post by Drac0 » Thu Aug 02, 2012 11:55 am

mirecek" wrote:
Drac0" wrote:You don't add to the existing mask, you need to replace it. So for the 12 files the mask is 4095, that's it. It's not added to anything else.
he HAS TO, if he wants to keep existing tiles AND to have new ones included in the ds1 he's opening
He doesn't as the total of 4095 includes the original 11 files (a total of 2047) PLUS the file he added (2048). All the files are included.
FIGURE-" wrote:Ok, thought of an alternative. Instead of adding a dt1 and changing the dt1mask, can I instead just swap an existing dt1 with the new one?
Yes, that would work but it would be a lot of work making sure all the tiles from the dt1 you replace are included correctly so you don't screw up other maps.

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Thu Aug 02, 2012 12:12 pm

Okay, this is the last thing I'll post to better explain the situation. I'll start from the beginning.

Frigid highlands uses multiple ds1s that contain the dt1s for the ruins folder. The ruins are those broken abandoned houses you find in the frigid highlands. My idea was to change these ruins into buildings taken from the house's dt1 in Harogath. The name of the dt1 for Harogath's houses is buildingses.dt1.

The name of the ruin I modified is called northhouse1.ds1. The first thing I did was edit this ds1 in win_ds1edit. I replaced the ruin with a a small house from harogath. The I edited lvltypes to include the buildingses.dt1 in the frigid highlands. The only unused file was 32. After it was added, I went to Lvlprest and changed the dt1mask to its correct value. 404596787 + some big number I cant remember. Everything should be okay now, the only thing left to do was pack it into a patch and test it, which I did and it didn't work. The editor shows the house without any distorted tilles while ingame it DOES show the distorted tiles. I've changed the dt1mask value so many times and it still doesn't work.

As kingpin said, I think it's because of some limit with how many files you can use. Only thing I can think of is maybe swapping buildingses.dt1 with the ruins dt1...
Yes, that would work but it would be a lot of work making sure all the tiles from the dt1 you replace are included correctly so you don't screw up other maps.
There's only one map that uses this dt1.

User avatar
mirecek
Dark Alliance Beta Test
Arch-Angel
Posts: 1218
Joined: Sun Sep 11, 2005 10:04 am

Re: Distorted dt1 tiles in game

Post by mirecek » Thu Aug 02, 2012 12:27 pm

I opened the unmodified lvlpres and it states 404596787 in mask.
That may be translated as 2^ ( 0,1,4,5,11,13,15,16,18,19,20,27,28 each in addition) so the houses are not using the first 12 entries as interpreted here (4096 or what) Maybe 12, but not the 0-11 ones.


because you add the 32th entry to the others, it will be 2^ (0,1,4.....27,28,32)

actual mask is 404596787

32th entry is 2^31 = 2147483648

sum = 2552080435

if that will not work, you have reached limit. But still, it shouldnt happen as you are using less than half of possible dt1.
"Each of those few chords separated by complete silence feels like a knife wound to the heart"

There is no greater sorrow than to recall happiness in times of misery. Draconian

User avatar
Eimernase
Junior Member
Paladin
Posts: 210
Joined: Tue Nov 30, 2004 7:13 pm
Location: Germany

Re: Distorted dt1 tiles in game

Post by Eimernase » Thu Aug 02, 2012 12:31 pm

the original dt1mask is 404.596.787
That means, that 14 dt1-files from lvltypes are here in use.

file 1, 3, 5, 6, 7, 12, 14, 16, 17, 19, 20, 21, 28, 29

If you add file 32 in leveltypes then you will get 2.552.080.435 as new mask


..mirecek was faster :lol:

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Thu Aug 02, 2012 12:54 pm

I opened the unmodified lvlpres and it states 404596787 in mask.
That may be translated as 2^ ( 0,1,4,5,11,13,15,16,18,19,20,27,28 each in addition) so the houses are not using the first 12 entries as interpreted here (4096 or what) Maybe 12, but not the 0-11 ones.


because you add the 32th entry to the others, it will be 2^ (0,1,4.....27,28,32)

actual mask is 404596787

32th entry is 2^31 = 2147483648

sum = 2552080435

if that will not work, you have reached limit. But still, it shouldnt happen as you are using less than half of possible dt1.


Are you sure you were looking at the right one? The entry has files 1-31 with dt1s unmodified and the name should be Act 5 - Barricade Ruins N. If so, this doesn't work. Swapping dt1s also doesn't work either. :(

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Thu Aug 02, 2012 1:12 pm

404596787 in binary should be 11000000111011010100000110011.
This means that it is using file 1,2,9,10,11,13,14,16,18,24,25,28,29
But dt1mask generator says that if the entry was using just those files it would be 427996931
which doesn't make any sense. I can only assume that my method of finding the files used is wrong.
Anyway, no number seems to work. Swapping dt1s doesn't seem to work either. I don't know what's wrong, but there doesn't seem to be any clear solution. I might need to move on with this idea. :(

User avatar
Eimernase
Junior Member
Paladin
Posts: 210
Joined: Tue Nov 30, 2004 7:13 pm
Location: Germany

Re: Distorted dt1 tiles in game

Post by Eimernase » Thu Aug 02, 2012 1:15 pm

He was at the right place and the mask from him is also correct.
Image

there are not only 1 for that in lvlprest, they need all this new mask.

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Thu Aug 02, 2012 1:52 pm

You mean every dt1mask that is 404596787 has to be the new mask that he calculated? If so, it didn't work.

User avatar
kingpin
Retired Admin
Cherub
Posts: 10954
Joined: Sat Jan 11, 2003 12:51 pm
Sweden

Hand-picked

Re: Distorted dt1 tiles in game

Post by kingpin » Thu Aug 02, 2012 3:55 pm

Do you really need all 32 files for that tile? lvltypes contains all for that group. But, for the map itself it's not necessary it uses every single file.

you could as test just use bit 32 as mask and see if your new part is loaded. That's best way to test if stuff you add works as it should before see what conflicts.

FIGURE-
Posts: 67
Joined: Sun Feb 28, 2010 11:04 pm

Re: Distorted dt1 tiles in game

Post by FIGURE- » Thu Aug 02, 2012 4:27 pm

I shortened it to use 12 files instead of 32. That would should change the dt1mask to either 4095,404600882,2165 or 404598952. None of them work.

Return to “Map Editing”