Page 4 of 18 FirstFirst 1234567891011121314 ... LastLast
Results 61 to 80 of 342

Thread: Perfect ESF<->XML converter and revolution in ESF modding [Released!]

  1. #61
    alhoon's Avatar Comes Rei Militaris
    Moderator Emeritus

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

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by taw View Post
    Right now, start command line, enter correct directory,
    then type jruby esf2xml <regions.esf >regions.xml

    Better interface will come later.
    cool...
    Where can I download your esf2xml converter?

    PS. Windows Vista x64.
    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).

  2. #62
    Artifex
    Patrician

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

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by alhoon View Post
    cool...
    Where can I download your esf2xml converter?

    PS. Windows Vista x64.
    All my code is in etwng repository, this particular part is here.

  3. #63
    alhoon's Avatar Comes Rei Militaris
    Moderator Emeritus

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

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    thx!

    You may want to edit your signature to place that link there.
    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).

  4. #64
    Artifex
    Patrician

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

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by alhoon View Post
    thx!

    You may want to edit your signature to place that link there.
    Oh, that's a pretty good idea. Done!

  5. #65
    r3deed's Avatar Semisalis
    Join Date
    May 2010
    Location
    unspeci
    Posts
    416

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Thanks taw for making it possible ?

  6. #66

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Can you do a complete tutorial of how to use it please? or have you already done that and i haven't notified?

    UNDER THE MOST HONORABLE PATRONAGE OF: Legio!
    PATRON OF: Wangrin, ♔Sir Digby Chicken Caesar♔, Geronimo2006 and Narf!

  7. #67
    Artifex
    Patrician

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

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by Fortes View Post
    Can you do a complete tutorial of how to use it please? or have you already done that and i haven't notified?
    I wrote above:

    Right now, start command line, enter correct directory,
    then type jruby esf2xml <regions.esf >regions.xml

    Better interface will come later.
    I know, it's not much of a tutorial. Hopefully I'll have time to port xml2esf
    from libxml to Nokogiri and therefore JRuby this weekend.

  8. #68

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    This is good news!

  9. #69

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by taw View Post
    I wrote above:

    Right now, start command line, enter correct directory,
    then type jruby esf2xml <regions.esf >regions.xml

    Better interface will come later.
    I know, it's not much of a tutorial. Hopefully I'll have time to port xml2esf
    from libxml to Nokogiri and therefore JRuby this weekend.
    Ok, i have 3 files "esf2xml", "esf_builder.rb" and "xml2esf" which one shall i open?
    I've tried to open esf_builder.rb but it says something about chose a program to open... sorry but I'm new in this things

    UNDER THE MOST HONORABLE PATRONAGE OF: Legio!
    PATRON OF: Wangrin, ♔Sir Digby Chicken Caesar♔, Geronimo2006 and Narf!

  10. #70
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by Fortes View Post
    Ok, i have 3 files "esf2xml", "esf_builder.rb" and "xml2esf" which one shall i open?
    I've tried to open esf_builder.rb but it says something about chose a program to open... sorry but I'm new in this things
    I'm figuring it out. Will let you know when i do
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  11. #71
    Artifex
    Patrician

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

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by Fortes View Post
    Ok, i have 3 files "esf2xml", "esf_builder.rb" and "xml2esf" which one shall i open?
    I've tried to open esf_builder.rb but it says something about chose a program to open... sorry but I'm new in this things
    Put let's say regions.esf in the same directory as these files.

    Start command line (Start menu > run > cmd), enter right directory
    (something like: cd something\something\Desktop\esfxml), then
    type jruby esf2xml <regions.esf >regions.xml

    Did it help? If not, someone make screenshots.

  12. #72
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by taw View Post
    Put let's say regions.esf in the same directory as these files.

    Start command line (Start menu > run > cmd), enter right directory
    (something like: cd something\something\Desktop\esfxml), then
    type jruby esf2xml <regions.esf >regions.xml

    Did it help? If not, someone make screenshots.
    I got it to work Making screenies for Fortes now
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  13. #73
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Okmin's guide to using this thing

    1. Install the Java SDK http://www.oracle.com/technetwork/ja...sp-136632.html

    2. Download JRuby http://jruby.org.s3.amazonaws.com/do...-bin-1.5.3.zip

    3. Extract jruby-1.5.3 (whole folder, not just contents) to C:\
    Spoiler Alert, click show to read: 

    4. Open the start menu and right-click my computer, click Properties, the open Advanced system settings (it's in the left pane)
    Spoiler Alert, click show to read: 

    5. Click Environment Variables... in the bottom right corner
    Spoiler Alert, click show to read: 

    6. On the bottom half (system variables) find Path, select it, and click Edit...

    7. Add ;C:\jruby-1.5.3\bin (WITH the semicolon) to the end of the second line. No space after any existing entry
    Spoiler Alert, click show to read: 

    8. For BOTH the top and bottom halves of the window, click New... and name the variable JAVA_HOME and its value should be C:\Program Files (x86)\Java\jre6. Remember to do it for the top AND bottom parts.
    Spoiler Alert, click show to read: 

    9. To verify your install: Open a command prompt and enter jruby -v The prompt should return some version info on JRuby
    Spoiler Alert, click show to read: 

    10. Then extract taw's esfxml folder to C:\jruby-1.5.3\
    Spoiler Alert, click show to read: 

    11. Also copy whatever .esf you want to convert to C:\jruby-1.5.3\esfxml\
    Spoiler Alert, click show to read: 

    12. Hold shift and click in a blank part of the window, then click "Open command window here"

    13. Type jruby esf2xml <*.esf> *.xml (* is either startpos or regions, depending on what you're using) THIS WILL TAKE TIME (see note at bottom)

    14. The .xml file will be in the ...\esfxml\ directory.
    Spoiler Alert, click show to read: 

    Made with Windows 7 x64. Post if you have issues (especially with a different OS. I'm perfectly able to help with XP, Vista, and 32 bit/x86)

    PS: Don't close the command line when you see the .xml appear. The thing needs time to actually put stuff in the .xml file. Wait for it to finish (you can tell it's not done if you have a blinking _ without a C:\...> to the left. If you get a message saying something about a 500m safety cap, type jruby -J-Xmx####m where #### is the memory cap you want to place on JRuby (in MB). Wait for it to finish, then try the esf2xml again.
    Last edited by Okmin; November 04, 2010 at 08:48 PM.
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  14. #74
    Artifex
    Patrician

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

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by Okmin View Post
    Okmin's guide to using this thing

    1. Install the Java SDK http://www.oracle.com/technetwork/ja...sp-136632.html
    2. Download JRuby http://jruby.org.s3.amazonaws.com/do...-bin-1.5.3.zip
    3. Extract jruby-1.5.3 (whole folder, not just contents) to C:\
    4. Open the start menu and right-click my computer, click Properties, the open Advanced system settings (it's in the left pane)
    5. Click Environment Variables... in the bottom right corner
    6. On the bottom half (system variables) find Path, select it, and click Edit...
    7. Add ;C:\jruby-1.5.3\bin (WITH the semicolon) to the end of the second line. No space after any existing entry
    8. For BOTH the top and bottom halves of the window, click New... and name the variable JAVA_HOME and its value should be C:\Program Files (x86)\Java\jre6. Remember to do it for the top AND bottom parts.
    9. To verify your install: Open a command prompt and enter jruby -v The prompt should return some version info on JRuby
    10. Then extract taw's esfxml folder to C:\jruby-1.5.3\
    11. Also copy whatever .esf you want to convert to C:\jruby-1.5.3\esfxml\
    12. Hold shift and click in a blank part of the window, then click "Open command window here"
    13. Type jruby esf2xml <*.esf> *.xml (* is either startpos or regions, depending on what you're using)
    14. The .xml file will be in the ...\esfxml\ directory.

    Screenshots coming soon
    JRuby has one-click installer all with JRE so you can do all of 1-8 in one step.
    Use this link to get this installer.

  15. #75
    Okmin's Avatar In vino veritas
    Join Date
    May 2010
    Location
    USA
    Posts
    7,506

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by taw View Post
    JRuby has one-click installer all with JRE so you can do all of 1-8 in one step.
    Use this link to get this installer.
    That didn't work for me for some reason, but maybe for other people...
    BTW there are screenshots now.
    IN VINO VERITAS
    IN CERVESIO FELICITAS

    Under the patronage of The Lizard King
    Patron of Narf
    and Starlightman

  16. #76

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Okay I tried converting the regions.esf but most of the xml contained the same hex code repeated over and over again. I couldn't get the startpos.esf to convert because I wasn't able to increase the memory cap (after increasing it to 1000m the command prompt doesn't do anything no matter how long I leave it).

    Is anyone else having more luck than me?
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

  17. #77
    Artifex
    Patrician

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

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by uanime5 View Post
    Okay I tried converting the regions.esf but most of the xml contained the same hex code repeated over and over again. I couldn't get the startpos.esf to convert because I wasn't able to increase the memory cap (after increasing it to 1000m the command prompt doesn't do anything no matter how long I leave it).

    Is anyone else having more luck than me?

    regions.esf DOES contain the same hex code repeated over and over - there are multiple bitmaps encoded in it, and bitmap extraction code while it exists is disabled right now for technical reasons.

    I recommend Notepad++ for viewing xml files, and turning off line wrap.



    startpos.esf takes about 2-3 minutes to convert on modern hardware iirc. If it doesn't end in even 10 minutes, that would indicate some very serious problem.

  18. #78
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    I get the memory cap too.

    When converting my previously editted 21mb .esf It worked fine.

    However at the vanilla 34mb startpos, I ran out of memory, even after increasing my safety cap.

    Hopefuly your version that plans to split up the xmls, will eliviate this problem.

  19. #79

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Quote Originally Posted by Okmin View Post
    If you get a message saying something about a 500m safety cap, type jruby -J-Xmx####m where #### is the memory cap you want to place on JRuby (in MB). Wait for it to finish, then try the esf2xml again.
    I'm waiting for more that 20 minutes is this normal? I've put 1000Mb in .

    UNDER THE MOST HONORABLE PATRONAGE OF: Legio!
    PATRON OF: Wangrin, ♔Sir Digby Chicken Caesar♔, Geronimo2006 and Narf!

  20. #80
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: Coming soon - Perfect ESF<->XML converter and revolution in ESF modding

    Definatly not normal.

    My 21mb esf took 20 seconds to make a 105,000kb XML file.

    So NTW's Vanilla esf or ETWs, at around 34mb should only take a minute max.

    But like I said, the difference between 21mb and 34mb for the converter, was too much for my PC to handle, apparantly.

Posting Permissions

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