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 03-22-10, 07:13 AM   #151
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by TheDarkWraith View Post
I see what you're trying to do and it won't work. The C++ code only allows dials on pages that already had dials on them. Sure you can add a dial to Page Default Hud but when you try to tie it to the the dial in the file dials.cfg it won't work. The game will not update the dial. It will be just a static bitmap. If you want to do TDC stuff then you have to keep the dials on PageTDC or use another page that already has dials on them.

Ah Ok, so I will have to use the original TDC page then. Thanks.

Have PM'ed this to maerean_m. But will post here in case anyone else could uptake.

"Hi maerean_m, can you tell me if there are any plans to do some simple tutorials on modding SH5.
This would be great for us newcomers to modding that are completly lost, even trying to understand what others have done with there mods is impossible as you cant tell whats been altered in some of the files.

For example a simple tutorial on how to introduce a single working dial eg the AOB dial into the User Interface.
This would show how to access the Editor, where to place the holders for the graphics, what .ini files are created and what scripts are required to introduce them into the game.
Just been able to see one solid example of how thing are done, would help people to go on from that and experiment."

Last edited by reaper7; 03-22-10 at 07:48 AM. Reason: Tutorial requirments
reaper7 is offline   Reply With Quote
Old 03-22-10, 10:19 AM   #152
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

adding a single dial is a very simple evolution. If you want to teach yourself how do this:

using the menu editor:

we want to add the heading/rudder dial to PageTDC.

in Page layout find the Heading group (it's under Group feedback) and copy it's entire tree over to PageTDC. Now when I say the entire tree I'm talking about it's anchor group. What denotes an anchor group? The big 'G' in the box. For heading it's 'Heading'. Now if you just copy over heading and think you got a dial you are wrong. The 'whole' dial consists of 'Heading' - a Group, 'Rudder' - a Group, 'Toggle Rudder Heading Around' - a button, and 'Toggle Rudder Heading' - a button. How do I know this? Two ways. One is that when I click on each one I get a yellow outline box on the editor that shows me graphically that it's part of the whole dial. Two, as I click on each one in the menu editor and I look in the zone section I see that the anchor refers to some part of the dial (it doesn't have to but doing so keeps the coherency of the object). You'll notice that the button 'Toggle Rudder Heading' anchor is 'Bkgr'.
Now after you've copied all those items over to PageTDC you need to check their anchors. You'll notice that 'Toggle Rudder Heading' anchor is set to Null now. Why? Well before it referenced an item in Page layout but we're now in PageTDC so obviously that page doesn't exist here. I would set the 'Toggle Rudder Heading' anchor to the object on PageTDC that you want this dial to be anchored to. Best thing to do is set the anchors of all the copied objects to reflect the values of the object you copied from in the other page. After setting all the anchors to the values they should be, moving the 'Toggle Rudder Heading' will cause the whole dial to move with it (if all the anchors are setup to reference one another in the object). If one of the anchors is set to reference some other object then that part won't move when you move 'Toggle Rudder Heading'.
Okay so now we have a new dial on PageTDC. But how do we get the game to update it? That's the easy part. Go back to the page you copied this new dial from. I'll use the Heading/Rudder here as an example. For the game to update a dial it needs 3 pieces of information: the dial, the current value, and the new value. Open up the file \data\Menu\cfg\Dials.cfg. This is where we define the dials. Do a search for 'CompassFdbk'. This dial, [Dial22] is responsible for updating the 'Heading' dial in Page layout. How do I know this? Easy. Look at the values for CrtVal (current value), NewVal (new value), and Dial. They start with 3F (0x just means this is a hex value). If we go back to the menu editor and go to Page layout we see that it's ID is 3F000000. If we find the values for CrtVal, NewVal, and Dial on Page layout we see that they reference objects of the dial in question (parts of the Heading dial). Now if you correlate the CrtVal, NewVal, and Dial to the objects on the screen you can see what is controlling what. After you denote the correlation then add another entry to Dials.cfg at the bottom. Copy the whole entry for [Dial22] to the bottom and give it the next number in the chain (if you're using the stock file the next number will be 75. Now change the CrtVal, NewVal, and Dial IDs on this new entry to reflect the IDs of the dial on PageTDC. But wait we're not done yet. This dial has two states - Heading and Rudder. We have to create another entry in Dials.cfg. But what is this entry? Well I know that rudder needs to look like the entry [Dial21] (RudderFdbk). So copy the whole entry for [Dial21] to the bottom of Dials.cfg and give it the next number in the chain (would be 76 with stock file). Now these names - RudderFdbk, SpeedFdbk, etc. can be anything you want to call them for your new dials. Change the IDs of the new dial entry to reflect the object in PageTDC (parts of the Rudder dial). Don't forget to change the Dials.cfg's top number 'DialsNo=' to one plus the last entry in the chain of dials (it's zero based). For our example that line should read 'DialsNo=77'. Save the file.
Are we done yet? Nope. We have a new dial on PageTDC. The game will update it. But the game will not switch it between states - Heading/Rudder. Why? Because the original dial's 'Toggle Rudder Heading' ID is hard coded in the game. The game recognizes 'events' from that ID and responds to them. Your new 'Toggle Rudder Heading' ID means nothing to it. So you have to get creative and create some python code to make it switch states! Where do you place this python code? In PageTDC.py.
TheDarkWraith is offline   Reply With Quote
Old 03-22-10, 12:45 PM   #153
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Thank you TheDarkWraith

I really appreciate you taking the time out to write this, especially when your hard at work working your excellent mods.

This makes it great for us new guys, so much easier to figure out when there's a solid example in front - compared to trying to reverse engineer what others have already done.
This is my first time getting involved in the modding scene, I'm usually the one sitting back waiting to see what some else does.
And with my only abilities on the graphics side, it can be hard to figure things out.

I've been spending the last 2-3 weeks going thru what has being released, thru the editor and trying to understand pyhton but its all going over my head.
So far I've only done graphic editing mods to the dds files. But with the help of the community I'm sure I'll be able to contribute a lot more in time.

Thanks again, its really appreciated.
reaper7 is offline   Reply With Quote
Old 03-22-10, 06:04 PM   #154
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by reaper7 View Post
This makes it great for us new guys, so much easier to figure out when there's a solid example in front - compared to trying to reverse engineer what others have already done.
reverse engineering/ethical hacking is my second hobby
TheDarkWraith is offline   Reply With Quote
Old 03-23-10, 04:58 PM   #155
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Thanks to TheDarkWraiths help in the previous post I've been learning from him the last 2 days. And have put together a tutorial on what I've learnt so far.
This should be of help to those starting to learn to Mod

Post can be found here:
http://www.subsim.com/radioroom/showthread.php?t=165968

reaper7 is offline   Reply With Quote
Old 03-23-10, 07:33 PM   #156
Thresher
Sparky
 
Join Date: Apr 2006
Location: New Mexico, USA
Posts: 151
Downloads: 20
Uploads: 0
Default

Quote:
Originally Posted by Heretic View Post
I've been using Granny Viewer to look at the crew models and animations. . . .
Heretic,

Are you actually using GV to see the animations in data/characters/animations?

I've been able to see tons of models/meshes, but haven't figured out how to apply an animation from that folder to a model.

BTW, thanks for all the instruction and great work!
Thresher is offline   Reply With Quote
Old 03-23-10, 07:57 PM   #157
Heretic
Commodore
 
Join Date: Mar 2005
Location: Nebraska
Posts: 617
Downloads: 240
Uploads: 2


Default

Quote:
Originally Posted by Thresher View Post
Heretic,

Are you actually using GV to see the animations in data/characters/animations?

I've been able to see tons of models/meshes, but haven't figured out how to apply an animation from that folder to a model.

BTW, thanks for all the instruction and great work!

Ok. Looks like you got the meshes in. That's the CharacterBodyParts.GR2 file. I right-click on the "Mesh List" tab and select "Hide All Meshes" so I don't have that huge mass. Then left click the Mesh List tab which shows a list of all the meshes so I can select the ones I want. I usually scroll all the way to the bottom and just select the first torso, pants, and head from there.

Then left click Animation List tab. Then click the grey bar that appears under it, it'll bring up a file window. Navigate to the character\animations folder, select whichever ones you want - you can select more than one. They'll then show up under Animation List just like the meshes did under Mesh list. Left-click the animation and it'll start playing in the window. If you don't have any meshes selected, you won't be able to see anything.


Hope that helps
Heretic is offline   Reply With Quote
Old 03-23-10, 08:26 PM   #158
Thresher
Sparky
 
Join Date: Apr 2006
Location: New Mexico, USA
Posts: 151
Downloads: 20
Uploads: 0
Default

Quote:
Originally Posted by Heretic View Post
...They'll then show up under Animation List just like the meshes did under Mesh list. Left-click the animation and it'll start playing in the window. If you don't have any meshes selected, you won't be able to see anything.


Hope that helps
Works like a champ Heretic, Thank You Sir. For some reason I didn't realize each animation was running in its own little window in the list and clicking on it would animate the preview area. Too many days at sea squinting thru binocs I guess.

I find this all very robust, have made a crazy Ivan with my opinion of SH5, and can also see where mod integration could be a nightmare. I was actually in the process of doing my own scripting/crew additions when I ran across your MightyFine Crew. MightyFine Stuff! My stuff pales in comparison.

I see a project team on the horizon.

Thanks Again!
Thresher is offline   Reply With Quote
Old 03-27-10, 10:32 PM   #159
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default DXT3 Compression

Hi I've just started converting over my graphics from a Mod I have in progress.
I created the graphics in Photoshop and converted to dds using DXT3, but the compression I'm getting is terrible, I've tried all the options I can think of. These are the results.

DDS file on the Left: Origial PSD on the Right:


As you can see there a lot of loss between the original and converted.
Is this Normal, was hoping for much better results.
Or is there a program that will give better results than the photoshop plugin?
reaper7 is offline   Reply With Quote
Old 03-27-10, 10:49 PM   #160
Arclight
Navy Seal
 
Join Date: Jun 2008
Location: Land of windmills, tulips, wooden shoes and cheese. Lots of cheese.
Posts: 8,467
Downloads: 53
Uploads: 10
Default

Maybe try DXT5, or switch to GIMP with dds plugin or Paint.net.
__________________

Contritium praecedit superbia.
Arclight is offline   Reply With Quote
Old 03-28-10, 04:32 AM   #161
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Cheers Arclight, I'll give them a try. In this case Photoshop's just not cutting it.
reaper7 is offline   Reply With Quote
Old 03-28-10, 06:30 AM   #162
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Sorry to double post, but I've just discovered something.

As you can see from my post above I've being having problems trying to convert to dds without incurring compression losses.

I tried all the compression options for DXT3 which was the dds format that everyone has listed as that required to import into SH5.
I tried all the other applications to see if the results would be better than photoshops, but they all had similar to worse results.

As I'm trying to create a High Resolution UI Mod the losses above were just not acceptable for the scale they were to be displayed at.
Not happy with the results, I started to mess with the .dds export setting in the DDS Photoshop Plugin - trying every export type and compression settings besides DXT3 and DXT5.
Importing each file type into the SH5 Editor.

I was very surprised to find this one actually worked and displayed perfectly in the Editor. (Alpha channels display perfectly as well)
Results are a 1:1 copy of the original PSD file, although file sizes for the dds file are just to big. The Following example has a file size of 4MB.
But the editor displays it with no problem.

dds export used was 32.32.32.32f ABGR 128 bpp / Floating Point.


Last edited by reaper7; 03-28-10 at 09:17 AM.
reaper7 is offline   Reply With Quote
Old 03-28-10, 07:25 AM   #163
Decoman
Frogman
 
Join Date: Sep 2005
Location: Oslo, Norway
Posts: 306
Downloads: 24
Uploads: 0
Default

Maybe we could create a floating point sky texture then? To remove the banding.
Decoman is offline   Reply With Quote
Old 03-28-10, 01:44 PM   #164
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by Decoman View Post
Maybe we could create a floating point sky texture then? To remove the banding.
Being doing a load more testing and have found this gives the best results:
8.8.8.8 ARGB 32bpp | unsigned
File sizes are a lot better than 32.32.32.32f too so thats a bonus.
reaper7 is offline   Reply With Quote
Old 03-29-10, 07:12 AM   #165
thfeu58
Officer
 
Join Date: Mar 2006
Location: Berlin
Posts: 243
Downloads: 142
Uploads: 0
Default

Please, I need help . How I come after the Game runs, the menu Editor is opened to load in the Game menu around a score. I come to here, but how further ?

thfeu58 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 10: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.