Page 17 of 18 FirstFirst ... 789101112131415161718 LastLast
Results 321 to 340 of 342

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

  1. #321
    Artifex
    Patrician

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

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

    Quote Originally Posted by PietroMicca View Post
    are expected other updates, taw?
    I only fixed u2/i2/angle mess and made esfxml warnings less verbose.

    I don't have anything else on my esfxml todo list.

    My current modding plans is finishing db tables.
    Then maybe I'll take a look at S2TW ui layout files (Version0XX files) but only if I have some extra free time.

  2. #322
    Artifex
    Patrician

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

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

    I updated converter to work with both Ruby 1.8 and 1.9, since new JRuby defaults to Ruby 1.9, and I don't want to complicate already overly complicated installation process.

    Tests are all OK, but I might have missed some case, so if you see any problems message me.

  3. #323

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

    Where is the download link for this script? I"m looking for the script not the apps that convert.

  4. #324
    Artifex
    Patrician

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

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

    Quote Originally Posted by terryn View Post
    Where is the download link for this script? I"m looking for the script not the apps that convert.
    It's all in https://github.com/taw/etwng

  5. #325
    Geronimo2006's Avatar TAR Local Moderator
    Join Date
    Oct 2007
    Location
    Ireland
    Posts
    7,395

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

    And how do I convert esf to xml and vice versa? I downloaded the zip file of etwng-master. What now?
    Colonialism 1600AD - 2016 Modding Awards for "Compilations and Overhauls".



    Core i7 2600 @ 3.4ghz - NVIDIA GTX950 2GB

    Colonialism 1600 AD blog

  6. #326

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

    @taw hi!

    I could pack the esf to startposnew certainly but it has only 1 mb volume! without any compressed_data!????
    why? I unpacked Attila startpos, pls help!

    this is the script when it is packed:

    Spoiler Alert, click show to read: 
    PS D:\modding\ESFviaXML\etwng-master\esfxml> ./packesf.ps1
    RuntimeError: Unknown tag open "i1"
    block in XmlTagHandlers at .\xml2esf:1388
    default at org/jruby/RubyHash.java:711
    [] at org/jruby/RubyHash.java:1100
    start_element_namespace at .\xml2esf:1418
    parse_with at nokogiri/XmlSaxParserContext.java:252
    parse_file at C:/jruby-9.1.12.0/lib/ruby/gems/shared/gems/nokogiri-1.8.0-java/lib/nokogiri/xml/sax/pars
    er.rb:104
    parse_file at .\xml2esf:1447
    on_empty_node_xml_include at .\xml2esf:1101
    end_element_namespace at .\xml2esf:1424
    parse_with at nokogiri/XmlSaxParserContext.java:252
    parse_file at C:/jruby-9.1.12.0/lib/ruby/gems/shared/gems/nokogiri-1.8.0-java/lib/nokogiri/xml/sax/pars
    er.rb:104
    parse_file at .\xml2esf:1447
    on_empty_node_xml_include at .\xml2esf:1101
    end_element_namespace at .\xml2esf:1424
    parse_with at nokogiri/XmlSaxParserContext.java:252
    parse_file at C:/jruby-9.1.12.0/lib/ruby/gems/shared/gems/nokogiri-1.8.0-java/lib/nokogiri/xml/sax/pars
    er.rb:104
    parse_file at .\xml2esf:1447
    on_empty_node_xml_include at .\xml2esf:1101
    end_element_namespace at .\xml2esf:1424
    parse_with at nokogiri/XmlSaxParserContext.java:252
    parse_file at C:/jruby-9.1.12.0/lib/ruby/gems/shared/gems/nokogiri-1.8.0-java/lib/nokogiri/xml/sax/pars
    er.rb:104
    parse_file at .\xml2esf:1447
    on_empty_node_xml_include at .\xml2esf:1101
    end_element_namespace at .\xml2esf:1424
    parse_with at nokogiri/XmlSaxParserContext.java:252
    parse_file at C:/jruby-9.1.12.0/lib/ruby/gems/shared/gems/nokogiri-1.8.0-java/lib/nokogiri/xml/sax/pars
    er.rb:104
    parse_file at .\xml2esf:1447
    on_empty_node_xml_include at .\xml2esf:1101
    end_element_namespace at .\xml2esf:1424
    parse_with at nokogiri/XmlSaxParserContext.java:252
    parse_file at C:/jruby-9.1.12.0/lib/ruby/gems/shared/gems/nokogiri-1.8.0-java/lib/nokogiri/xml/sax/pars
    er.rb:104
    parse_file at .\xml2esf:1447
    initialize at .\xml2esf:1455
    parse at .\xml2esf:1440
    <main> at .\xml2esf:1473

    LZMA 9.22 beta : Igor Pavlov : Public domain : 2011-04-18



    it has error for runtime: unknown tag open, is this the prob or not?!

    also I did not change any things but the new startpos has not any compressed_data at all! only has save_game_header and campaign_preopen_map_info!

    also I went in this method:

    Spoiler Alert, click show to read: 
    Method:
    -Place startpos.esf in d:\modding\ESFviaXML\.
    -Use Powershell or another shell and navigate to d:\modding\ESFviaXML\etwng-master\esfxml.
    -Run Unpack script. (command ./unpackesf.ps1)
    -You should get a folder named "startposunpacked" in the d:\modding\ESFviaXML\ folder.
    -Run Pack script (command ./packesf.ps1), you should get a startposrepacked.esf file in the same folder.

    but the new startpos hasnt any compressed_data!!

    and also I went according to this guide http://www.twcenter.net/forums/showt...nto-Text-Files step by step but I have that prob too!

    the created compressed_data.esf in packdir when it packing is 0 kb!!

    I know I have a prob in this line of script but dont know how to resolve:

    jruby .\xml2esf $tempdir\packdir\compressed_data $tempdir\packdir\compressed_data.esf


    the prob is that the tool couldnt change the compressed_data folder to compressed_data.esf, it makes the compressed_data.esf in packdir but it is 0 kb and then the compressed_data.esf.xz file is made after it with only 1 kb volume! I changed the scripts several times but nothing happened!

    I request the people making this correctly teach me how can i resolve this prob pls.
    Last edited by asadyan; September 01, 2017 at 08:11 AM.

  7. #327
    Artifex
    Patrician

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

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

    According to my notes, it seems that you encountered the tag which I list as:
    • 02 int8 - int8 (never observed in practice)

    Well, now that it's been observed I see I missed it in decoded.

    It's easy fix, but could you send me the file so I can test it?

  8. #328

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

    Quote Originally Posted by taw View Post
    According to my notes, it seems that you encountered the tag which I list as:
    • 02 int8 - int8 (never observed in practice)

    Well, now that it's been observed I see I missed it in decoded.

    It's easy fix, but could you send me the file so I can test it?
    yes of course i'll send you Attila startpos along with new packed startpos to see what happened to it and test it:

    startpos
    Last edited by asadyan; September 01, 2017 at 10:31 AM.

  9. #329
    Artifex
    Patrician

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

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

    I tried converting those files, and never got errors - they unpack just fine.

    So I suspect the actual error was probably with compression program or something like it.

    I fixed i1 tag support just in case, but it doesn't seem to be the problem.

  10. #330

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

    Quote Originally Posted by taw View Post
    I tried converting those files, and never got errors - they unpack just fine.

    So I suspect the actual error was probably with compression program or something like it.

    I fixed i1 tag support just in case, but it doesn't seem to be the problem.
    yes its unpacking is complete without any problems but the problem is for packing for compressed_data

    pls tell me what is the resolution if you fix it @taw
    Last edited by asadyan; September 02, 2017 at 08:00 AM.

  11. #331
    Artifex
    Patrician

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

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

    I tried to reproduce asadyan's problems but couldn't reproduce it. I sent you all relevant data on steam chat. So no idea. Does anybody else has similar problems?

  12. #332
    alhoon's Avatar Moderator
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    23,744

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

    I would like to say here, for all it's worth, that I have managed (years ago) to use this tool to create a Hybrid campaign map in Rome 2 Total War.
    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).

  13. #333
    Artifex
    Patrician

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

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

    Quote Originally Posted by alhoon View Post
    I would like to say here, for all it's worth, that I have managed (years ago) to use this tool to create a Hybrid campaign map in Rome 2 Total War.
    I haven't done any Total War coding in very long time, but I definitely approve of people still doing useful things with tools I once made.

  14. #334

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

    Great tool. Once it's in xml it's easy to script any changes you want. I used it to change all the existing unit sizes in an Empire game.

  15. #335

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

    Quote Originally Posted by taw View Post
    Request for requests: You might have noticed that recently <!-- comments --> started to appear on many different rather complicated records
    in xmls created by esf2xml script. It is now really easy for me to add such comments, so if you want to see something annotated, just tell me precisely
    where to put what kind of comments, and I'll quickly add them.

    Comments are simple but they have huge impact on ease of modding.
    Just imagine what pain it used to be to edit diplomacy before it got proper annotations,
    and how easy it is now (and how it would be even easier if the rest of fields got annotations as well):

    Code:
      <rec type="DIPLOMACY_RELATIONSHIPS_ARRAY">
       <rec type="DIPLOMACY_RELATIONSHIP">
        <i>573864472</i><!-- france -->
        <ary type="DIPLOMACY_RELATIONSHIP_ATTITUDES_ARRAY">
         <draa/><!-- State gift received -->
         <draa/><!-- Military alliance -->
         <draa/><!-- Alliance Broken -->
         <draa/><!-- Alliances not honoured -->
         <draa drift="-1" current="15" limit="0" active1="yes" extra="15" active2="yes"/><!-- Enemy of my enemy -->
         <draa/><!-- Trade Agreement -->
         <draa/><!-- Trade Agreement broken -->
         <draa/><!-- War -->
         <draa/><!-- Peace Treaty -->
         <draa/><!-- Allied with enemy -->
         <draa extra="-15" active2="yes"/><!-- War declared on friend -->
         <draa/><!-- Unreliable ally -->
         <draa/><!-- Territorial expansion -->
         <draa/><!-- Backstabber -->
         <draa/><!-- Assassination attempts -->
         <draa drift="0" current="-10" limit="0" active1="no"/><!-- Religion -->
         <draa drift="0" current="-10" limit="0" active1="no"/><!-- Government type -->
         <draa drift="1" current="-80" limit="0" active1="yes"/><!-- Historical Friendship/Grievance -->
         <draa/><!-- Acts of sabotage -->
         <draa/><!-- Acts of espionage -->
         <draa/><!-- Threats of Attack -->
         <draa/><!-- Unknown (does not seem to do anything) -->
        </ary>
        <no/><!-- trade agreement -->
        <i>0</i><!-- military access turns (-1 = unlimited) -->
        <s>neutral</s><!-- relationship -->
        <i>0</i>
        <u>0</u>
        <i>0</i>
        <i>0</i>
        <i>0</i>
        <i>0</i>
        <i>0</i>
        <u>0</u>
        <u>0</u>
        <ary type="REGULAR_PAYMENTS"/>
        <u>0</u>
        <u>0</u>
        <ary type="ALLIED_IN_WAR_AGAINST"/>
        <u4_ary>0 0 0 0 0 0 0 0 0 0 0</u4_ary>
        <u>0</u>
        <s>neutral</s><!-- this is NOT relationship -->
        <no/>
        <no/>
        <i>-85</i>
       </rec>
      </rec>
    If you know the meaning of various <u>s and <i>s, just give me precise locations and comments, and esf2xml will start inserting them.
    It's pretty easy usually.

    I'm especially interested in CAI code which is filled with ridiculous number of weird ids.
    Right now it's a huge pain to edit so many things, because you also need to edit weird numbers in corresponding CAI entries (or face CTDs later).
    If we got everything annotated, modding would be easier, and even better - it would become much easier
    for me to write scripts to automate common modding tasks for a double win.

    This also applies to meaning of whole records (which we can convert to really pretty and meaningful xml tags),
    arrays of integers (u4_ary, i4_ary), and any other data.

    The more information I have, the better will be xmls produced by esf2xml.
    The difference between low-level xmls (barely easier to edit than with EsfEditor),
    and high-level xmls we get thanks to all our knowledge, is just huge.

    Just give me everything you know.
    Hello taw! Judging by your github, you were still developing the tool last year. Did you happen to find out the meaning of those diplomacy entries without annotations? I'm trying to rebalance diplomatic relationships between colonial European powers and Indian empires to specifially make Europeans colonize more aggresively. And I have a gut feeling, that some of those entries are directly responsible for making one faction see another as a potential enemy/friend for life. I'm especially curious about the last three entries in DIPLOMACY_RELATIONSHIP rec type. I noticed that factions which often fight each other usually have a negative last entry of -45 or -85 towards each other.

    EDIT: Maybe you know some mods which already tried to make Europeans more active in India and succeded? If you do, please let me know.
    Last edited by ilia_r_s; August 08, 2022 at 08:58 AM.

  16. #336
    Artifex
    Patrician

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

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

    Quote Originally Posted by ilia_r_s View Post
    Hello taw! Judging by your github, you were still developing the tool last year. Did you happen to find out the meaning of those diplomacy entries without annotations? I'm trying to rebalance diplomatic relationships between colonial European powers and Indian empires to specifially make Europeans colonize more aggresively. And I have a gut feeling, that some of those entries are directly responsible for making one faction see another as a potential enemy/friend for life. I'm especially curious about the last three entries in DIPLOMACY_RELATIONSHIP rec type. I noticed that factions which often fight each other usually have a negative last entry of -45 or -85 towards each other.

    EDIT: Maybe you know some mods which already tried to make Europeans more active in India and succeded? If you do, please let me know.
    I keep the tools updated for compatibility with latest games etc., but I didn't really do any more research about Empire.

  17. #337

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

    Quote Originally Posted by taw View Post
    I keep the tools updated for compatibility with latest games etc., but I didn't really do any more research about Empire.
    That's a pity. But anyway, thanks for the answer! The tools are fire. Especially in combination with source control to keep track of what you're doing.

  18. #338

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

    Hi again taw! Just wanted to ask if you still update the schemas etc. if research is already done. For instance, most columns in unit_stats_naval are annotated in PFM as of 5.2.4 version. Etc. If you don't - no problem I can probably fix the schema myself for my own use.

    Spoiler Alert, click show to read: 



  19. #339
    Artifex
    Patrician

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

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

    Just open a pull request on github with any updates.

    Quote Originally Posted by ilia_r_s View Post
    Hi again taw! Just wanted to ask if you still update the schemas etc. if research is already done. For instance, most columns in unit_stats_naval are annotated in PFM as of 5.2.4 version. Etc. If you don't - no problem I can probably fix the schema myself for my own use.

    Spoiler Alert, click show to read: 



  20. #340
    alhoon's Avatar Moderator
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    23,744

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

    Taw! Still around!? Awesome!
    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).

Posting Permissions

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