SUBSIM Radio Room Forums



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

Zurück   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Antwort
 
Themen-Optionen Ansicht
Alt 02-17-13, 02:15 AM   #1
scudder
Sailor man
 
Registriert seit: Oct 2011
Ort: Western MA
Beiträge: 43
Downloads: 35
Uploads: 2
Standard Dissecting menu_1024_768.ini

Ok, so I'm working on (well, really studying SH3 file structure prior to working on) a new mod, and it's become apparent that the only way to really do it will be to edit the menu_1024_768.ini file. I've been poking through my .ini (already modified by GWX) and reading the readme that comes with sublynx's chart mod. I think I'm getting a pretty good grasp of how it works, but I can't wrap my head around a couple things. Let me give you a chunk of my .ini as an example:

[G31 I20]
Name=Target;Neuer Eintrag fur Konvoy Karte
Type=1031;Stat bmp array
ItemID=0x31000006
ParentID=0x31000000
Pos=-990,1781,1026,1026
Color=0xFFFFFFFF
Materials=1
Display=0;No stretch
Mat 0=data/Menu/Gui/Layout/KonvoyMap.tga
Crop 0=0,0,1,1
MatFlags=0x9
TexFmt=0x9
Drag=true
BmpState=1
NeedFocus=true
SelOne=true
IdGroup=0
StatesColors=0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF

If you'll indulge me, first I want to run through what I THINK I understand already, please feel free to point and laugh at any errors:

This section is for the pulldown convoy route map added as part of GWX 3.0. G31 tells me this is for the navigation map view, and I20 is the item number. I've gathered through reading the forums that each item in a group must have an item number, and they must be sequential and contiguous (i.e. no skipped numbers from the first item to the last, so you can't just delete an item without renumbering the rest).

The "Name" parameter appears optional based on some other items in the file, and can be set to anything.

