Jump to content

[PC] Broken Sword 1 (Shadow of the Templars Director's Cut) - Font editing


Go to solution Solved by Rabatini,

Recommended Posts

Posted (edited)

Hi!

Can anyone give me some advice or help on how to eport/import the font from this game to make it editable?

I recently solved a problem with exporting/importing text from this game. That's solved. However, a new problem has appeared. Czech contains some specific letters ( ě š č ř ž ů ť ď ď ň ) and these are then displayed incorrectly in the game. I would need to edit the font in the game. There are two fonts in the game directory (help, diary, save game). I have edited those. But the font used directly for the in-game subtitles is probably inside some file (bs1dc.dat?).

 

file bs1dc.dat: https://drive.google.com/file/d/1dE24ZJxbXmDfQuMAmWC0NwsaAyAl91ZH/view?usp=sharing

file bs1dc.exe: https://drive.google.com/file/d/1Qq3Jt-yw2NzxnVti2IUNYpThJfWRvNy2/view?usp=sharing

Edited by martin2306
Link to comment
Share on other sites

  • martin2306 changed the title to [PC] Broken Sword 1 (Shadow of the Templars Director's Cut) - Font editing
1 hour ago, martin2306 said:

I tried the quickbms script. I don't know if I did something wrong. I have a folder with 2550 DAT files. Is that correct?

Well yeah, there are no filenames stored in this archive.

Link to comment
Share on other sites

Posted (edited)

How did you find text files because as far as I can see they are also packed in the bs1dc.dat?

Also, have you tried to edit two ttf fonts in the root folder? It seems like game is using them as it doesn't start without these files.

 

Edit Yeah, game is using them, but unfortunately only partially, subs stay unaffected

bs1dc-2024-05-03-23-07-39-43.png

 

bs1dc-2024-05-03-23-08-47-83.png

Edited by Thief1987
Link to comment
Share on other sites

File formats from this game have not been documented anywhere. After extracting DAT archive, you can inspect each file using hex editor like hex workshop and you'll notice that some files starts with signatures like BACK BM16 FACE FG16 FORE SPR4 SPR8 SPRA. Signature indicate which file format are you looking at and one of these extracted file can be the font you're looking for. I would start with figuring out a way to preview or decode graphics from this game. This script may help you

https://github.com/vpelletier/sword1-dc/blob/master/dump.py

as well as this Game Extractor plugin:

http://www.watto.org/specs.html?specs=Viewer_DAT_HSFS_SPR8_SPR8

But remember that it may be not enough. You may need to debug the game to see how the font is handled (like how the coordinates table is parsed etc.)

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

16 hours ago, Thief1987 said:

How did you find text files because as far as I can see they are also packed in the bs1dc.dat?

Also, have you tried to edit two ttf fonts in the root folder? It seems like game is using them as it doesn't start without these files.

 

Edit Yeah, game is using them, but unfortunately only partially, subs stay unaffected

bs1dc-2024-05-03-23-07-39-43.png

 

bs1dc-2024-05-03-23-08-47-83.png

- I found the game texts using Notepad++ in the bs1dc.dat file.

- I have already edited the two TTF files.

But the font for the subtitles is somewhere inside the game. I can think of a bs1dc.dat or bs1dc.exe file.

Link to comment
Share on other sites

3 hours ago, ikskoks said:

File formats from this game have not been documented anywhere. After extracting DAT archive, you can inspect each file using hex editor like hex workshop and you'll notice that some files starts with signatures like BACK BM16 FACE FG16 FORE SPR4 SPR8 SPRA. Signature indicate which file format are you looking at and one of these extracted file can be the font you're looking for. I would start with figuring out a way to preview or decode graphics from this game. This script may help you

https://github.com/vpelletier/sword1-dc/blob/master/dump.py

as well as this Game Extractor plugin:

http://www.watto.org/specs.html?specs=Viewer_DAT_HSFS_SPR8_SPR8

But remember that it may be not enough. You may need to debug the game to see how the font is handled (like how the coordinates table is parsed etc.)

I will study the links but I am not a programmer. I can work with some utilities (e.g. QBMS). I also have Game Extractor, but I'm not very good with it yet. I am a translator (self-taught) rather than a technician.

The turning point came a few days ago. While searching on the internet I discovered the Hungarian translation of this game. I contacted the translator and he sent me the files with which he translated this game. But the utilities were created for him by someone else. This solved the problem with exporting/importing the text, including the graphics with the text (buttons, comic). There was also a file to edit the font "inside" the game. Unfortunately, just by the name (bs1dc_hunfont_GUI.exe) it modified that font "inside" the game to the Hungarian character set.

I'm attaching the file "bs1dc HU.zip" where is everything I got.

bs1dc HU.zip

Link to comment
Share on other sites

Posted (edited)

Well I think I was wrong and libftgl only used for converting ttf fonts into bitmap in runtime so it doesn't needed in your case. Font is actually look similar to their sprite formats. There is a  decompiler for SPR4, SPR8 and SPRA formats at that github repo that ikskoks posted, but even if it's look similar it doesn't look like any of them, so it needs separate researching and most likely reversing through debugging. 

Edited by Thief1987
Link to comment
Share on other sites

Posted (edited)

I don't understand it, but what about trying to look at the file "bs1dc_hunfont_GUI.exe" what changes are made by this file?

Otherwise, I have a plan B. If the CZ translation doesn't have the correct characters, it will be a grammatical error, but it won't change the meaning of the word. It won't be a 10/10 translation, but a 7/10...

Edited by martin2306
Link to comment
Share on other sites

Posted (edited)
38 minutes ago, martin2306 said:

I don't understand it, but what about trying to look at the file "bs1dc_hunfont_GUI.exe" what changes are made by this file?

Otherwise, I have a plan B. If the CZ translation doesn't have the correct characters, it will be a grammatical error, but it won't change the meaning of the word. It won't be a 10/10 translation, but a 7/10...

Well, that program is patching the font data in the bs1dc.exe, that is all that it's doing, so person who did it reversed font format, maybe ask them

Edited by Thief1987
Link to comment
Share on other sites

12 minutes ago, Thief1987 said:

Well, that program is patching the font data in the bs1dc.exe, that is all that it's doing

Yes, it patches the font in the bs1dc file for Hungarian and I would need the same but for Czech.

Link to comment
Share on other sites

2 hours ago, Thief1987 said:

...so person who did it reversed font format, maybe ask them

I did. That seemed like the easiest solution. I haven't heard back from him yet. I'll wait a while. In the meantime, I'll translate and then there will be a plan "B".


Thank you for your efforts and the time you have given me. Thank you!

Link to comment
Share on other sites

48 minutes ago, martin2306 said:

I did. That seemed like the easiest solution. I haven't heard back from him yet. I'll wait a while. In the meantime, I'll translate and then there will be a plan "B".


Thank you for your efforts and the time you have given me. Thank you!

Yeah, good luck with it. I will try to look at this thing, though I'm not very good at debugging so result is highly not guaranteed.

  • Thanks 1
Link to comment
Share on other sites

7 hours ago, Rabatini said:

Well, i find something, seems to be the font, but its tiled.

I think it might be the font. I'm sending a picture of the game.

Attached is the file "bs1dc_hunfont_GUI.exe" that the translator sent me. Unfortunately, it modifies the Hungarian character set.
If it would be possible to find out what, where and how it was modified.

 

Snmekobrazovky2024-05-07111035.png.393acf6953bcbf8895333427d6bdc28e.png

bs1dc_hunfont_GUI.zip

Link to comment
Share on other sites

Posted (edited)

YES!
That's definitely this font! It's only used in subtitles in game.

The menu buttons are in graphics (pictures).
The others ( tooltip, diary, savegame title...) use a different font (Linux Libertine type).

 

Snmekobrazovky2024-05-07152947.png.5fac71f3f9eb87f3e8b44e62271971c6.png

 

Edited by martin2306
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...