Log in

View Full Version : Advice(s) on menu_1024x768.ini please


ichso
04-11-08, 04:00 AM
Hi,

I was about to write a PM to OLC but thought it might be good to ask that in general so somebody who might need this too comes across this question. ;)

At first a little problem:
At the nav map (F5) I don't get the speed conversion charts, which is strange as no other mod fiddled with the menu_1024...ini so far and the SpeedTable.tga is also there. I currently played in 1280x1024 resolution but set it back to 1024x768 as I thought a higher resolution interferes with the absolut pixel-related positions of the items in menu_1024...ini.

Now the other thing:
I just started playing SH3 again and found out about the OLC GUI (1.2.3). I really love it and use it. But a few month ago, I also loved the 6 Dials Sim Feeling mod.
I now want to integrate this two into one mod.
I know that there's already a kombi mod out there for sliding dials and the OLC GUI, but I like it more if 1. the dials are bigger and 2. there slide in from the right (or at least the bottom more to the right).
Don't know why, but I have my gripes with using dials on the left.

The "6 Dials ..." mod has a great manual of how to setup up the mod piece by piece. So I followed the instructions and wanted to start out with the big compass on the
right (as it is already in GWX 2.0 too, but not anymore with OLC GUI).
I added the according sections into the menu_1024...ini as described in the readme.exe of the "6 Dials..." mod.

I added it right behind the whole OLC-stuff section, gave it it's unique number etc.
I didn't change any position values for this dial item but it appears on the bottom to the left is only seen halfway and doesn't slide out either.

Now my question is: what exactly controls WHERE you have to point the cursor to make any item slide out.
And where is the point of ordinates in SH3 (0,0) ? In the upper left corner of the screen ? And if you use any screen resolution, does that interfere with those absolute pixel values in the menu_1024...ini ?

Thanks in advance, i. :)

danlisa
04-11-08, 04:22 AM
Now my question is: what exactly controls WHERE you have to point the cursor to make any item slide out.
And where is the point of ordinates in SH3 (0,0) ? In the upper left corner of the screen ? And if you use any screen resolution, does that interfere with those absolute pixel values in the menu_1024...ini ?

Thanks in advance, i. :)
It's just a rollover state so you only need to be in the general area of the menu item to have it appear. If you have the popout compass, the slideout area you mouse needs to be in is anywhere along the height on the item/tga. If you are experiencing trouble with menu items, you have cross pollination from other mods/menu.ini's & possible menu groups sharing the same group/item name.

Top left is 0,0 so all other co-ordinates stem from this point. You can even go into minus numbers, like the draggable flaggen sheet.

Resolution has no effect on the menu.ini. All co-ordinates are still in a 1024x768 configuration.

onelifecrisis
04-11-08, 04:39 AM
Resolution has no effect on the menu.ini. All co-ordinates are still in a 1024x768 configuration.

The second part is correct. :know:
SH3 doesn't "translate" higher resolutions down to 1024x768 very well when it comes to the menu file. If your menu ini relies on pixel-perfect positioning (e.g. OLC GUI) then rounding errors at higher resolutions can result in malfunctioning slide-outs.

bert8for3
04-11-08, 06:19 AM
...
I just started playing SH3 again and found out about the OLC GUI (1.2.3). I really love it and use it. But a few month ago, I also loved the 6 Dials Sim Feeling mod.
I now want to integrate this two into one mod.
I know that there's already a kombi mod out there for sliding dials and the OLC GUI, but I like it more if 1. the dials are bigger and 2. there slide in from the right (or at least the bottom more to the right).
Don't know why, but I have my gripes with using dials on the left.
...


Ichso, have you used the MyFavoriteDials mod (MFD)? It was a combo of 6Dials and some other stuff.

The reason I ask is that I would also love to have the bigger (and slideout) dials but also a few of the other elements of MFD such as the transparent text and command stuff at the bottom. OLC's GUI is terrific, but there are some aspects I prefer from MFD (this is absolutely not a criticism of OLC's GUI, just to be clear, merely personal preference).

Anyway, all to say that if you need a hand I'd be happy to help. I have no modding experience or ability (just some very limited idea about how the file structure works), but could eg test or whatever. Even if you just wanted to merge in 6Dials, I could maybe learn enough to figure out how to merge MFD.

