Jump to content

CK2 Possibilities for Women only world mod


darkkismeth

Recommended Posts

Hello folks,

 

I'm playing Ck2 for quite some time now, installed some mods and had a lot of fun.

 

But i stumbled over some mods, which makes me wonder, what is actually possible make and what not?

 

There is a mod called "The world is your harem", killing off all the men, except for you and your sons. But only works, if you are a man. And looking at all the harem mods and the DW mods, it should be possible, to create a women only world with these mods, right?

 

The Futa trait should help in creating children, but the same sex mechanics are stopping it from working on proposing Betrothals and Marriages for political gains. Maybe turning all men into women with futa trait? As in having the trait "Was once a man"? Even using a Cultural or Religion specific building/event for that? So, they only look like women, but the system registers them as men? But then, what is with the other Kingdoms/Cultures/Religion? They should have a chance too, to have Futas for making children. Maybe as a disease?

 

I have no real knowledge about modding in Ck2, so i'm just asking, if this is possible at all first.

Link to comment

It's been a while since I tested it but event-driven same sex marriages and even impregnations were possible a few versions back. I'd guess they still are now.

 

Making men look like women would theoretically be as "easy" as changing the base portraits of males (I don't know how much work that'd actually be, there are soo many portrait packs already), but the game would still distinguish between male-females and female-females. Adding the futa trait to those male-females is possible with an on_birth-event that gives every male the futa trait right after birth. You could even swap the portrait with that event and eliminate the need of switching all base portraits, though that'd require something akin to the DW ReMeDy Custom Portraits Pack, as to my knowledge you can't assign a vanilla female portrait to a male. Also, making a culture-based portrait swapping event for every culture in the game would be... a hassle to say the least.

 

By the way, simply swapping males' portraits for females' and assigning the futa trait to every male would cause every not event-driven marriage (basically every ai-marriage) to be between a futa and a female. You could play around with probability-based assignment of the futa trait to counteract that. Also, as there'd still be a strict distinction between male and female in the game's code, those male-females would never get pregnant. I'm not entirely sure, but I think you can force a male to become pregnant via events. So there's that. Oh, and if not disabled in the religions, male-female(-futas) would still have access to the secondary wives and concubinage-mechanics.

 

Cultural/Religion-specific buildings are possible, as well as events based on culture, religion and buildings.

 

Tl;dr: Possible, but tied to a good amount of work and workarounds.

Link to comment

So, it is possible, but, which route is the right one?

 

I mean, Paradox is still patching the game, which is good, but makes a Mod useless if the patch changes something. So, a safe route is desirable.

 

Potraitpack might be a easy solution, but it might create confusion on the long run, as you don't know, who is "male" and who is female without any clear sign or indicator.

 

The on_birth-event trait, can that be locked to a activated world-event? Just thinking loud here.

 

Maybe the building-event might be easier in some regard?

 

I'm just checking the available routes here, not that i try everything at once first.

Link to comment

There's no definitive "safe route". Paradox might disable this or that in the next update and boom! the whole mod's useless. I'm not proficient enough in terms of portrait modding to be of any more help there, but I'd say take a closer look at ReMeDys Portrait Pack or how noxbestia handles portrait swapping in Darkest Perversions.

With the on_birth event you could add a trait as an indicator to every character. And yes, it could be locked to a world event, game rule, DW Start scenario, character_flag, global_flag, etc. pp.

 

What kind of building-event do you mean exactly?

Link to comment

By building-event i mean, specific building gets placed and unlocks an available event or causes an event like spreading a specific trait to the population and surrounding regions, getting stronger with each conversion, or simply building another one in the next region to make the specific trait strong in that region.

 

A building, that causes conversion in the people culture or religion, going around to make on_birth-event for every culture and religion. Or even causes a new heresy among the religions, making it secret cult first, then getting strong enough for open conversions.

 

Just a crazy idea, but it wouldn't make much work, only the effects and everything tied to it would need work.

Link to comment

While I'm not certain that you can force a heresy of a certain religion to stay dormant until someone builds a specific building, has an event, takes a decision or whatever, everything else would most likely be possible. I've not looked all too much into societies (which recently replaced trait-based secret religious cults), so I can't say much to that.

