Jump to content

CK2 Modding Quick Question Thread


Recommended Posts

Posted
8 hours ago, adrikappa said:

Hey,

 

I made an event chain with 6 steps.

Event number 4 in the chain gets a random vassal to interact with, using save_event_target_as .

If i run the event from console, it shows my icon and the vassals icon.

If i run event 1 and let it continue, at event number 4 it only shows my picture. 

Any ideas why?

 

What I see most people do in their mods is assign the npc a flag then use that flag to reference them in the rest of the chain. Events don't seem to hold scope, reverting to ROOT(usually you) for the next event, so the flag is used to bring that npc back into each event. When you are done with the npc remove the flag.

 

There is so much I don't know and hopefully somebody who knows more can actually explain why, but this is what I see a lot of people do to get around the limitation.

Posted
10 hours ago, adrikappa said:

Hey,

 

I made an event chain with 6 steps.

Event number 4 in the chain gets a random vassal to interact with, using save_event_target_as .

If i run the event from console, it shows my icon and the vassals icon.

If i run event 1 and let it continue, at event number 4 it only shows my picture. 

Any ideas why?

 

Not without looking at the script, I fear.

Posted

I ran into a weird thing the other day.

For targetted decision filters, does anyone know how the "home" in "home_court" is determined? I have a character that should be presented a decision for one of its prisoner. All potententials match. However the decision is not in the list. If I change the filter from "home_court" to "court" the decision is shown.

 

I actually have found 3 decisions in my mod that seem affected. The only thing I can see is for some reason my characters court is not considered its "home". Any other ideas?

Posted
3 hours ago, coleman1 said:

I ran into a weird thing the other day.

For targetted decision filters, does anyone know how the "home" in "home_court" is determined? I have a character that should be presented a decision for one of its prisoner. All potententials match. However the decision is not in the list. If I change the filter from "home_court" to "court" the decision is shown.

 

I actually have found 3 decisions in my mod that seem affected. The only thing I can see is for some reason my characters court is not considered its "home". Any other ideas?

From my understanding home_court is your court or at least your capital's court. (Basically everyone listed in the court tab + your prisoners)

 

Court scope to your hosts court. Host being the where your character resides. (Such as your liege, or if you imprisoned it would be whoever has you imprisoned.) 

 

As for why court works and home_court does not it really depends on who holds the prisoner and possible your scripting later on. Without seeing the coding for the decision there really isn't a way to say for certain why home_court is not working.  

 

Posted

Does anyone know if there is a way to alter a character's age with an event? I know it is easily done through console commands but I would prefer to be able to have it as a result of an event option. Either by someone gaining years through a harrowing experience or being rejuvenated by a good one

Posted
5 hours ago, Breunor44 said:

Does anyone know if there is a way to alter a character's age with an event? I know it is easily done through console commands but I would prefer to be able to have it as a result of an event option. Either by someone gaining years through a harrowing experience or being rejuvenated by a good one

I have tried before with no success. The only in-game mechanic for that is the console command, but putting that command into an event does not seem to work.

Posted
On 5/12/2018 at 11:39 PM, ngppgn said:

Not without looking at the script, I fear.

Decision to start event chain

 

get_fucked_for_building_boom = {
        high_prio = yes
        
        potential = {
        NOT = { has_character_flag = GFFT_buildfucked }
            ai = no
        }
        
        allow = {
            
            always = yes
        }
        
        effect = {
            narrative_event = { id = GFFT_holdings.4001 }
        }
        
        revoke_allowed = {
            always = no
        }
        
        ai_will_do = {
            factor = 0
        }
            
    }

 

event 1

 

