Jump to content

Menus.UIB research


lovalmidas

Recommended Posts

MVI (and some others who I don't know) made a lot of progress deciphering the format of various UIB files, culminating in the release of an editor that works on many uib formats.

For the menus.uib, the each menu entry had: a key name (that UIL searches for when attempting to open a new menu), a value (the file that represents the menu to open) and two unknown integer values, named Unknown1 and Unknown2.

I'll let Ghidra explain the unknown values for me. (Apparently the game has functions converting other files into UIB files. Probably used for debugging or their development, but very useful for reverse engineering their formats)

0YSWfSg.png

----------------------------------------

Unknown 1 (int): Determines how the menu fades in

  • 0 = Fade From Black? (From videos of the game, this appears to be Fade From Black. However, my game does something weird when this is used, drawing a black rectangle at point 0,0 during the 'animation' phase). It could be due to the patched game, a graphics setting or that some legacy Windows broke on newer Windows. See below for a more visual result)
  • 1 = Unused (the game flickers when you use this. I suspect this is for fading out but it doesn't play well as a fade in sequence)
  • 2 = Tween (looks like the proper fade blending the menu and the background behind it)
  • 3 = Skip (no transition. The new menu pops in)
  • Other values (I only tested '4') = The new menu is not drawn, but is functional. See below for a more visual result)

----------------------------------------

Unknown 2 (int): Determines how the menu fades out

  • 0 = Unused (the game flickers when you use this. I suspect this is for fading in but it doesn't play well as a fade out sequence)
  • 1 = Fade To Black? (From videos of the game, this appears to be Fade To Black. However, my game does something weird when this is used, drawing a black rectangle at point 0,0 during the 'animation' phase). It could be due to the patched game, a graphics setting or that some legacy Windows broke on newer Windows. See below for a more graphical result)
  • 2 = Tween (looks like the proper fade blending the menu and the background behind it)
  • 3 = Skip (no transition. The new menu pops out)
  • Other values (I only tested '4') = The background behind the closing menu is not drawn, but is functional. See below for a more visual result)

----------------------------------------

The tests are perform by modifying the entry for DIFFICULTY / skill.uid. This menu is called when you click Start New Game on the main menu.

Visual - When using value 0 or 1 (Fade) as fade in / fade out

nUQTMlZ.png

For an example of a working Fade To Black, see 3:20 of https://www.youtube.com/watch?v=-x9MahcVn7k where a Fade To Black was demonstrated from the campaign map.

 

 

Visual - Value 4 for Fade In 

Menu did not appear, but is active. Buttons will paint over the screen when you interact with them.

JIKsXCf.png

 

Visual - Value 4 for Fade Out

Menu did not disappear, but the previous menu (main menu) is active. Buttons from the currently active menu will paint over the screen when you interact with them.

M37QLlk.png

 

With this I think the description of the Menus.uib is complete. I hope this gives modders more control over the UI behavior of their experiments. :)

 

EDIT: Corrected errors - it was Fade (value 0,1) that was giving display glitches, not Tween.  Also added more information on the fade behaviour.

 

 

Edited by lovalmidas
  • Upvote 2
Link to comment
Share on other sites

More information on the fade (value 0, 1).

It appears that the Fade to Black and Fade from Black works.

The only issue is that the game uses a black rectangle to simulate the fading process. And the size of this rectangle follows the original resolution. 

This is what is seen on a game with the original dimensions (640 x 400)

bRyMEkW.png

 

 

Looks like hi-res patch has some more work to do. :D

  • Upvote 1
Link to comment
Share on other sites

Having someone around who's able to look through all these files like the modders of olde, like MVI, is fantastic. This is some fascinating stuff, man! I'm tremendously excited to see what else you uncover.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...