Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 55

Thread: Esf Total Editor

  1. #1
    husserlTW's Avatar Artifex
    Join Date
    Mar 2009
    Posts
    6,977
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Esf Total Editor

    There are some very useful utilities which are console based and thus it is made difficult for some users to use them. I started making this Win Application to solve this problem and more over to unify in one interface all the current tools about startpos editing. These are my first steps in Visual Basic so I expect your feedback for possible problems or suggestions to improve it further.

    You have to have jruby installed (http://jruby.org/download) for Taw's converters to run (http://www.twcenter.net/forums/showthread.php?t=392712) and optionally notepad++ ( http://notepad-plus-plus.org/) for xml editing. The 3 esf editors are included.

    Esf Total Editor


    Esf Total Editor
    is an application that combines all the existing utilities for editing .esf files. With Esf Total Editor you can edit an .esf file, convert it to xml or search in which records a specific number is located.


    Edit .esf:


    Using Esf Total Editor, you can edit any .esf file. In Menu bar click Esf choose Editor and the version of the editor you want to use. I've included all three existing versions since they are all useful. The v. 1.4.3 is fast, stable but has no nodes, the v. 1.4.5 uses nodes but it is slow and in some rare occasions unstable, 1.5 beta is fast uses nodes but it is unstable and cannot save the changes. In Esf menu, Esf Folder you can have access in the files you've converted.

    Tip: I usually work using more than one Editor, some time all three of them, for the same file. For example if I want to work on a region, I open the file first with v. 1.4.5, I find easily the region I want and I move it first in the list. Then open it with v. 1.4.3 to work with it knowing that my region is the first one in REGIONS list and the same time I have a copy of the esf opened with v. 1.5 beta, for finding fast infos like CAI IDs. You cannot open the same file with more than one editor so make copies of the file.

    Conversions:


    Esf to Xml


    1. Browse for your esf you want converted (2)
    2. Type the name for the output folder with the converted xml
    3. Click Esf to Xml button (3)

    You can adjust the xml_split.jb file to custom the xml(s). It is useful some times to have one xml to work the find/replace factions or a certain number of sub folders containing specific parts of startpos. To edit xml_split.jb, go in Menu bar, choose Xml, Xml Split, Edit. If you like to restore the original file choose Restore, but before keep a backup of your custom xml_split.jb because it will be overwritten.

    Tip: To make the process faster you can first edit your esf file and using the Export function, export the part(s) of the esf you want to make your changes. In this way the file(s) will be small and the process faster.

    Xml to Esf


    1. Browse for the Xml folder that contains the xml(s) you want converted (4). By default Browser starts from Xml folder of the Esf Total Editor
    2. Type the name for the output esf file with it's extension (e.g. myfile.esf).
    3. Click Xml to Esf button (3)1.

    You can access your xml folder in Menu bar, Xml, Xml Editor.

    Tip: If you like, you can give a different name to your new esf file than the one that esf had before its conversion to xml.

    Search for ID


    1. Browse for the esf file you want searched. (7)
    2. Type the name for the output text file that will have the results with its .txt extension (e.g. myfile.txt).
    3. Enter the number of ID (10)
    4. Click Search button (9)

    You can search for any number ID, grid, etc. You can access your txt files in Menu IDs, IDs Folder.

    Installation:

    Download attached zip, unzip it and place Esf Total Editor wherever you like, it does not need installation. Launch the program running TEE.exe.

    Credits:

    Just

    Koras123

    Alpaca

    Erasmus777

    Taw
    Attached Files Attached Files
    Last edited by husserlTW; January 08, 2011 at 11:51 AM.




  2. #2
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,186
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Definitly looks like a useful tool Husserl, and finally someone put taw's tools in an graphical GUI

    + rep.

  3. #3
    husserlTW's Avatar Artifex
    Join Date
    Mar 2009
    Posts
    6,977
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Thanks P. I've just added the installation files.
    Last edited by husserlTW; January 07, 2011 at 12:23 PM.




  4. #4
    uanime5's Avatar Artifex
    Join Date
    Mar 2007
    Posts
    3,877
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Great tool husserlTW. This will make working with the esf files much easier.
    Expanded Japan mod (83 new regions,86 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

    ETW mapping information
    http://www.twcenter.net/forums/showthread.php?t=355187

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

  5. #5
    Bethencourt's Avatar PLVS VLTRA
    Artifex

    Join Date
    Jul 2009
    Posts
    4,694
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Hi!

    I have started to use your new tool to follow the unanime5 guide to create a new slot in a city in NTW. I have vista, the tool was saved in program files C:\Program Files\Esf Total Editor, I started it using the desktop icon, it opened well, then I selected the file I wanted to convert to xml then I gave name to the xml folder, I called 1, but when I started the conversion it tells me no controlled exception , continue or quit, access denied to the rout of access 'C:\Program Files\Esf Total Editor\ Converters\Data\esfxml.bat'

    Then I went to the C:\Program Files\Esf Total Editor folder and started the program directly form there with the same result.

    Then I copied the Esf Total Editor in C:\Program Files\Steam\SteamApps\common\napoleon total war and run it I select region esf of nap europe and then give name 1 to xml folder, it make the conversion it says I can go to XML menu and in xml folder I will find it, but as I press ok then another message saying Exception not crontrolled in the program continue or quit, and Exception of HRESULT:0x800A004C (CTL_E_PATHNOTFOUND). Anyway I go to xml menu>folder but I do not see folder 1.


    Well that is my experience by now. I want to use the tool but maybe I am doing anything wrong or it is not working for me.


    Edit: I have just seen that you said that I have to have installed jruby, but there are 8 downloads. Do I have to dowload and install all of them?
    Last edited by Bethencourt; January 08, 2011 at 11:24 AM.

  6. #6
    husserlTW's Avatar Artifex
    Join Date
    Mar 2009
    Posts
    6,977
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    If you had tried taw's xml to esf tool then you should have jruby. If not then yes you have to install it. Choose one of these for 32 or 64 bit: JRuby 1.5.6 Windows Executable (md5, sha1), JRuby 1.5.6 Windows Executable (x64) (md5, sha1). After you install jruby open a cmd window and type these 2 commands (one at the time pressing enter):

    Code:
    jgem uninstall nokogiri
    
    jgem install nokogiri --pre
    Then you are good to go. Also I suggest to copy Esf Total Editor folder (as you've done already) and use it from there and uninstall the Esf Total Editor you've installed using set up file.

    Btw T.C. told me that you are trying to add some slots in cities. I am working on the new method where you really add new slots, without downgrading any city. That is one of the reasons that I made the tool. I have simplified enough the procedure and soon I'll release a tutorial.




  7. #7
    Bethencourt's Avatar PLVS VLTRA
    Artifex

    Join Date
    Jul 2009
    Posts
    4,694
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Thank your for making it clear. About our intentions yes you are right, we have seen that most minor factions that only have one city only have room for cantonment not for artilley buildings so they end up having infantry and cavalry armies but not artillery, and now that we are making some of them playable it makes much sense to give them more slots, also Topcat is working in a new feature that requires a new builiding slot, so this tool development you are making comes in the best moment. I will be one of the first readers of that tutorial. Good work.
    Last edited by Bethencourt; January 08, 2011 at 12:04 PM.

  8. #8
    Bethencourt's Avatar PLVS VLTRA
    Artifex

    Join Date
    Jul 2009
    Posts
    4,694
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Hi!

    Just to say that after downloading JRuby 1.5.6. Windows Executable and pressing the conversion button it worked but saying the same mistake that I have said here:
    Quote Originally Posted by Bethencourt View Post
    I copied the Esf Total Editor in C:\Program Files\Steam\SteamApps\common\napoleon total war and run it I select region esf of nap europe and then give name 1 to xml folder, it make the conversion it says I can go to XML menu and in xml folder I will find it, but as I press ok then another message saying Exception not crontrolled in the program continue or quit, and Exception of HRESULT:0x800A004C (CTL_E_PATHNOTFOUND). Anyway I go to xml menu>folder but I do not see folder 1.
    BUT after searching I found that Esf Total Editor had really worked and that xml files were saved in here:

    C:\Program Files\Steam\SteamApps\common\napoleon total war\Esf Total Editor\Converters\1

    so with Notepad++ I have been able to open the xml file.

    I am a happy man now.
    Last edited by Bethencourt; January 09, 2011 at 07:52 AM.

  9. #9
    husserlTW's Avatar Artifex
    Join Date
    Mar 2009
    Posts
    6,977
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    After conversion xml is copied in Esf Total Editor\Converters\XML and it is deleted from Esf Total Editor\Converters. If you found it in Converter folder that means that for some reason the process didn't completed. If I recall correctly your OS is Vista. Start always as administrator the application.
    Attached Files Attached Files
    Last edited by husserlTW; January 14, 2011 at 02:48 PM.




  10. #10
    ForteS's Avatar Need Hugz?
    Join Date
    Jun 2010
    Location
    PT, EU
    Posts
    4,242
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Looking great, will download.
    +rep

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

  11. #11
    Okmin's Avatar In vino veritas
    Content Staff

    Join Date
    May 2010
    Location
    USA
    Posts
    7,413
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Great tool, thanks for saving us all from repeatedly typing command lines (Not that there's anything wrong with command lines )

    +rep
    IN VINO VERITAS
    IN CERVESIO FELICITAS

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

  12. #12
    Invictus XII's Avatar SOL INVICTVS
    Join Date
    May 2009
    Posts
    2,834
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Oh I love all of you!
    Formally known as 'Marshal Beale' - The Creator the Napoleon TW mods - 'Napoleon Order of War' and 'Revolution Order of War'

  13. #13
    Artifex
    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,236
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Hey, why didn't anybody tell me about this awesome tool!

    A question to husserlTW and others: Now that there's pretty GUI,
    I can easily extend esf2xml to take extra options controlling conversion process in any way we want.

    Well, I could have done that earlier as well, but many such things would require
    some complicated command line options.

    xml2esf is quite flexible in terms of what it can convert back anyway.

    Is there any kind of conversion control you'd like to see added?

    A few examples of possible things:

    • different xml splitting rules - xml_split.rb is a simple config file, and if there's any need, esf2xml could support multiple layouts
    • enabling / disabling handlers of various tags - if you need lower level xml for any reason
    • disabling handlers of all tags - if you need really low level xml
    • I could make esf2xml print better "progress meter" information, currently it prints % finished every 5 second.
    • possibly, converting only interesting parts of esf and leaving everything else as binary - this isn't 100% trivial as this binary would need to be modified on reassembly, but in theory it should be way faster this way
    • a bit of messing with JRuby ahead-of-time compilation, and other switches can possibly make it a lot faster
    • some parts of esf like quad trees can be converted to png and back - but only very slowly. It might be a good idea to enable this as a switch.

    I also sort of want to create a few scripts. Each such script would do the following:

    • convert esf to xml
    • run some simple code to patch xml
    • convert xml to new esf

    Except it would be a lot faster because only relevant parts of esf would need to be converted.

    A few obvious examples of such scripts might be:

    • remove all forts
    • change turns per year
    • convert cities from one size to another
    • add or remove units etc.

    I'm not saying I'm actually going to implement much of what I mentioned here, just that it's possible if you guys would find it very helpful.

  14. #14
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,186
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    A very nice tool, makes the convertion definitly much easier

    So just a little requests if possible:

    - at moment if i look for a esf file, i always have to start from the c:\program files and have to click my way through until i reach the destination where have the files.
    Would it be possible to add a option where i could change the default folder to a custom one?

  15. #15
    husserlTW's Avatar Artifex
    Join Date
    Mar 2009
    Posts
    6,977
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    I'll check this and if possible I'll add it in next version.




  16. #16
    Tiro
    Join Date
    Jan 2011
    Posts
    53
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    I'm having a problem using the tool, I simply cannot convert xmls back to .esf. The commandbox gives the following:
    E:/JRuby/jruby-1.5.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31in 'require': no such file to load -- nokogiri (LoadError)
    from E:/JRuby/jruby-1.5.6/lib/site_ruby/1.8/rubygems/custom_require.rb:31 in 'require'
    from xml2esf:4
    I have no idea what it means though; Am I missing some files?

  17. #17
    Artifex
    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,236
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Quote Originally Posted by Aermanner View Post
    I'm having a problem using the tool, I simply cannot convert xmls back to .esf. The commandbox gives the following:


    I have no idea what it means though; Am I missing some files?
    Run from command line: jgem install nokogiri --pre

  18. #18
    Tiro
    Join Date
    Jan 2011
    Posts
    53
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Wauw, that was quick! Now I just fell kinda stupid for not understanding you. I write your command in the cmd.exe but what am I supposed to do afterwards?

  19. #19
    Artifex
    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,236
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Quote Originally Posted by Aermanner View Post
    Wauw, that was quick! Now I just fell kinda stupid for not understanding you. I write your command in the cmd.exe but what am I supposed to do afterwards?
    It will download and install library which is missing, then you continue doing what you wanted to do before ;-)

  20. #20
    Tiro
    Join Date
    Jan 2011
    Posts
    53
    Tournaments Joined
    0
    Tournaments Won
    0

    Default Re: Esf Total Editor

    Ah, yes, I figured it out, I was simply too impatient before and closed the window befor eit was finished. Patience, patience, patience.
    Thanks for your help, it is appreciated!

    dit: I still have a problem: the file isn't converted. There is a file in the ESF-folder, however, it's completely empty, and there is a file by the same name in the converter-folder. I'm not sure, what I have done wrong.
    Last edited by Aermanner; January 26, 2011 at 04:13 PM.

Page 1 of 3 1 2 3 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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