narrative_event = {
    id = GFFT_holdings.4001
    
    title = "Building Boom"
    desc = "A lot of people will need to fuck me to get things going as cheap as possible"
    picture = brothel_female_female_fingerbang
    
    is_triggered_only = yes
    
    option = {
        name = "Lets get fucked"
        add_character_modifier = { name = GFFT_building_boom duration = 1000 }
        add_character_modifier = { name = GFFT_building_boom_2 duration = 1000 }
        set_character_flag = GFFT_buildfucked
        narrative_event = { id = GFFT_holdings.4002 }
    }
    option = {
        name = "Fuck this"
    }
}

 

event 2

 

narrative_event = { 
    id = GFFT_holdings.4002
    
    title = "What is needed now"
    desc = "Getting fucked is what is needed. Me getting fucked to be exact. Again and again and again getting fucked. Motherfuckers dont even know how to do it properly"
    picture = brothel_female_female_fingerbang
    
    is_triggered_only = yes
    
    trigger = {
        has_character_flag = GFFT_buildfucked
    }
    
    option = {
        name = "Who's dick do i have to suck now?"
            narrative_event = { id = GFFT_holdings.4003 days = 3}  #fucked by investor and/or his buddies
            random_list = { 
                20 = { narrative_event = { id = GFFT_holdings.4005 days = 45 } }  #architect and/or his buddies
                20 = { narrative_event = { id = GFFT_holdings.4007 days = 45 } }  #painter and/or his buddies
                20 = { narrative_event = { id = GFFT_holdings.4009 days = 45 } }  #sculptor and/or his buddies
                10 = { narrative_event = { id = GFFT_holdings.4011 days = 45 } }  #foundation fuck
                10 = { narrative_event = { id = GFFT_holdings.4012 days = 45 } }  #wood fuck
                10 = { narrative_event = { id = GFFT_holdings.4013 days = 45 } }  #stone fuck
                10 = { narrative_event = { id = GFFT_holdings.4014 days = 45 } }  #transport fuck
            }
            random = {
                chance = 20
                random_list = {
                    30 = { narrative_event = { id = GFFT_holdings.4015 days = 28 } }  #random noble fuck routing          +3 (alone, with buddies in private, with buddies in public
                    30 = { narrative_event = { id = GFFT_holdings.4019 days = 28 } }  #random priest fuck routing      +3 (alone, with buddies in private, with visiting priest in private
                    40 = { narrative_event = { id = GFFT_holdings.4023 days = 28 } }  #random peasant fuck routing       +3 (village townhall, village square, peasants from other villages start joining, maybe more events
                }
            }
        
    }
    option = {
        name = "stop this shit"
    }
}

 

event 3

 

narrative_event = { 
    id = GFFT_holdings.4015
    
    title = "What is needed now"
    desc = "meeting with [GFFT_noble_who_fucks.GetFirstName], a noble"
    picture = brothel_female_female_fingerbang
    
    is_triggered_only = yes
    
    immediate = {
        random_vassal = {
            limit = {
                is_adult = yes
            }
            save_event_target_as = GFFT_noble_who_fucks
        }
    }    
    
    option = {
        trigger = {
            event_target:GFFT_noble_who_fucks = { character = yes }
        }
        name = "Some noble wants to see me"
        event_target:GFFT_noble_who_fucks = {
            wealth = 0
        }
        narrative_event = { id = GFFT_holdings.4016 }
    }
}

 

if i run event 3 from console the icons appear for me and the vassal, if i run the chain only my icon appears

sorry for the wall of text

Posted
1 hour ago, adrikappa said:
Spoiler

 

Decision to start event chain

 

get_fucked_for_building_boom = {
        high_prio = yes
        
        potential = {
        NOT = { has_character_flag = GFFT_buildfucked }
            ai = no
        }
        
        allow = {
            
            always = yes
        }
        
        effect = {
            narrative_event = { id = GFFT_holdings.4001 }
        }
        
        revoke_allowed = {
            always = no
        }
        
        ai_will_do = {
            factor = 0
        }
            
    }

 

event 1

 

