• 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.
I currently have two unresolved problems invloving my 900AD scenario/bookmark:
  1. There is this dude Mozaffar Mozaffrid who appears every time I load this scenario as a Persian ruler in some part of Persia. I would like to be able to give him an emirate but I have been unable to find him or his char id in any of the game files (I have searched in most of the folders, ex. interface is one of the few game folders I have not searched for him). Could someone explain this?
  2. Also in this start date, I would like to change certain provinces' religion from Jewish to tengri: Tana, Sarpa, Don-Portage, and Sharukan. However, whenever I go into the province history files I see only that they start out as Tengri provinces in 769, and later switch over to Sunni. What is it that makes this provinces Jewish? I would like to know so I can make them not Jewish for my start dates and purposes.
In addition, I need some more longterm help with events, if anyone is interested

1. If you haven't used charinfo to get his character id definitely try that. Otherwise, I believe there may be some sort of seed that creates some pseudorandom characters the same at the beginning. Could be wrong, but I feel like some of the generated characters always get created very similarly.

2. I believe you are talking about the religion of provinces with no holdings that are held by the Khazars, and provinces instantly change religion and culture to the religion and culture of their holder once the last holding is destroyed. So you could change the province to any religion but as soon as a Jewish Khagan takes control of it and there are no holdings it will revert to Jewish.
 
How do you mod defines.lua?

I want to change VASSAL_LIMIT_EMPEROR_MULT = 30.0 to VASSAL_LIMIT_EMPEROR_MULT = 50.0

Creating a new file in mod/Mymod/common/defines and copying this into it"NDefines.NDiplomacy.VASSAL_LIMIT_EMPEROR_MULT = 50.0" does nothing.
 
How do you mod defines.lua?

I want to change VASSAL_LIMIT_EMPEROR_MULT = 30.0 to VASSAL_LIMIT_EMPEROR_MULT = 50.0

Creating a new file in mod/Mymod/common/defines and copying this into it"NDefines.NDiplomacy.VASSAL_LIMIT_EMPEROR_MULT = 50.0" does nothing.

If you have conclave enabled there is a separate set of defines for vassal limit.
 
If you have conclave enabled there is a separate set of defines for vassal limit.
Thanks! I found the second set of values!

Was my method correct? - setting up a file in common/defines in the format NDefines.N.Diplomacy.XXX

What do I name the file? Mymod_defines.lua, okay?

What if I want to edit the stats of a unit type in defines.lua, how do I do that?
 
Thanks! I found the second set of values!

Was my method correct? - setting up a file in common/defines in the format NDefines.N.Diplomacy.XXX

What do I name the file? Mymod_defines.lua, okay?

What if I want to edit the stats of a unit type in defines.lua, how do I do that?

Yeah, your method is correct. You can name the file whatever you want as long as it's in the common/defines/ folder, and then it will overwrite the lines as you have written in the first post.

Each line in the master defines.lua is inside an NDefines bracket block, and inside that you have nested blocks like NDiplomacy, NMilitary, etc. You can give new values to any of those by having a line like:
Code:
NDefines.NDiplomacy.WHATEVER = xxx

Just make sure not to add commas to your overwrite file like exist in the master file. Checking out an example like in CK2+ is always a good idea.
 
Did a recent patch change the syntax for dependencies in a .mod file? I'm updating an old mod of mine and having two mods listed there now causes a ctd after a few in-game days, when it used to work like a charm in 5.2.
 
1. If you haven't used charinfo to get his character id definitely try that. Otherwise, I believe there may be some sort of seed that creates some pseudorandom characters the same at the beginning. Could be wrong, but I feel like some of the generated characters always get created very similarly.
I will try using charinfo to get his id, but I'm not sure it will work. I figured out what you said about pseudorandom characters so I searched his name and birth date (which is always the same!) in each of the folders it could be in (most of them actually, just not interface, launcher, music, sound, and soundtrack pretty much).

As for #2 that's good to know. It explains why the provinces' religion wasn't reflecting what it was set to in the province history files.
 
I've heard that the monthly_character_wealth command for character modifiers doesn't work. In game, it shows up but doesn't appear to do anything. If I want to leave it as a kind of tooltip, and make an event to deduct money each month, will that break anything?
 
A question I'm certain has been asked before but I cannot find it after a quick search soooo.

Can you mod the amount of commanders you can have? Or is it not possible as I would like to have more than vanilla.
 
A question I'm certain has been asked before but I cannot find it after a quick search soooo.

Can you mod the amount of commanders you can have? Or is it not possible as I would like to have more than vanilla.
They're in defines, and you can also mod them for government types. Check out the nomad government type for an example in vanilla.
 
A question I'm certain has been asked before but I cannot find it after a quick search soooo.

Can you mod the amount of commanders you can have? Or is it not possible as I would like to have more than vanilla.

It probably is in the defines.lua file (under \common). To modify this file you can either modify the existing file from within your mod directory, or create a new file in a defines folder called changes.lua and add the following two lines of comments at the top followed only the lines you wish to change,

--- Format for overwriting define values:
--- NDefines.NDiplomacy.DEMESNE_BASE_MAX_SIZE = 2.0

Does that make sense?
 
Any ideas, why game don't see this? I have "potential", "ai_will_do" etc. as targetted decisions...

Code:
targetted_decisions = {
   anti_curse_balwan = {
       is_high_prio = yes
       filter = sub_realm
       ai_target_filter = sub_realm
       only_playable = yes
       from_potential = {
           is_alive = yes
           is_adult = yes
           controls_religion = no
           independent = yes
           religion = slavic_pagan_reformed
           primary_title = { higher_tier_than = DUKE }
           NOT = {
               has_character_flag = { flag = byzsla_interakcje_1 }
           }
           OR = {
               has_character_modifier = perun_curse
               has_character_modifier = mokosz_curse
               has_character_modifier = rod_curse
               has_character_modifier = svarog_curse
               has_character_modifier = jarilo_curse
               has_character_modifier = dadzbog_curse
               has_character_modifier = lada_curse
           }
       }
       potential = {
           is_alive = yes
           FROM = {
               is_liege_of = ROOT
           }
           religion = slavic_pagan_reformed
           is_theocracy = yes
           learning = 13
           OR = {
               tier = duke
               tier = king
           }
           is_ruler = yes
           is_title_active = d_slavic_pagan_reformed
       }
       allow = {
           FROM = { diplomacy = 15 }
           FROM = { piety = 100 }
           FROM = { treasury = 100 }
           war = no
           prisoner = no
       }
       effect = {
           character_event = { id = byzsla_slavic_event_interakcje.1 days = 2 }
           FROM = {
               set_character_flag = byzsla_interakcje_1
               piety = -100
               treasury = -100
           }
       }
       ai_will_do = {
           factor = 0.05
       }
   }
}
 
Can you use hyphens for an event name like that? I've never seen it done before.
Problem isn't with "effects", but problem is that game don't read this correct.
You method also don't work.

EEA8A24757BE886860888008C544C5CA0213C30C
 
Last edited:
Problem isn't with "effects", but problem is that game don't read this correct.
You method also don't work.

EEA8A24757BE886860888008C544C5CA0213C30C
If it's doing that, there's likely a mismatch of brackets somewhere, if not in that decision, in one above or below it.
 
If it's doing that, there's likely a mismatch of brackets somewhere, if not in that decision, in one above or below it.
In Notepad++ i see, that all brackets are OK (test by "brackets check plugin")
 
Last edited:
Any ideas, why game don't see this? I have "potential", "ai_will_do" etc. as targetted decisions...
Technically, you do have extra brackets.
Code:
               has_character_flag = { flag = byzsla_interakcje_1 }
'flag' is not a valid. Use has_character_flag = byzsla_interakcje_1 instead.
 
Last edited: