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 > Silent Hunter 4: Wolves of the Pacific > SH4 ATO Mods
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 07-25-23, 09:01 AM   #16
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

In Open Office...............

There is a Text delimiter on import.
DELETE the " or ' you find there.
Leave it BLANK!!!
The file will show correct then. For the most part anyway.
There's still a few symbols that do not appear properly in a Spread sheet.


I'm not a Spread Sheet expert nor use them myself.
Seeing as one does not need to change those symbols but only the sizes?
I'd code to adjust the sizes and leave the symbols alone.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 07-25-23 at 10:27 AM.
Jeff-Groves is offline   Reply With Quote
Old 07-25-23, 10:41 AM   #17
Bartholomew Roberts
Bosun
 
Join Date: Sep 2021
Posts: 69
Downloads: 107
Uploads: 2
Default

Quote:
Originally Posted by Jeff-Groves View Post
In Open Office...............

There is a Text delimiter on import.
DELETE the " or ' you find there.
Leave it BLANK!!!
The file will show correct then. For the most part anyway.
There's still a few symbols that do not appear properly in a Spread sheet.


I'm not a Spread Sheet expert nor use them myself.
Seeing as one does not need to change those symbols but only the sizes?
I'd code to adjust the sizes and leave the symbols alone.
Oh, I didn't notice that , that also works for libre office. Years passed I almost forgot how to use spreadsheet. You need to do script both reading and writing off file, good luck.
Bartholomew Roberts is offline   Reply With Quote
Old 07-25-23, 10:50 AM   #18
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

I've already started the scripts but they only work with Sweetscape 010
https://sweetscape.com/



Kind of strange the Devs used different symbols in the off files as you probably never see most of them.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 07-25-23, 11:48 AM   #19
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

Looking at 'Some' wide screen mods?
They seemed to rename an off file to kind of fit then just scaled up the graphic file. So most of the symbols in some files are worthless.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 07-25-23, 12:26 PM   #20
Bartholomew Roberts
Bosun
 
Join Date: Sep 2021
Posts: 69
Downloads: 107
Uploads: 2
Default

Quote:
Originally Posted by Jeff-Groves View Post
I've already started the scripts but they only work with Sweetscape 010
https://sweetscape.com/



Kind of strange the Devs used different symbols in the off files as you probably never see most of them.
I know the studio was in Romania that's why they use this code. There is no font for 4k in other mod, you simply need to double the font size. So no off file matches
Bartholomew Roberts is offline   Reply With Quote
Old 07-25-23, 12:38 PM   #21
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

X, Y, Width, and Height only need to be scaled as long as they match the scale of the TGA or DDS file.
So if you scale say Chalk.dds up to 200%?
A script that scales the off file up should work. No need to translate off to text file.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 07-25-23, 09:25 PM   #22
Bartholomew Roberts
Bosun
 
Join Date: Sep 2021
Posts: 69
Downloads: 107
Uploads: 2
Default

Quote:
Originally Posted by Jeff-Groves View Post
X, Y, Width, and Height only need to be scaled as long as they match the scale of the TGA or DDS file.
So if you scale say Chalk.dds up to 200%?
A script that scales the off file up should work. No need to translate off to text file.
but most Font in the game don't have a txt file, only off . So it's still needed. Say FPHunt38 eg. I wonder is there a way to transfer normal Font file like TTF、EOT into off. That would bring much more possiblities .
Bartholomew Roberts is offline   Reply With Quote
Old 07-26-23, 07:08 AM   #23
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,749
Downloads: 439
Uploads: 2


Default

Just remember that the way the fonts were built for SH4 was an attempt to save on the RAM footprint (2005 programming). Some fonts do not have certain characters due to their use in the game that do not require all of the characters for varying applications. This is similar to indexed color use in tga or dds files. You choose the palette you work with.
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 07-26-23, 07:32 AM   #24
Bartholomew Roberts
Bosun
 
Join Date: Sep 2021
Posts: 69
Downloads: 107
Uploads: 2
Default

Quote:
Originally Posted by propbeanie View Post
Just remember that the way the fonts were built for SH4 was an attempt to save on the RAM footprint (2005 programming). Some fonts do not have certain characters due to their use in the game that do not require all of the characters for varying applications. This is similar to indexed color use in tga or dds files. You choose the palette you work with.
Just in case someone play or make mod other than english, a unified code and little extra letters are need for all good. So I decided to enlarge some of the stock font for most compatibility.
Bartholomew Roberts is offline   Reply With Quote
Old 07-26-23, 01:32 PM   #25
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

