Results 1 to 12 of 12

Thread: UI Layout file documentation

  1. #1

    Default UI Layout file documentation

    Hi all,
    This thread can be used to store any information found out about UI layout files. I've been making some changes over the last few days for EiC and I've found out quite a bit of information about them - if anyone has any additional info, please post it here.
    Some of the jargon here won't make any sense at first reading, but once you have a dig through some UI files you'll see what it means

    TGA I.D's:
    TGA ID's, and possibly other ID's are limited to 9 digits. Any more than this will cause a crash.

    General I.D's:
    All states, TGA uses, transitions, children etc need a unique ID.

    XY Co-ordinates.:
    XY co-ords do not work as simply as it may seem. Many off them are offsets, so you must take into account the parent's XY, which is turn an offset of the parent of the entire file's contents.
    The origin (0, 0) appears to be located in the top left corner of the screen. Traditional geometry would indicate that all co-ords are therefore (+X, -Y), but they appear to be (+X, +Y). To save a long winded explanation, just imagine that all Y co-ords are minus, even though they are represented as plus in the xml files.

    Tooltips:
    For a tooltip to be active the following requirements must be met:
    • <flag8> and <flag9> in the <uiEntry> -> <state> to be set to 1
    • A valid pointer in <tooltipText> (to ui.loc)
    • A text entry in <tooltip> (doesn't need to correspond to the pointer's text, it will make no difference.)

    Those are the requirements for elements with only one state; I haven't looked into elements with multiple states.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  2. #2
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: UI Layout file documentation

    Quote Originally Posted by T.C. View Post
    The origin (0, 0) appears to be located in the top left corner of the screen. Traditional geometry would indicate that all co-ords are therefore (+X, -Y), but they appear to be (+X, +Y). To save a long winded explanation, just imagine that all Y co-ords are minus, even though they are represented as plus in the xml files.
    This is how pixels have been addressed on computer monitors since time immemorial. Top left is (0, 0).

  3. #3

    Default Re: UI Layout file documentation

    Quote Originally Posted by taw View Post
    This is how pixels have been addressed on computer monitors since time immemorial. Top left is (0, 0).
    Shows my inexperience then
    Thanks for pointing it out though
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  4. #4
    alhoon's Avatar Comes Rei Militaris
    Moderator Emeritus

    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,758

    Default Re: UI Layout file documentation

    Can this be used to make the unit cards smaller? So that we could fit more than 20 in battles?
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  5. #5

    Default Re: UI Layout file documentation

    Quote Originally Posted by alhoon View Post
    Can this be used to make the unit cards smaller? So that we could fit more than 20 in battles?
    That wouldn't be quite as simple as you might think, and would take a lot of time and skill to do.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  6. #6
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: UI Layout file documentation

    Does someone know how I can change the name and dates of campaign in the selection screen?

    It doesn't appear to be in the localisation file, so I suppose it's somewhere in the UI.

  7. #7

    Default Re: UI Layout file documentation

    Quote Originally Posted by Steph View Post
    Does someone know how I can change the name and dates of campaign in the selection screen?

    It doesn't appear to be in the localisation file, so I suppose it's somewhere in the UI.
    The date is in the startpos (see huserlTW's esf editing tutorial: http://www.twcenter.net/forums/showt...ht=esf+editing) and the name is somewehere in the loc.

  8. #8

    Default Re: UI Layout file documentation

    Quote Originally Posted by T.C. View Post
    That wouldn't be quite as simple as you might think, and would take a lot of time and skill to do.
    Even so, how would one go about doing that? (Aka which file, converter, etc). If that itself takes time to explain, never mind
    Developer of The Great War | Leader of WW2: Sandstorm | Under the Woolen Patronage of Mitch | King of All

    Quote Originally Posted by Admiral Van Tromp View Post
    History has always been a bit of the State's slut.

  9. #9

    Default Re: UI Layout file documentation

    Quote Originally Posted by King Sama View Post
    Even so, how would one go about doing that? (Aka which file, converter, etc). If that itself takes time to explain, never mind
    You'd need to first use taws UI file layout converter to convert the layout file and resize all the cards. Then you'd need to most likely get a decompiled luac file for the cards and edit how the loop for unit cards positions them (so the smaller cards fit next to one another). But you'd have to fix the luac file first, as it would probably have bugs. Atm I'm the only one seemingly able to do that (surely there are more out there, but I'm the only one actively doing it at present). And I only fix luacs on a need to use basis. This is too much work for something that doesn't interest me at the minute. Perhaps in the future I'll look at it.

    Then again, you might get away without recompiling any luac files - I'd encourage you to take a look at the converted layout file. It's not complicated to understand, you should be able to make some progress on it easily enough.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  10. #10
    Emperor of The Great Unknown's Avatar Primicerius
    Join Date
    Nov 2008
    Location
    far enough where verizon cant go
    Posts
    3,110

    Default Re: UI Layout file documentation

    Someone did just what your asking for.

    Quote Originally Posted by Albtraum23 View Post
    Give a man a fish you feed him for a day, teach a man to fish you feed him for a lifetime.
    cant read?

  11. #11
    zxcvmnb's Avatar Semisalis
    Join Date
    Nov 2009
    Location
    a forest
    Posts
    474

    Default Re: UI Layout file documentation

    Was just about to link this ^

    Any idea how this was done or if it is fake? If not, it'd be a pretty big achievement.

    Thanks!
    Signed,
    zxcvmnb

    TGW Mod Official Unit Cutter-Outer

  12. #12
    zxcvmnb's Avatar Semisalis
    Join Date
    Nov 2009
    Location
    a forest
    Posts
    474

    Default Re: UI Layout file documentation

    Sorry for double post but it's not at all fake, I just downloaded the mod, take a look:
    http://www.twcenter.net/forums/showt...5#post10065985

    TGW Mod Official Unit Cutter-Outer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •