Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Replace textures and sprites

  
  1. #1

    Default Replace textures and sprites

    Anyone know if this is possible without re-compiling KeeperFX? On the website under "Sources of graphics files" it says to place the texture-files in the KeeperFX repository and invoke "make pkg-gfx" before "make package". I've checked the source-files just briefly and it's not really that clear were to put them but if I would guess it'd be the pkg-folder? However anyone know if it's possible to just re-pack the textures and replace some dat-file in the game? The make-commands seem to imply it's not possible but there's not that much documentation to go on.

  2. #2
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,242

    Default Re: Replace textures and sprites

    Quote Originally Posted by Daver690 View Post
    Anyone know if this is possible without re-compiling KeeperFX? On the website under "Sources of graphics files" it says to place the texture-files in the KeeperFX repository and invoke "make pkg-gfx" before "make package".
    You don't have to recompile KeeperFX source code, but some of the tools have to be compiled to convert files with "make pkg-gfx". So - you do need a compile environment (mingw and other tools) to be set up. If you will invoke only "make pkg-gfx", then the "pkg" folder will only be filled with the created GFX files.

    If you don't want that, then download precompiled tools - then you can generate each file by hand, you don't even have to download KeeperFX sources. Note that these are console tools, no GUI.

    Quote Originally Posted by Daver690 View Post
    I've checked the source-files just briefly and it's not really that clear were to put them but if I would guess it'd be the pkg-folder?
    well, maybe I should be more clear: if you want to place GFX sources into KeeperFX sources, place them into "gfx" folder, on the same level where "src", "lib", "pkg" and other folders are.
    If you're going to use pre-compiled tools, this doesn't matter - you will have to type the commands by yourself anyway, so you may use any directories you want (i guess having everything in one directory saves a lot of typing, so is better). Running tools without parameters will force them to show some basic help.

    Quote Originally Posted by Daver690 View Post
    anyone know if it's possible to just re-pack the textures and replace some dat-file in the game?
    Yes, you may generate a single file with pre-compiled tools i mentioned earlier.

    To recompile textures, use the commands below:
    Code:
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa000.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa000.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa001.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa001.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa002.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa002.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa003.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa003.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa004.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa004.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa005.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa005.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa006.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa006.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa007.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa007.txt"
    The palette.dat file should be a copy of "gfx/palettes/engine.pal" (or you may just replace the file name in command lines).
    Last edited by mefistotelis; August 17th, 2014 at 22:51.

  3. #3

    Default Re: Replace textures and sprites

    Thanks for the detailed answer!

    Quote Originally Posted by mefistotelis View Post
    Yes, you may generate a single file with pre-compiled tools i mentioned earlier.

    To recompile textures, use the commands below:
    Code:
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa000.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa000.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa001.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa001.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa002.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa002.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa003.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa003.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa004.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa004.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa005.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa005.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa006.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa006.txt"
    tools/pngpal2raw/bin/pngpal2raw.exe -b -o "pkg/data/tmapa007.dat" -p "pkg/data/palette.dat" -f raw -l 0 "gfx/textures-32/filelist_tmapa007.txt"
    The palette.dat file should be a copy of "gfx/palettes/engine.pal" (or you may just replace the file name in command lines).
    I was hoping for some tool to convert the textures directly to a file that you can replace the in the installed Dungeon Keeper-game folder. But I assume engine.pal is compiled into keeperfx.exe or some other package as I can't find it in the game-folder?

    I'm pretty familiar with programming so I guess the easiest way is to just brush up on C. Hopefully I'll find some time to do that. It's really impressive what you've done

  4. #4
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,242

    Default Re: Replace textures and sprites

    Quote Originally Posted by Daver690 View Post
    I was hoping for some tool to convert the textures directly to a file that you can replace the in the installed Dungeon Keeper-game folder.
    Yes, you can do exactly that with the command lines I provided.

    Quote Originally Posted by Daver690 View Post
    But I assume engine.pal is compiled into keeperfx.exe or some other package as I can't find it in the game-folder?
    No, I mentioned in the instruction where to get that file:
    Quote Originally Posted by mefistotelis View Post
    The palette.dat file should be a copy of "gfx/palettes/engine.pal" (or you may just replace the file name in command lines).
    It can also be found in complete release of KeeperFX.

    Quote Originally Posted by Daver690 View Post
    I'm pretty familiar with programming so I guess the easiest way is to just brush up on C. Hopefully I'll find some time to do that. It's really impressive what you've done
    Sure, you can do that. I don't have any instructions explicitly for building graphics tools, but for building KeeperFX itself here's one:
    https://code.google.com/p/keeperfx/s...structions.txt
    (there is also a thread here on the forum with build instructions)

  5. #5

    Default Re: Replace textures and sprites

    Sorry for the late reply. I went on my vacation some time after my last post and have been away for some weeks. I'm mostly interested in playing around with the textures for now so I guess I'll give it some tries just replacing those.

    I tried to run the first pngpal2raw.exe-command but it says "This format supports only one input file name." and no output-file is created. Running with -v it shows a list of all the files in filelist_tmapa000.txt so it seems to be doing something.

    Just what I get, I downloaded the KeeperFX tools, then created a folder called test and put the engine.pal- and filelist_tmapa000.txt-file from the gfx_sources_v9 there (I've also tried running it with a copy of the PNG-files in filelist_tmapa000.txt in the same folder as that file seem to be making relative references to those):

    Spoiler



    I checked the arguments for pngpal2raw.exe and the file "tmapa000.dat" is the output-file you copy to your data-folder in Dungeon Keeper, right? But is engine.pal/palette.dat all the packed PNG-images? How would you change a texture, is there another tool to convert the PNGs to DAT like png2bestpal.exe? I tried running it with filelist_tmapa000.txt as input-file but it just freezes without printing anything or creating an output-file.

    It's a little confusing it says output-format RAW, but I want a DAT-file? I tried just changing RAW to DAT but then I get no error or output-file. Just typing "test" as output-format gives the same result so I guess it's just not supported.

    Also, how do you generally change any texture in the game? I checked the files filelist_tmapa000.txt 1-7 and they seem to reference the PNG-files in the textures-32-folder. I'm assuming those PNG-files go in the DAT-files with the same names tmapa000.dat 1-7? For example if you want to replace a sprite can you use the file "/sprites/animlist.txt"? It seem to reference all the TXT-files that in turn reference the PNG-files for all sprites. However what would be the output-file? I can't find a DAT-file in the Dungeon Keeper-install folder with a name similar to sprite or animlist.

  6. #6
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,242

    Default Re: Replace textures and sprites

    Your command line seem OK, looks like the tools I put on the site may be outdated. I will update them.

    On specific map, texture is selected by entry in .inf file - it has only one byte, which is the texture number.

    Sprites format (generated from "/sprites/animlist.txt") is JTY. The output file is creature.jty/.tab.

    EDIT:
    The package is now updated.
    Last edited by mefistotelis; September 29th, 2014 at 07:22.

  7. #7

    Default Re: Replace textures and sprites

    Cool, thanks for the update. I managed to draw on one of the textures and successfully import it into the game.

    I'm having a little trouble with the sprites. I noticed the -m argument for a list of animations that sounds right as well as -t for the ouput tab-file. I tried running with this:

    C:\David\Mods\DungeonKeeper\keeperfx_toolspkg>pngp al2raw.exe -v -m -t "test\creature.tab" -p "test\engine.pal" -f raw -l 0 "C:\David\Mods\DungeonKeepe
    r\gfx_sources_v9\sprites\animlist.txt"

    It shows that it works with all the images for the sprites with -v then ends with "Saving RAW file "r1frame01.raw"." which is the only file it creates. I also tried adding -o "test\creature.jty" in addition to "test\creature.tab" but then I just get an jty-file. I'm not sure how it's suppose to work?

  8. #8
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,242

    Default Re: Replace textures and sprites

    To build JTY, you have to set different format (-f):

    pngpal2raw -m -o "output.jty" -p "palette.dat" -f jspr -l 0 "animlist.txt"

  9. #9

    Default Re: Replace textures and sprites

    Cool, everything works perfectly. Thanks for all the help!

  10. #10
    Ghost
    Join Date
    Sep 2009
    Location
    Holland
    Posts
    392

    Default Re: Replace textures and sprites

    So, what are you actually doing with this Daver?

    Show some screenshots!

Similar Threads

  1. Adikted and map textures
    By Hades in forum KeeperFX
    Replies: 1
    Last Post: April 14th, 2013, 08:31
  2. Dungeon Keeper Resources (Sprites/Sounds/Animations)
    By Keepingates in forum Dungeon Keeper 1
    Replies: 5
    Last Post: December 21st, 2010, 06:42
  3. Fefnir from MMZ in Mega Man X 1-3 Style Sprites
    By Metal Gear Rex in forum Off Topic
    Replies: 0
    Last Post: May 12th, 2010, 05:48
  4. Hi Res Textures?
    By Synesthesia in forum Dungeon Keeper 2
    Replies: 18
    Last Post: October 7th, 2009, 22:22

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •