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: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: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.