Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Borked textures

A topic by Rudolpher created Apr 19, 2022 Views: 289 Replies: 5
Viewing posts 1 to 6

Any idea what might be causing this?

Initially had some issues importing textures due to default program for .py set to a text editor. However after fixing this and doing a fresh reinstall of Dungeon Keeper Gold GOG version + KeeperFX and redoing texture caching. it still looks like below. Static noise.

Developer

If I recall correctly, that means the "tmapa000.dat" files (in DK's /data/ directory) aren't properly being decompressed when they should be. So the editor is instead reading the RNC compressed versions, causing this static reading.

The editor usually decompresses these files but it may have trouble doing so if the DK directory has no write permissions. The problem is most likely that you've installed Dungeon Keeper to "C:/Program Files/" (Windows is fussy about that directory) and so this can be fixed if you move DK's directory elsewhere. There was supposed to be a write permissions error but maybe it didn't pop up.

If you like, you can check whether your tmapa000.dat files are still compressed by opening them in a Hex editor or Notepad and if the first three chars are: R N C, that means it's still a compressed file and Unearth hasn't successfully decompressed it.

The compression stuff was a big pain to deal with. There's a lot of compressed maps too, Unearth actually runs an external program from a subfolder (unearthdata\rnc-decompressor\dernc.exe) for each compressed file, since the algorithms were too difficult for me to rewrite.

(3 edits)

Thank you for the thorough response!

I tried moving it to C:\Dungeon Keeper\, running Unearth+dernc as admin, and changing security settings giving full access to user/authenticated. However it still fails for both GOLD and FX:

Keeper FX: tmapa000, 001, 004, 005, 006 (All start with RNC / 52 4E 43)

"C:/Dungeon Keeper/FX/DATA/tmapa000.dat": 1469381268,

"C:/Dungeon Keeper/FX/DATA/tmapa001.dat": 1469381270,

"C:/Dungeon Keeper/FX/DATA/tmapa002.dat": 1469381270,

"C:/Dungeon Keeper/FX/DATA/tmapa003.dat": 1469381272,

"C:/Dungeon Keeper/FX/DATA/tmapa004.dat": 1469381275,

"C:/Dungeon Keeper/FX/DATA/tmapa005.dat": 1469381277,

"C:/Dungeon Keeper/FX/DATA/tmapa006.dat": 1469381278,

"C:/Dungeon Keeper/FX/DATA/tmapa007.dat": 1469381279


Gold: tmapa000, 001, 002 (Forgot to check, assume they start with RNC as well)

"C:/Dungeon Keeper/Gold/DATA/TMAPA000.DAT": 1650580993,

"C:/Dungeon Keeper/Gold/DATA/TMAPA001.DAT": 1650580992,

"C:/Dungeon Keeper/Gold/DATA/TMAPA002.DAT": 1650580993,

"C:/Dungeon Keeper/Gold/DATA/TMAPA003.DAT": 1650580993,

"C:/Dungeon Keeper/Gold/DATA/TMAPA004.DAT": 1650580993,

"C:/Dungeon Keeper/Gold/DATA/TMAPA005.DAT": 1650580993,

"C:/Dungeon Keeper/Gold/DATA/TMAPA006.DAT": 1650580992,

"C:/Dungeon Keeper/Gold/DATA/TMAPA007.DAT": 1650580992


GOG is set to automatically update Dungeon Keeper GOLD(Redownloaded to test), and KeeperFX is v0.4.8 build 2154.

PS: Could Python affect this, and if so which version is recommended?

Developer

I don't think Python has anything to do with anything. The editor is written in Godot's GDScript and dernc.exe was written in C.

There could be some very obscure reason why dernc.exe isn't working for you. What version of Windows are you using? One idea is to try using the dernc.exe executable by itself to see if that works. In command line (Run -> cmd) you use it very simply like so:

"C:\directory\dernc.exe" "C:\directory\TMAPA000.DAT"

But for now, to get the editor up and working, you simply need some decompressed TMAPA files. The latest alpha of KeeperFX supplies them decompressed already.
https://keeperklan.com/threads/7239-KeeperFX-Test-builds-for-version-0-4-9
https://keeperfx-loobinex.keeperklan.com/alphabuilds/
Since you have 0.4.8 you'd have to install keeperfx_0_4_9_alpha_2215.7z then fx_alpha_2696_from_2215.zip, which as of writing this post is the latest.

If there's a reason you don't want to install the latest KeeperFX, you can simply copy the tmapa files from fx_alpha_2696_from_2215.zip into your DK's /data/ directory, replacing the old ones. By the way these files only contain texture map tilesets, nothing more. I just remembered you can also tell if a tmapa file is decompressed by whether it's 544KB or not.

Developer (1 edit)

If you've got multiple DK directories you might also need to reselect the game executable (Settings->Game executable) so the editor knows which /data/ directory to look inside.

Wasn't aware of the 0.4.9 release, much appreciated! That solved the texture issue.

Tried running dernc manually on the old KeeperFX and Gold install, and it successfully decompressed the texture files that previously failed. I've ran Unearth outside Program Files and a folder structure without spaces or special characters, but that didn't help. It's always the same files that fails to decompress.


The only reason I asked about Python was because a text editor was set as default for .py files, and it opened when running decompression through Unearth the first time. My setup with Python is quite unorthodox, so figured it might be the issue.