• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
That's something I'll attempt (alternatively reverting it to base CleanSlate and slowly adding things back to see when it breaks); I just figured a second set of eyes might spot something obvious I've missed since code blindness happens.

I didn't see anything that stood out to me, although I am of course not knowledgeable about Tianxia's many additions (even if your comments seemed to cover all the relevant bits). Best of luck, I hope it's just something small and silly, so that it can be fixed easily.
 
Yes, absolutely, and I usually call mine 00_whatever.txt to make sure they load first. There are some circumstances where you want your stuff loaded first, and others where you want it loaded last, though. The wiki has a partial guide to this behaviour.

nd
1717462255593.png

1717462281753.png

Thank you for the help. Numbering has worked as intended.
 
Tragically, after playtesting, it appears this isn't working as intended, and I have had 2 CTDs. Guess that means no slimming down file size on this front.
 
View attachment 1144504
Hi guys, i'm here again asking for wisdom. In the character selection menu the vassals that i've modified looks like they are independant, but they aren't. Do you know the cause of this?

One of their demesne titles (likely the primary) doesn't have a scripted liege for that date in the title history, which is corrected when you load in and the game goes "This other title has a liege, so the holder should also have that liege [unless it is impossible, e.g. they are the same tier as their liege]".
 
One of their demesne titles (likely the primary) doesn't have a scripted liege for that date in the title history, which is corrected when you load in and the game goes "This other title has a liege, so the holder should also have that liege [unless it is impossible, e.g. they are the same tier as their liege]".
And how do i fix it?

PS. Thanks a lot, i've done as you said and it worked. So basically, you have to always add the liege, even for counties that are already part of a duchy?
 
Last edited:
And how do i fix it?

PS. Thanks a lot, i've done as you said and it worked. So basically, you have to always add the liege, even for counties that are already part of a duchy?

The usual way to set it up is to always make sure that a character's lower titles are under their primary title (or intermediate de jure liege title, if they hold that, e.g. c_apulia under d_apulia rather than under k_sicily) and that all primary tier tiles are under their liege. That way, unless a lower tier title stops being part of the same demesne you only need to update the higher tier titles (e.g. if k_siciliy was under e_byzantium and went independent in the example above, you'd not need to change anything for c_apulia if that is scripted as a vassal of d_apulia or k_sicily).
 
Tragically, after playtesting, it appears this isn't working as intended, and I have had 2 CTDs. Guess that means no slimming down file size on this front.
Final follow-up
1718120379745.png

So apparently, this slim mod could work as intended,
1718121398432.png

whether you hold a modded title or not. CTDs may have more to do with my dying computer instead of the game's code.
 
I know you can scale a spawned army's size to X times the local garrison's size. Is there any way to actually make its composition match the local levy?
 
I know you can scale a spawned army's size to X times the local garrison's size. Is there any way to actually make its composition match the local levy?

I ran a few quick tests. scaled_by_biggest_garrison seems to require specifying base troop sizes, but match_settlement does not, and if you omit it, it does indeed scale by the actual levy composition (and ignores the garrison entirely). match_mult did seem to not be working entirely as expected, since the scaling factor was roughly 16.25 even though I specified it to be 10. If you want to apply that to all holdings in the province, you could spawn an army for each holding, and set them all to merge, to make it seem like only one army was spawned to match the entire province.

I hope that's what you're looking for.
 
  • 2
Reactions:
Is it possible to let a merc company not use the merc and holy order-specific succession law?
 
Yes, requirements for each law are in common\laws\succession_laws.txt. You can make any title use whichever law you want it to use.
Great. Now I only need to learn how to write a succession law that makes it possible for my vassals to wrest control of my standing army (represented by special mercs, b/c I don't think event troops is a good stand-in, and retinues can't be inherited by my vassals) from me...
 
Great. Now I only need to learn how to write a succession law that makes it possible for my vassals to wrest control of my standing army (represented by special mercs, b/c I don't think event troops is a good stand-in, and retinues can't be inherited by my vassals) from me...

You might run into a bit of trouble related to mercs not being meant to be playable, so having the companies themselves be inheritable by a vassal means that a player playing as that vassal might get a game over.

Also, a "fun" issue I discovered a while back that might be relevant for what you're trying to do: Merc hire conditions are ignored if they are vassals, so anything like "Can only be hired by persistent_event_target:true_commander" would be ignored for vassal mercs.


Not sure if either is relevant to your implementation, but I know the pain of trying to implement something and running into hardcode issues that turn out to be unsolveable.
 
You might run into a bit of trouble related to mercs not being meant to be playable, so having the companies themselves be inheritable by a vassal means that a player playing as that vassal might get a game over.

Also, a "fun" issue I discovered a while back that might be relevant for what you're trying to do: Merc hire conditions are ignored if they are vassals, so anything like "Can only be hired by persistent_event_target:true_commander" would be ignored for vassal mercs.


Not sure if either is relevant to your implementation, but I know the pain of trying to implement something and running into hardcode issues that turn out to be unsolveable.
Perhaps the mercs could remain as their own title, with normal merc succession, but their liege is changed by event? (Eg. On succession, or if the vassal somehow usurps their loyalty.)
 
You might run into a bit of trouble related to mercs not being meant to be playable, so having the companies themselves be inheritable by a vassal means that a player playing as that vassal might get a game over.
I'm thinking of limiting election to leadership of the "standing mercs" (if only PDX gave the option to implement actual professional armies in CK2, sigh) only for characters who aren't heir to anything, sort of like Crusader beneficiaries. Being a vassal, that means my own army now could join factions, and cause trouble if I try to play as a tyrant overlord.
It would probably be more difficult to make these commanders ally with their landed kin against me, though.
 
I'm thinking of limiting election to leadership of the "standing mercs" (if only PDX gave the option to implement actual professional armies in CK2, sigh) only for characters who aren't heir to anything, sort of like Crusader beneficiaries. Being a vassal, that means my own army now could join factions, and cause trouble if I try to play as a tyrant overlord.
It would probably be more difficult to make these commanders ally with their landed kin against me, though.
FYI, in the base game, only landed vassals can join factions. (Because every faction, in ...\common\objectives\00_factions.txt , has is_landed = yes.)

So, your vassal mercs will only be able to join a faction if they gain a landed title.

Or you could modify all of the factions (eg. by replacing every is_landed = yes with OR = { is_landed = yes is_special_modded_merc_company = yes }). Despite the fact that this involves overwriting the base game, I think it might actually be the better choice, because I think it might be difficult to ensure that every such merc company always has a landed title.
 
FYI, in the base game, only landed vassals can join factions. (Because every faction, in ...\common\objectives\00_factions.txt , has is_landed = yes.)

So, your vassal mercs will only be able to join a faction if they gain a landed title.

Or you could modify all of the factions (eg. by replacing every is_landed = yes with OR = { is_landed = yes is_special_modded_merc_company = yes }). Despite the fact that this involves overwriting the base game, I think it might actually be the better choice, because I think it might be difficult to ensure that every such merc company always has a landed title.
It would be a bit wonky on the historical side to make every commander of a standing army also a landed magnate. That would mean they're away from their fiefs for years, even decades, doesn't really make sense.
Thanks for the coding tip.
 
Hi everyone,

Would anyone know how to mod a constant prestige bonus from having children who are either landed or married to a landed character?

At present, marriage prestige gain seems to overweight marriage to random Karlings over actual landholders, and I’m trying to incentivise myself to do careful dynastic marriage planning instead. Thanks very much in advance!
 
Hi everyone,

Would anyone know how to mod a constant prestige bonus from having children who are either landed or married to a landed character?

At present, marriage prestige gain seems to overweight marriage to random Karlings over actual landholders, and I’m trying to incentivise myself to do careful dynastic marriage planning instead. Thanks very much in advance!
At the moment, I can only think of the brute-force approach - a stacking modifier on every adult character, which adds prestige per month depending on their childrens' marriages, and which is recalculated via event on every character's yearly pulse.

I did something similar for dynamic increases in retinue size based on the total realm size of your permanent tributaries - you are welcome to use it for inspiration (see attached).
...\common\event_modifiers\expd_t_suzerain_buff_modifiers.txt
...\common\on_actions\expd_t_on_actions.txt
...\events\expd_t_suzerain_buff_events.txt
 

Attachments

  • expd_t_suzerain_buff_modifiers.txt
    79 bytes · Views: 0
  • expd_t_on_actions.txt
    755 bytes · Views: 0
  • expd_t_suzerain_buff_events.txt
    3,3 KB · Views: 0
  • 2Like
Reactions: