SUBSIM Radio Room Forums
The newest naval sim by Totem Games!

SUBSIM: The Web's #1 BBS for all submarine and naval simulations since 1997

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

Reply
 
Thread Tools Display Modes
Old 04-21-2016, 04:39 PM   #1
Tycho
Watch Officer
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 343
Downloads: 254
Uploads: 1


Default Modding SH3

In this topic I will share about modding and customizing your Sillent Hunter 3. Can I?
My English is bad and my modding techniques are amateurish, so be careful.

[TEC]
1 - Terrain Types and Seasons
2 - Terrain.act file (Map gradient)
3 - Locations.cfg - Renumbering
4 - UZO Fast pointing
5 - How to adjust axis direction to your needs
6 - Uboat Aces screen
7 - Some objects - texturing
8 - How the terrain texturing work.


My mods:
1 - GridXXXX
2 - Analog clock
3 - DR3 Slide Rule
4 - LGN1's Poor Man Enigma Mod
5 - KzS Notepad
6 - Tycho Sh3 Patch
__________________
If you ride like lightning, you're gonna crash like thunder.

Last edited by Tycho; 06-24-2017 at 12:51 PM.
Tycho is offline   Reply With Quote
Old 04-21-2016, 10:32 PM   #2
Anvar1061
Seasoned Skipper
 
Join Date: May 2012
Location: on land,on air and on sea
Posts: 688
Downloads: 476
Uploads: 0
Default

Where you can download them?
Anvar1061 is offline   Reply With Quote
Old 04-22-2016, 01:46 AM   #3
Tycho
Watch Officer
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 343
Downloads: 254
Uploads: 1


Default

Let's start with:
Recently, I decided to deepen in the types of terrains in the game. And here will share what I learned.
I saw relationship between TerrainTypes.raw, Terrain.cfg and folders Terrain\Textures and Forests.

First TerrainTypes.raw, it is pure data grayscale image, without any header, every byte define one shades of gray.
Next is Terrain.cfg, there have a IDX converter, where different shades of gray are specify to 9 terrain types.
OK, let's look over:
 
^
This is original TerrainTypes.raw, I made it more brighter to see it.

But because in Terrain.cfg, 32 indexes are simplified to 9 terrain types, so actually it work like (layered over the SH3 World and colorized):
 


For example, I experimented a bit, and made a new one with more simple drawing, but with 11 terrain types. In the future, I always may edit it as I want.
Code:
[IdxConversion]
IDX 1=2       ;Polar cap zone, 1 season
IDX 2=3       ;Subpolar zone, 3 seasons
IDX 3=0       ;Temperate zone, 4 seasons
IDX 4=1       ;Temperate mountain zone, 2 seasons
IDX 5=4       ;Subtropical zone N, 4 seasons
IDX 6=5       ;Subtropical mountain zone, 2 seasons
IDX 7=6       ;Desert zone, 1 season
IDX 8=7       ;Tropical zone N, 2 seasons
IDX 9=8       ;Tropical mountain zone, 1 seasons
IDX 10=9      ;Tropical zone S, 2 seasons
IDX 11=10      ;Subtropical zone S, 4 seasons
Will take me so much time to pick textures for all this.
Look like:
 


In Terrain.cfg, you define different terrain types:
Code:
[TerrainTypeDef03]
TerrainType=0
StartDate=0601
EndDate=0831
ForestName=Forest
Tex01=data/Terrain/Textures/Summer/summer_s0.tga
Tex02=data/Terrain/Textures/Summer/summer_g0.tga
Tex03=data/Terrain/Textures/Summer/summer_r0.tga
Tex04=data/Terrain/Textures/Summer/summer_d.tga
You may separate terrain type to different seasons, with different textures and different forest file.
This thing is not dynamic, if you sail over these parameters on 31 august, summer:
Code:
TerrainType=0
StartDate=0601
EndDate=0831
On the next day, 1st september, the textures will not changed to the autumn.
The changes will happen on the next game loading, according to the in-game date of your save.

Terrain.cfg is editable through notepad.
TerrainTypes.raw is editable through hex editor (very cumbersome), or with graphic editor. Probably Photoshop open and edit it, but I use PaintNet.
So I first need to convert it. For conversion I use ImageMagick, here is how:
1 - Go on ImageMagick site and download, I prefer the portable version.
2 - Extract the archive somewhere on your computer, in my case: "D:\Programs\ImageMagick\"
3 - Let's say, that you have somewhere a working folder with the "TerrainTypes.raw" file. Make a batch file (RawToTga.bat) with the following line:
Code:
"D:\Programs\ImageMagick\convert.exe" -depth 8 -size 2160x1080 gray:TerrainTypes.raw TerrainTypes.tga
Change the path to the convert.exe, according to your.
Now, when you start the "RawToTga.bat" file, ImageMagick\convert.exe will convert it and create a new file "TerrainTypes.tga".

