• 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.
MTTH works life the half-life of radioactive material. Suppose you....
Code:
day  chance   product
1     .50     .50
2     .25     .50
3     .125    .375
<more lines, carried on 'forever'>
The chance per day comes directly from the half-life: (1 day between checks)/(2 day half-life)=50%. A 3 day half-life would give 1/3=33%, and so one. By the way, you were mistaken... because the whole system is an exponential decay: radioactive material is the *most* radioactive at the start, and 'cools off' over time.

Now, the game doesn't check every day. It defaults to every 20 days for rulers & provinces, 50 days for courtiers
Thank you for your time, I have a better idea of what MTTH is.
However I still don't understand how you have done any of the calculations. Tried to follow/finish your table, couldn't do it. Tried to understand how these number were produced, couldn't do it.

If anyone would be so kind and try to make it even simpler, maybe then I have a chance. :confused:
 
Sort of related questions...

1) What controls how a character will vote on your Council? Is it possible to change that via event, or is it 'set' by their personality?
2) Is there any way to exempt a character from negative opinion penalties, such as tyranny?

The idea I'm thinking of is a kind of 'special loyalty' where the Character would support another character no matter what; but the best I can think of, from what I know, is to give them a huge, long-term opinion boost... Is there a better way?
 
1) What controls how a character will vote on your Council? Is it possible to change that via event, or is it 'set' by their personality?
common\council_voting controls
you can define pretty much anything here for each pattern using whatever triggers you want. The below would mean Councillors would always vote for law_0 but be always against law_1 as they consider law_0 to personally benefit them.
Code:
selfish_pattern_for = {
    icon = 9
    pattern_type = for

    law_0 = {
        always = yes
    }
    law_1 = {
        always = no
    }
}


selfish_pattern_against = {
    icon = 10
    pattern_type = against
    
    law_0 = {
        always = no
    }
    law_1 = {
        always = yes
    }
}

2) Is there any way to exempt a character from negative opinion penalties, such as tyranny?
Nope, you would have to have a maintenance event to remove opinion modifiers between the characters
 
I wanted to know if there was some sort of way I could examine dated list of decisions that a particular character has enacted? I suspect that decision spam may be causing a particular bug, but I've been unable to find a way to generate a fully comprehensive list of AI decisions
 
common\council_voting controls
you can define pretty much anything here for each pattern using whatever triggers you want. The below would mean Councillors would always vote for law_0 but be always against law_1 as they consider law_0 to personally benefit them.
Code:
selfish_pattern_for = {
    icon = 9
    pattern_type = for

    law_0 = {
        always = yes
    }
    law_1 = {
        always = no
    }
}


selfish_pattern_against = {
    icon = 10
    pattern_type = against
   
    law_0 = {
        always = no
    }
    law_1 = {
        always = yes
    }
}


Nope, you would have to have a maintenance event to remove opinion modifiers between the characters
Thanks for the reply :)
 
Thank you for your time, I have a better idea of what MTTH is.
However I still don't understand how you have done any of the calculations. Tried to follow/finish your table, couldn't do it. Tried to understand how these number were produced, couldn't do it.

If anyone would be so kind and try to make it even simpler, maybe then I have a chance. :confused:
Suppose there are exactly 1,000 characters in the game that are eligible to receive your event. With an MTTH of 10 days, roughly half of them-500 characters-will have had it fire at some point in the first ten days. After another ten days, half of the characters that didn't have your event fire the first time around--250 characters--will have it fire for them on the second time. The third time around, the 250 remaining characters are split in half again, leaving 125 characters that still have not had it fire after 30 in-game days.

This pattern will continue forever.
 
Do numerical operators (e.g., =, <, >, <=, >=, ==) work within a create_character block? For instance, if I wanted to create a character with age <= 21, would that work as intended?
 
Do numerical operators (e.g., =, <, >, <=, >=, ==) work within a create_character block? For instance, if I wanted to create a character with age <= 21, would that work as intended?
No. create_character parameters only use '=', and where a number is needed in, it will only take only take a literal number.

Creating characters with random ages, etc. requires making a random clause where each part of it has a create_character command with a different literal number. It is very clunky (like a lot of the scripting language).
 
I have a long, complex event which is entirely aimed at allowing the player to browse and then choose one of about 30 mutually exclusive options. There are sub-menus that link back to the event that called them, and the entire thing loops, in that the last option on the last event of the main menu calls the first event again.

So far, so good. I just successfully tested it. But I want the AI characters to choose in-character options for themselves; at the moment their choices seem random. I've seen how ai_chance works in simple events, but for a multiple-branched menu like this, do I need to include chances for each stage, or just the final outcome?

Thanks,

nd
 
I have a long, complex event which is entirely aimed at allowing the player to browse and then choose one of about 30 mutually exclusive options. There are sub-menus that link back to the event that called them, and the entire thing loops, in that the last option on the last event of the main menu calls the first event again.

So far, so good. I just successfully tested it. But I want the AI characters to choose in-character options for themselves; at the moment their choices seem random. I've seen how ai_chance works in simple events, but for a multiple-branched menu like this, do I need to include chances for each stage, or just the final outcome?

Thanks,

nd
For such event chains with looping multi options etc. it is hard to make the AI understand it well. Instead the simplest solution is make an AI only option and disallow all other options, in that AI only option have it do all the ai chances for every other now disallowed option so the AI can filter down to the thing it wants and then skips to the end.
Otherwise you are going to be in for a nightmare of balancing and testing for the AI.
 