Basically it's just a matter of getting the scopes and triggers right. Making a building capital-only for example is also possible. Province-based (and thus also building-based) events are relatively common, you can scope to a province of your choice (be it your current location, your capital, a specific province) and check for existing buildings.

Also there''s a scope called random_neighbor_province (see http://www.ckiiwiki.com/Scopes for more info) which could spread culture, religion, even buildings to a neighboring province. As for buildings you could even go as far as limiting building the building (but not it's effects) to a certain trigger (culture, religion), so it could spread even to those who are not eligible to build it. This kind of spreading is possible for almost everything, including religion, culture, traits, province modifiers.

 

 

By building-event i mean, specific building gets placed and unlocks an available event or causes an event like spreading a specific trait to the population and surrounding regions, getting stronger with each conversion, or simply building another one in the next region to make the specific trait strong in that region.

 

Here's a very very basic example for that. Everything behind a # is commentary

province_event = {
 id = eventIdOfYourChoice
 desc = eventIdDescription
 trigger = {
  has_building = theBuildingOfYourChoice #check /Crusader Kings II/common/buildings/ for how to add a new building
 }
 mean_time_to_happen = { #can also set the event to is_triggered_only = yes and trigger it via pulse or on_something
  months = 1
 }
 option = {
  name = eventIdOfYourChoiceA
  random_province_character = {
   limit = {
    NOT = {
     has_trait = traitYouWantToAdd
    }
   }
   add_trait = traitYouWantToAdd
   #could also route via character_event = { id = somethingSomething days = 3 } to give the character an event for the trait-change.
   #You'd have to define that character event seperately.
  }
 }
}

This event would spread a certain trait to a single random character in a province where a certain building is present and who does not already have the trait every month (on average).

Link to comment

Hm, okay, thank you for that info.

 

You helped me a lot so far actually.

 

Basically, what i think would be easy, is to make a culture spreading building, turning men into women with the futa trait. To make it balanced, it can only built in the capitol once. But each upgrade gives a higher culture spreading rating.

 

That would save me the hassle, to give every culture a potrait swapping while still allowing religion specific stuff like harems and such.

 

I never encountered that, but can a Culture change also force a Ruler to build that specific culture building?

Link to comment

The problem with the culture swapping lies not within making the corresponding event, but within the portraits themselves if you want to "change" the gender of a character. Take a look at /Crusader Kings II/gfx/characters/ if you will, there you see the vanilla portraits, or rather, how they're built within the game. Those are expanded via at least 10 portrait (or content) packs, giving you at least 12 different portrait archetypes (13 if you count the horses). Numbers might be off.

I've looked at how Dark World handles portraits - basically you can imagine one of their portraits as a hat that is put on top of the character. But the hat is a full-sized portrait and non-transparent and added on top of everything if one of several hundred traits is true (I just got even more respect for the time and work that went into those mods).

 

Right now I am fairly uncertain if using the vanilla portraits would be possible at all. Maybe if you do the same, work with traits that change all the corresponding layers to female-based portrait parts, using as many traits as there are distinctive parts (eyes, nose, mouth, chin, neck, cheeks, ears and hair) for every single different portrait archetype. Which would not be taking into account that males have beards and females don't and who knows what that might break. And you'd have to randomize those somehow, or everyone would look the same.
That might preserve the ethnicity of the characters when changing their gender... or break everything. If you're fine with very male looking male-female-futas you don't have to worry about portraits, but I feel like that exactly - having no male portraits or very, very few - was the point of your idea.

 

If you depend your mod on Dark World you could use its portraits and the corresponding traits. Go through the portraits and write down the corresponding numbers of those you want to use, make an event to randomly assign one of those to the converted character (add the trait portraitX to the character with X being the number, every *.dds file starting with remedy_portrait_swapping.dds holds up to 26 different portraits, which means #2 starts with 27, #3 with 53 and so forth). [Edit: The Portrait Pack has recently been fully integrated into Dark World.]

Also you'd need a designated "all males become futas"-culture or culture group, be it your own or an already existing one. Mind that a "new" culture, your own, would have none of the culture-specific events and buildings already in the game, you'd need to redefine those.

 

If you want to force a "converted" charater to build a certain building, just send another event a few days later which builds it in the character's capital after changing the culture. Scope to the characters capital holding and add the building.

option = {
 name = blablabla
 capital_holding = {
  add_building = XYZ
 }
}

Mind that this building would be free and instant. No cost attached. Also consider that people can change their capital. I've not yet succeeded in taking your capital-specific buildings with you nomad-style.

Link to comment

That might be a idea, using the portrait pack of DW for my futa culture and use them as hats.

 

Hm, as Norse, you can raise a Runestone. That is a culture specific event, right? Could be something similar implemented with the building? Don't the Nomads have such specific events too?

 

I try to understand this modding of CK2, but the Guides are...not really helpful? I feel more lost as i try to find a Guide, that is actually helping me to understand in the first place. Can you recommend some guide? Because you make it sound so easy and yet so fascinating.

Link to comment

I read through many pages on the CKII Wiki, which was a huge help, and dug through a whole lot of code trying to understand how things work in the game, changing some things here and there, trying out this and that. Didn't really follow any specific guide, a lot of it was learning-by-doing and shamelessly imitating what others had already done.

 

The runestone event is an event that can - in theory - fire for every culture. But it is set to "is_triggered_only = yes", which means it can not occur on random, but has to be triggered somehow. In this particular case, it is called by a decision:

    commission_runestone = {
        only_playable = yes
        potential = {
            has_dlc = "The Old Gods"
            is_playable = yes
            age = 16
            prisoner = no
            ###1###
            culture_group = north_germanic
            ###1###
            NOT = {    has_character_flag = commissioned_runestone }
            NOT = { year = 1150 }
        }
        allow = {
            wealth = 100
            prisoner = no
        }
        effect = {
            wealth = -100
            set_character_flag = commissioned_runestone
            hidden_tooltip = {
                ###2###
                character_event = { id = TOG.500 }
                ###2###
            }
        }
        revoke_allowed = {
            always = no
        }
        ai_will_do = {
            factor = 1
            modifier = {
                factor = 0
                NOT = { wealth = 300 }
            }
            modifier = {
                factor = 0
                NOT = { age = 30 }
            }            
        }
    }

as found in /Crusader Kings II/decisions/minor_decisions.txt. The text between ###1### is what makes the decision, and therefore the event (found in /Crusader Kings II/events/oldgods_runestone_events.txt, first defined event) specific to the north_germanic culture group, which are norse, swedish, norwegian and danish.

The text between ###2### calls the corresponding event, which routes through the different versions of the runestone.

 

Just about every government, every culture, every religion has it's own events. It's all a matter of "potential" and "allow" with decisions and "trigger" with events. So yes, it would be possible to have something similar implemented with buildings. I imagine you probably think of something like this:

decisions = {
 embrace_futaism = {
  only_playable = yes
  potential = {
   ai = no
   culture_group = your_favorite_futa_culture_group
   NOT = { has_global_flag = futas_are_coming }
  }
  allow = {
   any_demesne_province = {
    has_building = futa_spire
   }
  }
  effect = {
   character_event = { id = Futaism.1 }
  }
 }
}

The following could be the corresponding event:

namespace = Futaism

character_event = {
 id = Futaism.1
 desc = Futaism_1_DESC
 #picture =
 #border =
 is_triggered_only = yes

 option = {
  name = Futaism_1_A
  set_global_flag = futas_are_coming
 }
}

A lot of assumptions here and as before very basic and not fleshed out. What this'd do is enable the player to take a decision to set a global flag if the imaginary building called "Futa Spire" is present anywhere in their demesne and they are of the correct culture. This global flag can be used in further events to check whether someone wants Futaism to spread or not, as in this decision can enable more events which have their trigger set to "has_global_flag = futas_are_coming". Think of something like this as an on-switch of sorts.

 

For everything you want to do in CKII, it's always a matter of getting your Scopes, your Conditions and your Commands (Effects) right. While some things are indeed impossible (such as changing the sex of a character), most everything else isn't.

Link to comment

Huh, this is interesting.

 

Can i give the Ai my created Culture? I know, that certain factions are bound to the culture and religion at the start, so this shouldn't be a issue. But then, if the Ai has my created culture, can i force it, to use the event to place the "Futa-spire" event? Because i'm starting to plan to make Futaism the main culture and then add sub cultures like North, South, West and Nomadic.

 

Nomadic culture may be the only culture without my culture specific building, but that could i sell as "Not all cultures are the same" trait, as Nomads are wandering and leaving markings behind, spreading that way their culture. That may work.

Link to comment

I'm not sure if I understand your point completely. Do you want to start "Futaism" yourself and then spread it or do you want anyone to be able to start "Futaism", spreading it as soon as anyone builds a specific building?

 

What exactly do you want your different culture(s) to mean? What is your point behind adding a new culture group, or rather, tieing Futaism to a specific culture group?

 

The "Futa Spire"-event I outlined is nothing more than a decision for you to take (akin to the runestone decision) which only sets a global flag. That global flag can be used to enable (or un-disable) other events, like events that spread the culture or the building. I'll re-use the example in post #6:

province_event = {
 id = Futaism.2
 desc = Futaism_2_DESC
 trigger = {
  has_building = futa_spire
  has_global_flag = futas_are_coming #this is set in Futaism.1
  any_province_character = {
   NOT = {
    has_trait = futa
    culture = futa_culture
   }
  }
 }
 mean_time_to_happen = {
  months = 1
 }
 option = {
  name = Futaism_2_A
  random_province_character = {
   limit = {
    NOT = {
     culture = futa_culture
     has_trait = futa
    }
   }
   culture = futa_culture
   add_trait = futa
  }
 }
}

Still very basic, but this'd add a trait and change the culture of a random character in a province with the Futa Spire. Of course this can be modified in a bazillion ways, like only adding a trait, only changing culture, working with a capital-only Futa Spire, and so on and so forth.

Mind that it is prudent to not silently change anything but let the character change themselves, as in send that character an event that makes them change/add anything instead of changing it for them.

province_event = {
 id = Futaism.2
 desc = Futaism_2_DESC
 trigger = {
  has_building = futa_spire
  has_global_flag = futas_are_coming #this is set in Futaism.1
  any_province_character = {
   NOT = {
    has_trait = futa
    culture = futa_culture
   }
  }
 }
 mean_time_to_happen = {
  months = 1
 }
 option = {
  name = Futaism_2_A
  random_province_character = {
   limit = {
    NOT = {
     culture = futa_culture
     has_trait = futa
    }
   }
   character_event = { id = Futaism.3 days = 3 }
  }
 }
}

character_event = {
 id = Futaism.3
 desc = Futaism_3_DESC
 is_triggered_only = yes
 option = {
  name = Futaism_3_A
  culture = futa_culture
  add_trait = futa
 }
}

 

But then, if the Ai has my created culture, can i force it, to use the event to place the "Futa-spire" event?

 

[EDIT: I've misread this part.]

Yes, you can. If you want to define ai weights, use ai_will_do = {}. See the runestone event for an example.

ai_will_do = {
 factor = 1
}

******

ai_will_do = {
 factor = 1
 modifier = {
  factor = 0
  NOT = { culture = futa_culture }
 }
}

 

Nomadic culture may be the only culture without my culture specific building

 

Nomadic, in the game, is a government type, not actually a culture. So you could probably base your futa related buildings on government type instead of culture.

Link to comment

Hm, if i make it government type, what are the differences? Sorry if it gets annoying, but i really try to understand all this.

 

I looked at the other mods and i'm always in awe, how much written text is there. So many program lines to consider and such. And yet i wonder, where to start if i want to start writing my mod.

Link to comment

Don't worry, I'm happy to help and explain things.

 

Main difference between government and culture in this regard - for me - is that it's way easier and way more random to change your culture than to change your government. While it's true that nomads and tribes ultimately aim to reform themselves into feudal/iqta, you can still play them for a very long time (and can even define something like "building inheritance", seen in many tribal buildings). All it takes for you to switch your culture around is bad luck with inheritance and education. I feel like reforming your government is very much more in your control than changing your culture.

It also depends on whether you want your futas to be something completely seperate, devoid of any of the vanilla culture-based events, decisions, titles, etc. Search the /Crusader Kings II/events/ folder for "culture =" for example. You'll understand what I mean.

But in the end it's up to you. Think about the different implications, choose everything to your best liking and don't do anything you don't like - content wise. Take hints, listen to criticism or ideas if/when you make your mod public, but for the love of God/Odin/Allah/Lillith/[insert your Divine here] don't suck up to people and don't change anything just because someone wants you to. If you don't want to change something in particular yourself even after considering what someone said, don't change it.

 

Yes, picking where to start is always difficult. My advice would be "Just start with what you'd want the most". The rest will most likely fall in place, even if that includes rewriting your start five times. But, you have to start somewhere.

Link to comment

Okay, started to make my mod. I aim to make a submod first, going towards DW, as a way to get familiar with it. Created my first trait Herm for men as a base. And after the first try, wondering why the symbol didn't show up, i quickly found the problem in the interface icon.gfx and added a s to the very first line and worked at the second try.

 

Does this count already as modding? Was simple yet showed me, how much i must care about what i type, to make sure it works at all.

 

I looked at the Cultures and must say, impressive. Yet, it is the better solution, as religion doesn't really change appearance, unless getting part of a society but that is something different, and government, i could add buildings to make the special trait appear, but it would feel strange, as any one with that gov could build it and trigger the creation, kinda giving the players the option even if they don't want it.

Or how did you mean that?

 

I realized, as i was browsing the traits and checked for hints and tips, how do i bind a trait to the culture? Is that anchored in the cultures or is it generally in the events? I found out, how to bind the trait to newborns, but how do i make sure, that this trait doesn't appear outside the futa culture?

Link to comment

Well some people call changing a single value in the defines.lua "modding", so I'd say you're in the clear :)

Make sure to get accustomed to the modder's greatest friends - CTRL+C and CTRL+V. Makes a few things a lot easier, and a lot of things a bit easier.

 

Regarding culture / government type, I'm frankly not sure why you'd want to limit your futas to a certain culture. What I meant is that you can have government-based futa buildings regardless of culture but based on traits and other things. I didn't convey that appropriately, so let me make things clear by example.

 

This works:

futa_building = {
	desc = futa_building_desc
	potential = {
		FROM = {
			has_global_flag = futa_test_flag
		}
	}
	trigger = { TECH_CASTLE_CONSTRUCTION = 1 }
	gold_cost = 50
	build_time = 182
	garrison_size = 0.025
	levy_reinforce_rate = 0.025
	fort_level = 0.3
	ai_creation_factor = 65
	extra_tech_building_start = 10
}

This does as well:

futa_building = {
	desc = futa_building_desc
	potential = {
		FROM = {
			trait = test_futa
		}
	}
	trigger = { TECH_CASTLE_CONSTRUCTION = 1 }
	gold_cost = 50
	build_time = 182
	garrison_size = 0.025
	levy_reinforce_rate = 0.025
	fort_level = 0.3
	ai_creation_factor = 65
	extra_tech_building_start = 10
}

To be fair, I'm a big fan of keeping a culturally diverse realm, which is why I always try to not use noblemen or holy men invited to my court but rather claimants or random people of any culture I invited to my realm when assigning vassalages. Which means I'm not a fan of a "futa culture" as you might have noticed :D

All I'm saying is you're not limited to culture or government type with your buildings. But you can add different government based buildings to be built as soon as your futaism is spreading, like a futa spire in castle, a futa pit in tribes, a futa altar in churches, a futa market in cities, even a designated futa clinic in hospitals or a futa garrison in forts.

Regarding triggers / potential you could probably even do some absolutely over-the-top stuff like this:

futa_building = {
	desc = futa_building_desc
	potential = {
		FROM = {
			any_realm_character = {
				any_demesne_province = {
					has_building = futa_building
				}
				culture = futa_culture
			}
			has_global_flag = futa_test_flag
			culture = futa_culture
		}
	}
	trigger = { TECH_CASTLE_CONSTRUCTION = 1 }
	gold_cost = 50
	build_time = 182
	garrison_size = 0.025
	levy_reinforce_rate = 0.025
	fort_level = 0.3
	ai_creation_factor = 65
        extra_tech_building_start = 10
}

To be fair, I didn't check the last one, but as far as I know, that'd also work.

Mind how trigger = { } and potential = { } work with buildings. The former sets when you can actually build a building while the latter sets whether you can see the building listed in your holding at all. That means, even if trigger = { } is evaluated to true, you won't even see the building if potential = { } is evaluated to false. It also means that the building will completely disappear, as in be deconstructed when, at any point after building it, potential = { } evaluates to false.

On a side note: is_active_trigger = { } exists for buildings. Here you can define something that has to be "true" for the building to be active, which enables you deactivate buildings at your leisure.

futa_building = {
	desc = futa_building_desc
	potential = {
		FROM = {
			has_global_flag = futa_test_flag
		}
	}
	trigger = {
		TECH_CASTLE_CONSTRUCTION = 1
		FROM = {
			culture = futa_culture
		}
	}
	is_active_trigger = {
                FROM = {
                        culture = futa_culture
                }
	}
	gold_cost = 50
	build_time = 182
	garrison_size = 0.025
	levy_reinforce_rate = 0.025
	fort_level = 0.3
	ai_creation_factor = 65
	extra_tech_building_start = 10
}

Just throwing out some examples. This building would appear as soon as a global flag is set, can be built with the castle construction tech 1 and by a character with the futa culture and would only be active as long as the owner of the building has the futa culture.

 

 

 

I realized, as i was browsing the traits and checked for hints and tips, how do i bind a trait to the culture? [...] but how do i make sure, that this trait doesn't appear outside the futa culture?

 

There's no way to culturally limit a trait inherently. You'd have to define an event that removes it on changing one's culture, or make a check that you run every now and then that removes the trait from anyone who is not of your desired culture. You can only limit randomly generated characters to not get the trait without a certain culture, with potential = { culture = xyz }. Even with that, everyone can still get the trait via event.

You can only limit a trait to religion, meaning it would get removed on religion change ( religious = yes ).

Link to comment

I like diversity too, usual when the people are cool with me having a different religion and culture. But the AI is really sometimes too stubborn.

 

About limiting to culture, i see now, how you mean it. I want to create more than one futa culture actually, as in North, South, West and East culture as in making the diversity visible and not having all the same skin color for example. And culture is more easily spreadable as you can give the Ai the culture or Trait to desire to create the culture or even Religion.

 

Maybe i should create a Trait first, that let the Character desire to create Futa Religion/Culture/Building? Then make a decision available to that Char with that trait and trigger an optional Building in the Temple/Church/whatever, giving the Player and the Ai the option to build it and causing the Futa trait to spread, that is religious bound.

Link to comment

 

About limiting to culture, i see now, how you mean it. I want to create more than one futa culture actually, as in North, South, West and East culture as in making the diversity visible and not having all the same skin color for example.

 

Just keep in mind that the game distinguishes, for the lack of better words, between social culture and genetic culture, so if you use the DW Portraits, you need to think of a way to apply them appropriately. And then you'll have to ask yourself "What if someone switches from north to south?". Will you change his/her portraits, how will it affect his/her offspring...?

 

In any case, it's up to you how you do it, but if you have any further questions, I'll be happy to help.

Link to comment

Yeah, i have actually more questions, around the events for now.

 

Can i bind events to a building? A building bind to an event i know that part now thanks to you, but what about the other way around?

 

And how can i make sure, the events trigger for the Ai too or making the Ai trigger the event instead of me?

 

I know, events is a big field to cover, so i'm just asking for some beginner advice about creating Events.

 

And the more i think about the religion thing and the bound trait, can a char keep the trait even if switching the religion? Because culture switching is a thing, but i'm not entirely sure, about the religious traits.

Link to comment

 

Can i bind events to a building? A building bind to an event i know that part now thanks to you, but what about the other way around?

 

Absoluteley. There are a few ways to do that, so I'll go by (abbreviated) example again. Let's look at an event's trigger conditions:

trigger = {
	any_realm_province = {
		has_building = futa_building
	}
}

trigger = {
	any_demesne_province = {
		has_building = futa_building
	}
}

trigger = {
	capital_scope = {
		has_building = futa_building
	}
}

These are the most basic ways to check for a building. The difference between any_realm_province and any_demesne_province is that realm takes any province under your rule into account, even vassals and vassals' vassals. Demense are only the provinces you control directly. Capital_scope is your capital province. Take note that these triggers will evaluate to true if any holding in the corresponding province has the building.

trigger = {
	any_realm_province = {
		capital_holding = {
			has_building = futa_building
		}
	}
}

I am not entirely sure, but capital_holding should be usable in a province scope, so this trigger should only evaluate to true if the province's capital holding has the building, not any holding in the province.

 

Mind the difference between character_events and province_events. The example above works only for character_events!

trigger = {
	has_building = futa_building
}

trigger = {
	capital_holding = {
		has_building = futa_building
	}
}

This would be correct for a province_event but would be evaluated for any and all provinces though, so you might want to limit the trigger further.

 

 

And how can i make sure, the events trigger for the Ai too or making the Ai trigger the event instead of me?

 

By the sound of that you're probably mixing up decisions and events. Events can fire for everyone, unless you define it otherwise.

trigger = {
	ai = no
}

This would prevent an event (or decision, for that matter) to be available to the ai.

If you want the ai to use your events and/or decisions, you should define some ai weights though.

Let's go over an event first:

character_event = {
	id = futa_event_id
	desc = futa_event_desc
	title = futa_event_title
	picture = fut_event_picture
	
	trigger = {
		any_realm_province = {
			has_building = futa_building
		}
		NOT = {
			OR = {
				trait = embrace_futas
				trait = reject_futas
			}
		}
	}
	mean_time_to_happen = {
		days = 7
	}
	option = {
		name = futa_event_id_a
		piety = -25
		add_trait = embrace_futas
		ai_chance = {
			factor = 10
			modifier = {
				factor = 10
				trait = lustful
			}
		}
	}
	option = {
		name = futa_event_id_b
		piety = 25
		add_trait = reject_futas
		ai_chance = {
			factor = 10
			modifier = {
				factor = 10
				trait = chaste
			}
		}
	}
}

As always, it's a very basic event. You could interpret this as an event to choose between embracing futas or rejecting them for a ruler who hasn't chosen yet and who has that building present in his realm. The ai_chance defines what the ai will choose when they get the event. These weights work multiplicatively with their modifiers, so in this case it would be a 10:10 chance if the character is neither lustful nor chaste, and a 100:10 / 10:100 chance if they are either.

 

Decisions work a bit differently, these are the options that appear in the intrigue window. I've not worked with them as much, so I might be in the wrong here.

futa_decision  = {
	is_high_prio = yes
	potential = {
		NOT = {
			OR = {
				trait = embrace_futa
				trait = reject_futa
			}
		}
		any_realm_province = {
			has_building = futa_building
		}
	}
	allow = {
		war = no
		prisoner = no
		NOT = { trait = in_hiding }
		age = 16
		custom_tooltip = {
			text = is_not_busy_trigger_tooltip
			hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
		}
	}
	effect = {
		character_event = { id = futa_event_id }
	}
	ai_will_do = {
		factor = 1
		modifier = {
			factor = 0
			trait = content
		}
	}
}

This decision would fire the event I defined above for a character (the event would have to be set to is_triggered_only, or else it would still fire randomly, also you should remove the mean_time_to_happen part).

Here you use ai_will_do instead of ai_chance, and it maxes out a 1 which means a 100% chance for the ai to hit the decision. How anything between 0% and 100% is evaluated exactly is beyond me, I'd assume something like a monthly chance. The modifiers to it still work multiplicatively.

 

 

And the more i think about the religion thing and the bound trait, can a char keep the trait even if switching the religion? Because culture switching is a thing, but i'm not entirely sure, about the religious traits.

 

You keep any trait that is not set to "religious = yes" on religion change.

 

Nota bene:

What I outlined above (with the event and all) is only one way to make lasting decisions and only one way to pass these decisions on to one's children. If you set those traits to inherit_chance = 100 or agnatic = yes / enatic = yes they will be passed down to any children (though you'd have to make an event to give any already existing children the trait). Other ways are what I call "silent" laws (with add_law and revoke_law, which can't be changed by the players directly), title flags (set_title_flag), dynasty flags (set_dynasty_flag) and probably some others I can't think of right now.

Link to comment

Okay, i'm trying to create a test building to check things, but something is wrong. For one, the option for the building doesn't even appear and second, where is the localisation for the buildings? The Ck2 modding page is not really helpful and i copied (shameless) a building from a mod to make sure, it works in the first place. And i made it part of a tribal and part of a castle, two different buildings actually and separated in 2 text files.

 

As i dig more into the portrait stuff, i found out, you can create a custom ethnicity, as in setting custom frame for portrait creation, which is allowed and which not. But i don't fully understand it yet. Is that a possible way, to make men look like women? But then is the work on the culture needed.

 

And as last question for today, i found older mods, that aren't working anymore in current version. Do i have to keep anything in mind when working on the current version?

Link to comment

Can you attach the file(s) for the buildings you created to a post or copy the entire code here? That'll make finding an error a lot easier. And I'll too have another look at portraits.

 

Localisation is in /Crusader Kings II/localisation/, so in your mod folder add a folder named "localisation" on the same level as the "common" folder. The files used are .csv, you can modify those in NP++, MS Excel and most likely some other programs.

 

About the version... yes, you can try, but whatever you do, it can always be blasted in the next release. Remember what you did in your mod, and take a look at the patchnotes whenever a new version of CKII is released. Sometimes you just have to change stuff because PDS changed something on their end.

Link to comment

The localisation part is already done, i made my traits work with that wonderfully. But i don't find the localisation of the Buildings in the main game OR in any the of mods.

 

 

castle = {
    rapetrain = {
        desc = rapetrain_desc
        trigger = { TECH_CASTLE_CONSTRUCTION = 1 }
        gold_cost = 100
        build_time = 150
        ai_creation_factor = 50
        
        extra_tech_building_start = 1
        tax_income = 0.5
    }
}

As you can see, nothing fancy, just a normal test.

 

#Tribal
tribal = {
    sex_shop = {
        desc = sex_shop_desc
        add_number_to_name = yes
        trigger = { TECH_CITY_CONSTRUCTION = 1 }
        gold_cost = 25
        build_time = 180
        ai_creation_factor = 30
        extra_tech_building_start = 1
        tax_income = 0.3
    }

}

I don't see any problem or anything else, it stops me from building it.

 

Maybe the problem is somewhere else? Like the path?

 

I will look a bit into the religion part, just to learn some more.

Link to comment

Hm, you're right, just from that it looks like the buildings should be working.

Did you copy the original 00_buildings.txt and add your buildings to the bottom of the file or do you use your own file?

Do the buildings not appear at all or are you simply unable to build them?

 

To make that clear, buildings should be in

mod/[your mod]/common/buildings/

and the localisation is in

mod/[your mod]/localisation/

 

Vanilla building localisations are found in

 

/Crusader Kings II/localisation/text3.csv

/Crusader Kings II/localisation/v1_06a.csv

/Crusader Kings II/localisation/v1_06.csv

/Crusader Kings II/localisation/v1_09.csv

/Crusader Kings II/localisation/v1_09b.csv

/Crusader Kings II/localisation/text1.csv

 

... and many more files.

 

Same question here, did you copy a file and added your localisation to it or did you make your own file?

 

I'm asking about the files because sometimes I've had trouble with the encoding used when I made a new file instead of copying an existing one and changing it.

Link to comment

GOSH DARN IT!

 

Sorry, my buildings folder missed the DAMN S at the end. I just changed it. Seriously, like my second test trait i created, simply typed the short term while i used the whole term as anchor and wondered, why the symbol and descr doesn't show up.

 

Now it all works! FFS! And i was almost getting desperate, wondering what i did wrong! Even the descriptions are working great.

 

Okay, i can officially make buildings now too!

 

Let's see, if we can make this portrait creation with culture ethnicity get to work.

 

But i'm starting to wonder, if the player doesn't pick the Test1 trait and the Ai only gets it through inheritance, could i make a event for the Ai to get the trait?

 

Edit: Made my own religion, with description and hookers!(Wives and Concubines, because Concubines are easy to lay off, but Wives are for the long run!) Not happy with the Religion color and the RGB color system but fine tuning is not important now.

 

Wait, traits, buildings, religion, is this enough for a Alpha mod test?

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use