narrative_event = {
    id = GFFT_holdings.4001
    
    title = "Building Boom"
    desc = "A lot of people will need to fuck me to get things going as cheap as possible"
    picture = brothel_female_female_fingerbang
    
    is_triggered_only = yes
    
    option = {
        name = "Lets get fucked"
        add_character_modifier = { name = GFFT_building_boom duration = 1000 }
        add_character_modifier = { name = GFFT_building_boom_2 duration = 1000 }
        set_character_flag = GFFT_buildfucked
        narrative_event = { id = GFFT_holdings.4002 }
    }
    option = {
        name = "Fuck this"
    }
}

 

event 2

 

narrative_event = { 
    id = GFFT_holdings.4002
    
    title = "What is needed now"
    desc = "Getting fucked is what is needed. Me getting fucked to be exact. Again and again and again getting fucked. Motherfuckers dont even know how to do it properly"
    picture = brothel_female_female_fingerbang
    
    is_triggered_only = yes
    
    trigger = {
        has_character_flag = GFFT_buildfucked
    }
    
    option = {
        name = "Who's dick do i have to suck now?"
            narrative_event = { id = GFFT_holdings.4003 days = 3}  #fucked by investor and/or his buddies
            random_list = { 
                20 = { narrative_event = { id = GFFT_holdings.4005 days = 45 } }  #architect and/or his buddies
                20 = { narrative_event = { id = GFFT_holdings.4007 days = 45 } }  #painter and/or his buddies
                20 = { narrative_event = { id = GFFT_holdings.4009 days = 45 } }  #sculptor and/or his buddies
                10 = { narrative_event = { id = GFFT_holdings.4011 days = 45 } }  #foundation fuck
                10 = { narrative_event = { id = GFFT_holdings.4012 days = 45 } }  #wood fuck
                10 = { narrative_event = { id = GFFT_holdings.4013 days = 45 } }  #stone fuck
                10 = { narrative_event = { id = GFFT_holdings.4014 days = 45 } }  #transport fuck
            }
            random = {
                chance = 20
                random_list = {
                    30 = { narrative_event = { id = GFFT_holdings.4015 days = 28 } }  #random noble fuck routing          +3 (alone, with buddies in private, with buddies in public
                    30 = { narrative_event = { id = GFFT_holdings.4019 days = 28 } }  #random priest fuck routing      +3 (alone, with buddies in private, with visiting priest in private
                    40 = { narrative_event = { id = GFFT_holdings.4023 days = 28 } }  #random peasant fuck routing       +3 (village townhall, village square, peasants from other villages start joining, maybe more events
                }
            }
        
    }
    option = {
        name = "stop this shit"
    }
}

 

event 3

 

narrative_event = { 
    id = GFFT_holdings.4015
    
    title = "What is needed now"
    desc = "meeting with [GFFT_noble_who_fucks.GetFirstName], a noble"
    picture = brothel_female_female_fingerbang
    
    is_triggered_only = yes
    
    immediate = {
        random_vassal = {
            limit = {
                is_adult = yes
            }
            save_event_target_as = GFFT_noble_who_fucks
        }
    }    
    
    option = {
        trigger = {
            event_target:GFFT_noble_who_fucks = { character = yes }
        }
        name = "Some noble wants to see me"
        event_target:GFFT_noble_who_fucks = {
            wealth = 0
        }
        narrative_event = { id = GFFT_holdings.4016 }
    }
}

 

if i run event 3 from console the icons appear for me and the vassal, if i run the chain only my icon appears

sorry for the wall of text

 

 

The first thing that jumps out to me is that both the wiki and DWR use a scope block around saving your event_target

 

so in event 3

save_event_target_as = GFFT_noble_who_fucks

 

probably needs to be

FROM = {save_event_target_as = GFFT_noble_who_fucks }

 

I am doing similar things right now and that's how I did it, works fine for me. So worth trying until someone comes up with a better answer. :classic_biggrin:

Posted

Alaratt, i have no idea how or why but running the event chain today everything is ok. The icon of the vassal shows up. I was messing around with another mod and when i tried today with this one it just works. I didnt change anything. I will work on the other routing events and see if anything happens. 

 

