scudder
02-17-13, 02:15 AM
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 :hmmm::
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.
[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 :hmmm::
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.