Tuesday, October 10, 2023

Force Engine - Mac data

Mac rendered at 640x480 apposed to Dos at 320xsomething

Maybe not 480, probably 400? Menu says 640x400...640x395 measured?

600x400 doubled pixels, so 300x200?

Anyway, 384x200 is "teensy":

Most parts are the same, but

  • the loading screen was 640x480
  • hud textures were double resolution 
  • weapons data stored in WEAPONS.GOB, but otherwise the same content
  • minor differences in levels
  • fonts smoother(extra Glowing!.fnt ?)
  • music same/different. music is stored in resource fork?
  • cutscenes: same except for AGENTMNU.LFD and MENU.LFD (font was upscaled, the button names were changed from "DOS" to "QUIT", and a mysterious widening of two parallel red lines.

 



The big changes below are not changes, just re-ordered arm1 <-> arm2 messages


Hotkeys, quit hotkey changed to qQ from dD

NARSHADA.O is missing an object(missing the remote sprite), and extra LOGIC: ANIM in nava card:



SECBASE.O only has an extra LOGIC: ANIM similar to the one in NARSHADA



TEXT.MSG is mac-ified:

The midi instruments are stored in instruments1,2, all in the resource fork(I think that is all that and menu/icon things are all the resource fork data):




instruments in 2 are roughly double the size of 1 so probably 16bit?

Stereo Panning? ... listens. It seems to work. dos version doesn't have an option for it, but it seems to work by default.

I don't know if there is a way to send the midi data out of the mac version, or if the instruments provided are all we get.

cutscenes (extracted with DF2.exe in dosbox, probably could have used lfdtool.py in win):

 

python ..\..\..\..\..\dftools-master\delttool.py AGENTDLG_11.DELT ..\AGENTMNU.PLT


MAC 324x182
Dos 323x188

I think I need some more context.

All the other AGENTDLG_##.DELT are just various menu ui bits, "are you sure you want to quit", "yes", "no" buttons and such.

AGENTMENU.ANIM
D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data\Cutscenes\AGENTMNU>python ..\..\..\..\dftools-master\animtool.py extract AGENTMNU.ANM AGENTMNU
Extracting "D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data\Cutscenes\AGENTMNU\AGENTMNU.ANM" into directory "D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data\Cutscenes\AGENTMNU\AGENTMNU"





Macified text.


D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data-dos\LFD\MENU>python ..\..\..\..\dftools-master\fnttool.py FONT8.FON
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\fnttool.py", line 4, in <module>
    from PIL import Image
ModuleNotFoundError: No module named 'PIL'

D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data-dos\LFD\MENU>pip install Pillow
Collecting Pillow
  Downloading Pillow-10.0.1-cp39-cp39-win_amd64.whl (2.5 MB)
     |████████████████████████████████| 2.5 MB 3.2 MB/s
Installing collected packages: Pillow
Successfully installed Pillow-10.0.1
WARNING: You are using pip version 21.0; however, version 23.2.1 is available.
You should consider upgrading via the 'c:\python39\python.exe -m pip install --upgrade pip' command.

D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data-dos\LFD\MENU>python ..\..\..\..\dftools-master\fnttool.py FONT8.FON
Loaded built-in palette "SECBASE"
Converting "D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data-dos\LFD\MENU\FONT8.FON"
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\fnttool.py", line 44, in <module>
    main()
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\fnttool.py", line 40, in main
    from_fnt(args)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\fnttool.py", line 23, in from_fnt
    fnt.to_image(fnt.read(image), rgb_palette).save(f'{imageName}.png')
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\formats\fnt.py", line 23, in read
    raise Exception('File does not have FNT magic identifier.')
Exception: File does not have FNT magic identifier.

oh it isn't a 'fnt' it is a 'font'


\(〇_o)/
Gimp to the rescue
Mac - Dos

The mission briefing uses a different font:


Jan looks a bit smoother

Yep, some of those pixels have been al/tered.

I cant find the upscaled jan and mon mothma images. TFE looks like it is

s_menuActor = lactorAnim_load(bgAnim, &bounds, 0, 0, 0);

which does a:

sprintf(animName, "%s.ANIM", name);

name -> bgAnim ->  brief -> bgAnim -> &s_sharedState.briefingList.briefing[briefingIndex];

list gets loaded in with:
if (!parseBriefingList(&s_sharedState.briefingList, "briefing.lst"))

which is in DARK.GOB. I probably should have guess that,

LEV: SECBASE    LFD: dfbrief.lfd ANI: brf-mon PAL: brf-jan
DFBRIEF.LFD ... meld showed them as identical, but I'll check 'brf-mon' or 'brf-jan' or 'brf-nil'
brf-jan.anim -> brf-jan_0.DELT has the background, but it is the same as the dos version 311x200.

 

I'm still not sure where the extra pixels come from.


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.


Wednesday, August 16, 2023

Star Trek: Klingon on linux via wine

Requires Video for Windows but won't install due to "Video for Windows does not run on Windows NT 3.1. Please upgrade your version of Winodws." Despite having winecfg set to Windows XP.

Copy the /media/cdrom0/vfw11ea folder somewhere and edit setup.mst. Remove lines 67-74. nope it is win nt kernel, so probably just 69-73

Then it will start up, and not display video. 😢

Bonus, copying the video files from the disk to C:\ and changing klingon.ini disk drive to C:\ removes the need to have the cd in the drive.

Sunday, June 11, 2023

torani syrup popsicle recipie

TLDR: 20%-30% syrup

6 popcicles -> 10oz or 275ml volume

55mL Syrup/220mL water
to
82.5mL syrup/192.5mL water

methodology

50mL water -> add syrup until taste

Peach
watertaste
2.5mLwater
5mLwatery
10mLpeachy
15mL
15/(50+15)=23% syrup
raspberry
watertaste
10mLwatery
15mLalmost
20mL
20/(50+20)=29% syrup