![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#13 | |
Admiral
![]() |
![]()
Hi Fred, been gone for longer than I expected (you "make hay when it sunshines", lately its wheat and making straw!).
Looks like you're doing OK with the project. I do have a couple of other ideas. The menu_1024_768.ini file creates the 2D screens within the game. Some screens like the Sonar or Radar stations are made from the 3D models found in the correct .dat files, but the crew management screen is made up through the menu_1024_768.ini file. Some screens have a mixture of both 3D elements and 2D images that require different processes. I pointed out that I put a tooltip on the Deck Gun screens and the following is what it looks like. ![]() Just a small tooltip that explains what the figures at the ammunition selection area mean. For this to appear you need to "link" the information to an existing item in the menu_1024 file. The menu_1024 file has three categories for the deck guns used in the game. Main gun found in the section G38, The 37mm found in the G39, and the 20mm found in the G3A section. Since the picture above is of the 20mm station the following is the first 3 entries in that section. [G3A I1] Name=Page 20mm gun Type=1027;Menu page ItemID=0x3A000000 ParentID=0x0 Pos=0,0,1024,768 Zone= 0 768 1024 768 2 1 0x0 0.5 -0.5 0x3A000000 -0.5 0.5 0 0 LoadingMode=2 [G3A I2] Name=Shells Type=1026;Menu group ItemID=0x3A010000 ParentID=0x3A000000 Pos=814,-284,120,200 Zone= 814 484 120 200 0 1 0x3A000000 1 -0.5 0x3A010000 -1.75 0.5 0 0 Color=0xFFFFFFFF [G3A I3] Name=GunText Type=1031;Static bmp ItemID=0x3A010007 ParentID=0x3A010000 Pos=2,-149,120,16 Zone= 882 335 120 16 0 1 0x3A010002 0.5 -1 0x3A010007 -0.5 0 0 -20 BmpState=1 ToolTipText=2215 This colored "Item3" entry was added to the section to create the tooltip. The actual wording of the tooltip is done in the menu.txt file at the #2215 entry. A couple of things that you should do when you make an entry like this. First, you need to know what ItemID number is available for you to use. The entry needs to have an ID that is different from any others. I found that the 0x3A010006 was the last ID used so, 0x3A010007 became the ID for this item entry. When you make an item ID I found you'll get a CTD when you place it out of sequence when compared to the lower numbered items. It seems the file is read from the bottom up, not the top down, so the higher numbered ID's need to appear "above" the lower ones. From a modding point of view this creates a bit of a problem in that the new entry needs to be placed towards the top of the section and the remaining section item numbers (G3A I4, to the end) need to be changed to keep everything in sequence. Luckily these sections don't have too many entries (some have several hundred). The ParentID is critical, it's what the entry is linked or related to. In this case the Parent is the "Shells" entry just above in the I2 entry. You need the tooltip to be linked to an item that forms a "Menu Group", the item 0x3A010000 does this. The Position and Zone lines tell the tooltip where to be positioned on the page (follow the tutorial by zAmboni). The BmpState=1 sets-up the tooltip to have the ability to have the mouse "captured" when you move over the particular area that the zone line defines. This allows the tooltip to be "seen" when you mouse over the spot. So does the reference of the "Type=1031;Static bmp". This Type=1031 tells the game that the image can trap the mouse, where a Type=1030 does not. Stuff that mean the difference between getting things to work or not. I spent some time trying different things with the Crew Management screen found in the menu_1024_768.ini file in the [G61] section. Unlike the Deck Gun sections, there wasn't much to work with. I found the entry for placement of the sub image found below. Notice the reference to the Gato image. Apparently the game code changes the image to the correct sub picture found in this folder. [G61 I15] Name=Submarine Type=1030;Static bmp ItemID=0x61000001 ParentID=0x61000000 Pos=276,-36,694,120 Zone= 276 732 694 120 1 1 0x6100000E 0.5 -0.125 0x61000001 -0.5 0.5 0 0 Materials=1 Display=2;Linear Mat 0=data/menu/data/submarineclasses/gato_class_01.tga Crop 0=0.0976563,0.195313,0.847656,0.585938 MatFlags=0x9 TexFmt=0x0 This same entry appears in the other sections of the Weapons & Sensors, Sub Systems, and the Torpedo sections as well. Differently placed through the Zone Line parameters. Since the image already has a static text of the subs name appear when you mouse over it (as you know) but this ability does not exist in the menu_1024 file!?! It's apparently hard coded as well. So I couldn't change anything since there was nothing to change!! I did however find the entry for the top left area of the Crew Management screen that names the sub and it's sub class. [G61 I75] Name=Left Top Panel Type=1031;Stat bmp array ItemID=0x6100001A ParentID=0x61000000 Pos=0,1,232,84 Zone= 0 769 232 84 2 1 0x6100000F 0.5 0 0x6100001A -0.5 1 0 -10 Materials=1 Display=2;Linear Mat 0=data/menu/skins/american/gui/layout/crewleft.dds Crop 0=0,0.699219,0.90625,0.0820313 MatFlags=0x9 TexFmt=0x0 Drag=false BmpState=1 NeedFocus=true SelOne=false IdGroup=0 StatesColors=0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF ToolTipText=7635 By adding the Tooltip with the referenced text in the menu.txt file for the added 7635 item, this is what you get..... ![]() The tooltip appears when you mouse over the top left area. Pay no attention to the rest of the screen, I simply just used one of my Optical Targeting Corrections mods to try a couple of things. It seems by adding the tooltip entry to this item you can have what you're looking for on the Crew Management screen without messing up other screens in the process. As I said, it looks like your trying some other things. So, here's something else to look at. ![]()
__________________
The HMS Shannon vs. USS Chesapeake outside Boston Harbor June 1, 1813 USS Chesapeake Captain James Lawrence lay mortally wounded... Quote:
|
|
![]() |
![]() |
|
|