• 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.

-Rodri-

First Lieutenant
7 Badges
Feb 2, 2007
211
29
  • Crusader Kings II
  • Europa Universalis IV
  • Hearts of Iron III
  • Supreme Ruler 2020
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: Pre-order
Hi!
This would be a thread to ask those quick questions about modding that maybe doesn't deserve a thread of its own.
So let me start with one:
How can I get the prices a certain strata pays for al the goods it consumes?
 
Is economic migration hardcoded? It appears to be, based on the files I've been looking through. I can shift various percentage chances around but I can't find what I'd need to change to allow economic migrants to leave their own market, for example.
 
I have a perhaps complicated question.

I would like to generate a new state, which I was able to do by adding entries in several files.

However, the visual assets on the map (cities especially) seem to be linked to the state for some reason. For instance splitting a state into two (one new state entry) caused the existing city to remain small (no growth), however relocating it to the new confines of the original/vanilla (no split) state did ensure it was visually growing.

Considering this effect, I started to look into how we can add new map objects, such as cities, farms, wood, mine etc. However I haven't been able to do so successfully. I looked into all the files, and eventhough I tried adding an entry in the "Victoria 3\game\gfx\map\map_object_data" files belonging to these assets respectively, it doesn't seem to add anything on the map.

So, in short: how can we add new cities/farms/mines/wood/ports and link these to their respective state?
 
I made a separate post before this was created; anyways how do I make a single province State into a Treaty Port?

I can create a Treaty Port with zero population with the code below
s:STATE_SHENGJING = {
create_state = {
country = ROOT
owned_provinces = { x709001 }
state_type = treaty_port
}
}
I can take the single province but is not a Treaty Port with the code below

s:STATE_SHAOZHOU = {
set_owner_of_provinces = {
country = ROOT
provinces = { xB03161 }
}
state_type = treaty_port
}
 
not really but I get the same bug message for just > or < conditions
If you start the game in debug mode from the launcher and open the script editor you can see all the authorized trigger/scope/effect commands.
 
I was told in another thread there is no MTTH event triggers in this game (can't confirm).
 
script trigger:
"year >= 1840"
console when calling event:
(BUG: year_greater_or_equal_missing_perspective)
what does it mean?

Try:

game_date >= 1840.1.1
 
is there a more ergonomic way of making lists of event targets?
The syntax of add_to_list only seems to take a single target at a time. If I want to create a list of, for example, provinces, I think I need to write:

add_to_variable_list = { name = prov_list target = p:x212F2F } add_to_variable_list = { name = prov_list target = p:x94CB2D } ...

I was hoping I could use some syntax like:
add_to_variable_list = { name = prov_list target = { p:x212F2F p:x94CB2D ...} }

On the subject of provinces, does anyone know if its possible to access the id/transfer ownership of the province from the province scope?
I know that set_ownership_of_provinces takes a hardcoded province hex code list, but I can't seem to invoke it dynamically (e.g. I can't pass a list of provinces scopes to it)
 
Has anyone figured out how to use use "replace_path" in modding? I'm working on a new map but if I put "replace_path" or "replace_paths" in metadata.json it just loads the vanilla map.

Edit: The problem is of course a comma, I needed it after "multiplayer_synchronized" : true,

I currently have:
"game_custom_data" : {
"multiplayer_synchronized" : true
"replace_paths": [
"common/history/states",
"common/history/pops",
"common/history/buildings",
"map_data/state_regions",
"common/strategic_regions"
]
}
 
Last edited:
I'm having some issues trying to figure out modding interest group preconditions, replacing the following block:

enable = {
always = yes
}

Something like THIS = c:[tag] works fine, as does country_has_primary_culture = cu:japanese. But army_size >= 10, has_law = law_type:law_professional_army, and has_port = yes seem to have no effect at all that I can see.

Any advice on why some things would work here but not others would be immensely appreciated.
 
1. Is there a way to force a country to start enacting a law by a scripted effect?
2. The files refer occasionally to an interest group being "insurrectionary", but what does this actually mean?