Results 1 to 11 of 11

Thread: Stele 10: Missing pieces of the UI puzzle

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Stele 10: Missing pieces of the UI puzzle

    Part of Europa Barbarorum is the unique look of the UI for various culture groups. If you have modded UI for RTW or M2TW you will be familiar with the following workflow:

    1. Change some TGA files to suit your look
    2. Run the game
    3. Rinse and repeat.


    However in M2TW the second step now “does more”. It used to be that the UI was whatever you defined in some TGA files, but M2TW introduces a new file format with the SD file extension.

    This format contains all meta data about UI: what TGA files it consists of, what “sprites” (buttons) are defined on which TGA file and where. This meta data is largely defined in code inside another new type of file with the file extension .SD.XML. Since it is a simple XML format you can edit this code with any simple texteditor. All in all it is a lot more flexible than the old RTW approach where the position and the names of the TGA files were pretty much hardcoded.

    Unfortunately in M2TW the “does more” part is also accompanied by “has more bugs”. In particular the game engine is supposed to automatically update SD files when the source code in the SD.XML files has changed. This mostly works, except for the strategy.sd file in which case the engine will fail to cooperate in this scheme unless you pollute the “vanilla” M2TW files outside of your mod directory.

    Additionally, if you make mistakes in your SD.XML source code the engine wil most helpfully display a corrupted UI at best, or a garbled mess at worst. Try as you might, but you will not find any error message about your SD.XML code in the logs, hence why typical forum advice discussing errors in SD.XML code boils down to: “when you hit an error: start over”.

    Of course the team working on Europa Barbarorum II is not infallible and, so, we did manage to mess things up. Since we are loathe to start over (it took us long enough to begin with!), and since we were looking to generate the files when possible on our Linux server for the purpose of building installers automatically anyway, I decided this was a good opportunity to kill two birds with one stone and wrote a tool to solve this problem.

    The new SD tool provides the basics of converting SD.XML source code into an SD file. Additionally it provides for validation of the code: it checks if sprite declarations do not refer to bogus names for instance, and if the sprite can possibly fit on the page as it is declared. (For instance the tool will reject code
    attempting to fit a sprite 516 pixels below the top of a 512×512 page.)

    Today the Europa Barbarorum team releases the SD tool to the wider modding community in the hope that they might find it useful. For information about where to download and how to use it, please refer to this thread: http://www.twcenter.net/forums/showthread.php?t=500744.

    Finally the work on the tool has been sped up considerably by the fact that there is a much older tool by alpaca which attempted to tackle the basic problem of generating SD files through reading custom formatted text files. His work ensured that I had a handy reference guide to writing files in the SD format.

    Regards,
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  2. #2

    Default Re: Stele 10: Missing pieces of the UI puzzle

    We should thank all the EB II modders for making nice tools and a nice mod!

  3. #3

    Default Re: Stele 10: Missing pieces of the UI puzzle

    Congrats on the SD tool, I think it's great, that you people not only share your mod (when it's done^^) but also the tools you developed. Sounds like hard work.
    Although I am no modder, there is one question, I asked myself while reading this:
    Aren't you in contact with other modders or groups of modders? Because I know that, for instance, the "Third Age"-Team did a lot on individualizing the UI in the strategy map. So they could've shared some knowldge with you?

    Or are you gonna change the whole adjustment of the buttons and... everything? Then I could perfectly understand the need of a new tool, since I never saw that in any other mod.

    Greetings and keep up your great work, I love EB1 ... and just because of your amazing work on this mod, I definatly WILL love EB2 :-)
    Last edited by TheFafner; December 15, 2011 at 01:04 PM.

  4. #4

    Default Re: Stele 10: Missing pieces of the UI puzzle

    Quote Originally Posted by TheFafner View Post
    Aren't you in contact with other modders or groups of modders? Because I know that, for instance, the "Third Age"-Team did a lot on individualizing the UI in the strategy map. So they could've shared some knowldge with you?
    In the context of writing this tool the insights came from reading forums thread, the source code of alpaca's SD converter and the frustration of having the game stubbornly display a building icon instead of faction logo's. With the last thing leading to the crucial insight that validation wasn't just a “nice to have, to pursue when there's time” but more of a “wish we had it right *now*”.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  5. #5

    Default Re: Stele 10: Missing pieces of the UI puzzle

    Quote Originally Posted by Tellos Athenaios View Post
    In the context of writing this tool the insights came from reading forums thread, the source code of alpaca's SD converter and the frustration of having the game stubbornly display a building icon instead of faction logo's. With the last thing leading to the crucial insight that validation wasn't just a “nice to have, to pursue when there's time” but more of a “wish we had it right *now*”.
    Hello Tellos Athenaios,
    I'm sorry, but I don't clearly understand how that answers my question. I'm no native speaker concerning english, perhaps that made me miss your point. Let's put the question a bit different:
    Where there no modders out there, who already managed to do UI-customizations like you want them to be? Or is your new tool so mighty, that you can change things in the UI that no-one ever dreamed of before?

  6. #6

    Default Re: Stele 10: Missing pieces of the UI puzzle

    Quote Originally Posted by TheFafner View Post
    Or is your new tool so mighty, that you can change things in the UI that no-one ever dreamed of before?
    Not quite.

    More like the satus quo used to be that you could either use alpaca's tool with plain text files (which are a bit fiddly and hard to maintain if you plan on moving UI elements inside the TGA files around), or you could use the SD.XML format based off what you'd learn by looking at the code from the Custom Campaign/Kingdoms retrofit mod. The latter approach is arguably better but unfortunately the M2TW engine contains a bug which prevents it from working well for fully modfoldered mods (like EB2).

    Secondly, neither option offers a lot of sanity checking beyond the basics. Neither approach will point out when you declare an icon at an offset of 516 pixels from the left boundary of a page which is only 512 × 512. Neither approach will tell you if you declare a sprite on top of another. The tool I wrote specifically does look for such errors and flags them when found.

    Finally the tool internally uses a streamlined version of the SD.XML format (because it is easier to parse) which also happens to be easier to write as it eliminates the need for manually adjusting reference counts. This format can be used instead of SD.XML code and would be an especially good choice if you need to start from scratch.
    Last edited by Tellos Athenaios; December 16, 2011 at 10:41 AM.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  7. #7
    The excited one's Avatar Senator
    Join Date
    Mar 2011
    Location
    australia
    Posts
    1,014

    Default Re: Stele 10: Missing pieces of the UI puzzle

    why made lots of Stele this year
    war is peace, ignorance is strength, freedom is slavery......
    (george orwell 1984)

  8. #8
    Campidoctor
    Join Date
    Jun 2006
    Location
    Southampton, UK
    Posts
    1,563

    Default Re: Stele 10: Missing pieces of the UI puzzle

    Quote Originally Posted by The excited one View Post
    why made lots of Stele this year
    Why not?


  9. #9
    The excited one's Avatar Senator
    Join Date
    Mar 2011
    Location
    australia
    Posts
    1,014

    Default Re: Stele 10: Missing pieces of the UI puzzle

    Quote Originally Posted by bobbin View Post
    Why not?
    just asking since there are lots of steles like in the past 6 months i can feel there's a major update especially due to a long absence of your EB twitter account (must be Christmas i guess)
    war is peace, ignorance is strength, freedom is slavery......
    (george orwell 1984)

  10. #10

    Default Re: Stele 10: Missing pieces of the UI puzzle

    Allright, now I understand the main benefits of this tool and why someone would put a lot more work in something like that rather than just use the possibilities you already had. Thank you, Tellos!

  11. #11

    Default Re: Stele 10: Missing pieces of the UI puzzle

    Eb conquers all, especially early releases.

Posting Permissions

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