On another topic, i am trying to use create_tradepost and im having some issues. I have all the requirements for creating it.

When testing, the event recognizes FROM and the saved event target but when i click the option i dont get the tradepost.

 

 

Targetted decision.

 

get_fucked_for_trade_post = {
        only_playable = yes
        filter = independent_rulers
        ai_target_filter = realm
        
        from_potential = {
            is_patrician = yes
            is_female = yes
            is_adult = yes
            ai = no
            NOT = { trait = in_hiding }
        }
        
        potential = {
            is_adult = yes
            NOR = {
                character = FROM
                trait = in_hiding
            }
        }
        
        allow = {
            prisoner = no
        }
        
        effect = {
            FROM = { 
                narrative_event = { id = GFFT_holdings.5003 }
            }
        }
        
        revoke_allowed = {
            always = no
        }
        
        ai_will_do = {
            factor = 0
        }
            
    }

 

EVENT.

 

narrative_event = { 
    id = GFFT_holdings.5003
    
    title = "I need to  another tradepost"
    desc = "get fucked for a  tradepost"
    picture = brothel_female_female_fingerbang
    
    is_triggered_only = yes
    
    immediate = {
        FROM = {
            random_realm_province = {
                limit = {
                    AND = {
                        has_trade_post = no
                        port = yes
                    }
                }
                save_event_target_as = GFFT_tradepost_objective
            }
        }
    }
    
    option = {
        name = "lets get fucked for tradepost"        
        create_tradepost = GFFT_tradepost_objective #465
    }
    
    option = {
        name = "nevermind"
    }
}

 

I tried  create_tradepost = 465 and it works perfectly. But i want it to be dinamic depending on the ruler i choose. So how can i scope the province when using create_tradepost.

Posted
25 minutes ago, adrikappa said:
Spoiler

 

Alaratt, i have no idea how or why but running the event chain today everything is ok. The icon of the vassal shows up. I was messing around with another mod and when i tried today with this one it just works. I didnt change anything. I will work on the other routing events and see if anything happens. 

 

On another topic, i am trying to use create_tradepost and im having some issues. I have all the requirements for creating it.

When testing, the event recognizes FROM and the saved event target but when i click the option i dont get the tradepost.

 

 

Targetted decision.

 

get_fucked_for_trade_post = {
        only_playable = yes
        filter = independent_rulers
        ai_target_filter = realm
        
        from_potential = {
            is_patrician = yes
            is_female = yes
            is_adult = yes
            ai = no
            NOT = { trait = in_hiding }
        }
        
        potential = {
            is_adult = yes
            NOR = {
                character = FROM
                trait = in_hiding
            }
        }
        
        allow = {
            prisoner = no
        }
        
        effect = {
            FROM = { 
                narrative_event = { id = GFFT_holdings.5003 }
            }
        }
        
        revoke_allowed = {
            always = no
        }
        
        ai_will_do = {
            factor = 0
        }
            
    }

 

EVENT.

 

narrative_event = { 
    id = GFFT_holdings.5003
    
    title = "I need to  another tradepost"
    desc = "get fucked for a  tradepost"
    picture = brothel_female_female_fingerbang
    
    is_triggered_only = yes
    
    immediate = {
        FROM = {
            random_realm_province = {
                limit = {
                    AND = {
                        has_trade_post = no
                        port = yes
                    }
                }
                save_event_target_as = GFFT_tradepost_objective
            }
        }
    }
    
    option = {
        name = "lets get fucked for tradepost"        
        create_tradepost = GFFT_tradepost_objective #465
    }
    
    option = {
        name = "nevermind"
    }
}

 

I tried  create_tradepost = 465 and it works perfectly. But i want it to be dinamic depending on the ruler i choose. So how can i scope the province when using create_tradepost.

 

 

maybe something like

 

