Page 1 of 3 123 LastLast
Results 1 to 20 of 41

Thread: Giving Characters Traits, Money through Savegame Editing

  1. #1

    Default Giving Characters Traits, Money through Savegame Editing

    Hi,

    This is the first tutorial I've ever posted, so bear with me! I've noticed a few people (mostly in threads about how to edit savegames/startpos) were wanting to give their generals/ninja/whatever specific traits, etc when starting, so I thought I'd put up how. It's a bit of a pain with saving/loading, but avoids mucking about with the startpos or any serious modding, so it's reasonably safe. You can even do it while the game runs (I run mine windowed, so I don't even have annoying loadscreens ). I've also had issues with the scripting.lua editing to change money about, so I'll include that here too. Basically, by the end of this, you should be able to:

    A: Have as much money as you want
    B: Have a general/agent of any level with as many skills as you want.

    I'll describe the process for a general: it's the same for an agent, just substitute agent's type for general.

    1. Get ESF editor version 1.4.6 ESF Editor updated for Shogun 2. The 1.4.8 currently corrupts savegames, from what I can tell by saving them in an ETW format. I haven't had issues with 1.4.6

    2. Backup the savegame you want to edit. REALLY DO THIS. The editors are still under development, and the last thing you want to do is kill that really awesome savegame you've got going. I called my backup "safe" and my editable save "editable". Original, I know.

    3. Open up the ESF editor, and open "editable". Expand as follows:
    editable
    campaign_save_game
    campaign_env
    campaign_model
    world
    faction_array
    4. Now you'll see a list of factions. I'm playing Chokosabe (I love me my archers), and the first entry (the top one) is mine. I think that the player always has the top array though, from what I can remember. Let's continue expanding:
    faction_array
    faction
    5. If editing money, do the following. If not, skip to 6.
    Select, not expand, the faction_economics entry. Expanding gets you history, which you do not want. Selecting gets you a list of 6 numbers, they'll look something like this:
    4000
    0
    1452
    420
    1800
    The one in red is the amount you currently have. Change it to whatever number you like. I've tested up to 320000. Save and the money editing is done.
    6. We have a little more work to get to the characters we want to edit. Expand:
    Character_Array
    Now there'll be a list of several "character_array". You have to expand each one and select "character" to find out what type of character they are. Selecting "character" may get you something like this:
    44
    598157432
    minister
    If so, this character is, from what I can gather, either a wife or a child. Leave them alone.

    Instead, where it says minister, you want to look for "general" for generals. Now, to find out which of your generals you have, you need to expand the "character" and select "character_details". The second to last line tells you whether it's your faction leader or not. If so, it will read:
    "chosokabe_daimyo" (or shimazu, or whatever)
    If you're doing this late game, and have dozens of generals, you need to expand "character_details" and select the "campaign_localisation" entries to get the names.
    7. To make sure you're not lost: now you know which "character_array"s are which generals, and you expanded as so:
    character_array
    character
    character_details
    8. Now we get to the fun bit, where our generals get their skills. Select "character_skills". It has 4 entries, I'll explain what I think each one is:
    20 -------> This is the number of skill points you have
    5 --------> This is the "level" of your general. NOTE: A "5" here means your general is 6 stars in the game. IE, it means the level of ability your general has unlocked.
    500 --------> I think this is the experience, or maybe total experience required. I haven't played enough with it to be sure though.
    general_skills------> This is the type of skills you can unlock. A general gets general skills, equally a ninja gets ninja skills. Don't change this, it may have really odd results. Like your general not being able to engage in battles.
    9. Change the first number to whatever you like for skill points, and the second to whatever level you want unlocked. THESE ARE NOT FINAL. Just temporary, so don't worry, you can reset your general after. Save the file.

    10. Go to TWS2. Open the savegame "editable". Spend the skillpoints as you like. You may notice your general lacks the Retinue peoples, just as if he'd come out of a city that makes agents with extra experience. So now we'll fix this/make it so you can have a general with specific skillsets added as an extra. Save the savegame. If ESF editor is still open, you may not be able to save as "editable", so I saved as "safeish" (since the first round of editing worked ).

    11. Open "safeish" in the ESF editor. Expand back to the "character skills". Set the second entry ("level allowed") back to 1, or whatever it was before. WARNING: I have not messed about with taking a general with retinue back below the retinue levels and getting more retinue than allowed. I suspect this was not predicted by the programmers, there is no "3 retinue already check" and result in a savegame fail/CTD.

    12. (Optional) There's an entry under "character_details" called "agentattributes". This has what I think are bonuses that can be applied to land command, etc. Careful messing with them, but I gave one of my generals a moral effect bonus (7) with no seeming ill effects.

    12: Save "safeish" in ESF editor. Load safeish in TWS2 and enjoy.

    And that's it. If you liked this tutorial, please tell me- I've got a fragile ego.

    EDIT:

    So, I figured out how to make the characters younger too. When expanded to the "character_details" level, three are 2 "Date" entries. The first is the date of birth. You'll see a number that starts "15XX" where the X's are numbers. Change them to whatever date you want your character to be born at. There may be minimums for age, so careful. I've been messing about with the national traits too, may make a tutorial for that later.
    Last edited by Raga; March 25, 2011 at 03:51 PM. Reason: additional discoveries

  2. #2

    Default Re: Giving Characters Traits, Money through Savegame Editing

    excellently written and very descriptive

  3. #3
    Igo's Avatar Libertus
    Join Date
    May 2005
    Location
    aussie
    Posts
    93

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Thankyou, I need this for when I change the date so none of my generals dye next turn, great find.

  4. #4

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Is there any way to avoid a manual search going down several tiers each of over 50 character arrays? I have 1 ninja among a pile of generals/colonels/captains. Pretty sure I've gone through that list twice already and haven't found the ninja.

  5. #5

    Default Re: Giving Characters Traits, Money through Savegame Editing

    That's incredible!! awesome!

    Any idea how to use this method to change the portrait or the model of my generals? what field would that be?

    Thanks

  6. #6

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Quote Originally Posted by gatorreefer View Post
    Is there any way to avoid a manual search going down several tiers each of over 50 character arrays? I have 1 ninja among a pile of generals/colonels/captains. Pretty sure I've gone through that list twice already and haven't found the ninja.
    So the characters are added in order. IE, the bottom of the list is the most recent character. This makes it pretty easy to find a character right after they've been recruited, but otherwise you're going to need to guess when you recruited the character. Colonels/Captains are placeholder characters that are in charge of general-less armies and navies, and are added automatically, which makes it a bit harder. Once the unpacking/repacking then saving parts of the ESF editor are functional, you could extract the files in question then search through them automatically, then rebuild the savegame. That's probably a ways off though.

  7. #7

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Portrait yes, model no. For the portrait, in the ESF editor under "character_details", there is an entry called portrait_details. There are three entries that start ui/portraits... and one that's a number. You may notice that the numbers all match (or at least for those I've looked at). So, to change portrait, change the number. I'm not sure what numbers are valid, so you may want to find a portrait you want to use first from an existing character. I haven't tested anything involving this, by the way- pure conjecture. You may even be able to get away with changing the portrait numbers to different ones, ie have your general's portrait in the info screen look different from the one in the army bar/ general campaign screen.

  8. #8

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Is there any other way to change the model of a specific general? I particularly like the look of the bessho daimyo.

  9. #9

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Quote Originally Posted by jammer8111 View Post
    Is there any other way to change the model of a specific general? I particularly like the look of the bessho daimyo.
    You mean the battle model of the bessho daimyo, right? There may be, but I've no idea where to start looking. Actually, that's a lie. You could look under the "army_array"s, find the right army, find the bodyguard unit, and hope to be able to identify the captain unit for the bodyguard (which may or may not be possible to edit) then change that to the whatever the model is for the bessho guy. However, that would be a huge pain in the ass, especially wading through the army_arrays and doing the identification. The best way to do this is by editing the database (DB) files, which are in the packs. If they're anything like Empire/Napoleon (which they likely will be) there is an entry for each type of bodyguard unit with the "captain" (ie the general) as a specific model. I'm not sure if the PFM (packfile manager) has the ability to do all this yet, and I think that there are still some issues with adding modding files, so this'll have to wait.

  10. #10

    Default Re: Giving Characters Traits, Money through Savegame Editing

    EDIT: Nevermind, solved.
    My machine:
    OS: Windows 10 x64
    MOBO: Z270 GAMING M3
    CPU: Intel i7 7700k @ 4.7
    RAM: 16GB DDR4 2666
    GPU: Zotac GTX 970
    Storage: Samsung 850 EVO + 5 HDD

  11. #11

    Default Re: Giving Characters Traits, Money through Savegame Editing

    strange but now my saved game crashes I'm sure I did every thing right... btw I get this error in esf editor after edit

    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at EsfEditor.Parser.TitleParser.TitlesInValues(List`1 vals, Boolean& found)
    at EsfEditor.Parser.TitleParser.GetTitle(IEsfNode node, List`1& children)
    at EsfEditor.Forms.EsfEditorForm.treeView_AfterExpand(Object sender, TreeViewEventArgs e)
    at System.Windows.Forms.TreeView.OnAfterExpand(TreeViewEventArgs e)
    at System.Windows.Forms.TreeView.TvnExpanded(NMTREEVIEW* nmtv)
    at System.Windows.Forms.TreeView.WmNotify(Message& m)
    at System.Windows.Forms.TreeView.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Last edited by pilekasis; April 14, 2011 at 10:14 AM.

  12. #12

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Are you using the right esf editor? What entries are you editing?

  13. #13

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Quote Originally Posted by Raga View Post
    Are you using the right esf editor? What entries are you editing?
    Every thing now is fine. I used the 1.4.6.0 editor but the download of that version was corrupted! But still I some times get "don't send" error now I think its because when you engadge a fight or what ever you CAN'T modify any more skills... Or else it will go corrupt...
    Last edited by pilekasis; April 14, 2011 at 03:26 PM.

  14. #14

    Default Re: Giving Characters Traits, Money through Savegame Editing

    game crashing when do a campaign fight with a genreal full skilled with 60 skillpoints left, i did add 1 insteed of level 5 after spending the skillpoints.

  15. #15

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Wow! Great tutorial, not only did it teach me a great cheat but it also was a good beginners tutorial to modding. Thanks so much!
    Qui desiderant pacem praeparet belleum (Let him who wants peace prepare for war)
    ~Vegatius

    I am the successor, not of Louis XVI, but of Charlemagne
    ~Napoleon Bonaparte

  16. #16

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Quote Originally Posted by pilekasis View Post
    strange but now my saved game crashes I'm sure I did every thing right... btw I get this error in esf editor after edit

    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at EsfEditor.Parser.TitleParser.TitlesInValues(List`1 vals, Boolean& found)
    at EsfEditor.Parser.TitleParser.GetTitle(IEsfNode node, List`1& children)
    at EsfEditor.Forms.EsfEditorForm.treeView_AfterExpand(Object sender, TreeViewEventArgs e)
    at System.Windows.Forms.TreeView.OnAfterExpand(TreeViewEventArgs e)
    at System.Windows.Forms.TreeView.TvnExpanded(NMTREEVIEW* nmtv)
    at System.Windows.Forms.TreeView.WmNotify(Message& m)
    at System.Windows.Forms.TreeView.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    I ever found somethin like this. I guess you save as file which already opened in esf editor.

  17. #17
    Slayer113's Avatar Laetus
    Join Date
    Feb 2011
    Location
    New Jersey
    Posts
    10

    Default Re: Giving Characters Traits, Money through Savegame Editing

    This didnt help me. I dont seem to have the same items in the menu as you guys do.

  18. #18

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Thanks a lot, but I have a problem
    How to edit the character's ancillaries
    I want to add or remove the character's ancillaries, but I can't find it.
    Last edited by yangji; May 01, 2011 at 07:25 AM.

  19. #19

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Quote Originally Posted by pilekasis View Post
    Every thing now is fine. I used the 1.4.6.0 editor but the download of that version was corrupted! But still I some times get "don't send" error now I think its because when you engadge a fight or what ever you CAN'T modify any more skills... Or else it will go corrupt...
    About the corrupting the fight file, that sounds about right. The game takes into account the general data etc when making the "balance of power" calculation, and in general its a bad idea in TWS2 (and pretty much everything else in computing) to mess with something already under use.

  20. #20

    Default Re: Giving Characters Traits, Money through Savegame Editing

    Quote Originally Posted by hardcore knight View Post
    game crashing when do a campaign fight with a genreal full skilled with 60 skillpoints left, i did add 1 insteed of level 5 after spending the skillpoints.
    Can you give more details? Did it work more more limited (not having hundreds of skillpoints)? What actions did you take in what order? What condition for your general before moddification? Have you managed any other editing based off this tutorial successfully? I can't help without a bit more information.

Page 1 of 3 123 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
  •