Page 1 of 12 1234567891011 ... LastLast
Results 1 to 20 of 227

Thread: Esf Editor

  1. #1

    Default Esf Editor

    THIS VERSION IS OUT OF DATE.

    GET THE CURRENT VERSION AT http://www.twcenter.net/forums/showthread.php?t=428754


    Here is a program with which you can edit .esf files as well as savegames.

    It's not quite finished, but it is usable at this point.

    You can edit text and numbers, but not the binary data.
    You can also duplicate repeating data.

    Future improvements:
    • Include an editor for the binary parts
    • Descriptions for the values in the .esf files (you can help with this by letting me know any values you've discovered, you can easily copy the path and value number from a textbox.
    • Searching
    • Descriptive names for items in large arrays


    Some interesting places:
    Turns per year: main\startpos.esf\CAMPAIGN_STARTPOS\CAMPAIGN_ENV\CAMPAIGN_MODEL\CAMPAIGN_CALENDAR - value #1
    Starting season of the years: main\startpos.esf\CAMPAIGN_STARTPOS\CAMPAIGN_ENV\CAMPAIGN_MODEL\CAMPAIGN_CALENDAR\DATE - value #2
    Faction's colors on the campaign map: main\startpos.esf\CAMPAIGN_STARTPOS\CAMPAIGN_ENV\CAMPAIGN_MODEL\WORLD\FACTION_ARRAY\FACTION_ARRAY\FACTION\FACTION_FLAG_AND_COLOURS - value #2-10 (9 bytes, Red 1, Green 1, Blue 1, Red 2, Green 2, Blue 2, Red 3, Green 3, Blue 3, and in the node below the colors for the republic.

    The startpos.esf for the main campaign contains over 4 million values, so there is lots more to explore

    Quick explanation of the things you'll encounter in the editor
    Spoiler Alert, click show to read: 

    Colors and such used in the treeview:
    Gray: this contains 0 or more sets of the same type of data
    Red: this is marked for deletion
    Green: this is new
    Cursive: somewhere in this tree is a deleted/new/changed value
    Bold: this node contains changed values

    Data types:
    Short: Can go from -32768 to + 32767
    Boolean: Either true or false
    Byte: Can go from 0 to 255
    Int: Can go from -2 billion to +2 billion
    UInt: Can go from 0 to +4 billion
    UInt16: Can go from 0 to 65535
    Float: A number with a floating point, pretty much any number allowed
    FloatPoint: two floating points separated by a semi-colon ;
    UTF16: a string of text that can contain any character, English or foreign.
    Ascii: a string of text that can contain no extended characters like ëàû中国, pretty much the keys you can find on an English keyboard are allowed.
    UShort: Can go from 0 to 65535

    If you enter a value that's not allowed the program will beep and the value will revert.

    Right clicking a changed value or node will allow you to undo your changes.
    Right clicking a node allows you to copy, paste, clone or delete them.
    Copy stores the node for later pasting.
    Paste puts a copy of the node right after the designated node. You can only paste to another node of the same name.
    Clone puts a copy of the node right after the one you selected.
    Delete marks a node for deletion.

    All copying is based on the data on disk, it will not copy/clone any unsaved changes.

    Changes are committed when you press save in the file menu.

    Saving can take a minute if you have changed the size of the file, by changing the length of a string or by duplicating/deleting nodes, otherwise it is immediate.


    Comments, ideas, suggestions, bug reports are welcome.
    Last edited by just; February 26, 2011 at 06:23 PM.

  2. #2
    aronnov's Avatar Tiro
    Join Date
    Oct 2004
    Location
    Nashville, TN
    Posts
    267

    Default Re: Esf Editor

    Very nice. a huge step in the right direction. +rep
    Honor ... means that a man is not exceptional; fame, that he is. Fame is something which must be won; honor, only something which must not be lost. ~ Schopenhauer

  3. #3

    Default Re: Esf Editor

    Nice! +rep. I managed to give Athens to Greece, in the campaign menu, it says they have 1 starting region and Greece (Athens) is highlighted in green on the map. However, the game still crashes when I try to start the campaign. So close!

    Argh, crash after crash, I'll leave it to someone else, this is too advanced for me.
    Last edited by Sorkenlol; March 25, 2009 at 06:53 PM.

  4. #4

    Default Re: Esf Editor

    i have add west prussia region to prussia..
    no crash..all ok but i need too know how move poland-lit unit from west prussia to maybe warzaw. city..can some one tell me how move unit
    from west prussia to some one city?



    Nice one,Just...well done!

  5. #5

    Default

    Excellent work!

    Adding victory conditions works! Now, off to edit the victory conditions for the Mughal Empire.

    Double posts merged. - Thanatos
    Last edited by Thanatos; March 25, 2009 at 09:19 PM.

  6. #6

    Default Re: Esf Editor

    Hey just I think in the two strings above the colors are the type of AI the faction would use.

    Also in the campaign players setup the first string is the faction name, then the first bool is if that faction is the player which only pertains to a save file. and then the next one is if it is playable. Third I am unsure.

    Also really would be useful to have the large arrays be named by one of the strings in their data like for faction array to use the faction name string and for regions to use the region name.
    Last edited by GeorgiaPeanuts; March 25, 2009 at 08:39 PM.

  7. #7

    Default Re: Esf Editor

    @Just..can u make too a edit on this "offset" too on ESF.Editor..need too write on hex value

    @@. pls too make all edit on whatever..we need can edit/write all..not only name,too all..BUT thats GREAT ESF EDITOR!
    Last edited by Takeda♔Shingen; March 25, 2009 at 09:21 PM.

  8. #8

    Default Re: Esf Editor

    just I have a major breakthrough about these random big ints with like 346317616.

    They are unique ids for different things. For instance all of Britain units have that ID value somewhere in their definition and then you will see that the first entry of the faction info for Britain is that value 346317616 so just must discover what each id is pointing to. and another example is there is an id for each settlement that is then used by the CAI_ systems.

    In future a good feature would be to actual allow you to move to open all records that have the same id.
    Last edited by GeorgiaPeanuts; March 25, 2009 at 09:19 PM.

  9. #9

    Default Re: Esf Editor

    Yes, most of those are indeed ID numbers.

    I like your ideas, searching and names for certain nodes I will add.

    @WarriorOne: The offset isn't a value you can edit, it's the location in the ESF where the data is.

  10. #10

    Default Re: Esf Editor

    Also need a way to add new subsections and pasting/copying doesn't seem to work at every node level.

    Another feature would be to copy and paste in another file, for example I will have open a save and I want to copy an army_array from the save to an army_array in the startpos, but paste only seems to function in the window copy was done in.

  11. #11
    l33tl4m3r's Avatar A Frakkin' Toaster
    Join Date
    Mar 2009
    Location
    Soldier of Fortune
    Posts
    6,330

    Default Re: Esf Editor

    Quote Originally Posted by just View Post
    Comments, ideas, suggestions, bug reports are welcome.
    You so sexy!
    [House of Caesars|Under the Patronage of Carl von Döbeln]

  12. #12

    Default Re: Esf Editor

    Nice work just!

    Quote Originally Posted by just View Post
    Yes, most of those are indeed ID numbers.
    With strange numbers like that, perhaps you made the same mistake I did by interpreting a short string made out of number characters to be a uint32.

  13. #13

    Default Re: Esf Editor

    Quote Originally Posted by Sorkenlol View Post
    Nice! +rep. I managed to give Athens to Greece, in the campaign menu, it says they have 1 starting region and Greece (Athens) is highlighted in green on the map. However, the game still crashes when I try to start the campaign. So close!

    Argh, crash after crash, I'll leave it to someone else, this is too advanced for me.
    That's because you didn't give Athens to Greece in the actual game.

    While we were still hex editing the .esfs, we found the list of regions that had factions assigned to them and it looked very promising. However, it turns out that this list only controls which regions turn green on that starting campaign menu and has nothing to do with the actual campaign.

    So yeah, we still have yet to figure out the mechanism.

    EDIT:

    Ack!!!

    Okay, so I edited a save file and changed my faction's colors. It looks like everything worked fine--the savegame loaded, the colors were changed, etc. So then I saved over my normal save file with it. After doing so, everything broke. I couldn't load any save games because my list was completely empty.

    Removing the newly overwritten save (but not the one I physically edited) fixed the problem and my saves are visible again.

    What could be causing this?

    EDIT2: Okay, it has nothing to do with this program--I've noticed any savegames while playing as the nonplayable papal_states somehow breaks the savegame system, whereas saving games with a playable faction does not. Ugh, stupid new patch...

    EDIT3: Okay, making *another* new save in the borked save screen has caused the save games to reappear, and I can load that "broken" save just fine. It seems any time you make a save game with a nonplayable faction, you have to make a new save immediately after in order to see your saves again. That's extremely dumb. Silly patch.
    Last edited by Iaius Statius Laurentius; March 26, 2009 at 05:30 AM.

  14. #14
    Miles
    Join Date
    Mar 2009
    Location
    Lille, France
    Posts
    325

    Default Re: Esf Editor

    Great work!

  15. #15

    Default Re: Esf Editor

    Can we edit emergent factions with this editor to make them playable?

  16. #16

    Default Re: Esf Editor

    Can we get the source code for this?

  17. #17

    Default Re: Esf Editor

    Quote Originally Posted by PowerWizard View Post
    Can we edit emergent factions with this editor to make them playable?
    I've actually already tried that with the U.S and so far I can assign it a region, I can make selectable, and I can make to where it reads that it has one region and have shown on the pre grand campaign at the faction selection screen, but when I try to play it, it still crushes.

  18. #18

    Default Re: Esf Editor

    Aw man, I feel the breakthru is so close. If someone makes the emergent nations playable with this editor, both he and just will be worshipped on TWC like demi-gods .

  19. #19

    Default Re: Esf Editor

    HowTo make work edited startpos.esf???? Shoul I place it in any of .pack files???

  20. #20
    aronnov's Avatar Tiro
    Join Date
    Oct 2004
    Location
    Nashville, TN
    Posts
    267

    Default Re: Esf Editor

    Quote Originally Posted by Rodrigo The Scarred View Post
    HowTo make work edited startpos.esf???? Shoul I place it in any of .pack files???
    i think you just backup your original and replace with the new one.
    Honor ... means that a man is not exceptional; fame, that he is. Fame is something which must be won; honor, only something which must not be lost. ~ Schopenhauer

Page 1 of 12 1234567891011 ... LastLast

Tags for this Thread

Posting Permissions

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