Total War: THREE KINGDOMS

Total War: THREE KINGDOMS

Not enough ratings
How to edit startpos without inferring with Portrait mods.
By Ironic
How to edit startpos without inferring with Portrait mods.
   
Award
Favorite
Favorited
Unfavorite
Experience
If you wanting to get into startpos and wish to do but can't leave your favorite portrait mod behind I will show you the way.

I will not be covering these topics here:

RPFM
DAVE
BOB

So I am expecting somewhat of experience with these three items. And I will teaching you about scripting a little bit. Just enough to do what you need to do.
Part 1: Introduction
Before doing this I would recommend for you to do your startpos changes to see if it works, so you can narrow down the issue if one does occur.

So you want to edit startpos but don't want to infer to with the portraits. This is fairly easy to do, the only heavily lifting is the startpos itself and the how to get the portrait characters into your mod.

If you wish to change CEO, you can not unless the portraits are not changing ceos.

Note: This doesn't include any changes that the mod made with startpos.

This does require a lot of preparation as well.
Part 2: Startpos
First step is to list each and every character, the portrait mod has you start out with. This is really long, so if you have a list that already does, it will be very helpful.

Also keep a list of those apart of armies in the beginning and or apart of the first fights.

This is for after.

Now after you have put together a list of changes. You now can began, so open up DAVE.

Step 2

Creating dummy characters:

So for faction leaders without a portrait, you want to create a dummy character. This is so the character will spawn in with their portrait.

You only need to do this to any faction leaders, as with heirs and such you can just script them in later.

For a dummy character follow this guide:

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1798650568

Example would be: Wang Kuang in 190 or Gongsun Du.

If they spawn in with a special weapon like TUP with Xiahou Dun, you can just give them it via scripts.

Step 3

Removing characters:

Navigate to Start_Pos_Characters and you want to remove any characters(Keep any character that is apart of a faction's first fight) that has any portrait. You may get errors, but follow these tables it wishes you to fully remove the character.

Step 4

Make any start pos changes you want and now you can export changes to binary and build BOB.

If an error has occured double check that is an issue with your side or if it was the characters that had ended up wrong.
Part 3: Getting the portrait characters into the game.
So assuming that you have created your startpos and exported it into a RPFM file. And it works, no crashes and all, we shall began with getting the modded characters in.

This is where the fun begins, scripting.

I have a mod called Script Database which is going to be helpful if you have little experience.
Link here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2663045670

If you do use it, please make it a requirement and always launch this up with your mod.

So you need to get your characters in.

You need to create this in your RPFM

script/campaign/mod

in the mod folder create a text file, whatever you want to call it then end it in .lua an example

ironic3kmain.lua

Next up is to identify the start date

182 = 3k_dlc04_start_pos
190 = 3k_main_campaign_map
194 = 3k_dlc05_start_pos
200 = 3k_dlc07_start_pos

With this example I will be changing our dummy faction leader Gongsun Du to the actual Gongsun Du. And making Gongsun Kang and making him into the heir

If I place some in there with name_? this is to rename it to whatever you want and then the ? will be a number to it's easier to follow.

and I will be using my script database which will be easier to follow.

cm:add_first_tick_callback_new(function() name_1() end); function name_1() --- Replace start date with your start date from above --- if cm:query_model():campaign_name() == "startdate" then ---Within this you can place as much code as you want. spawn_character_type_faction("3k_main_faction_gongsun_du", metal, "3k_main_template_historical_gongsun_du_hero_metal") assign_faction_leader("3k_main_template_historical_gongsun_du_hero_metal") kill_character("ironic_dummy_template_gongsun_du") spawn_character_type_faction("3k_main_faction_gongsun_du", earth, "3k_main_template_historical_gongsun_kang_hero_earth") assign_minister_slot("3k_main_template_historical_gongsun_kang_hero_earth", "faction_heir") --- If you want to give out a ceo to a character use add_ceo from my script database. end; end

Conclusion
That is all you need to edit startpos without conflict to your favorite portrait mod.

If you need any clearing up, please put that in the comments so I can edit and changes things.
Discord
If you want more help other this modding process or other mods do join: the modding server

https://discord.gg/VPjDfyZphd
24 Comments
RustyCrowHK 20 Jul, 2024 @ 11:56am 
ah i see, thanks Ironic. Thought that I can just simply create a dummy feaction leader, use the script to kill it and spawn a update one, that would be much convenient. If i have to input the tables and CEO to create the startpos esf, that's actually tons of works...
Ironic  [author] 20 Jul, 2024 @ 10:26am 
@RustyCrowHK that is doing it through the old method just recreating the startpos and CEOs if you are looking to make your mod MTU compatible please look to the TROM/MTU server for the Uc to apply
RustyCrowHK 20 Jul, 2024 @ 5:26am 
hey Ironic, quick question, I saw your 190 seems able to make those faction leaders applying the portrait without killing the dummy character. Did you find a new way doing this?
Ajie 6 Mar, 2022 @ 9:36pm 
OMG that explains it. i was wondering why there's general and hero. thanks a lot. now back to modding.
Ironic  [author] 6 Mar, 2022 @ 8:51pm 
@Ajie check in character_generation_template_game_mode and make sure the retinue is a hero and not a general
Ajie 6 Mar, 2022 @ 8:29pm 
i cross with something that i don't know how to fix, i subscribe on a bodyguard mod. then all my custom created heroes can't duel anymore they have this cavalry unit behind them even in romance mode, i unsubscribe the mod, repair the game and even uninstall it. is there any changes in the game that "zades custom character" wont be effective like before? i tried to re create the characters still the same.
Ajie 5 Mar, 2022 @ 2:55pm 
i see its more complicated than the start_pos. thanks
Ironic  [author] 5 Mar, 2022 @ 2:49pm 
@Ajie run it by itself first then with preferred portrait mod.

The thing with the creation of more ceos is you lose that compatible with other portrait mods, we can edit start pos freely but not ceo. If you want to give them a unique title, just make a custom skill with that. Hope that answers your question.
Ajie 5 Mar, 2022 @ 2:46pm 
one more thing i have this theory:
what if just create like a hundred new "ceo_career" and give them to all those vanilla characters. to make them editable. do you think it will work?
i took some of eight princess dlc ceo and give it to a custom character and i downloaded a custom character mod that uses the same. the first one to spawn will have the armour linked with that career ceo, and the 2nd no armour and lost its portrait. i saved the game and edit the portrait path for the 2nd. and it works. my theory is do this to vanilla characters.
Ajie 5 Mar, 2022 @ 2:16pm 
@Ironictw3st In Part 3 of your guide you said run the start_pos mod with the necessary changes and see if it works without crashes do i need to run it without any other mods on? and if it works the scripting begins... this comes the favorite portrait mods with their templates.
both mods will have their own start_pos file: the new mod with the new scripts + the favorite portrait mod.