• 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.
well, depending on how much you want to over-write, replace_path is a thing. ...

Replace_path is only for folders, which in turn is too much for what i had in mind.

Thanks, but as jursamaj said, it's just not practical nor feasible.
I'll do the file renaming instead then..maybe...some day in the future. :rolleyes: :p
 
It might work, unless the trigger for the custom loc would need to remain true throughout the war (that'd break if it e.g. was a character flag being checked on the attacker and the original attacker died/abdicated). I've not gotten around to testing anything yet since I basically got the idea about a random war name and immediately thought "I wonder if someone else has tried this before?".
Put a flag on a title? Maybe the primary title of the attacker? You can't usurp titles from those at war (though i'm not sure about title revocation and inheritance; on-actions maybe?)
 
Anyone know a way to put something like the code below working ?

I need to find a way to count cities on a given province.

any_province_holding = {
holding_type = CITY
count >= 2
}

I thought holding types were not supposed to be in caps? Also, you might be better off scoping to a county, and then scoping to its baronies. Like so:
Code:
county = { #scope to the county
    any_province_holding = { #scope to the baronies
        if = {
            limit = { holding_type = city }
            ROOT = { change_variable = { which = local_city_num value = 1 } }
            
            #ROOT is a placeholder here; just make sure the variable
            #is scoped under one entity, instead of to THIS scope
        }
    }
}
 
  • 1
  • 1
Reactions:
I thought holding types were not supposed to be in caps? Also, you might be better off scoping to a county, and then scoping to its baronies. Like so:
Code:
county = { #scope to the county
    any_province_holding = { #scope to the baronies
        if = {
            limit = { holding_type = city }
            ROOT = { change_variable = { which = local_city_num value = 1 } }
           
            #ROOT is a placeholder here; just make sure the variable
            #is scoped under one entity, instead of to THIS scope
        }
    }
}
ROOT wont do anything in the above code, local_ saves the variable to the event chain, not to a scope.
Probably worth trying with the original code, with city in lowercase... I can't see any other reason for it not to work - this is assuming the idea is to simply check there are two or more cities, not to count them
 
I thought holding types were not supposed to be in caps? Also, you might be better off scoping to a county, and then scoping to its baronies. Like so:
Code:
county = { #scope to the county
    any_province_holding = { #scope to the baronies
        if = {
            limit = { holding_type = city }
            ROOT = { change_variable = { which = local_city_num value = 1 } }
          
            #ROOT is a placeholder here; just make sure the variable
            #is scoped under one entity, instead of to THIS scope
        }
    }
}
Thank you it works, I just needed to adapted this to my purpose so i'm calculating the number of towns with a scripted effect while on the province scope and than use the trigger with the variable local_city_num
 
Quick question. Is there an easy way to find character id's without having to go in game and look at them?

Search the save file.
Either by the first name, birthday or whatever seperates the char from others
or
if landed, then you look up a county or holding in the characters demesne and find the id that way:

Code:
        c_baghdad=
        {
            liege=d_baghdad
            holder=34002
 
Last edited:
ROOT wont do anything in the above code, local_ saves the variable to the event chain, not to a scope.
Probably worth trying with the original code, with city in lowercase... I can't see any other reason for it not to work - this is assuming the idea is to simply check there are two or more cities, not to count them
I literally wrote that ROOT is just a placeholder XD
 
Thank you it works, I just needed to adapted this to my purpose so i'm calculating the number of towns with a scripted effect while on the province scope and than use the trigger with the variable local_city_num
just take notice that variables starting with local_ are local variables, i.e. they are deleted once the event chain is over. I'm of an opinion that it's more efficient (and polite) to use local variables where possible, so as not to clutter the debug tooltip.
 
Is it possible to make a custom title (through create_title) which the AI will not ever revoke/give away?
Also, is it possible to use replace_captain_on_death for non-mercenary titles? Like, say, if you want to have a clerical order of healers whose succession is (mostly) out of the hand of the player, and who exist as an actual title and not a society?
 
Is it possible to make a custom title (through create_title) which the AI will not ever revoke/give away?

As far as I know, it isn't possible to do this at all unless you tear out the whole title grant and title revocation system. However, assuming the council votes on title revokation/title granting you could make set all voting patterns to oppose granting/revoking the title, making the AI reluctant to do it unless it's bought council support (though if it really wants to it'll force it through with tyranny). You could potentially also take advantage of a government forbidding revocation without reason, though that'd still not cover someone with a claim or a reason (e.g. the "Traitor" opinion modifier).

Also, is it possible to use replace_captain_on_death for non-mercenary titles? Like, say, if you want to have a clerical order of healers whose succession is (mostly) out of the hand of the player, and who exist as an actual title and not a society?

I don't think you can use replace_captain_on_death, but you can always script an event fired on_death that makes the holder grant the title to a specific successor (e.g. a character you spawn in that event).
 
Anyone knows why the border between provinces are not showing up ?
I'm trying to recreate the three hills on king's landing for a personal modification i'm doing.
Provinces are created titles are all ok only the borders are not showing

Capture.JPG
 
in scripted_triggers, how can I scope to the previous scope while already in a PREVPREV scope. e.g
Code:
is_special_tributaries_of_a_title = {
    k_a_title = {
        holder_scope = { # I want to check this scope as the suzerain
            PREVPREV = {
                OR = {
                    is_tributary = { type = special_trib_a suzerain = PREV } # PREV is relative, using PREV in a PREVPREV scope equals to PREVPREVPREV, which is not what I want.
                    is_tributary = { type = special_trib_b suzerain = PREV }
                }
            }
        }
    }
}
I know a persistent_event_target/global_event_target can work, but I want to make things easier...
 
in scripted_triggers, how can I scope to the previous scope while already in a PREVPREV scope. e.g
I know a persistent_event_target/global_event_target can work, but I want to make things easier...
Does this suffice?

Code:
is_special_tributaries_of_a_title = {
    k_a_title = {
        holder_scope = {
            any_tributary = {
                character = PREVPREVPREV
   
                OR = {
                    is_tributary = { type = special_trib_a suzerain = PREV }
                    is_tributary = { type = special_trib_b suzerain = PREV }
                }
            }
        }
    }
}
 
  • 1
Reactions:
Be sure the songs have a sample rate of 44100 Hz.
If not initally, then you can change it in Audacity at the bottom left through the drop-down menu.

Just a curious question left, you said "I converted the mp3 files of the game OSTs".
Did you convert mp3 music files out of the soundtrack folder of the game ? I wonder, as they are already available as ogg.
No, I was referring to the two game OSTs I added. They are from two different games of course, not from CKII.
They are "War of the Vikings" and "Expeditions: Vikings".

Thank you for the tip with the sample rate. I will try that.
 
No, I was referring to the two game OSTs I added. They are from two different games of course, not from CKII.
They are "War of the Vikings" and "Expeditions: Vikings"

Ah, that makes sense.

Thank you for the tip with the sample rate. I will try that.

Should work. Used to be the fix since the issue showed up in patch 2.7 or so.
 
Quick question!
Does anyone know how I would transfer all of my previous kingdom title history to my new one? e.g. Kingdom of England's title history to the United Kingdom of Great Britain's title history (mid game of course).
 
If I wanted to create a backwards version of the silk road, is there an easy way to do it? Do I just reverse the order of all the numbers in the path blocks in the silk road file and define the provinces I want it to start at? Or does the order that paths show up matter?

Quick question!
Does anyone know how I would transfer all of my previous kingdom title history to my new one? e.g. Kingdom of England's title history to the United Kingdom of Great Britain's title history (mid game of course).
Look at the "create custom title" decision and the "Reform the Roman Empire" decision.