Jump to content

UI Specification


Recommended Posts

Posted

This topic is for documenting UI files, I'll update this post with my and your findings. The following I have found so far:

UIB Files - new as of 01/10/2009

text.uib specification:

32 bit int specifying number of entries

->then for each entry:

16 bit int specifying length of key (including null terminator)

key (which is a null terminated string)

16 bit int specifying length of value (including null terminator)

value (which is a null terminated string)

e.g. theoretically were the text.uib only to have two entries which were ("Index1","Message1","Index2",Message2) this would be:

02 00 00 00 07 00 49 6E 64 65 78 31 00 09 00 4D 65 73 73 61 67 65 31 00 07 00 49 6E 64 65 78 32 00 09 00 4D 65 73 73 61 67 65 32 00

colours.uib specification:

this is very similar except that the key is not a string. Note that colours are stored in the 24 bit system but are ordered BGR not RGB.

32 bit int specifying number of entries

->then for each entry:

16 bit int specifying length of key (including null terminator)

key (which is a null terminated string)

one byte for blue

one byte for green

one byte for red

one null byte

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

Files - Important ones underlined

Globe.uil - The menu on the globe pick territory screen

InGame.uil - Campaign ingame main options screen (hit options in the top left corner to bring up this menu.)

Commands List (Found in Buttons only)

"LoadMission a5v2"

"SetValuesS4To gSideId 2"

"SetValueU1To gMissionNumber 1"

"SetValueECTo gGameState GameStateMainLoop"

"JumpToMenu SAVE" - used to pop up a menu on top

"BackMenu" - used to drop down a menu

"ReturnToMainMenu"

"SetValueBFTo gLose TRUE"

"PlaySample S_MISSIONFAILED"

"LeftGame"

"QuitMenu"

"SetValueECTo gGameState GameStateBriefing"

"QuitAndJumpToMenu ABORT_MP_GAME"

"BackMenuAndJumpTo PRECAP"

"StartRegisterProg"

"SetValueS2To gNetNetworkType 3"

"SetValueECTo gGameType GameTypeSerial"

"SetValueBFTo gCancelConnect TRUE"

"SetValueBFTo gRestartGame TRUE"

"RestartGame"

"DeleteGame deleteListBox"

"LaunchGameBrowse"

"LauncChatHelp"

"LaunchDune2KLadder"

"CloseSession"

"DestroyWigNet"

"CreateProcess modem.cpl"

"JumpToMenu SERIALLOBBY"

"Dune2000CdCheck"

"SetValueS2To gNetNetworkType 1"

"SetValueECTo gGameType GameTypeModem"

"StartSession"

"BackTo MULTIPLAYERTYPE"

"BackMenuAndJumpTo MODEM_JOIN"

"JumpIfSelected deleteListBox CONFIRM_DELETE"

"DownloadFinished"

"PreviousMission"

"NextMission"

"JumpToMenu QUIT_CAMPAIGN"

Files not done:

CGameSes.uil and chatops.uil and ClientMP.uil

then HGameSes.uil onwards

Posted

Thanks for the data.

It looks like the bit 09 (often followed by another 09) in the .uil represents an enter and the // represent an  = sign. I tried to use XVI to change it to .txt enters, but that did not work. Is there a way you can easily make those 09's to 'real' enters and when saving changing them back to 09?? I think it will improve the readability massively of the files.

My Python skills are at this moment too low (trying to improve) to make a simple script to do what I want. :)

Seven times 09 looks to be a normal tab.

Button data I found:

00 ?? 00 BUTTON loadMission 233, 110 140, 20  (?? is length of BUTTON and loadMission text + 1 for the zero) (numbers represent position  on screen 233 is x and 110 is y (vertical). no idea what the 140 and 20 do. I guess the size of the button or click area, but changing has no effect.)

LoadGameFile // button text  (The LoadGameFile stands for the text string found in the text.ui)

00 ?? 00 LightRed // highlight  (these seem to work/show up only for buttons that use NO! Gfx, see below)

00 ?? 00 VDarkRed // lowlight  (these seem to work/show up only for buttons that use NO! Gfx, see below)

00 ?? 00 Red // button up colour

00 ?? 00 DarkRed // button down colour