4 - In the reverse case, you create "TgaToRaw.bat" with the following line:
Code:
"D:\Programs\ImageMagick\convert.exe" -depth 8 -size 2160x1080 TerrainTypes.tga gray:TerrainTypes.raw
Change the path to the convert.exe, according to your.
When you start the "TgaToRaw.bat" file, ImageMagick\convert.exe will convert TerrainTypes.tga and create a new file "TerrainTypes.raw".
Video:
 


So now you are able to experiment with terrain texture drawing in the game.
You want Saint Helena island to be with the specific textures, no problem.
Let's go!


Quote:
Originally Posted by Anvar1061 View Post
Where you can download them?
I don't need to download nothing. If you ask for yourself, then:
Let me check my Russian!
Не имеется ничего для скачивания. Я говорю люди, как они могут редактировать свою игру.

Nothing for download. I write how someone can edit its own game.
__________________
If you ride like lightning, you're gonna crash like thunder.

Last edited by Tycho; 05-03-2017 at 03:54 AM.
Tycho is offline   Reply With Quote
Old 04-22-2016, 01:50 AM   #4
Fahnenbohn
Keelhauled
 
Join Date: Sep 2013
Location: France
Posts: 1,146
Downloads: 155
Uploads: 0
Default

In TerrainTypes.raw, are they 9 or 32 different shades of gray ?

You can only open this file after having converted it ?

What is a batch file ? How do you create it ?
Fahnenbohn is offline   Reply With Quote
Old 04-22-2016, 03:01 AM   #5
Tycho
Watch Officer
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 343
Downloads: 254
Uploads: 1


Default

Quote:
Originally Posted by Fahnenbohn View Post
In TerrainTypes.raw, are they 9 or 32 different shades of gray ?
They are 32. Under [IdxConversion] you specify for every index what terrain type will be.

IDX 1 is color index in TerrainTypes.raw, thinks for it like:
R=1
G=1
B=1
IDX 26 is color index or R=26, G=26, B=26

IDX 1=0
IDX 2=0
IDX 8=0
IDX 13=2
Means, that all first three indexes for the game they will be TerrainType=0, index 13 will be TerrainType=2.

Quote:
Originally Posted by Fahnenbohn View Post
You can only open this file after having converted it ?
Quote:
Originally Posted by Tycho
Probably Photoshop open and edit it, but I use PaintNet.
So I first need to convert it. For conversion I use ImageMagick.
Quote:
Originally Posted by Fahnenbohn View Post
What is a batch file ? How do you create it ?
You can use any text editor (such as Notepad or WordPad) to create your batch files. As long as the file extension ends with .bat it will be a batch file.
To run the batch file, double-click it like any other program. Once the batch file has completed running it closes automatically.
__________________
If you ride like lightning, you're gonna crash like thunder.
Tycho is offline   Reply With Quote
Old 04-22-2016, 05:27 AM   #6
Fahnenbohn
Keelhauled
 
Join Date: Sep 2013
Location: France
Posts: 1,146
Downloads: 155
Uploads: 0
Default

Thank you very much for explanations. I will try this.
Fahnenbohn is offline   Reply With Quote
Old 04-22-2016, 05:47 AM   #7
Fahnenbohn
Keelhauled
 
Join Date: Sep 2013
Location: France
Posts: 1,146
Downloads: 155
Uploads: 0
Default

Quote:
Originally Posted by Tycho View Post
Why have you made this ?
Fahnenbohn is offline   Reply With Quote
Old 04-22-2016, 05:50 AM   #8
Fahnenbohn
Keelhauled
 
Join Date: Sep 2013
Location: France
Posts: 1,146
Downloads: 155
Uploads: 0
Default

Would it be possible to add new foests types ?
Fahnenbohn is offline   Reply With Quote
Old 04-22-2016, 05:53 AM   #9
Fahnenbohn
Keelhauled
 
Join Date: Sep 2013
Location: France
Posts: 1,146
Downloads: 155
Uploads: 0
Default

Are the sea types controlled in the same way ? With a .raw file ?
Fahnenbohn is offline   Reply With Quote
Old 04-22-2016, 07:47 AM   #10
Tycho
Watch Officer
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 343
Downloads: 254
Uploads: 1


