• 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.
If you want your files to override others, you actually want them to load last. So, in fact, dependencies is the way to go about to, to my knowledge. What I use 00_<...> for, is when I want to determine the order in which my decisions pop up (the one in 00_ appear before those in 01_, and so on and so forth)

Load last then, thanks, but is there another way then the file naming ?
Simply because that's not only tedious, but a problem if another mod names the files in the same way.
I'll do it if there is no other option, but if there is, then that'd be great and why i ask.

I suppose the mod/folder names are irrelevant ?

Dependencies again only make sense if i know what mods are used and the major idea behind my inquiry was to release an updated version
of the community patch mod which have priority over other non-overhaul mods.

I guess i overthink this and make this too complicated.
A bane really with everything i do... *sadface*

I think i need a coffee...LOL

The problem is that dependencies works the other way around. You use it to make sure your mod overrides the dependency, so he'd have to list everything he wants to override as a dependency while naming his files so as to not override others. If this is a private mod, he can do that, but for a published mod, it really wouldn't work.

Indeed and IF there would be a way other than renaming the files, as for instance by a certain type of folder name of my mod, then that
would be obviously quicker and easier to handle.


Thanks both of you so far.
I guess there is no other way then ?
I was just curious if there is another option to do this that i had missed, but seems not.
 
Last edited:
I have recently added music to my personal music mod, in particular two game soundtracks.

I converted the mp3 files of the game OSTs with Audacity into ogg files.
However one of the two sets is played correctly in game, the other one is played with distorted sound.

Since I converted both from mp3 to ogg with the exact same tool and function, I have no idea why it doesn't work.
I assume that the mp3 files are somehow different, but have no idea what the difference is or what I can do about it.

Any suggestions/ideas/help?

Thanks in advance.

EDIT:
I have played both sets of files outside of the game, both sound fine. So it is indeed the game that distorts the sound of the files, apparently because of some feature of the files.
Also this is not the first time I encountered this, but in the past it was only one or two files from about 200 total.

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.
 
Last edited:
  • 1Like
Reactions:
I've got 2 counties, a duchy, and a kingdom set under the kingdom I've created.

One county is working perfectly. If I try to play as the kingdom or duchy, it won't let me and says I cannot play as landless. If I try to play as the other county, it immediately throws me into a game over. If I play as the working one, I find the rulers who are supposed to own the non-working ones in random courts.

If I copy/paste the history from the working one's title file into the kingdom or duchy, it adds them to the working one's territory. If I try to copy/paste the working title history file's info into the remaining county's file, it doesn't add it to the first county's land. If I swap the title history between the working and a non-working on, the leader from the working one doesn't work in the non-working one, and the leader from the non-working one works ruling the working one.

Anybody have any idea why the mod refuses to let the rulers actually rule their provinces?

I'll post any files anybody needs.

EDIT: After making a copy, I tried deleting all characters, all provinces, and all landed titles, then adding in one king, one pair counties for him to rule, and adding just the kingdom with those two counties to that file. It still gives me a game over as soon as the game finishes loading.
 
Last edited:
Game overs often result from accidentally ending up as either a (non-merchant) republic or a theocracy. Make sure that the capitol holding is either a tribe or a castle.

Dukes and kings who do not own a county are, indeed, unplayable and it sounds like you didn't give them counties. During the game they would just usurp from one of their subjects, but I think it doesn't know to do that at start-up. For your set-up, you probably want at least 4 counties.

It might help to show us the code or upload the files.
 
Game overs often result from accidentally ending up as either a (non-merchant) republic or a theocracy. Make sure that the capitol holding is either a tribe or a castle.

Dukes and kings who do not own a county are, indeed, unplayable and it sounds like you didn't give them counties. During the game they would just usurp from one of their subjects, but I think it doesn't know to do that at start-up. For your set-up, you probably want at least 4 counties.

It might help to show us the code or upload the files.

Making sure that that there was a county to each kingdom did fix the "can't play as landless" problem. Not having a capitol in a castle or tribe is probably the reason for the instant game over, since i don't know how to make something a tribe or castle, so I wouldn't have though to mess with it.

EDIT: Apparently, they were giving me an auto game over because I wasn't putting the baronies in the landed title file.
 