"Type" is fairly self-explanatory, defines what type of object this is, based on (I'm assuming) a proprietary array of object types built into the game engine somewhere.

"Color" - The "base" color of the object in hex code, in this case white. Never seen by the user as the referenced image is written over it.

"Materials" - Number of reference items (image files, usually) the object needs.

"Display" - one of several pre-defined behaviors for the way the object is displayed

"Mat 0" - The direct reference to the first item needed by this object. If more than one item is needed would be followed by "Mat 1" and so on.

Ok, now on to the stuff I know I don't know :

ParentID and ItemID - I assume ParentID references the Group, and ItemID is a hex identifier for this item, but what confuses me is the ItemID value is repeated among several items, so doesn't have to be unique? Not sure what these attributes really do.

Hex colors - I'm familiar with the 6 digit hex colors in RRGGBB format, but there are too many digits here for that, so are they using a different system or is there some kind of prefix appended to each color?

Pos - I assume refers to position on the screen, but what do the 4 coordinates represent? the 4 corners of the image?

Crop 0 - I know some image files contain several small images all loaded into one file, and this appears to be a reference to which part of the larger image to display. What I don't get is how "0,0,1,1" displays the entire source image.

MatFlags, TxtFmt, BmpState, NeedFocus, SelOne, IDGroup. No idea on these. I do know the concept of "focus" in Windows environments, i.e. the window that has focus gets information from input sources, etc., but not sure how that applies here.

StatesColors - This, I'm guessing, defines the "base" color for this object in it's various states from the standpoint of being a window. (i.e. has focus, doesn't have focus, etc.) Kind of a shot in the dark here, an assumption from my distant intro level programming days.

If you've read this far you deserve some kind of commendation, so I thank you. I hope some of you can fill in the gaps/errors in my understanding so I can work a bit more efficiently going forward. I don't mind trial and error, but the knowledge here is vast, and to call me an amateur would be generous. Many thanks to sublynx for his detailed readme, and to the GWX team for putting in comments everywhere in the files they modified.
scudder is offline   Mit Zitat antworten
Alt 02-17-13, 03:09 PM   #2
irish1958
Ocean Warrior
 
Registriert seit: Apr 2005
Ort: Carmel, Indiana
Beiträge: 3.250
Downloads: 320
Uploads: 11
Standard

There is a post concerning this file with details on how to work with it. I can't find it on search and I do't have my files and notes. Somebody will come along and guide you to it.
__________________
Irish1958
irish1958 is offline   Mit Zitat antworten
Alt 02-17-13, 03:49 PM   #3
Sailor Steve
Eternal Patrol
 
Benutzerbild von Sailor Steve
 
Registriert seit: Nov 2002
Ort: High in the mountains of Utah
Beiträge: 50.369
Downloads: 745
Uploads: 249


Standard

Yeah. It looks like you already know more about it than I do. I've done some massive changes but it was always copy/paste from a mod, so I didn't really learn much.

Sorry.
__________________
“Never do anything you can't take back.”
—Rocky Russo
Sailor Steve is offline   Mit Zitat antworten
Alt 02-17-13, 04:02 PM   #4
Hitman
Pacific Aces Dev Team
 
Benutzerbild von Hitman
 
Registriert seit: Sep 2002
Ort: Spain
Beiträge: 6.099
Downloads: 109
Uploads: 2


Standard

Zitat:
ParentID and ItemID - I assume ParentID references the Group, and ItemID is a hex identifier for this item, but what confuses me is the ItemID value is repeated among several items, so doesn't have to be unique? Not sure what these attributes really do.

...

Pos - I assume refers to position on the screen, but what do the 4 coordinates represent? the 4 corners of the image?
Yes Item and Parent ID are unique. Usually Item ID is Parent ID with last numbers changed, so they keep a common beginning that highlights that one depends from the other.

Position is the first two numbers X and Y, but IIRC Y value is inverted and counts from the top of the screen downwards. The last two values is the size of the item.

Please note that position for Items that have a parent is counted starting from the parent location. For example, let's say that you have a menu page called "Attack Periscope". It will display a background over the full screen with 0,0, 1024,768

Now you position for example the torpedo tube lights on it like this:

Item=Torpedo Tube lights

512,512,128,128 and that gives you a square of 128,128 whose top left corner is at 512,512 from where the periscope screen started, i.e. from 0,0

Then you want to position the tube 1 lights, so you put the item as child to the torpedo lights background you just created and you go on like this:

Item= Tube 1 light
25,25,64,64

This would mean that the tube 1 light is located 25 pixels right and 25 down from the starting position of the Parent tube lights (512,512) and then be 64x64 pixels big.

Please double check that I got it right, I haven't edited Sh3 menu for ages
__________________
One day I will return to sea ...
Hitman is offline   Mit Zitat antworten
Alt 02-17-13, 05:00 PM   #5
machiavelli
Stowaway
 
Beiträge: n/a
Downloads:
Uploads:
Standard

Hi scudder,

Perhaps I can help. Editing this file can be tedious. You'll need a handy tool, the menu_1024_768.ini Renumbering Tool. Very handy. It removes spaces and renumbers things so all is good and working.

I didn't make it, I forgot who did. But whoever did, its a great tool.

Menu_1024.... is one of the more complex files in the game directories. It is quite large too. But its simple to grasp.
  Mit Zitat antworten
Alt 02-17-13, 05:01 PM   #6
machiavelli
Stowaway
 
Beiträge: n/a
Downloads:
Uploads:
Standard

BTW, keep up the hard work. Looking forward to your mod.
  Mit Zitat antworten
Alt 02-17-13, 05:41 PM   #7
rudewarrior
Sonar Guy
 
Registriert seit: Apr 2005
Ort: Middlebury, VT, USA
Beiträge: 378
Downloads: 165
Uploads: 2
Standard

Color is in the format RRGGBBAA, where AA denotes the opacity of the alpha channel. You can look at it as the opacity of the the color chosen. Except, with white/grey/black it works differently, and I haven't quite figured out how.

Also, the menu.ini renumberer referenced above is a product of h.sie. You can find his mod page under his sig in the Realism- and gameplay-related hardcode fixes for SH3.EXE thread stickied at the top of the mods forum.

Good luck!
rudewarrior is offline   Mit Zitat antworten
Alt 02-17-13, 06:13 PM   #8
scudder
Sailor man
 
Registriert seit: Oct 2011
Ort: Western MA
Beiträge: 43
Downloads: 35
Uploads: 2
Standard

Thanks all for the replies, excellent information as usual (and so prompt too!)...and thanks Sailor Steve for the...uh....reading my whole post

Also, in case anyone else happens across this thread, I think I found the thread to which irish1958 was referring, here. It concerns SH4, but the structure of the file and it's elements appear largely unchanged. When/if I get this file figured out I'd be happy to collect my knowledge into one post, if someone needs it.
scudder is offline   Mit Zitat antworten
Alt 02-18-13, 10:33 AM   #9
irish1958
Ocean Warrior
 
Registriert seit: Apr 2005
Ort: Carmel, Indiana
Beiträge: 3.250
Downloads: 320
Uploads: 11
Standard

Keep up the good work
__________________
Irish1958
irish1958 is offline   Mit Zitat antworten
Alt 02-18-13, 05:38 PM   #10
sublynx
Sea Lord
 
Registriert seit: Mar 2011
Ort: In the conning tower of my VIIC scanning the sea through the periscope
Beiträge: 1.698
Downloads: 173
Uploads: 7
Standard

Onelifecrisis has answered some of your questions in this post:

http://www.subsim.com/radioroom/showthread.php?t=141633

Latemail made a very thorough tutorial on the file, unfortunately only in German. I did find that German tutorial when making my own mod, but can't find it anymore.

If you do write a post about menu_1024_768.ini, please consider writing it as a short tutorial and then perhaps uploading it to the downloads section, where it can be found easily.

Good luck with your mod!
__________________
[SIGPIC][/SIGPIC]
NYGM+H.sie v16+Stiebler 4C+MaGui WS
sublynx is offline   Mit Zitat antworten
Alt 02-18-13, 09:44 PM   #11
scudder
Sailor man
 
Registriert seit: Oct 2011
Ort: Western MA
Beiträge: 43
Downloads: 35
Uploads: 2
Standard

Zitat:
Zitat von sublynx Beitrag anzeigen

If you do write a post about menu_1024_768.ini, please consider writing it as a short tutorial and then perhaps uploading it to the downloads section, where it can be found easily.
Will do. Maybe I'll do a text-only post (perhaps I'll lobby for a sticky on that if it's thorough enough) and a PDF for the downloads section? Maybe with pictures where needed? Suddenly I have several projects going at once, bet that's never happened to a modder before...
scudder is offline   Mit Zitat antworten
Alt 02-19-13, 06:29 AM   #12
sublynx
Sea Lord
 
Registriert seit: Mar 2011
Ort: In the conning tower of my VIIC scanning the sea through the periscope
Beiträge: 1.698
Downloads: 173
Uploads: 7
Standard

Zitat:
Zitat von scudder Beitrag anzeigen
Will do. Maybe I'll do a text-only post (perhaps I'll lobby for a sticky on that if it's thorough enough) and a PDF for the downloads section?
That would be great and it would help a lot young modders as now everyone needs to find the needed info here and there.
__________________
[SIGPIC][/SIGPIC]
NYGM+H.sie v16+Stiebler 4C+MaGui WS
sublynx is offline   Mit Zitat antworten
Antwort


Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ -5. Es ist jetzt 06:38 PM Uhr.


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