ichso
04-11-08, 09:04 AM
Thanks for the hints.

I'm currently installing a second SH3 version, which I'm going to use without GWX and Patches to test my results. It just loads way faster than with GWX on top ;)

I think I begin to understand how everything works in this file.

If the mod wants to create the switchable 25m-260m depth gauges, it first creates a group to put all needed graphics and controls together. An ItemID and ParentID allow you to reference specific items (menus, dials, ...).
So, for the depth gauge group, there is an item of type menu group, that works as the top level item for the whole depth gauge group.

G3F I347
Name=FLB Sale`s 6 Anzeigen, Tiefenmesser
Type=1026;Menu group
ItemID=0x3F0C0000
ParentID=0x3F000000
Pos=678,344,344,344
Color=0xFFFFFFFF
VertSlide=-343
So this is also the only item of the whole group that needs to get the absolut position on the screen and the slideout setting.
The other items (that refer to this one as their parent item) have position values only relative to this one's.

The following items (which still belong to this group) then load the needed graphics, like the dial graphic or backgrounds and pointers.

My problem now is, that I copied the whole section of the MyFavDial mod, which has something to do with the depth gauges, at the end of my G3F section in menu_1024_768.ini.
I renamed the numbers for the new items, so that they follow the numbering of the G3F section. (It ended at G3F I346 and I named them G3F I347, G3F I348,...).

But the dial doesn't get displayed correctly.
The only thing that gets displayed is a little digital number which gives my current depth and which slides in and out.
If I click somewhere near it I give a speed command, although I don't see the dial.
Don't know what is wrong or missing, just inserted the section as the mod does.
And I'm using stock SH3 now, so there is no other mod disturbing this.

Anyway, all to say that if you need a hand I'd be happy to help. I have no modding experience or ability (just some very limited idea about how the file structure works), but could eg test or whatever. Even if you just wanted to merge in 6Dials, I could maybe learn enough to figure out how to merge MFD. Help is appreciated :up:
As I see, we seem to have the same goals on this. I never did anything with this file before, too.

The thing I want to do, is to just integrate the depth gauges, speed dial and compass like it was with the original MFD.
As I use OLC GUI, I wanted to adjust the sliding settings, so that for example the speed dial slides further upwards than it did in the original MFD. Because the OLC GUI has this bar at the bottom which would otherwise be in the way of the sliding dial.



EDIT: Intelligent as I am, I forgot to include the needed graphics. No wonder that none got displayed if there weren't any...
I just forgot that in stock SH3, there where no such big dial graphics but with GWX there where.
Depth gauges now working as intended in original MFD.

danlisa
04-11-08, 09:06 AM
Have you installed the textures that are required for the larger dials?

ichso
04-11-08, 09:21 AM
Now I have, and now the depth gauges work as they should.

I'm currently fiddling with the slide setting.
There are two sections:

(G3F I347)
Name=FLB Sale`s 6 Anzeigen, Tiefenmesser
Type=1026;Menu group
ItemID=0x3F0C0000
ParentID=0x3F000000
Pos=678,344,344,344
Color=0xFFFFFFFF
VertSlide=-100

(G3F I348)
Name=Group feedback
Type=1026;Menu group
ItemID=0x3F010000
ParentID=0x3F000000
Pos=678,344,344,344
Color=0xFFFFFFFF
VertSlide=-100

Where one seems to control how far the whole group slides upwards and the other how far it would slide downwards again when the cursor leaves the area.

My respect for the modders increases as it is pretty annoying to start a big application as sh3 everytime you want to test a little change you made :-?

bert8for3
04-11-08, 09:33 AM
My respect for the modders increases as it is pretty annoying to start a big application as sh3 everytime you want to test a little change you made :-?

You might want to try an empty campaign files mod for that ... I put it up here http://hosted.filefront.com/bert8for3 ... from another post ... "You'll load faster for testing if you use a dummy or empty campaign folder (back up your existing campaign folder first). If you search the forum, you should find an empty_campaign mod. Enable it with JSGME, which will itself also backup your existing campaign folders (but make a separate backup first to be sure). That will let you start up faster, 'cause it won't have to load full campaign files." edit/add: Forgot to mention ... if you do that, start the game up directly via the sh3 game icon, and not via SH3Cmdr (if you use it). That way, you won't mess up SH3Cmdr's recognition of your saved campaign. After you're done testing, which best just in an academy mission or a created simple test mission for faster loading, disable the empty campaign mod, which will put you back where you were before, then you can start up via SH3Cmdr to resume your saved campaign.