Last edited:
The problem is that dependencies works the other way around. You use it to make sure your mod overrides the dependency, so he'd have to list everything he wants to override as a dependency while naming his files so as to not override others. If this is a private mod, he can do that, but for a published mod, it really wouldn't work.
well, yes? The dependency block determines which mods must be loaded before this one. But why won't this work for a published mod? Granted, you would have to list every mod you want to override in the .mod file (or else give instructions to users on how to do it themselves), but it shouldn't be impossible. Unless it's a steam workshop thing? I've never published my stuff before, so i wouldn't know XD
 
Load last then, thanks, but is there another way then the file naming ?
Simply because that's not only tedious, but a problem if another mod names the files in the same way.
I'll do it if there is no other option, but if there is, then that'd be great and why i ask.

I suppose the mod/folder names are irrelevant ?

Dependencies again only make sense if i know what mods are used and the major idea behind my inquiry was to release an updated version
of the community patch mod which have priority over other non-overhaul mods.

I guess i overthink this and make this too complicated.
A bane really with everything i do... *sadface*

I think i need a coffee...LOL



Indeed and IF there would be a way other than renaming the files, as for instance by a certain type of folder name of my mod, then that
would be obviously quicker and easier to handle.


Thanks both of you so far.
I guess there is no other way then ?
I was just curious if there is another option to do this that i had missed, but seems not.
well, depending on how much you want to over-write, replace_path is a thing. Also, in the .mod file, the name you give the mod determines the order they appear in the launcher. Not sure if the game loads non-dependencies in the same order they appear in the launcher, but it could be something to look into
p.s. sry for the late reply, end-of-terms are a pain for students
 
  • 1
Reactions:
Quick question. In events, can you make the immediate block execute before the desc and picture blocks are executed? I was thinking about making a random roll to determine the desc, and I was wondering if you could keep it in the event itself instead of having to make another event before it.
 
Quick question. In events, can you make the immediate block execute before the desc and picture blocks are executed? I was thinking about making a random roll to determine the desc, and I was wondering if you could keep it in the event itself instead of having to make another event before it.
Vanilla uses
Code:
character_event = {
    id = 421
    desc = {
        text = EVTDESC421
        trigger = {
            NOT = { random = 50 }
            FROM = {
                OR = {
                    father_of_unborn_known = no
                    father_of_unborn = { character = ROOT }
                }
            }
        }
    }
 
    desc = {
        text = EVTDESC421_2
        trigger = {
            random = 50
            FROM = {
                OR = {
                    father_of_unborn_known = no
                    father_of_unborn = { character = ROOT }
                }
            }
        }
    }
...
For desc randomness. And neither desc or picture block executes command, they are trigger block and resolved only.
 
A somewhat odd question: Is it possible to use different names ("The X War", where "X" is a random string selected from among a bunch of pre-defined options prior to the war starting) for an event-started war without creating a bunch of copy-paste CBs with different names?
 
Vanilla uses
Code:
character_event = {
    id = 421
    desc = {
        text = EVTDESC421
        trigger = {
            NOT = { random = 50 }
            FROM = {
                OR = {
                    father_of_unborn_known = no
                    father_of_unborn = { character = ROOT }
                }
            }
        }
    }

    desc = {
        text = EVTDESC421_2
        trigger = {
            random = 50
            FROM = {
                OR = {
                    father_of_unborn_known = no
                    father_of_unborn = { character = ROOT }
                }
            }
        }
    }
...
For desc randomness. And neither desc or picture block executes command, they are trigger block and resolved only.
huh, forgot about random in trigger. That said, what i had in mind was a long-ass random block with multiple mult_modifier blocks, so i'm not sure this would work

I was hoping for smt like this:
Code:
character_event = {
    id = test.001
    is_triggerred_only = yes
    
    immediate = {
        random_list = {
            20 = { #outcome A -> set_character_flag = flagA }
            20 = { #outcome B -> set_character_flag = flagB }
            20 = { #outcome C -> set_character_flag = flagC }
        }
    }
    desc = { #outcomeA
        trigger = { has_character_flag = flagA }
        text = "whatever"
    }
    desc = { #outcomeB
        trigger = { has_character_flag = flagB }
        text = "whatever"
    }
    option = { #whatever }
}
 
huh, forgot about random in trigger. That said, what i had in mind was a long-ass random block with multiple mult_modifier blocks, so i'm not sure this would work

I was hoping for smt like this:
Code:
character_event = {
    id = test.001
    is_triggerred_only = yes
   
    immediate = {
        random_list = {
            20 = { #outcome A -> set_character_flag = flagA }
            20 = { #outcome B -> set_character_flag = flagB }
            20 = { #outcome C -> set_character_flag = flagC }
        }
    }
    desc = { #outcomeA
        trigger = { has_character_flag = flagA }
        text = "whatever"
    }
    desc = { #outcomeB
        trigger = { has_character_flag = flagB }
        text = "whatever"
    }
    option = { #whatever }
}

If you want a random description, you can simply put down multiple descriptions, and the game will pick one of them, as far as I know.
 
A somewhat odd question: Is it possible to use different names ("The X War", where "X" is a random string selected from among a bunch of pre-defined options prior to the war starting) for an event-started war without creating a bunch of copy-paste CBs with different names?

Using custom localisation in the war name key doesn't work?
 
Using custom localisation in the war name key doesn't work?

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?".
 
well, yes? The dependency block determines which mods must be loaded before this one. But why won't this work for a published mod? Granted, you would have to list every mod you want to override in the .mod file (or else give instructions to users on how to do it themselves), but it shouldn't be impossible. Unless it's a steam workshop thing? I've never published my stuff before, so i wouldn't know XD
Oh certainly, you could do that. But the original question wanted to override *any* other mod, except overhaul mods. This is not doable short of making a custom list of dependencies, which is problematic for a published mod. Each user will have to edit that list, which many don't know how, and their edits will get overwritten each time the mod updates. It's just not practical.
 
Hello,
I'm trying to do a population mod but I want it to read actual population, thousands and millions.

So i have a scripted effect that looks like these

pop_quantity_update = {
set_variable = { which = pop_thousands which = pop }
divide_variable = { which = pop_thousands value = 1000 }
divide_variable = { which = pop_thousands value = 1000 }
multiply_variable = { which = pop_thousands value = 1000 }

set_variable = { which = pop_millions which = pop }
divide_variable = { which = pop_millions value = 1000 }
divide_variable = { which = pop_millions value = 1000 }
divide_variable = { which = pop_millions value = 1000 }
multiply_variable = { which = pop_millions value = 1000 }
}


I'm trying to do a call test and check the variable on my character to see if the variables apear the correct numbers

character_event = {
id = population_events.100


immediate = {
set_variable = {
which = pop
value = 1150613
}
set_variable = {
which = pop_thousands
value = 0
}
set_variable = {
which = pop_millions
value = 0
}
}

option = {
pop_quantity_update = yes
}
}

when I place the code that is on the scripted effect on the event this works when I use the script instead it doesn't, is there something i'm missing or is this a code limitation ?
 
Firstly
Code:
pop_quantity_update = {
    set_variable = { which = pop_thousands which = pop }
    divide_variable = { which = pop_thousands value = 1000 } # no need to divide again only to multiply by the same number

    set_variable = { which = pop_millions which = pop }
    divide_variable = { which = pop_millions value = 1000000 } # same
}
Secondly, I wouldn't use such large numbers, if you treat 100,000 as 1,000,000 it'll keep you further from max variable, which is desirable

Thirdly, why not put the scripted effect in the immediate block? If you have it localised in the event option then it probably wont work as it hasn't processed the scripted effect when the localisation is generated.

Fourthly, The population is attached to a character? not a province???
 
No CK2 only can handle 3 decimal cases and I want the intenger number so for example
I have 1 516 613 population on the modifier what will apear on the province i want to see 1M population or 1.5M (still working that on my head)
so i need to have 3 divisions of 1000 to get 0.001 so when i multiply by 1000 I get 1 (1 000 000 and 1 000 000 000 are to large to calculate and causes negative numbers)
In every province I will have 3 variables 1 full value that only changes with events and such and pop_thousans and pop_millions that change when pop is updated
Currently attached to a character to be easier to validate.
 

Attachments

  • Population.rar
    33,3 KB · Views: 0
Just for the record problem was regarding file type I guess file ***.TXT is different than ***.txt

i-guess-im-the-idiot-then.jpg
 
  • 1
Reactions: