Just thought i'd make this thread for us modders to talk about various aspects of modding crusader kings II. Along with answering any questions that anyone might have, it can serve as a show off thread where we talk about what we're currently modding into ours games. I suppose I'll start, here's what I'm working on currently:
I have three narrative arcs planned to be implemented, this one will be the first and as they say big things have small beginnings. This narrative event chain has a chance of becoming triggered when one of your demesne provinces suffers either the high tax modifier, thieves' guild, or has a revolt risk of 5 or above.
You start by dealing with peasants not wanting to work your land (a direct violation of the very idea of feudalism, after all) and will soon meet the "Joan of Arc" character I have planned for my mod. How she reacts to you as a player is entirely dependent on how you deal with the problem as it evolves.
Coding the syntax was especially annoying, even more so than the first event I did due to how intricate i wanted to make the event (giving traits, adding province modifiers, ect). I'm quite grateful all of the Crusader kings II files are text based and easy to fix should errors arise. Because they do. Often. I'm really excited to code more of this event line.
Originally Posted by Kekvit Irae: This has given me a good idea for a History of the World, Part I mod
That's nothing, you should have seen the first version - I had to tone down the humor due to the event windows not scaling to your localisation of options.
Originally Posted by Monk: That's nothing, you should have seen the first version - I had to tone down the humor due to the event windows not scaling to your localisation of options.
I feel somewhat embarrassed at having to ask, but is there a save game folder anywhere? I just want to alter a provinces culture in a single game only, so that my Khan of Ulster can convert the rest of Ireland to the Mongol culture (massively OP? Yes. Fun though ).
Originally Posted by Ishmael: I feel somewhat embarrassed at having to ask, but is there a save game folder anywhere? I just want to alter a provinces culture in a single game only, so that my Khan of Ulster can convert the rest of Ireland to the Mongol culture (massively OP? Yes. Fun though ).
Assuming you're not on an OS that sucks, your save games will be in your My Documents/Paradox Interactive/Crusader Kings II/ folder
notepad, but that can be.. very buggy due to the large file sizes. So get notepad++
For quickly finding your character do a search for "player = yes", though if you other random characters, use "charinfo" console game in-game to get the character id. Another search is to search via title so the duke of york holder would be d_york =
Originally Posted by Tiaexz: notepad, but that can be.. very buggy due to the large file sizes. So get notepad++
For quickly finding your character do a search for "player = yes", though if you other random characters, use "charinfo" console game in-game to get the character id. Another search is to search via title so the duke of york holder would be d_york =
This. Saves are ridiculously huge. They are essentially all of the history files combined with the landed_titles file. If you don't search for specific variables you'll likely go insane trying to sort through them yourself. When it comes to file editing or new coding notepad++ has been my tool of choice for bigger files and error hunting. Can't recommend it more.
Well I've finally hit a wall. I wanted to add in a new councilor to my mod. Edited all the files, put the files in the right places, and everything works fine. Unfortunately, when I place my new councilor on the map, I get a CTD. Searching around reveals that the xsc and xac files are part of a modeling program called Emotion FX, and simply renaming the spymaster model files to what I want wont work. Did I mention that Emotion FX uses proprietary software and costs 10,000 dollars a license?
I can just move all the new actions over to the old councilors, but meh. I wanted my seamstress!
Originally Posted by Kekvit Irae: Well I've finally hit a wall. I wanted to add in a new councilor to my mod. Edited all the files, put the files in the right places, and everything works fine. Unfortunately, when I place my new councilor on the map, I get a CTD. Searching around reveals that the xsc and xac files are part of a modeling program called Emotion FX, and simply renaming the spymaster model files to what I want wont work. Did I mention that Emotion FX uses proprietary software and costs 10,000 dollars a license?
I can just move all the new actions over to the old councilors, but meh. I wanted my seamstress!
Yikes. Well good to know some limitations before i spend some time going in that direction. I actually had a few ideas myself, a little disappointed I won't be able to see those realized. Oh well. Back to population event coding
edit: Also having a of a time striking a good balance for Iberia. While i have it to where it's not so hopeless for the northern kingdoms currently, it feels like the AI weights holy wars way too heavily as that's all it ever does. All the time. It doesn't seem able to cope with the new mechanics of religious defense. It makes trying to balance areas of religious tension (any place where Islam/Christianity meet) incredibly hard.
Originally Posted by Kekvit Irae: Well I've finally hit a wall. I wanted to add in a new councilor to my mod. Edited all the files, put the files in the right places, and everything works fine. Unfortunately, when I place my new councilor on the map, I get a CTD. Searching around reveals that the xsc and xac files are part of a modeling program called Emotion FX, and simply renaming the spymaster model files to what I want wont work. Did I mention that Emotion FX uses proprietary software and costs 10,000 dollars a license?
I can just move all the new actions over to the old councilors, but meh. I wanted my seamstress!
I'm unsure if you have played the Game of Thrones mod for CK2, but adding another role to the Council should be possible without the need for expensive software; that mod added Castellans/Hand of the King as a sixth member, which combined abilities from the other roles (mainly the Steward and Chancellor, I think).
I'd be interested to see what this seamstress was capable of (and why her sewing led to a council place!) :3
Originally Posted by Secura: I'm unsure if you have played the Game of Thrones mod for CK2, but adding another role to the Council should be possible without the need for expensive software; that mod added Castellans/Hand of the King as a sixth member, which combined abilities from the other roles (mainly the Steward and Chancellor, I think).
I'd be interested to see what this seamstress was capable of (and why her sewing led to a council place!) :3
I'll need to reverse engineer it then and see what the hell they did.
The seamstress was designed to act like the court bishop's inquisition, only you can convert counties and characters to your culture. Sure beats having to wait decades for a county to convert on its own.
As your mod focuses at the more female aspects of CKII, you could try to make women generals. You could also make an event where, if woman have been on the throne for a long time, you make succession cognatic.
About 2 hours coding this morning has turned up 5 new events. A few of these i probably won't implement but overall this is the direction i'm taking my mod. More Events for the player that allow direct interaction with his/her subjects.
Some examples...
I tried to focus on events that I haven't personally seen before, but I'm sure there's probably going to be some overlap with what paradox has already done and what I'm planning. Nearly all of these events either allow you a small chance to gain traits, or apply provincial modifiers to your demesne as a direct result of your actions. I've tried to strike a good balance between personal actions and provincial actions, and not have an entire populace get upset if there isn't reason to.
Originally Posted by rickinator9: I would love an event in the style of Barbarossa drowns.
Oh man that's something I have do now. Won't be too hard to do either. Most of my events are tagged to trigger based on various actions, most of which require you to be at peace, or when your character is NOT in command of an army. A "player has drowned!" event would consequently require those variables changed to yes and allow random chance for death. Actually.. one moment..
Code:
#Barbarossa Death
character_event = {
id = 2000007
desc = EVTDESC2000007
picture = GFX_evt_crusaders
is_ruler = yes
only_playable = yes
capable_only = yes
trigger = {
age = 20
is_ill = no
war = yes
in_command = yes
NOT = {
has_character_flag = barbarossa_drowns
}
}
immediate = {
set_character_flag = barbarossa_drowns
}
mean_time_to_happen = {
months = 6
}
option = {
name = EVTOPTA2000007
prestige = 15
random = {
chance = 25
death = {
death_reason = death_battle
}
}
}
option = {
name = EVTOPTB2000007
if = {
limit = {
NOT = {
trait = craven
}
}
add_trait = craven
hidden_tooltip = {
character_event = {
id = 38257
# Notify craven
}
}
}
}
}
Here's an event just like you outlined rick! It requires the character to be both at war AND currently leading troops. It's mean time to happen is an average time to expect this event to fire once all triggers have been met, i set it to 6 months for demonstration purposes, but you'd probably want to mess with that yourself. Unless you wanted every character you play to face the peril of the river. I also included a character flag, which applies immediately upon firing. Note I also defined in the triggers that, if the character s to see this event, they CANNOT have that flag. Which basically just means it's a once in a life-time event.
I also took a bit of liberties with the second option. Who wouldn't want to avoid any chance of death and game the system? Well, your troops might think less of you and think you're a coward, that's why.
The event id can be whatever you want, for the purposes of my mod I am using 2,000,000 as a starting base as to not interact with any of paradox's events.
EVTNAME_seam900.1;County Culture Converted;;;;;;;;;;;;;x
EVTDESC_seam900.1;The people in [Root.Location.GetName], or, at least, most of them, have embraced the [Root.Culture.GetName] culture!;;;;;;;;;;;;;x
EVTOPTA_seam900.1;My hard work has paid off!;;;;;;;;;;;;;x
EVTTOOLTIP_seam20000.1;Send a letter to my liege!;;;;;;;;;;;;;x
EVTDESC_seam20000.1;My liege, I am pleased to report the success of my mission to [From.Location.GetName]. The majority of the population have been converted to the [From.Culture.GetName] culture!\n\n[From.GetTitledName];;;;;;;;;;;;;x
EVTOPTA_seam20000.1;That's haute.;;;;;;;;;;;;;x
EVTDESC_seam20001.1;My [Root.GetTitle], I am pleased to report the success of my mission to [From.Location.GetName]. The majority of the population have been converted to the [From.Culture.GetName] culture!\n\n[From.GetTitledName]
EVTOPTA_seam20001.1;That's haute.;;;;;;;;;;;;;x
EVTNAME_seam901.1;Subject Culture Converted;;;;;;;;;;;;;x
EVTDESC_seam901.1;Due to my tiredless efforts, a humble subject in [Root.Location.GetName] has embraced the [Root.Culture.GetName] culture!;;;;;;;;;;;;;x
EVTOPTA_seam901.1;No one can resist the haute culture!;;;;;;;;;;;;;x
EVTTOOLTIP_seam20010.1;[This.GetTitledName] embraces the [Root.Culture.GetName] culture;;;;;;;;;;;;;x
EVTDESC_seam20010.1;The [From.GetJobTitle] of [From.Host.PrimaryTitle.GetName], [From.GetTitledName], has strongly influenced me and I have decided to convert to the [From.Culture.GetName] culture!;;;;;;;;;;;;;x
EVTOPTA_seam20010.1;I will truly embrace the [From.Culture.GetName] culture!;;;;;;;;;;;;;x
EVTDESC_seam20011.1;My liege, I am pleased to report that your errant subject, [From.GetTitledName], has converted to the [Root.Culture.GetName] culture.;;;;;;;;;;;;;x
EVTOPTA_seam20011.1;But how does [From.GetPossPronoun] rate on Haute Or Not?;;;;;;;;;;;;;x
EVTDESC_seam20012.1;My liege, after being convinced by the Chancellor from another province, I have decided to convert to the [From.Culture.GetName] culture!\n\nYour humble servant,\n[From.GetTitledName];;;;;;;;;;;;;x
EVTOPTA_seam20012.1;Good!;;;;;;;;;;;;;x
EVTOPTB_seam20012.1;Who dares lead my subjects astray like this!;;;;;;;;;;;;;x
action_flattermerchant;Flatter Merchants;;;;;;;;;;;;;x
action_flatternoble;Flatter Nobles;;;;;;;;;;;;;x
action_flattermerchant_desc;Flatter merchants to convince them that your culture is more haute than theirs.;;;;;;;;;;;;;x
action_flatternoble_desc;Flatter nobles to convince them that your culture is more haute than theirs.;;;;;;;;;;;;;x
Your event ids should be whole numbers. The inclusion of the . and the letters is what's giving the event fits when it tries to parse the file and dump it into the game engine. You were also missing a separater value in the localisation file which was causing further issues. I'm afraid it's difficult for me to properly troubleshoot the file, as I lack the on action commands that you've plugged in and thus my attempts get strange behavior no matter what I do. However, try this:
Code:
EVTNAME_seam900.1;County Culture Converted;;;;;;;;;;;;;x
EVTDESC_seam900.1;The people in [Root.Location.GetName], or, at least, most of them, have embraced the [Root.Culture.GetName] culture!;;;;;;;;;;;;;x
EVTOPTA_seam900.1;My hard work has paid off!;;;;;;;;;;;;;x
EVTTOOLTIP_seam20000.1;Send a letter to my liege!;;;;;;;;;;;;;x
EVTDESC_seam20000.1;My liege, I am pleased to report the success of my mission to [From.Location.GetName]. The majority of the population have been converted to the [From.Culture.GetName] culture!\n\n[From.GetTitledName];;;;;;;;;;;;;x
EVTOPTA_seam20000.1;That's haute.;;;;;;;;;;;;;x
EVTDESC_seam20001.1;My [Root.GetTitle], I am pleased to report the success of my mission to [From.Location.GetName]. The majority of the population have been converted to the [From.Culture.GetName] culture!\n\n[From.GetTitledName];;;;;;;;;;;;;x
EVTOPTA_seam20001.1;That's haute.;;;;;;;;;;;;;x
EVTNAME_seam901.1;Subject Culture Converted;;;;;;;;;;;;;x
EVTDESC_seam901.1;Due to my tiredless efforts, a humble subject in [Root.Location.GetName] has embraced the [Root.Culture.GetName] culture!;;;;;;;;;;;;;x
EVTOPTA_seam901.1;No one can resist the haute culture!;;;;;;;;;;;;;x
EVTTOOLTIP_seam20010.1;[This.GetTitledName] embraces the [Root.Culture.GetName] culture;;;;;;;;;;;;;x
EVTDESC_seam20010.1;The [From.GetJobTitle] of [From.Host.PrimaryTitle.GetName], [From.GetTitledName], has strongly influenced me and I have decided to convert to the [From.Culture.GetName] culture!;;;;;;;;;;;;;x
EVTOPTA_seam20010.1;I will truly embrace the [From.Culture.GetName] culture!;;;;;;;;;;;;;x
EVTDESC_seam20011.1;My liege, I am pleased to report that your errant subject, [From.GetTitledName], has converted to the [Root.Culture.GetName] culture.;;;;;;;;;;;;;x
EVTOPTA_seam20011.1;But how does [From.GetPossPronoun] rate on Haute Or Not?;;;;;;;;;;;;;x
EVTDESC_seam20012.1;My liege, after being convinced by the Chancellor from another province, I have decided to convert to the [From.Culture.GetName] culture!\n\nYour humble servant,\n[From.GetTitledName];;;;;;;;;;;;;x
EVTOPTA_seam20012.1;Good!;;;;;;;;;;;;;x
EVTOPTB_seam20012.1;Who dares lead my subjects astray like this!;;;;;;;;;;;;;x
action_flattermerchant;Flatter Merchants;;;;;;;;;;;;;x
action_flatternoble;Flatter Nobles;;;;;;;;;;;;;x
action_flattermerchant_desc;Flatter merchants to convince them that your culture is more haute than theirs.;;;;;;;;;;;;;x
action_flatternoble_desc;Flatter nobles to convince them that your culture is more haute than theirs.;;;;;;;;;;;;;x
All i did was change each event ID to be a whole number and take out the "seam" from each entry. I also changed the personal character event to be an id of 900,000, as i am fairly certain the base 900 is taken. I also added in the missing seperation into your localisation. Should make a bit more sense now.
Originally Posted by Monk: Your event ids should be whole numbers. The inclusion of the . and the letters is what's giving the event fits when it tries to parse the file and dump it into the game engine. You were also missing a separater value in the localisation file which was causing further issues. I'm afraid it's difficult for me to properly troubleshoot the file, as I lack the on action commands that you've plugged in and thus my attempts get strange behavior no matter what I do. However, try this:
All i did was change each event ID to be a whole number and take out the "seam" from each entry. I also changed the personal character event to be an id of 900,000, as i am fairly certain the base 900 is taken. I also added in the missing seperation into your localisation. Should make a bit more sense now.
Lemme know if that helps.
The id was the same format used in my heretic removal portion, as well as a few other mods I've come across, all with no problem. I don't know what's different with this.
hereticremoval.csv
Spoiler Alert, click show to read:
Code:
CODE;ENGLISH;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
EVTNAME_HR567890.1;Heretic Stronghold Removed;Conversion religieuse d’un comté;Grafschaftsreligion konvertiert;;Condado convertido;;;;;;;;;x
EVTDESC_HR567890.1;I have forcefully removed the local heretic stronghold in [Root.Location.GetName]!;J'ai enlevé avec force la forteresse hérétique locale [Root.Location.GetName]!;Ich habe mit Nachdruck die lokale Ketzer Hochburg in entfernt [Root.Location.GetName]!;;¡Me han quitado la fuerza de la fortaleza local en hereje [Root.Location.GetName]!;;;;;;;;;x
EVTTOOLTIP_HR567890.2;Send a letter to my liege!;J’envoie une lettre à mon suzerain !;Schickt einen Brief an meinen Lehnsherrn!;;¡Envía una carta a mi señor!;;;;;;;;;x
EVTDESC_HR567890.3;I have forcefully removed the local heretic stronghold in [Root.Location.GetName]!;J'ai enlevé avec force la forteresse hérétique locale [Root.Location.GetName]!;Ich habe mit Nachdruck die lokale Ketzer Hochburg in entfernt [Root.Location.GetName]!;;¡Me han quitado la fuerza de la fortaleza local en hereje [Root.Location.GetName]!;;;;;;;;;x
EVTOPTA_HR567890.3;My hard work has paid off!;Mes efforts ont payé !;Meine Anstrengungen haben sich ausgezahlt!;;¡Mis esfuerzos han dado su fruto!;;;;;;;;;x
EVTDESC_HR567890.4;I have forcefully removed the local heretic stronghold in [Root.Location.GetName]!;J'ai enlevé avec force la forteresse hérétique locale [Root.Location.GetName]!;Ich habe mit Nachdruck die lokale Ketzer Hochburg in entfernt [Root.Location.GetName]!;;¡Me han quitado la fuerza de la fortaleza local en hereje [Root.Location.GetName]!;;;;;;;;;x
Originally Posted by rickinator9: I'm pretty sure that's not a problem. That's the namespace mechanic. That 'title' I am not familiar with.
Title is displayed at the top of the event. Most character events don't have them but some do, they're optional.
Originally Posted by Kekvit Irae: The id was the same format used in my heretic removal portion, as well as a few other mods I've come across, all with no problem. I don't know what's different with this.
Perhaps the validator was simply giving fits for no reason over that, if so feel free to ignore that. The changes I made to the localisation and the events provided a perfectly readable event on all levels. Maybe the problem was solely in the localisation?
Mind giving it a look and seeing what's wrong? I've made some necessary changes, but it still screws up. The new actions are in the Steward and Chancellor.
Isolated the problem and what is different: your events are overlapping.
After some experimenting i discovered that trying to keep the event at seam900.1 was overlaping with the base game's event of 900.
I thought it might be a localisation error but no matter what i changed (caps, decimal inclusion, ect) nothing would change about the way the event displayed, all i would get is this:
After some messing around and experimenting I struck on the idea.. maybe somehow the game was confusing seam900.1 with the base event id 900? Went back in and changed only the id to SEAM900001 as well as all the localisations related to that. End result:
I think decimals are fine but the game will still get confused unless you're in your own id range. 900,000 isnt used for anything in vanilla, which lets the event fire on its own. Same with your heretic events. 567,890 is not used in vanilla, so its free to fire on its own without overlap
edit: to be honest Kekvit this is my best guess. I changed the id to SEAM900001 and it worked, changed it back (along with all localisations) and it instantly broke, then changed it back and it worked again.
Originally Posted by Monk: Isolated the problem and what is different: your events are overlapping.
After some experimenting i discovered that trying to keep the event at seam900.1 was overlaping with the base game's event of 900.
I thought it might be a localisation error but no matter what i changed (caps, decimal inclusion, ect) nothing would change about the way the event displayed, all i would get is this:
After some messing around and experimenting I struck on the idea.. maybe somehow the game was confusing seam900.1 with the base event id 900? Went back in and changed only the id to SEAM900001 as well as all the localisations related to that. End result:
I think decimals are fine but the game will still get confused unless you're in your own id range. 900,000 isnt used for anything in vanilla, which lets the event fire on its own. Same with your heretic events. 567,890 is not used in vanilla, so its free to fire on its own without overlap
Oh thank god. I was about to completely ditch progress on my mod because of the frustration.
The implication for this would be that event names seem to ignore everything except the number, probably. The funny thing is that the Courts And Titles mod doesn't use numbers in the localisation file or event names except when seperated by a period. So I'm thinking I can completely ditch the seam900.1 and turn it into seam.1 and work from there. Since there are no numbers before the period, I should be safe.
Many thanks
EDIT: And just for reference, here is the CATs mod localisation file:
Code:
CODE;ENGLISH;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
EVTDESC_gift.0;My wife looks lonely. Maybe I should send my confidant to find her a cat.;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
EVTOPTA_gift.0;Go find one in the alley behind the marketplace.;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
EVTOPTB_gift.0;How about a lovely, fluffy one?;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
EVTDESC_gift.1;Thank you, my lord husband.;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
EVTOPTA_gift.1;I love it. Poor little half-starved thing.;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
EVTOPTB_gift.1;I would rather it keep the rats at bay;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
EVTOPTA_gift.2;What a fluffy little thing!;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
EVTOPTB_gift.2;Aaaaaaachhooooooo!;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
gift_cat;Felis silvestris catus;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
obj_conjugal_love_title;Family Pet;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
obj_conjugal_love_desc;Get My spouse a cat;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
To be honest if that hadn't worked i was just about out of ideas.
Happy I could be of assistance.
Originally Posted by : EDIT: And just for reference, here is the CATs mod localisation file:
Very interesting. I'd say it's a fair bet your assumption is correct in that light. For my own events i've been sticking to a numbered scheme, but it's nice to know you can have a bit of flexibility in how you set up your ids.
Although now I have the strangest desire to include cat related events in my mod...
Originally Posted by Kekvit Irae: Cat related events? BURN THE WITCH!
Spoiler Alert, click show to read:
(first you need to see if she weighs more than a duck)
I have to admit that was the very first thing that came to mind when I said "more interactions with your peasants." I've had to be careful not to make my mod TOO silly. Though, I wonder if there's any witch events in vanilla. I dont remember seeing any.