edit/add: and let me know if I can help at all (which is already exaggerating my non-existent abilities :rotfl: ). I'll study the posts above on the weekend, RL work interfering now.

ichso
04-11-08, 10:02 AM
I created a single mission where my boat sails lonley on the open atlantic in a world empty of any other ships or people.

I found out that in my previous post, the first vertical slide value does actually nothing. By changing the position and vertical slide value in the second block the depth gauges now float 100 pixels above the lower screen boundary. This should be enough to not interfere with the OLC GUI's bottom bar.

But this comes with a price: because there is now a little bit room between the screen bottom and the (fully upslided) dial, the dial tries to slide back down to the bottom if the cursor stays in the (100 pixel high) area between it and the bottom.
So to avoid a slight 'shaking' of the dial, the mouse cursor has to follow it a little bit as it slides up.
But I think this is something one can easily get used to.

Now I will try to insert the other sliding dials too and if everything works as intended, I will try the whole thing together with GWX and OLC GUI.

ichso
04-11-08, 10:41 AM
Does the speed conversion chart in OLC GUI slides out at every station or just when you're at the nav map station ?

EDIT:
The adjustments are working correctly without OLC GUI.
But when I pasted my additions into the menu_1024...ini which comes with OLC GUI, there appears some strange behaviour which I think OLC should be able to explain best.

The sliding dials work like they should but after inserting them, the TDC, the attack disk and the left dial bar of OLC GUI are always present and won't disappear. It doesn't *seem* to depend on the sliding dials because no matter if one of them is slided out or no one is visible, those three items decribed above don't change their behaviour.

What I did is the whole sliding dials section beneath the OLC GUI stuff. The latter ends at (G3F I400) so the sliding dials start at (G3F I401) and go on to 46x. No wrong numbers inbetween or something, I checked extra carefully.
Maybe it's something with the ItemID or ParentID numbers ? I didn't check all of them yet.

Gairith
04-11-08, 11:15 AM
I currently use the 6 dial mod with stock GWX and I have considered trying out OLC GUI. Will be watching your progress on this. :ping: :up:

ichso
04-11-08, 01:17 PM
Ok, I need a little more help.

As described above I had the problem that some of the items of OLC GUI weren't functional anymore after inserting the sliding dials into the menu_1024...

I discovered that some of the ItemIDs of OLC GUI stuff and my sliding dials where identical. So I wanted to just rename my inserted items to resolve this conflict.

Because these are over 100 Blocks that need to be edited by hand, I simply used notepad++ to search for regular expressions (0x3F...) and replace them by 0x9F...
Of course only in the sections of my added dials and nowhere else.
Then I also realised that some of those 'high level' items in my list refered to the 'highest level' item of the G3F section, which is in Block (G3F I0) and has the ItemID 0x3F000000. So I edited all (e.g. 6) blocks which refer to this (G3F I0) as their parent item so that they again show 0x3F0000000 as their ParentID.

This in fact resolved this conflict. I was happy to fire SH3 up again and see OLC GUI and the sliding dials in great teamwork, but after loading a mission I had to realise that my sliding dials were sliding and showing up correctly but they weren't functional anymore - just for decoration.

All those Items still have IDs like 0x9F... as described above but I did not see that become a problem. With my method every gui item in the file has it's unique block number and ID. And the 'high level' items of the sliding dials refer to their correct parent item (which is G3F I0 with ItemID=0x3F000000).

Would be great if some more experienced modder could explain to me what makes my inserted dials unusable.

onelifecrisis
04-11-08, 02:31 PM
All the ID's on a page have to start with the page ID.

In other words, everything on 3F has to start with 0x3F.

ichso
04-11-08, 04:34 PM
I researched the structure of the ItemIDs a little bit in my sliding dials section and found out that every ID correspondes to the regex 0x3F..0...

So what I did was to replace each of those regular expressions by 0x3F..7...
and because some of the items have 0x3F000000 as their ParentID I changed those few ones back to this value.
So everything should be in order, but when loading the game the sliding dials slide correctly but still aren't usable.

Very strange indeed...

EDIT: I also researched my menu_1024...ini (original from OLC Gui) and there are no items with ID 0x3F..7... so there shouldn't be any conflict left.

onelifecrisis
04-12-08, 02:37 AM
You did add your new dials to dials.cfg?

ichso
04-12-08, 05:02 AM
The manual to the sliding dials mod told me to add the following to the dials.cfg:

[Dial74]
Name=CompassFdbk; FLB Sale`s Slideout Anzeigen
Type=12; DIAL_GYROCOMPASS
Cmd=Set_course,Crew
Dial=0x0
CrtVal=0x3F1C7007
NewVal=0x0
DialVal=-180,180
RealVal=-180,180; degrees
Circular=Yes
Dynamic=Yes

(this block being in fact the 75th block in this file and the dialnumber at the beginning of the dials.cfg is set accordingly)

the ID at CrtVal refers to a block in the menu_1024...
[G3F I436]
Name=Crt val
Type=1031;Stat bmp array
ItemID=0x3F1C7007
ParentID=0x3F1C7000
Pos=8,-8,330,330
Materials=1
Display=5;Linear&rotation
Mat 0=data/menu/gui/layout/Richtung3.tga
Crop 0=0.002994011,0.002994011,0.9940119761,0.994011976 1
MatFlags=0x29
TexFmt=0x9
Drag=false
BmpState=1
NeedFocus=true
SelOne=false
IdGroup=0
StatesColors=0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF

The mod works without OLC GUI correctly with this only one additional block in the dials.cfg.
Do I need to add each further new dial too ?

onelifecrisis
04-12-08, 05:28 AM
The mod works without OLC GUI correctly with this only one additional block in the dials.cfg.

OIC. Is the problem simply that you can't click on it? In other words, when you add it to OLC GUI, does it update according to the heading of your U-boat?

ichso
04-12-08, 10:58 AM
Sadly not. They are not clickable and and they don't show the actual values. The pointers all are at 12 o'clock position.

ichso
04-15-08, 01:49 AM
[missposted]

ichso
04-15-08, 01:53 AM
After a few days pause I looked into the files again and found out what the problem was.

Probably because the old ItemIDs refered to already existing items in the dials.cfg and just replaced the older IDs in the menu_1024...ini it worked for the original MFD mod.
But because I changed those IDs it did not anymore.
So I added those new items to the dials.cfg and now they work correctly.

But one problem is left. How do I add a button properly to those files ?
There are buttons to toggle the depth gauges (for example). They show up and are clickable but do nothing.

By looking at some buttons of the original SH3-Layout I didn't find their ID in the dials.cfg. Also I found a tutorial about those two files but that either states nothing about making buttons functional.
Any hint there ?

The Bad Wolf
04-15-08, 04:00 AM
You need OLC.

As I understand there are only 3 toggle buttons available, which were used for the original Dials.
OLC used them for his mod. 2 for TDC/attack wheel and to toggle the dials on/off.
Thus you won't be able to toggle the dials.

onelifecrisis
04-15-08, 05:02 AM
As I understand there are only 3 toggle buttons available, which were used for the original Dials.
OLC used them for his mod. 2 for TDC/attack wheel and to toggle the dials on/off.
Thus you won't be able to toggle the dials.

Correct :know:
You can't add new buttons. I used all 3 in OLC GUI.

bert8for3
04-15-08, 05:03 AM
I vaguely remember, but could be quite wrong, that there are only three buttons. I wish I could help but beyond that I don't know. I take my hat off, though, to you for working through this, as well as to all modders. I took a few hours on the weekend looking at stock GWX, 6-Dials and OLCGui menu1024_768 files to compare them and it ain't easy. I'm way behind you in understanding them, never mind dials.cfg ... btw where did you find the explanation for dials.cfg?

Keep at it ... sounds like you're making progress :up:

edit/add: Hadn't seen BadWolf's post, and OLC's while I was writing mine, I was only looking at page 1 ... well at least I was right about the 3 buttons :|\\ . If you're going to slideout on the dials, that should free up one button if you disable the OLC dial panel ???

ichso
04-15-08, 07:51 AM
I see :-?

So, to get this straight: All the three available buttons are set to a fixed ItemID and to a fixed behaviour. I suspect so because there are no hints what those buttons exactly do, so it must be hardcoded somehow.

Let's take the 25m-260m switchable depth gauge fo an example. What I assume is that in stock SH3 (and MFD also) the 260 version gets printed first and the 25 version afterwards. So the only dial you see in the game is the 25 version.
Then one button refers to the 25m dial and toggles it's visibility. So, when you click it the 25-dial gets invisible and you then see the 260-dial (and the according pointer+value).
Is this right ?

What I would do then is to throw the OLC dial bar overboard to get the switchable depth dials again and split all other dials of MFD up into single ones so that they don't need to be switched.
Also, I would leave out the engine telegraph completely because you can easily control the speed setting by hotkeys. All the other 5 dials are important, though.

onelifecrisis
04-15-08, 07:57 AM
So, to get this straight: All the three available buttons are set to a fixed ItemID and to a fixed behaviour. I suspect so because there are no hints what those buttons exactly do, so it must be hardcoded somehow.

Yes the IDs are fixed and the behaviour is hardcoded.

Let's take the 25m-260m switchable depth gauge fo an example. What I assume is that in stock SH3 (and MFD also) the 260 version gets printed first and the 25 version afterwards. So the only dial you see in the game is the 25 version.
Then one button refers to the 25m dial and toggles it's visibility. So, when you click it the 25-dial gets invisible and you then see the 260-dial (and the according pointer+value).
Is this right ?

Not quite. The buttons toggle specific menu groups on and off. Each button has two associated menu groups (whos IDs are also fixed and hardcoded). Taking one button as an example, its first menu group (containing, say, the 25m dial) starts visible, and the other (containing the 260m dial) starts invisible. Pressing it switches the visibility of both groups.

Answers above in blue.

ichso
04-15-08, 08:02 AM
Thanks for explaining. :yep:

bert8for3
04-15-08, 08:43 AM
... What I would do then is to throw the OLC dial bar overboard to get the switchable depth dials again and split all other dials of MFD up into single ones so that they don't need to be switched. Also, I would leave out the engine telegraph completely because you can easily control the speed setting by hotkeys. All the other 5 dials are important, though.

Makes good sense imho. Then you'd just have to find place for one additional slideout. :up:

ichso
04-15-08, 02:15 PM
Is it required that the numberings of the menu items are continuous ?
I mean, is it a problem if I skip a number in between ? I'm getting some strange errors and want to find out whether this might be a problem.

onelifecrisis
04-15-08, 03:22 PM
Is it required that the numberings of the menu items are continuous ?
I mean, is it a problem if I skip a number in between ? I'm getting some strange errors and want to find out whether this might be a problem.

Yes its required. Yes, its a very big problem if you skip numbers. But, as long as parent IDs are always above their children, the order makes no difference... so just add to the end whenever you can, to avoid unnecessary renumbering. :up:

ichso
04-17-08, 05:11 AM
It's still a bit of a problem because your section containing the dials is somewhere at the beginning of the g3f section. The dials of MFD won't need so many blocks so I have to adjust all of the following numbers, which are several hundered.

I didn't want to do that by hand and had to realise that notepad++ isn't able to do that automatically. I just wrote a little Java program to parse the file and edit the section numbers automatically. This may at least save time for further editings in the future.

Makes good sense imho. Then you'd just have to find place for one additional slideout. :up:
I will try to put 3 dials on the right side of the screen. If that isn't practical I will have to put one more down at the bottom.
I'm also going to make a version without the digital values, they feel a little bit too arcadish for my taste :D

ichso
04-19-08, 04:26 AM
Finally the control dials for the sub are working as they should.

There are still a few problems I wanted to point out by some screenshots but [ctrl]+F11 doesn't work anymore, no screenshots saved in my installation directory :88)

One big problem is also still there which I don't understand yet:
The TDC controls are totally messed up, about 66% unfunctional -.-
I didn't touch any of them when deleting the OLC Gui dials. The TDC stuff is all still there but some things are at wrong places and some aren't clickable.
Numberings in the G3F section are continuous and in the dials.cfg also.
No error messages pop up while loading the game, also.

And now I can't even take screenshots to show what I mean :-?

bert8for3
04-19-08, 05:51 AM
... And now I can't even take screenshots to show what I mean :-?

Have you tried Ctrl/PrtScr? Since the res fix (which IIRC you're using) disabled my F10/11/12 keys I accidentally discovered that Ctrl/PrtScr works for screenshots, although it put them into tga format (but no big deal to convert).

Great work btw ... sounds like you're making good progress :up:

ichso
04-19-08, 06:39 AM
Have you tried Ctrl/PrtScr? Since the res fix (which IIRC you're using) disabled my F10/11/12 keys I accidentally discovered that Ctrl/PrtScr works for screenshots
Thanks, that I didn't know :up:

So here are some images of what is working right now and what not.
At first, how the MFD dials are lined up. The 260m and 25m are still switchable and in the same spot as before, the kompass is moved a little bit upwards, the speed and rudder dials are also seperated. Rudder dial sliding vertically from the upper right corner, the depth dials too (as in the original MFD). The other 2 dials are lined up at the right side of the screen and slide in horizontally.

http://cip.uni-trier.de/%7Eschmidt/sh3/MOD/25m.jpg
http://cip.uni-trier.de/%7Eschmidt/sh3/MOD/260m.jpg
http://cip.uni-trier.de/%7Eschmidt/sh3/MOD/compass.jpg
http://cip.uni-trier.de/%7Eschmidt/sh3/MOD/speed.jpg
http://cip.uni-trier.de/%7Eschmidt/sh3/MOD/rudder.jpg
At the rudder you can see that the little open spot to see a piece of the compass doesn't show the actual direction yet. If I don't figure out how to make it working again, I'm going to just use the 'closed' rudder dial.

Here now some broken things:
http://cip.uni-trier.de/%7Eschmidt/sh3/MOD/broken_tdc.jpg
http://cip.uni-trier.de/%7Eschmidt/sh3/MOD/tdc_peri.jpg
http://cip.uni-trier.de/%7Eschmidt/sh3/MOD/salvo.jpg
Nothing major I think but still irritating as I didn't touch any of the TDC related stuff in this file. The only thing I had to do was renumbering of the items because I deleted the OLC dials somewhere in between (where I found them) and added the MFD stuff at the very end of the section.

What also is broken atm:
- Range&AOB Finder (middle wheel not clickable)
- some of the TDC controls still work, although they look as they don't.
- and finally the Attack Disc shows up, but isn't clickable anymore.

I also had to renumber some stuff in the dials.cfg, but I didn't delete anything there, that was related to none-dial stuff. I also checked the ItemIDs showing up in this file and checked whether they are still linked against the according items in the menu_...ini.

So to summon up: some work is still left to do, no time to work on over the weekend, but hopefully everything will be completed by the middle of next week.

Oppinions about the placement of the MFD dials are also welcome ;)

Thanks for listening in, i. :arrgh!:

bert8for3
04-19-08, 06:52 AM
Oh, good, glad the screenshot thing worked.

The dial placement looks great. I remember that the little compass window in the rudder indicator did not work anyway with MFD, at least in its earlier version.

I wish I could suggest something about the so far not-working TDC things, but no bright ideas (or any at all).

ichso
04-19-08, 07:29 AM
Hm, OLC just released his ubermod which includes some more little changes to the menu layout. I download this and make the MFD compatible with this one, makes more sense :D

I remember that the little compass window in the rudder indicator did not work anyway with MFD, at least in its earlier version.
Okay, maybe there was some issue with that, right. I don't know anymore ^^.

The mod I still have here is the MFD compatible with GWX 1.03. Don't know whether there was a newer version.

I'll see next week, now I'm gonna visit my girlfriend home in port for the weekend :arrgh!::sunny:

bert8for3
04-19-08, 08:17 AM
... I remember that the little compass window in the rudder indicator did not work anyway with MFD, at least in its earlier version.
Okay, maybe there was some issue with that, right. I don't know anymore ^^.

The mod I still have here is the MFD compatible with GWX 1.03. Don't know whether there was a newer version.

I'll see next week, now I'm gonna visit my girlfriend home in port for the weekend :arrgh!::sunny:

From what i recall it didn't work with the 1.02 version anyway. I don't recall if it was fixed for the 1.03 ver but from what you're seeing, I guess not.

Have a nice weekend :up: