Page 1 of 2 12 LastLast
Results 1 to 20 of 31

Thread: UI layout file <-> xml converter - now handles 94% files from both ETW and NTW

  1. #1
    Artifex
    Patrician

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

    Default UI layout file <-> xml converter - now handles 94% files from both ETW and NTW

    I hacked alpaca's converter to support Version032 / Version033 ui layout files.
    Source code is on etwng.

    It's a quick hack job, one converter per version, three total.
    I want to merge them at some point, but for now enjoy converters.

    Even older versions would be fairly simple to add, but there are very few of them so it's not a huge deal.
    Last edited by taw; February 10, 2011 at 04:32 AM.

  2. #2

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Thank you very much
    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

  3. #3

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Very productive weekend Tomasz!

    But I can't convert v 32 and v 33 files. I receive this error:



    and the output is always the same, just this:
    Code:
    <ui>
        <version>033</version>




  4. #4
    Artifex
    Patrician

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

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Quote Originally Posted by husserlTW View Post
    Very productive weekend Tomasz!

    But I can't convert v 32 and v 33 files. I receive this error:



    and the output is always the same, just this:
    Code:
    <ui>
        <version>033</version>
    Which file were you trying to convert?
    I only tried it on a few of them, so I might have missed something.
    I'll check with other ui layout files later.

  5. #5
    Artifex
    Patrician

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

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    OK, I've been way too optimistic.
    Statistics for successful conversion round-trip (ETW and NTW):

    Version032 - 5 ok, 12 fail
    Version033 - 20 ok, 116 fail
    Version039 - 114 ok, 19 fail

    Where fail means failure at any stage (conversion failing, conversion back failing,
    or both working but producing non-identical file as a result).

    So apparently there's a lot more to do before it works,
    and my original test set was too small.

    Some bugs are in original code (for example it doesn't escape </> in xml output),
    some most likely are changes between formats I missed.

    Anyway, we advanced from 114 to 139 successful conversions, so it's some progress.

  6. #6
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Odd request taw but would it be possible to convert these converters to ruby as i cannot install python on this computer for some reason and would like to use them.

  7. #7

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Is there and (long term) plan to bundle all of these converters into some sort of vb .exe with an interface? I find them easy to use, but they have a steep learning curve.
    Also, will you be porting the fuse unpacker to windows? I'd really like to give it a try
    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

  8. #8
    Artifex
    Patrician

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

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Two more files convert successfully now, thank to better XML escaping.

    Quote Originally Posted by 'The Hedge Knight View Post
    Odd request taw but would it be possible to convert these converters to ruby as i cannot install python on this computer for some reason and would like to use them.
    I might end up doing this if they need significant rewrite, but I'd rather avoid it as long as converters work.

    Surely someone knows how to install Python, and could write a tutorial.
    Just create a thread about it, and hopefully someone will solve this problem.

    Quote Originally Posted by T.C. View Post
    Is there and (long term) plan to bundle all of these converters into some sort of vb .exe with an interface? I find them easy to use, but they have a steep learning curve.
    I think you want to go to husserlTW with that question.
    I'm trying to keep interfaces simple enough for other programs to use as well,
    and if you need anything more complicated JRuby works with Java GUIs easily.

    Quote Originally Posted by T.C. View Post
    Also, will you be porting the fuse unpacker to windows? I'd really like to give it a try
    Fuse driver on Windows? I know it's possible, but you need someone with more clue about Windows programming than me to do this.
    I sort of intend to make Linux version though. ;-)

  9. #9

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Quote Originally Posted by T.C. View Post
    Is there and (long term) plan to bundle all of these converters into some sort of vb .exe with an interface? I find them easy to use, but they have a steep learning curve.
    Also, will you be porting the fuse unpacker to windows? I'd really like to give it a try
    Yes, I am planing to make a vb app where I'll unify all Empire/Napoleon tools and converters. Also taw has some interesting ideas that they may change the way we make some modifications. For example some startpos modifications can become by scripts. If this becomes possible then these modifications can be made from a windowed application which will be a bless especially for inexperienced modders that hate to mess with stubborn startpos.esf.




  10. #10
    Artifex
    Patrician

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

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    We're up to 163 byte-perfect conversions now:

    Version025: {"not supported"=>1}
    Version027: {"not supported"=>1}
    Version028: {"not supported"=>3}
    Version029: {"not supported"=>5}
    Version030: {"not supported"=>2}
    Version031: {"not supported"=>1}
    Version032: {"ui->xml fail"=>11, "ok"=>6}
    Version033: {"ui->xml fail"=>101, "ok"=>35}
    Version039: {"ui->xml fail"=>4, "xml->ui fail"=>2, "ok"=>122, "differ"=>5}

  11. #11
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Its not that i cant install python ebcause i dont know how. Its that python freezes ont he install for me.

    Tried everything
    -different binaries
    -disabling antivrus
    -running as administrator
    -different insall locations
    -different binary locations
    -all other prgrams closed
    -command line installing

  12. #12

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    I wonder what's wrong ? no attribute readable



  13. #13
    Artifex
    Patrician

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

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Quote Originally Posted by 'The Hedge Knight View Post
    Its not that i cant install python ebcause i dont know how. Its that python freezes ont he install for me.

    Tried everything
    -different binaries
    -disabling antivrus
    -running as administrator
    -different insall locations
    -different binary locations
    -all other prgrams closed
    -command line installing
    Aren't there any alternative versions of Python, 32bit vs 64bit, 3.0 vs 3.1,
    msi vs exe, or whatever, you could try?

    If you keep having troubles like this with other programs as well,
    people tend to recommend reinstalling your operating system ;-)

    I vaguely recall someone who could run Python but not JRuby some time ago too,
    I don't remember how he fixed it...

  14. #14
    Artifex
    Patrician

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

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    samples_ntw/frontend ui/napoleon_battles converts perfectly for me.
    Are you using Python 3.1.2 too or some other version?

    Quote Originally Posted by kungfuserge View Post
    I wonder what's wrong ? no attribute readable



  15. #15
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Thats what i mean by different binaries.

    trust me, i have been trying over a week and dont really want to install os to get one scripting language working XD.

  16. #16

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    I have the Python26 installed as for the mesh converter ffrom Knight Errant python script which works like a dream ...

    and I have also the Python27 as I though it was better for your script

    but helas none of the 2 works on my XP

    Should we have the Python 3.1.2 ?

  17. #17

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    For Knight Errant's you'll need 2,6 but for the rest 3.X. You have to choose or you can have both but you have to adjust PATH in Enviromental Variables when you want to use the one or the other version. If you have 2 machines (e.g. desltop-laptop) then things are easier.




  18. #18
    Artifex
    Patrician

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

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Quote Originally Posted by kungfuserge View Post
    I have the Python26 installed as for the mesh converter ffrom Knight Errant python script which works like a dream ...

    and I have also the Python27 as I though it was better for your script

    but helas none of the 2 works on my XP

    Should we have the Python 3.1.2 ?
    UI converter requires Python 3.x. It will definitely not run with Python2.x.
    No idea if it requires any specific Python 3.x version - I think it doesn't matter.

    By the way, we're up to 170 correctly converted files - including nearly every Version039 file.

    Version025: {"not supported"=>1}
    Version027: {"not supported"=>1}
    Version028: {"not supported"=>3}
    Version029: {"not supported"=>5}
    Version030: {"not supported"=>2}
    Version031: {"not supported"=>1}
    Version032: {"ui->xml fail"=>11, "ok"=>6}
    Version033: {"ui->xml fail"=>101, "ok"=>35}
    Version039: {"ui->xml fail"=>4, "ok"=>129}

  19. #19
    Artifex
    Patrician

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

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Quote Originally Posted by 'The Hedge Knight View Post
    Thats what i mean by different binaries.

    trust me, i have been trying over a week and dont really want to install os to get one scripting language working XD.
    That's nothing. I need 3 virtual machines with XP, Vista,
    and Windows 7 just to test websites with various versions of IE for work ;-)

    By the way wouldn't it be easier to port that mesh converter from Python 2.x to 3.x like everything else?
    This looks like the most annoying conflict right now, and 2.x -> 3.x port is fairly simple.

    Volunteers?

  20. #20

    Default Re: UI layout file to xml converter - now with both ETW and NTW support

    Same with python 31 ; I will try with another computer

    Last edited by kungfuserge; January 23, 2011 at 12:19 PM.

Page 1 of 2 12 LastLast

Posting Permissions

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