SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 08-03-13, 08:38 AM   #1
Feuer Frei!
Navy Seal
 
Join Date: Sep 2009
Location: Valhalla
Posts: 5,295
Downloads: 141
Uploads: 17
Default Fonts

If wanting to edit fonts, and correct me if i'm wrong but as far as i understand it the off file contains the rectangles for the same-named dds file, which then the dds calls from to render the font ingame.

Now, silent 3ditor can open off files however all i get is a black screen in the viewing window.

Easier to use an existing off file to edit than creating a new font set.

Can someone enlighten me please as to why silent 3ditor is having black screen issues in the viwer window when opening off files, and also what is the easiest way to edit a existing font.
Considering utilizing an exising off is quicker?
__________________
"History is the lies that the victors agree on"- Napoleon

LINK TO MY SH 3 MODS
Feuer Frei! is offline   Reply With Quote
Old 08-03-13, 12:25 PM   #2
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Feuer Frei! View Post
If wanting to edit fonts, and correct me if i'm wrong but as far as i understand it the off file contains the rectangles for the same-named dds file, which then the dds calls from to render the font ingame.
Exact, off files define pixels in the dds file of the same name which correspond to each character. The arguments of each entry are:
  • Horizontal / Vertical spacing: not 100% sure about it, but I think this is the number of pixels that the game will space out fonts of in game (both can be set to 0 if the correct spacing is already included in the font definition, i.e. blank pixels in the dds file);
  • Character: the character defined;
  • X/Y: horizontal/vertical offset in pixels from the top left corner;
  • Width/Height: quite self-explanatory

You can add or delete as many font definition entries as you want.

Also note that most fonts are also set through an homonymous txt file, which specifies:
  • number of character definitions contained in the file;
  • width/height in pixels of the source dds;
  • character definitions including:
- set character;
- character ASCII number;
- left/top/right/bottom offsets relatice to the dds file, defining the position and size of each character.

As you can see, there is a lot of redundant information, which makes me to wonder whether both the txt and off files are required or not

Quote:
Originally Posted by Feuer Frei! View Post
Now, silent 3ditor can open off files however all i get is a black screen in the viewing window.
Probably a missing feature: I have tried opening SHIII fonts (which are in tga format), but with the same result.

Quote:
Originally Posted by Feuer Frei! View Post
Easier to use an existing off file to edit than creating a new font set.
Probably yes, if your manage to find a stock font which is similar to the one you want to add to the game. If not, font spacing will be messed up, with some fonts having a bigger spacing than other ones.

If, on the other hand, you decide to create a new font definition from scratch, you should measure pixel offsets manually, and enter them in the off/txt files. The best method to do it may vary though, depending on the photo editing program you are going to use. In general using the grid and the "sticky" guides featured by photoshop and similar programs, could ease up your work a lot

P.S: I have quite a good collection of fraktur fonts on my hard drive. Let me know if you need for them
gap is offline   Reply With Quote
Old 08-03-13, 01:04 PM   #3
volodya61
Ocean Warrior
 
volodya61's Avatar
 
Join Date: Feb 2012
Location: Rostov-on-Don, local time GMT+4
Posts: 3,300
Downloads: 374
Uploads: 0


Default

Quote:
Originally Posted by gap View Post
..P.S: I have quite a good collection of fraktur fonts on my hard drive. Let me know if you need for them
Guys, don't forget about Cyrillic symbols also, please.. so wont happen the same as in Parts Magui
__________________
.
Where does human stupidity end?

.


El sueño de la razón produce monstruos © - and for some people awakening will be cruel
volodya61 is offline   Reply With Quote
Old 08-03-13, 02:44 PM   #4
SkyBaron
Lieutenant
 
Join Date: Mar 2010
Location: South Atlantic
Posts: 262
Downloads: 673
Uploads: 2
Default

Quote:
Originally Posted by Feuer Frei! View Post
Now, silent 3ditor can open off files however all i get is a black screen in the viewing window.
I had to create monospaced fonts for the Enigma mod I'm working on, and I had the same issue. I solved the problem by editing the fonts on an old PC running Windows XP. Don't know if it was because of Windows 7 or my graphic card's driver, or a combination of both.
__________________


SkyBaron is offline   Reply With Quote
Old 08-03-13, 07:02 PM   #5
Feuer Frei!
Navy Seal
 
Join Date: Sep 2009
Location: Valhalla
Posts: 5,295
Downloads: 141
Uploads: 17
Default

Thank you for the replies Gents.

So, i tinkered with changing a font style yesterday, the load\save game screen and edited the page chooseloadsave file, example:

[G56 I4]
Name=SaveGame Button
Type=1032;Button
ItemID=0x56010001
ParentID=0x56010000
Pos=0,-218,300,36
Zone= 362 384 300 36 3 1 0x56010007 0.5 -1 0x56010001 -0.5 0 0 0
Color=0xFFFFFFFF
Materials=4
Display=0;No stretch
Font=10 <<<<<changed this to another number, according to menu.ini file
Text=3502 <<<<<< i assume this is the position of text on screen???
TextFlags=0x5
StatesColors=0x8B8989FF, 0xEBCF99FF, 0xDD5800FF, 0xDD5800FF

However, no change appeared ingame?

What exactly do i need to edit\change etc to get a different font appear in say, this particular screen?

If i want to introduce a new font, what file do i need to edit? The off file only or the off file and the tga file?

Obviously i need to add the new font to the menu ini file which is easy.

A step-by-step guide would be good\helpful.

PS: I use Gimp as my image editor.

Thank you.
__________________
"History is the lies that the victors agree on"- Napoleon

LINK TO MY SH 3 MODS
Feuer Frei! is offline   Reply With Quote
Old 08-04-13, 01:44 AM   #6
divingbluefrog
Medic
 
Join Date: Jan 2006
Posts: 164
Downloads: 63
Uploads: 1
Default

Quote:
Originally Posted by Feuer Frei! View Post
Text=3502 <<<<<< i assume this is the position of text on screen???
No, it's not. It's the entry 3502 = SAVE GAME text in the \Silent Hunter 5\data\Menu\menu.txt file.
Position on page is given by Pos= and zone= lines above.
divingbluefrog is offline   Reply With Quote
Old 08-04-13, 06:50 AM   #7
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Feuer Frei! View Post
What exactly do i need to edit\change etc to get a different font appear in say, this particular screen?
I think everything gets much more intuitive when you edit game menues using the inbuildt Menu Editor.

A bit of theory about menu ini format (esp. object resizing and placing):
http://www.subsim.com/radioroom/show...713#post496713

A couple of good Menu Editor tutorials:
http://www.subsim.com/radioroom/show...98#post1292498
http://www.subsim.com/radioroom/show...34#post1330634

Quote:
Originally Posted by Feuer Frei! View Post
If i want to introduce a new font, what file do i need to edit? The off file only or the off file and the tga file?

Obviously i need to add the new font to the menu ini file which is easy.

A step-by-step guide would be good\helpful.
You better start from a stock font.

You need to redo the alpha channel of its tga/dds file (RGB channel only used for font color). Editing off and/or txt files is only needed if you need to add new characters (cyrillic for instance) and/or if character spacing for the new font doesn't match you stock template.
gap is offline   Reply With Quote
Old 08-04-13, 07:11 AM   #8
Feuer Frei!
Navy Seal
 
Join Date: Sep 2009
Location: Valhalla
Posts: 5,295
Downloads: 141
Uploads: 17
Default

@gap

thanks very much for your informative post.

It will get me started in the right direction
__________________
"History is the lies that the victors agree on"- Napoleon

LINK TO MY SH 3 MODS
Feuer Frei! is offline   Reply With Quote
Old 08-04-13, 08:03 AM   #9
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Feuer Frei! View Post
@gap

thanks very much for your informative post.

It will get me started in the right direction
My pleasure.

Please note that the first tutorial I have linked in my previous post is relative to SHIV, but it still applies to SH5. In that respect, the only diffrence between the two games is the presence of a Menu Editor in the latter.

Let me know if you need for any further assistance
gap is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:11 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.