View Single Post
Old 08-23-2009, 08:34 PM   #10
karamazovnew
The Old Man
 
Join Date: Mar 2009
Location: Bucharest, Romania
Posts: 1,403
Downloads: 151
Uploads: 0


Default

Quote:
Originally Posted by makman94 View Post
hello Karamazovnew,

wonderfull info stuff you showed us here !!

i think that sh4's gui moders should start working on these new data you discover ....maybe we will see , at last , the u-jagd tools in sh4 !!

good job !
Hey Mak . Well, You don't need to wait too much, I've done it for you. Since I don't have acces to a computer that can play SH4, I've done the following from imagination. I need you to test it for me, if it works, then you'll have your U-jagd.... I'm assuming you don't have a resolution of 1024/768, otherwise it would just be silly. If you can, please test all directly on a 16:9 resolution, the higher the better.

First, Download Mikhayl's AOBF: http://www.mediafire.com/?xbn9xydc2jl
his thread is here: http://www.subsim.com/radioroom/showthread.php?t=135184

Use it first as it is to see how it works. I'll tell you because I've already analysed the Menu.ini file. The AOBF is made up of 2 items, the inner and outer dials (0x26030012 and 0x26030013) parrented to the AOB menu group (0x260E0000) which holds the elements from the AOB input dial, and is in turn parented to the AOB page (0x260C0000). This page is hardcoded to appear when you click the AOB text on the notepad. That means that
- to make the AOBF appear, you must click on the AOB text
- if you close the notepad from it's handle, the AOBF will move to the right, but will not dissapear.
- you can use both items at the same time, which allows you to still enter the AOB through the notepad.
Please test all of these behaviors.

Now, open the Menu_1024_768.ini files and let's make some changes to the G26 page (the attack periscope page). Let me explain what we'll do, you don't need to understand this part, but it would help. You'll probably get it after you make the changes. There is a catch to centering the AOBF on the screen for all resolutions. A simple way would be to parent the 2 items to the main periscope page, but that will make it always visible, and we don't want that. It's parents must remain the same, BUT, as I have said in my post, for an item to be centered in the screen, it must be centered on it's parent which must act as the screen, it must already be centered on the screen and have an aspect ratio of 4:3 (or simpler, it must have 1024/768 for size, and a SCALE of 2 and PIVOT of 1). The AOB menu group (0x260E0000), the primary parent of the AOBF is just an intermediary parent, not needed, but let's ignore that for now. It's the main AOB page that holds all of the items. It's the page that appears when you click the AOB text. This MUST be our "screen". But it's already parented to the notepad. No problem, we can break that link and parent it directly to the screen. So... do a search for the green text and cpopy my red lines over the original text. Got it?

[G26 I89]
Name=Angle on bow
Type=1026;Menu group
ItemID=0x260C0000
ParentID=0x26000000
Pos=0,0,1024,768
Zone= 0 768 1024 768 2 1 0x26000000 0.5 -0.5 0x260C0000 -0.5 0.5 0 0

Color=0xFFFFFFFF

Now the AOB menu page will fill the entire screen, regardless of resolution. It is invisible, but if you start the game now, you'll see all of the items of that page all around your screen (again, you're not using 1024/768 resolution right?!). However, please note that altough, the page is now parented to the main periscope menu group, it still only appears when you click the AOB text on the notepad.
Let's do the same thing to the 0x260E0000 item, that is the direct parent of the AOBF (we could ignore it and change the parent of the AOBF, but...some other time).

[G26 I92]
Name=AOB
Type=1026;Menu group
ItemID=0x260E0000
ParentID=0x260C0000
Pos=0,0,1024,768
Zone= 0 768 1024 768 2 1 0x260C0000 0.5 -0.5 0x260E0000 -0.5 0.5 0 0

Color=0xFFFFFFFF

As you see, I've put a SCALE of 2 for these items. If you go back to the game, now you'll see the temp AOB dial all screwy too. I guess it's time to move all of these screwy items out of the way. For the following items, simply move them out of the screen by inputing a value of 2000 for their X offset (you could also comment out their Zone lines, but if they are parented in any way, it will cause a CTD, changing the offset is much safer):

[G26 I90]
[G26 I91]
[G26 I93]
[G26 I94]
[G26 I95]
[G26 I96]
[G26 I97]

for example:
[G26 I90]
Name=Angle on bow val
Type=1029;Static text
ItemID=0x260C0053
ParentID=0x260C0000
Pos=190,-212,70,16
Zone= 929 527 70 16 0 1 0x260C0000 0.655172 -0.768116 0x260C0053 0 0 2000 0
Color=0x111111FF
Font=5
Text=0
TextFlags=0x6

This will move all of these items out of the screen. Now let's deal with the AOBF itself, it's waaay down at the bottom of the periscope page. Since it will need to always fill up the hole in the background, it must behave like it too. The background item has a SCALE of 5, so we'll use it like that. We also need to center the items on the screen. Also, since Mikhayl didn't imagine that someone would try to mess up with the resolution, he made the outer dial with a display factor of 0. Even if we make the menu group behave right, the image file itself will not be scaled, so let's make sure we correct that too, by giving it a linear display type.

[G26 I150]
Name=AOBF Inner Disc
Type=1031;Stat bmp array
ItemID=0x26030012
ParentID=0x260E0000
Pos=231,-103,562,562
Zone= 231 665 562 562 5 1 0x260E0000 0.5 -0.5 0x26030012 -0.5 0.5 0 0

Materials=1
Display=5;Linear&rotation
Mat 0=data/menu/OLC/AOBFInnerDisc.tga
MatFlags=0x29
TexFmt=0x9

[G26 I151]
Name=AOBF Outer Disc
Type=1031;Stat bmp array
ItemID=0x26030013
ParentID=0x260E0000
Pos=231,-103,562,562
Zone= 231 665 562 562 5 1 0x260E0000 0.5 -0.5 0x26030013 -0.5 0.5 0 0

Materials=1
Display=2
Mat 0=data/menu/OLC/AOBFOuterDisc.tga
MatFlags=0x29
TexFmt=0x9
BmpState=1

All done. What you should now have is:
- when you click the AOB text on the notepad, the AOBF appears in the center of the screen, scaled, regardless of resolution. GOOD
- if you "close" the notepad by clicking on it's handle, while the AOBF is visible, the AOBF stays where it is, in the center of the screen. GOOD.
- if you want to close the AOBF, you must click the Cancel or Accept buttons on the notepad, just as before. Again, GOOD
- if you want to enter AOB through the notepad, you can't, because we've moved that out of the screen. BAD, but i guess you can live with that.

Now again, this was all done mentally, based on my rules. If they are correct, it should work as described. Please test this, as I am unable. Here's the modified file, just in case you have problems, simply copy it over Mikhayl's mod. http://www.filefront.com/14372713/menu_1024_768.ini

PS: btw, remember to change resolutions, all should work just fine. And try to enter a US sub. You'll see that it is completely unchanged, since all of the new items have been parented to ID's which are not used in the US interface. And for the love of god, if you reply to this message, pleeeeaaaase don't quote it, it's huge!!!!

Last edited by karamazovnew; 08-23-2009 at 08:54 PM.
karamazovnew is offline   Reply With Quote