00 ?? 00 ButtonUpColour // font up colour

00 ?? 00 ButtonDownColour // font down colour

00 ?? 00 but1_up // upGfx  (these represent the brown wood texture.) (the ?? counts from the b to and with the x) (you can change this easily to like a trooper file in the UI_GFX folder, needs to be .bmp (I think 8bpp). see image below for example)

00 ?? 00 but1_dn // downGfx (these represent the brown wood texture.)

00 10 00 JumpToMenu LOAD (always 10 for JumpToMenu)

00 0B 00 END_BUTTON

post-5091-12833239935694_thumb.png

Posted

Glad to see you you've joined the holy cause Thumper :)

As to the 09 byte, I'm not sure what it is, but it isn't an enter. Enters can either be regarded as a n (newline) or a rn (carriage return followed by a newline.) However the newline is ASCII 10 (dec) or 0x0A, while the carriage return I believe is ASCII 13 (dec) from memory.

As for the // signs, these appear to be C++ style line comments, presumably to help them understand which bit was which.

The 140 and 20 represent the width and height of the button, I can't remember off the top of my head but I think that buttons specify the top left co-od, followed by width and height, wheras textboxes store the top left co-od followed by the bottom right co-od.

The colours it mentions can all be found in the colours.uib file, specifying the 24 bit values.

Please note that it isn't always 0x10 for JumpToMenu, the 0x10 is hex for 16 which is the length of "JumpToMenu LOAD" plus the null termination character.

Posted

Ah, so the // is no = sign, but a comment explaining what it is.

So its more like that each button has a basic list of items in a standard/certain order. They wrote there own parser for the .ui files that when it reads BUTTON it expects a certain list order. The 00 xx 00 is just some bits to tell the computer what is coming, right?

Ok, I think (not sure, correct me if I'm wrong) that this is all the data and in this order that are in the BUTTON part (if one is missing there will be an error, I think):

BUTTON

name

location (x,y) (max. 640, 480 ?)

clicksize (l,h)

button text (links to text.ui)

highlight (mouse cursor over effect)

lowlight (no mouse cursor, normal state?)

button up colour

button down colour

font up colour

font down colour

upGfx (image showed at button location)

downGfx

command (like JumpToMenu or those in first post of mvi)

END_BUTTON

What I could try to find out is what all the options for all these things are. Best would be to do this automatic, thought. :)

Posted

Globe.uil - The menu on the globe pick territory screen

That means we can create our own campaigns or maps but making .mis files seems to be hard. ;)

Posted

Well we don't need globe to make new mission campaigns, the UI is very flexible, like the mission select screen enabling mod I released. Whether or not we can add more missions I'm unsure. Might test tonight.

Posted