option = {
        name = "lets get fucked for tradepost"        
        create_tradepost = GFFT_tradepost_objective #465

        new_tradepost = {

             owner = {

                  event_target:GFFT_tradepost_objective

             }

        }
 }

 

 

or something similar, maybe.

Posted

I'm still trying to get my on_action event chain to work.

 

narrative_event = {
    id = RSLRandom.600
    desc = "RSLRandom"
    picture = dog_1

    ai = no
    
    is_triggered_only = yes  #by on_action yearly pulse
    
    trigger = {
            liege = {    
            has_character_modifier = pet_hunting_dog }
            }
            
            
        
        
        
    option = {    
            
        random_host_courtier = {
                            limit = {
                                is_female = yes
                                age = 14
                                NOT = { trait = incapable }
                                prisoner = no
                            }
                        }
                        name = rsl_further
            
             random_host_courtier = { narrative_event = { id = RSLRandom.603 }}    #female courtier event
            }    
            
    
}

 

I still have two problems:

 

Event.600 has only the player character in scope and I have difficulties in getting the random_host_courtier with the defined limits in scope.

Putting it in  an option shows two random courtiers on the bottom right page  but they don't fit the defined limits. In addition the follow-up event doesn't fire.

If I use host = { instead of random_host_courtier = {  the event does fire but without the random courtier.

 

If I put the random_host_courtier block above the option block it does call a courtier into the next event but does not apply  the limits (so I get men and children as well). In addition it doesn't fire the next event (.603) but skips to the subsequent event (.605).

 

I would appreciate your advice

Posted

The limit should be applied in the command block:

 

    option = {    
        name = rsl_further  
        random_host_courtier = {
             limit = {
                 is_female = yes
                 age = 14
                 NOT = { trait = incapable }
                 prisoner = no
             }
          narrative_event = { id = RSLRandom.603 }
        }
   }

 

Posted

This seems to work in that the limit is now respected. I get only one courtier in the option bar on the lower right-hand page. However the next events shows only the player character, no courtier in sight (in scope).

 

Adding random_host_courtier = { narrative_event etc just breaks the chain.

 

Does an on_action_event on_yearly _pulse only have a ROOT scope?  I can't seem to pull any other characters in.

Posted
22 hours ago, Alaratt said:

maybe something like

 

option = {
        name = "lets get fucked for tradepost"        
        create_tradepost = GFFT_tradepost_objective #465

        new_tradepost = {

             owner = {

                  event_target:GFFT_tradepost_objective

             }

        }
 }

 

 

or something similar, maybe.

Maybe i didnt explain very well. GFFT_tradepost_objective is the random province. If i use create_tradepost = 465, i get a tradepost in that province in my ownership.

What i want is to have it be dinamic. So any province i choose can get me a tradepost. i tried something like 

 

GFFT_tradepost_objective = {

      create_tradepost = THIS

}

 

and it doesent work. I want a way to scope the saved event target maybe using  create_tradepost = PREV or something like 

create_tradepost = { province = GFFT_tradepost_objective }

 

I dont know how to achieve this.

 

Posted
21 hours ago, adrikappa said:

Maybe i didnt explain very well. GFFT_tradepost_objective is the random province. If i use create_tradepost = 465, i get a tradepost in that province in my ownership.

What i want is to have it be dinamic. So any province i choose can get me a tradepost. i tried something like 

 

GFFT_tradepost_objective = {

      create_tradepost = THIS

}

 

and it doesent work. I want a way to scope the saved event target maybe using  create_tradepost = PREV or something like 

create_tradepost = { province = GFFT_tradepost_objective }

 

I dont know how to achieve this.

 

no, I should have read it better, I thought you were trying to make ai create tradeposts or something. Other then a long OR block with every province ID in it the only other way I know of to scope a specific province is to use one of your councilors.

 

I use a cheat mod that does this with the chancellor and his diplomatic function where you can place him anywhere outside of your realm to improve relations, then in an event scopes to the province he is in to get a claim immediately on the province/duchy/kingdom titles. You would have to use a different councilor that has a similar function that works inside your realm, then use something like this for the first option ;

 

  option = {
        name = "lets get fucked for tradepost" 

        job_marshal  = {                    #place him where you want the tradepost to be using his suppress revolts function before you activate the event

           location = {

              county = {

                 IF = {

                     limit = {

                          has_trade_post = no

                          port = yes

                     }

                     create_tradepost = ROOT 

                }

            }

         }

     }

 }

 

and then you should be able to delete the entire immediate block. This would be if you were wanting them in your lands. switch job_marshal to job_chancellor if its intended to be in ai owned provinces and use his diplomatic function, then set trigger the event.

Posted

Alaratt,

I found a mod called BuildAllUpgradeAll and i found something that works. I dont know why PREV works here and THIS didnt work in my try but at least i can move on. here is the working code

 

option = {
        name = "lets get fucked for tradepost"
        FROM = {
            random_realm_province = {
                limit = {
                    AND = {
                        has_trade_post = no
                        port = yes
                    }
                }
                ROOT = {
                    if = {
                        limit = {
                            is_patrician = yes
                        }
                        create_tradepost = PREV
                        }
                    }
            }
        }
    }

 

FROM is the guy i use the targetted decision on. ROOT is me. This lets me pick the realm where i can have the tradepost but not the province itself. I will try to make a title decision instead of a targetted decision and see what happens

Posted
On 17.05.2018 at 11:45 AM, adrikappa said:

create_tradepost = { province = GFFT_tradepost_objective }

I think it should be 

create_tradepost = event_target:GFFT_tradepost_objective

Posted

Is there somewhere in the code that specifically handles the chance for taking captives after a siege?

Ideally I would like to be able to increase the chances of taking courtiers/wives/daughters/etc in the aftermath of a siege/battle...

 

Alternatively, is there a mod that does this already? Thanks!

Posted
20 minutes ago, MasterAaran said:

Is there somewhere in the code that specifically handles the chance for taking captives after a siege?

There is on_action trigger  on_siege_over_loc_chars that fires events for all chars in captured holding
 

 

 

Posted

short: is it even worth playing CKII if one has only the basegame with no DLCs?

 

will any perverted mods work?

 

if so which should i install going for a medieval + medieval mythology experience. (no japanese anime hentai monsters and elves/orks/alien races)

Posted
3 hours ago, DeadSomething said:

short: is it even worth playing CKII if one has only the basegame with no DLCs?

 

will any perverted mods work?

 

if so which should i install going for a medieval + medieval mythology experience. (no japanese anime hentai monsters and elves/orks/alien races)

CK2 has plenty of stuff in the base game and I would say it is worth it. There are lots of cool features in the DLC packs but they aren't required to have a good time. There are a lot of them though so better to try the games base version before buying anything else.

 

I think Dark World Reborn can be used with just the base game, and you can set the game rules to include only what you want to play with. So no orcs/elves etc. should work just fine. It's hard to recommend any more then that though since I been playing for years and slowly bought all the DLC, so not having a DLC pack isn't something I have checked on.

Posted
17 hours ago, Alaratt said:

CK2 has plenty of stuff in the base game and I would say it is worth it. There are lots of cool features in the DLC packs but they aren't required to have a good time. There are a lot of them though so better to try the games base version before buying anything else.

 

I think Dark World Reborn can be used with just the base game, and you can set the game rules to include only what you want to play with. So no orcs/elves etc. should work just fine. It's hard to recommend any more then that though since I been playing for years and slowly bought all the DLC, so not having a DLC pack isn't something I have checked on.

thanks, i'll see how depraved i can mod my game :)

Posted

Hello,

 

I am trying to make it possible to choose which culture's clothing character is wearing

Is there a way to do it in portrait_propeties.txt?

Or at least some way to trigger clothing overrides, like one used for society clothing, without adding new traits to use portrait_has trait?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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