[Fixed] 'Height' bug in .DT1

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

User avatar
jetaman
Hosted Forum Moderator
Champion of the Light
Posts: 318
Joined: Sat Jul 18, 2015 7:00 pm
Location: Ukraine
Ukraine

Hand-picked

[Fixed] 'Height' bug in .DT1

Post by jetaman » Sat Mar 31, 2018 3:07 pm

Hey guys,
I need some help from coders. So, basically, my problem is that when I create new .DT1's and open them in DS1 Editor some of the tiles are cut on top, however in game they are displayed normally.

Image


I found the problem and managed to fix it. The problem is in the "Height" of the wall tile. The values that is generated is always higher than it should be. (the lower the values = the higher box, the higher the values=the lower the box). I fixed it by changing the byte to a lower value in Hex Editor. But now, I have to find all the tiles in Hex Editor and it's more than a hundred tiles, so doing it manually is gonna take me forever. Can someone write a script that finds these "Height" bytes values and fixes them to a defined lower values? Or another way of fixing it can be adding the "Height" and "Width" parameters to the .ini file of .dt1.

Image


P.S. oh and by the way - I'm doing this for the community. I'm preparing the release of all Arcanum tilesets for D2.

EDIT: I guess I would need a script something like this:
1.Skip 284 bytes
2.Decrease value by 'x' pixels
3.Skip 92 bytes
4.Decrease value by 'x' pixels
3.Skip 92 bytes
4.Decrease value by 'x' pixels
etc

The script must repeat this thing 'y' number of times. Y=number of tiles in the .dt1. The script can take this from 10C hex address. Again, I'm not a programmer, it's just how I imagine this might look like.
Last edited by jetaman on Sun Apr 01, 2018 3:55 pm, edited 1 time in total.

Hz133
Posts: 11
Joined: Fri Aug 26, 2016 5:04 am
Russia

Re: Fix the 'Height' bug in DT1

Post by Hz133 » Sun Apr 01, 2018 8:43 am

Something like this?
upd:
("open" button fixed)
You do not have the required permissions to view the files attached to this post.

User avatar
jetaman
Hosted Forum Moderator
Champion of the Light
Posts: 318
Joined: Sat Jul 18, 2015 7:00 pm
Location: Ukraine
Ukraine

Hand-picked

Re: Fix the 'Height' bug in DT1

Post by jetaman » Sun Apr 01, 2018 9:50 am

Thanks, it worked. You did a good job! I will soon release the first tileset.

P.S. Maybe its a good idea to Upload the tool on File Center.

User avatar
jetaman
Hosted Forum Moderator
Champion of the Light
Posts: 318
Joined: Sat Jul 18, 2015 7:00 pm
Location: Ukraine
Ukraine

Hand-picked

Re: Fix the 'Height' bug in DT1

Post by jetaman » Sun Apr 01, 2018 3:54 pm

It seems like I found the reason for the Height bug. The source .pcx image that you convert to .dt1 should have size in power of 32. In this case my image had 500 pixels height. I changed it to 512 px and the bug is gone :)

Return to “Code Editing”