For such event chains with looping multi options etc. it is hard to make the AI understand it well. Instead the simplest solution is make an AI only option and disallow all other options, in that AI only option have it do all the ai chances for every other now disallowed option so the AI can filter down to the thing it wants and then skips to the end.
Otherwise you are going to be in for a nightmare of balancing and testing for the AI.
Ah, thank you - that makes sense! Presumably I only need to do that in the initial event? Once prevented from choosing any of the first menu options, the AI will never find its way into the submenus?

Thanks,

nd
 
Ah, thank you - that makes sense! Presumably I only need to do that in the initial event? Once prevented from choosing any of the first menu options, the AI will never find its way into the submenus?

Thanks,

nd
Yeah, so if you have an event chain like this:
A - Intro event, one option for players triggering B
B - Core event, has 30 different cycling options with a next option going to the next set, when a non-next option is picked it sets a launches corresponding event 1-30
1-30 - Outcome events based on the option from B

Then for the player that is fine.

For the AI you should make the flow:
A - Intro event, one option for AIs that does a random_list with all of the weighting for options 1-30 you have in event B. The random_list then determines which of the corresponding events 1-30 is triggered.
B - Never reached by the AI, only used by the player in first example.
1-30 - Outcome events based on the random_list's outcome.
 
Let's say I have two different types of feudal government, and I want one of them to get a vassal opinion boost with the other government type, but not its own government type. ex: Feudal liege gets vassal opinion boost from Monastic Feudal vassal, but doesn't get the opinion boost from regular Feudal vassals. Is that doable as a government modifier?
 
I need help with modding 2 things.


first: I don't like when a landed character has an unlanded cousin that doesn't marry and just gets old and dies, so I'm trying to make an event where unlanded dynasty members get married. I have some parts of the event found out already. In the allow section of the event I know to have NOT = {dynasty = none}, is_married = no, is_female = no, is_adult = yes , and can_marry = yes. I also have any_dynasty_member_even_if_dead = { is_landed = yes }, but I'm not sure if this applies to titles such as baronies, temples, and mercenary groups so if anyone can confirm that they apply I would appreciate it. I also want the event to have the descendants of bastards to get married ( any_dynasty_member_even_if_dead = { is_landed = yes } won't work since bastards get new dynasties when they have children ). The main thing I don't know what to do about is making the event marry an eligible courtier above the that is younger than 30 years or, if this is no one eligible , generate a female courtier to marry to the dynasty member.


second: I want to change the succession law of the Aztec empire so it won't just be agnatic appointment. I keep trying to change it in the files but I can't figure it out.

I would greatly appreciate anyone who could help me modding these 2 things.

Have a nice day everyone and good luck to everyone else with their modding questions, hope y'all get answers . :D
 
Then the file is either in the wrong place or another mod is overwriting it. Do you have your government in its own file or are you editing the existing feudal file?
I just added it at the end of the existing feudal file. Does it need to be in a new file?

EDIT: Problem solved. It turns out the problem was with my .mod file and not with governments. Thanks to everyone for their replies!
 
Last edited:
Can someone help me? I'm new to the game and modding and i want to create an event to legitimize all my bastards. I saw some tutorials but i didn't understand it very well and i couldn't create the event, i don't even know where to start.
 
That's close to an "impossible question", since it's a really expansive question. You're essentially asking either to have someone write the event/decision for you, or to have a complete tutorial written on how to do it. You'll get much better answers if you try to work through the problem one stage at a time, and then return with any specific singular problems where your attempts go wrong. =)

The best starting point: find and copy the basic event template on Event Modding, and test it out in the game with the debug command "event (youreventid)", e.g., event mymodprefix.1 , typed in the console (`~ key). If it pops up on screen, great. If not, figure out what went wrong -- and you'll thank yourself later if you take the time to figure out and set up The Validator, since it really helps.

You probably want a decision rather than an event. They're about the same in terms of skill required (not hard, but takes a little doing to wrap your head around), but events fire themselves while the other is manually triggered by the player: so, a random event that legitimises your bastards probably won't help you. However, because a decision has no feedback for the player unless it also triggers an event, you usually need to use both a decision to do what you want when you want to, and then an event that's launched from the decision to tell the player that everything did what it was supposed to (taking advantage of the Clausewitz engine's automatic portrait insertion and tooltips to show off the effects).

In other words, even something as simple as this actually involves at least three separate stages: 1) create an event which contains the script code you want to run in the "option", 2) create a decision that triggers that event, which itself requires script code in the "effect' (usually just a "character_event" command to fire your event), and 3) create a localised .csv file that contains all of the text you want to use.

To know all this you'll need to understand Scripting (to control flow), Scopes, Conditions (to filter the scopes), Commands (to perform the same tasks as the legitimize_bastard decison in the game's decisions/dynasty_decisions.txt, Decision Modding, and Event Modding. You'll then need to worry about Localisation to learn how to create a properly formatted .csv file (although exporting one from a spreadsheet editor like OpenOffice, LibreOffice, or Excel will help avoid major crippling errors).
 
Last edited:
The "eventwindow.gui" file seems to be the most likely candidate but tweaking the numbers there doesn't seem to work. Also, since none of the larger interface mods increases the size of the picture window, I have nothing to compare to.

You can in fact add a whole new type of event window type with any kind of lyaout you want to.
For example I added a new one in my interface mod that is shown there.
Mind that if you want to use larger or differently shaped event pictures, you'd need to add some.
The whole thing requires some graphic work and some coding.