Thursday, October 5, 2023

Dark forces edit/mod

TLDR: png -> BM_converter.exe -> gobtool.py -> mods/texture/TEXTURE.GOB

I noticed a texture seemed odd. 

I thought it might be a glitch, I went back and checked the mac version in sheepsaver, and it shows there too.
 
 It is that way in a map editor wdfuse. 

 Given it's name, ZPMARBB1.BM, I guess it is "marble" something.

I grabbed a marble looking image from the internet. and saved it as 256x256 PNG, and imported it into "BM_Converter.exe" found on df-21.net

Next to create a TEXTURE.GOB with the file in it was a bit tricky. I found some python scripts to do it, https://github.com/njankowski/dftools , The documentation seems wrong


D:\Games\TheForceEngine-v1.09.530\dftools-master>python gobtool.py archive "TEXTURES.GOB" "..\TEXTURES"
Archiving "D:\Games\TheForceEngine-v1.09.530\dftools-master\TEXTURES.GOB" into GOB "D:\Games\TheForceEngine-v1.09.530\TEXTURES"
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 66, in <module>
    main()
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 62, in main
    args.func(args)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 13, in archive
    entries = bulkrw.read_files(args.directory, args.recursive)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\util\bulkrw.py", line 23, in read_files
    for file in os.listdir(directory):
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'D:\\Games\\TheForceEngine-v1.09.530\\dftools-master\\TEXTURES.GOB'

D:\Games\TheForceEngine-v1.09.530\dftools-master>cd ..

D:\Games\TheForceEngine-v1.09.530>python dftools-master\gobtool.py archive "TEXTURES.GOB" "TEXTURES"
Archiving "D:\Games\TheForceEngine-v1.09.530\TEXTURES.GOB" into GOB "D:\Games\TheForceEngine-v1.09.530\TEXTURES"
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 66, in <module>
    main()
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 62, in main
    args.func(args)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 13, in archive
    entries = bulkrw.read_files(args.directory, args.recursive)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\util\bulkrw.py", line 23, in read_files
    for file in os.listdir(directory):
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'D:\\Games\\TheForceEngine-v1.09.530\\TEXTURES.GOB'

D:\Games\TheForceEngine-v1.09.530>python dftools-master\gobtool.py archive "TEXTURES.GOB" "TEXTURES"
Archiving "D:\Games\TheForceEngine-v1.09.530\TEXTURES.GOB" into GOB "D:\Games\TheForceEngine-v1.09.530\TEXTURES"
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 66, in <module>
    main()
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 62, in main
    args.func(args)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 13, in archive
    entries = bulkrw.read_files(args.directory, args.recursive)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\util\bulkrw.py", line 23, in read_files
    for file in os.listdir(directory):
NotADirectoryError: [WinError 267] The directory name is invalid: 'D:\\Games\\TheForceEngine-v1.09.530\\TEXTURES.GOB'

D:\Games\TheForceEngine-v1.09.530>python dftools-master\gobtool.py archive "TEXTURES" "TEXTURES.gob"
Archiving "D:\Games\TheForceEngine-v1.09.530\TEXTURES" into GOB "D:\Games\TheForceEngine-v1.09.530\TEXTURES.gob"
Done

D:\Games\TheForceEngine-v1.09.530>

It seems that the arguments for the "make a gob" section were backwards.

Placing the resultant TEXTURE.GOB into a new TheForceEngine-v1.09.530\Mods\textures folder

And it seems to load and work:
before reference

Now that I put that in I see the replacement texture everywhere in that level.


No comments:

Post a Comment