Default

Quote:
Originally Posted by Fahnenbohn
Why have you made this ?
Just for experimentation. I tried quickly to make more types of terrains and seasons.
For example, when in north tropical zone is wet season, in the south tropical zone is dry season, and vice versa.

Quote:
Originally Posted by Fahnenbohn
Would it be possible to add new forests types.
Yes, but is lots of work.

Quote:
Originally Posted by Fahnenbohn
Are the sea types controlled in the same way ? With a .raw file ?
Yes. But according to some old posts in the forum, I remember, that I've read that something not work correctly there.
When the time comes, I will dig there, but for now I don't know.
__________________
If you ride like lightning, you're gonna crash like thunder.
Tycho is offline   Reply With Quote
Old 04-22-2016, 09:01 AM   #11
Anvar1061
Seasoned Skipper
 
Join Date: May 2012
Location: on land,on air and on sea
Posts: 688
Downloads: 476
Uploads: 0
Default

Thank you for your wonderful Russian! But why do not you upload your mod to download? Not all have to work with Photoshop and similar programs skills.
Anvar1061 is offline   Reply With Quote
Old 04-22-2016, 11:09 AM   #12
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,111
Downloads: 106
Uploads: 2


Default

Tycho: Is it possible to create a whole new world/map for SH3 like this?

I mean, is it possible to use for example a mercator projection map to create a new world for SH3 with it?
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 04-22-2016, 04:39 PM   #13
Tycho
Watch Officer
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 343
Downloads: 254
Uploads: 1


Default

Quote:
Originally Posted by Anvar1061
But why do not you upload your mod to download? Not all have to work with Photoshop and similar programs skills.
Because there is no mod. I just some days ago start just a quick experimentation with this. Now I need to do more precise TerrainTypes.raw, and I'll need many and varied textures, that I'll search and choose to my flavor.
But, because right now this is not my main activity on SH3, will take me a months until I'll come to that.

Quote:
Originally Posted by Hitman
I mean, is it possible to use for example a mercator projection map to create a new world for SH3 with it?
I don't think that this is possible.
All that above with TerrainTypes.raw and Terrain.cfg refers to how the game define where and when on the world, what textures to use for terrain drawing.
__________________
If you ride like lightning, you're gonna crash like thunder.
Tycho is offline   Reply With Quote
Old 04-23-2016, 06:32 AM   #14
Anvart
Admiral
 
Join Date: Jan 2006
Location: Russia ®, E-burg
Posts: 2,354
Downloads: 65
Uploads: 1
wolf_howl15

Hi, to lover of retro.

For starters, I think, you should find and look at old threads where answers on your questions are (may be).
At the beginning of 2006 year's ref, distinguished modder, published their work - Terrain Editor for SH3. I advise you to carefully read this topic and all subsequent, related, in SH3 and SH4 Workshops... where ref explains many things.
SH3 Terrain Editor - author ref:
http://www.subsim.com/radioroom/show...rain+Extractor
One of ref's replies:
http://www.subsim.com/radioroom/show...79&postcount=2
SH5 racerboy work:
http://www.subsim.com/radioroom/showthread.php?t=187355

Unfortunately I have not found my replica to racerboy... I found only 2 pictures:



In my explanation to the racerboy, I was talking that everything can be done using Photoshop:
1) load a Terrain Map (eg 4320_2160.raw);
2) Convert channel to indexed color mode;
3) load palette file Terrain.act as Color Table;
... and you can working with image... and so on.

Regards, Alex

P.S.
Отрывок из советской песни: "... адресованная другу ходит песенка по кругу ..."
Как раз наш случай...
__________________
Alex ®

Last edited by Anvart; 04-23-2016 at 06:43 AM.
Anvart is offline   Reply With Quote
Old 04-23-2016, 06:58 AM   #15
Tycho
Watch Officer
 
Join Date: Oct 2009
Location: Sofia, Bg
Posts: 343
Downloads: 254
Uploads: 1


Default

Quote:
Originally Posted by Anvart View Post
P.S.
Отрывок из советской песни: "... адресованная другу ходит песенка по кругу ..."
Как раз наш случай...
???

edit:
Ops, sorry. Change browser encoding, and now I see it.
__________________
If you ride like lightning, you're gonna crash like thunder.

Last edited by Tycho; 04-23-2016 at 07:13 AM.
Tycho is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 11:36 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © 1997- 2017 Subsim