well you can  but ypu must make corrections for uil files and the text.uib  .. dont forget to setup mission triggers/events  but how we will make the selection on map?  maybe on some edge of screen ordos or harkonnen reborn (after msision atreides 8 ordos is gone. for atreides mission 10  shoult be it back...

btw does uil allow you override map size?

by the way how yo will get a mission in mission selector if there is space only for 9 campagins?

i noticed that there is some free space under test buttons so  this shouldnt be problem.

Posted

well you can  but ypu must make corrections for uil files and the text.uib  ..

That would be the point of this topic.

dont forget to setup mission triggers/events   

What relevance does that have to UI files, obviously if you wanted new missions you'd make new mission files

but how we will make the selection on map? 

A map isn't the only way to represent mission progression

maybe on some edge of screen ordos or harkonnen reborn (after msision atreides 8 ordos is gone. for atreides mission 10  shoult be it back...

You don't seem to grasp how Dune works, you can bring as many houses as you like into any level, I have made a map file which has every house in for instance, the fact that Ordos isnt in level 9 is for story reasons and has no bearing on the creation of a new level 9 with them in.

btw does uil allow you override map size?

I can't say for sure, but I'm going to say no. The 128 by 128 limit is going to be buried in the DAT file, there might be a way to do it but it would take someone a long time

by the way how yo will get a mission in mission selector if there is space only for 9 campagins?

i noticed that there is some free space under test buttons so  this shouldnt be problem.

The layout of the mission selector is really not the most important part heh, I could just reduce the height of buttons if I wanted to.

Posted

but creating new one isnt problem.  i have design of map for atreides mission 10 and 11. 

for atreides 10  - revenge of ordos

for atreides 11  - rebirth of harkonnen

for atreides mission 10.  all houses have base ready to use. 

for atreides mission 11        arena.  you have  small bases and  harkonnen has small base but better protected

maps are v. hard to beat cos there will be one passage to other sector of mapp and the passage will be guarded by 10 sandworms

i will release the maps when  solution will be found for uil stuff.

Posted

I tried some stuff today, but I don't get where the first bit is for in the .uil. For example, when you take the mission one atreides (AMis1.uil, which very simple), you can change the first bit 0x0C into 0x0D or 0x0B, all that it has effect is that you need to press twice escape to skip movie. You can also just remove the movie part in the mission and your stuck with a black screen, very nice... :)

I also tried to add a background into AMis1.uil and loadmis.uil, but both give me nothing. The background option/command looks simple, but I don't get it to work. What I do is; put the BACKGROUND just before 00xx00GROUPBOX.... and add this:

001100BACKGROUND title000F00END_BACKGROUND

Still it does not work....

Posted

but creating new one isnt problem.  i have design of map for atreides mission 10 and 11. 

for atreides 10  - revenge of ordos

for atreides 11  - rebirth of harkonnen

for atreides mission 10.  all houses have base ready to use. 

for atreides mission 11        arena.   you have  small bases and  harkonnen has small base but better protected

maps are v. hard to beat cos there will be one passage to other sector of mapp and the passage will be guarded by 10 sandworms

i will release the maps when  solution will be found for uil stuff.

If ordos and harkonnan are destroyed how do they exact revenge.

and heres a link to mission 10:http://tinyurl.com/lm5pyt

Posted

I also tried to add a background into AMis1.uil and loadmis.uil, but both give me nothing. The background option/command looks simple, but I don't get it to work. What I do is; put the BACKGROUND just before 00xx00GROUPBOX.... and add this:

001100BACKGROUND title000F00END_BACKGROUND

Still it does not work....

I'll try and take a look when I get a chance. By the way it's a byte rather than a bit, a bit refers to a 1 or a 0, and a byte is made up of 8 bits giving 256 combinations :)

Posted

I'll try and take a look when I get a chance. By the way it's a byte rather than a bit, a bit refers to a 1 or a 0, and a byte is made up of 8 bits giving 256 combinations :)

:-X Oops, thanks for taking time to look at it.

I also made a small script in vbscript, you can copy/paste a string into it and it auto calculates the correct hex for the amount of characters plus 1 (for the 00 at the end).

Just create new .txt file and put this code in it and rename the file to .vbs. It gives you nice pop up.

Dim Input

Dim Count

Input = InputBox("Enter string:")

Count = Len(Input)

Count = Count +1

Input = hex(Count)

MsgBox ("The hex value is: 0x" & Input)

Posted

In the samples.uil you can change sounds. I changed for example rocket sound to sonic sound. Perhaps this can also help problem someone had with sound.  :D

samples.uil is very simple.

well its worth a try I suppose.

Posted

can u add new sounds for units?mayby is a key to play as any subhouse for campagin and use their units. since there was sound problem.

i have found a trick.

hit key what let you gather unitss. and keep pressing x for scatter.  you cant select by mouse but with keyboard  yes.  the guard mode (key g)is working too. but what is point  you can only defend base . i have tried to use that stuff to  fight in atreides 7 mission as mercenary and i could produce units  use keyboard to collect them at one place and hit G. but this can be cheated. if your base make controllable by ai. ai will be  using units that you produce so you have chance to fight .

  • 4 weeks later...
Posted

Updated the top of my first post to include the specification for both the text.uib and colours.uib files.

  • 3 weeks later...
Posted

In terms of the UIB files I've got an editor for all but one of the files now (not attempted to make the editor work on the remaining file, but it shouldn't take long once I get round to it.)

Would be great if you could help with the UIL files, I'd like to make an editor for the UI Layout files at some point.

Posted

I'm online every workday from around 10am to 6pm GMT, I assume from your post times that you're in a similar time zone? Are you online by the way?

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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.