The fonts in Game only use the dds or tga file to render.
The off file only tells the Game the positions to read for each letter/symbol to render.
The txt file is only for checking out what the off file says to the Game.

As long as the new dds or tga follows how the originals are done?
Should be no problems as long as the off file is done correctly.
It's all explained in the linked thread somewhere above.

As for off files that have no txt that goes with them? I'll just translate those and provide a link to DownLoad.
I highly doubt anyone will use a script for 010 anyways.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 07-28-23, 01:07 PM   #26
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

Almost done with the script to translate the off files to text files.
Just need to format the output to look like the text files that already exist.




The reason I'm copying the original format is the translate txt to off file script will read the needed areas properly.
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 07-28-23 at 01:29 PM.
Jeff-Groves is offline   Reply With Quote
Old 07-28-23, 02:47 PM   #27
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

I can tell you that some text files do NOT show all the settings in the off files.
So may need to re-export all the text files.

Format on export is done. Just need to convert the byte to a string character and then is all good.

A glimpe at the script..........

string f;
int k=3, i, c[3], y, x, h, w, sIndex;
ubyte l;
char W[40], sFile[];
//Start the code
OutputPaneClear();
sFile = InputOpenFileName("Select File", ("*.off | *.txt"));
sIndex = FileOpen(sFile);

f = FileNameGetBase(sFile, false) + ".off";
Printf("%s \n", f);//test for file name
Printf("Nb.char HSep VSep \n");
for( i = 0; i < k; i++)
{
c[i] = ReadInt();
FSkip(4);
}
Printf( " %i %i %i \n", c[0], c[1], c[2]);
Printf("Char x y width height \n");
for( i = 0; i < c[0]; i++)

{
l = ReadUByte();
__________________
I don't do Stupid. So don't ask.

Last edited by Jeff-Groves; 07-28-23 at 02:58 PM.
Jeff-Groves is offline   Reply With Quote
Old 07-28-23, 08:58 PM   #28
Bartholomew Roberts
Bosun
 
Join Date: Sep 2021
Posts: 69
Downloads: 107
Uploads: 2
Default

Quote:
Originally Posted by Jeff-Groves View Post
I can tell you that some text files do NOT show all the settings in the off files.
So may need to re-export all the text files.

Format on export is done. Just need to convert the byte to a string character and then is all good.

A glimpe at the script..........

string f;
int k=3, i, c[3], y, x, h, w, sIndex;
ubyte l;
char W[40], sFile[];
//Start the code
OutputPaneClear();
sFile = InputOpenFileName("Select File", ("*.off | *.txt"));
sIndex = FileOpen(sFile);

f = FileNameGetBase(sFile, false) + ".off";
Printf("%s \n", f);//test for file name
Printf("Nb.char HSep VSep \n");
for( i = 0; i < k; i++)
{
c[i] = ReadInt();
FSkip(4);
}
Printf( " %i %i %i \n", c[0], c[1], c[2]);
Printf("Char x y width height \n");
for( i = 0; i < c[0]; i++)

{
l = ReadUByte();
Shouldn't there be tab between letters&numbers?And is there a way to insert a equipment or upgrade and batch rename the item number behind?
Bartholomew Roberts is offline   Reply With Quote
Old 07-29-23, 10:06 AM   #29
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

Everything IS Tab seperated.
Only difference to the output text is it uses DOS linefeed instead of the UNIX linefeed like the existing text files.

Imports to Spread Sheets just like the originals.



And is there a way to insert a equipment or upgrade and batch rename the item number behind?

I have no idea what you mean.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 07-29-23, 01:51 PM   #30
Bartholomew Roberts
Bosun
 
Join Date: Sep 2021
Posts: 69
Downloads: 107
Uploads: 2
Default

Quote:
Originally Posted by Jeff-Groves View Post
Everything IS Tab seperated.
Only difference to the output text is it uses DOS linefeed instead of the UNIX linefeed like the existing text files.

Imports to Spread Sheets just like the originals.



And is there a way to insert a equipment or upgrade and batch rename the item number behind?

I have no idea what you mean.
Say you insert [Equipment 3] after [Equipment 2], then there are two [Equipment 3], if you want to make all equipments in group order, you have to add 1 number to every equipment behind. If you add more than one equipment in multiple places, it will be a mess. Is there a tool like S3D to handle this?
Bartholomew Roberts 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 06:29 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.