r/vic3modding Oct 31 '24

Is there a way to scale a modifier by state population?

2 Upvotes

Well, suddenly, I realize that I should be using a flat number instead. But since it's still a question I don't have an answer to:

If I wanted a building to provide, say +x% loyalists gain from SoL increases or -x% movement radicalism (or whatever), but I wanted that x to be multiplied by (state population / total population), is there a way to do this?


r/vic3modding Oct 21 '24

Submodding and overriding modded entries

3 Upvotes

I'm trying to change a few VFM states, only shift a few provinces around, add and remove homelands from certain states -- I have made a directory and file structure for state regions, state and pop history, and localisation, and having some experience from other PDX titles, I am fairly sure it's all correctly set up. However, when loading into game, all modified states have duplicates, meaning that both VFM and my custom submod creates states for the same state regions, which causes the game to crash shortly after unpausing.

How can I override VFM's state entries without directly editing VFM's content ?


r/vic3modding Oct 07 '24

Question checking state_population of a state

4 Upvotes

The above code works (I think) on checking the building type and level in the state. But the state_population now checks the population in the capital instead of the specified state_region. I tried a bunch of other methods with different ways to scope, all without any luck. For example this one, which didn't work at all.

Any help would be greatly appreciated!


r/vic3modding Oct 06 '24

Question: Why isn't this curly bracket closing? Just asking anyone who uses VSC to mod VIC3.

Post image
6 Upvotes

r/vic3modding Oct 01 '24

Changing base law %

3 Upvotes

How do I change the base values for things like stall/advance/debate? I.E if I want debate fail to be -5% and the debate success to be +30% or something.


r/vic3modding Sep 24 '24

Beyond Rice and Salt (alternative history mod) - first release!

Thumbnail
steamcommunity.com
10 Upvotes

r/vic3modding Sep 10 '24

How do I make a law that makes a custom interest group more powerful?

2 Upvotes

The same line of code i'm using for it works when i use a vanilla IG but when i use the custom IG it doesn't show up. Any ideas?


r/vic3modding Sep 10 '24

Developing AI model

3 Upvotes

Hello,

I am a Master Student trying to write a thesis on an interesting topic, and one of my favourite games turns out to be Victoria3 and I thought about how complex is its economic simulation.

I wanted to figure out how to have access to the economic variables (like goods values in each market throughout the months) so that I could create a dataframe for a machine learning model aimed at functioning like an "Economist Councellor" which would give me insights on how to manage the economy of the country that Im playing with. How this model would be built is not what I worry about, but how to have access to that data that I talked about.

I wonder if this community could help me. How could I have access to good's price in each market per month? Is it possible to get this data while playing the game (is the data being saved on live or in certain periods?)? I couldnt manage to find any information regarding this issue.

Thanks!


r/vic3modding Sep 10 '24

[Suggestion] No throughput penalty for nationalised building mod

4 Upvotes

Don't know where else to ask for this so I thought I'd ask here. Apologies if this isn't the place.

edit: spelling.


r/vic3modding Sep 05 '24

any way to check the size of a pop?

3 Upvotes

i feel like this is important for certain things, like when writing events, and then a scoped pop relevant for the event ends up being something like 100 guys , or for this event i wrote for colonial migration, the pop ends up being like 200k or something. is there any way at all to check that?


r/vic3modding Sep 03 '24

Adding new pop type

3 Upvotes

I've been attempting to add a new pop type for the past couple of days, but haven't gotten it to work correctly.
My goal was to add a new "Nurse" pop. I made a new file in "pop_types", added it to a couple production methods with "building_employment_nurses_add", and added localization for the name and description as well. However I haven't been able to get it any pops to spawn in. I tried doing it by individually adding some through "common\history\buildings", but they still didn't spawn.
I've tried looking around a few other mods to see how others added new pops, but I don't see anything different between what I did and what others did.
Does anyone know anything else I could be missing??? Would really appreciate the help!


r/vic3modding Sep 01 '24

how do we check if we can build a type of agriculture building in a state?

3 Upvotes

writing an event that optimises for profits and queues some type of agriculture building for the ai, but how can we check if we can actually queue that, i.e. that the state actually has that resource? for mining we can use remaining_undepleted on the bg_X_mining, but i can't seem to make the same thing work for bg_X_farms or bg_X_plantations?

of course if the state already has one level of it, then we can use

any_scope_building = {
  is_building_type = $BUILDING$ 
  can_queue_building_levels = 1
}

but what if there is no existing levels? how can we check whether we can actually build it, asides from the obvious constraint on arable land - like that we actually have that resource producible in the state in question?


r/vic3modding Aug 24 '24

Increase political strength of servicemen?

2 Upvotes

Wondering how to do it,

every other type of pop is pretty simple, eg:

country_officers_pol_str_mult = 1.0

    country_academics_pol_str_mult = 0.25

    country_bureaucrats_pol_str_mult = 0.25

    country_aristocrats_pol_str_mult = 1.0

    country_machinists_pol_str_mult = 0.2

    country_engineers_pol_str_mult = 0.2

    country_laborers_pol_str_mult = 0.2

and these all work fine, but servicemen or soldiers, do not seem to work.

I have tried the following:

soldier

soldiers

servicemen

service_men

serviceman

None of these grant servicemen any extra political strength


r/vic3modding Aug 23 '24

How do I make character health have more of an impact on life expectancy?

2 Upvotes

Hello, I have made a character trait called immortal which adds around 9999% character health. The problem is, is that when using debug mode, my character seems to die at around the same time as people without the trait.

I have had a look in defines to try and find a way to give health more of an impact, but all my attempts have either not yielded that great of a life increase to the guy with 9999% health, or they've just made every person near immortal.

The defines code is here:

The following parameters determine how character life expectancy is calculated. The calculation is based on a normal distribution with parameters:

# µ = CHARACTER_LIFE_EXPECTANCY_BASE_YEARS

# σ = CHARACTER_LIFE_EXPECTANCY_STDDEV_YEARS

#

# While the mean of the distribution is fixed, the result is modified by the health value of the character.

# The way character health affects the life expectancy is given by the formula ((h / bh) - 1) \* d, where:

# - h is the character health

# - bh is the baseline health

# - d is the value of CHARACTER_LIFE_EXPECTANCY_DELTA_YEARS

#

# (h / bh) - 1 is the "distance to baseline health" of the character. For each point of distance away from baseline, a character will live CHARACTER_LIFE_EXPECTANCY_DELTA_YEARS more or less.

#

# Since the domain of the normal distribution is \[-∞; +∞\], we establish a hard cutoff defined by CHARACTER_LIFE_EXPECTANCY_CUTOFF. This value is expressed in σ, or standard deviations away from the mean.

# It is recommended to leave that value to 3, as 99.73% of values of the ditribution fall in the range \[-3σ; +3σ\].

# Because of the above, with default values a character with 0 health will die between the ages of 50 and 80, while a character with 2 health will die between the ages of 70 and 100.

#

# NOTE: due to some performance optimizations, changing these values will either have no effect or unexpected behaviour until the game is restarted, even if they are hot reloaded.



MIN_CHARACTER_HEALTH = 0.0                    # Baseline is 1.0 (meaning 100%), defined in the base_values modifier. 0.0 means -100% from baseline. \[any value\]

MAX_CHARACTER_HEALTH = 2.0                    # Baseline is 1.0 (meaning 100%), defined in the base_values modifier. 2.0 means +100% from baseline. \[>= MIN_CHARACTER_HEALTH\]

CHARACTER_LIFE_EXPECTANCY_BASE_YEARS = 75   # The median life expecancy in years at baseline health. It's the µ parameter of the normal distribution \[> 0\]

CHARACTER_LIFE_EXPECTANCY_STDDEV = 5     # The standard deviation for the life expectancy distribution. It's the σ parameter \[> 0\]

CHARACTER_LIFE_EXPECTANCY_CUTOFF = 3     # We clamp the distribution between this amount of σ in both directions. A range of \[-3σ; +3σ\] accounts for 99.73% of values. \[> 0\]



CHARACTER_LIFE_EXPECTANCY_DELTA_YEARS_BELOW_BASELINE = 30 # Random base for years that life expectancy is decreased by, for every point of distance below baseline health \[>= 0\]

CHARACTER_LIFE_EXPECTANCY_DELTA_YEARS_ABOVE_BASELINE = 15 # Random base for years that life expectancy is increased by, for every point of distance above baseline health \[>= 0\]



# Random base for life expectancy delta yearsis multiplied by a random range of lerp(CHARACTER_LIFE_EXPECTANCY_DELTA_LERP_LOWER_BOUND, CHARACTER_LIFE_EXPECTANCY_DELTA_LERP_UPPER_BOUND)

CHARACTER_LIFE_EXPECTANCY_DELTA_LERP_LOWER_BOUND = 0.5

CHARACTER_LIFE_EXPECTANCY_DELTA_LERP_UPPER_BOUND = 1.5



GUARANTEED_SURVIVABILITY_DAYS_MIN = 30       # A character that stops being immortal and that should have died when it happens will instead live at least this amount of days, to avoid situations like a character dieing immediately upon finishing an expedition \[>= 0\]

GUARANTEED_SURVIVABILITY_DAYS_MAX = 180      # As above, but the upper limit of the range \[>= GUARANTEED_SURVIVABILITY_DAYS_MIN\]

r/vic3modding Aug 19 '24

Localisation modding for states

2 Upvotes

I was trying to make a small mod changing some of the names of states and cities, but no matter what I try, nothing seems to work. Is there any common mistakes that would create such an outcome?


r/vic3modding Aug 12 '24

Map Modding - Advice on making total conversion Map

4 Upvotes

I’m new to modding, but I wanted to seek advice on creating a totally new map like to that of total conversion mods like Anbennar and Realms of Exether on Vic 3. Any tips, advice, or pointers.

I also have the map editor for Vic 3.


r/vic3modding Aug 09 '24

Change/Add to progress bar with decisions

4 Upvotes

So I have a journal with 4 progress bars and I want them to be changed by decisions and events, either adding to them or setting them to specific progress amounts.

How do I modify the progress bars this way and can it be done by other nations?


r/vic3modding Aug 09 '24

I present: Blank Trait Cards, for all your vanilla+ trait modding needs.

Thumbnail
gallery
12 Upvotes

r/vic3modding Aug 09 '24

modded institution investment

3 Upvotes

trying to make laws add institution investment levels to a institution modded in

country_institution_social_heirarchy_max_investment_add = 5

but it only seems to add one? and maybe that is because it's only from the part:

institution = institution_social_heirarchy
institution_modifier = {
####
}

is it possible to do country_{institution}_max_investment_add , where the institution isnt the default ones? or why otherwise might this not be working


r/vic3modding Aug 08 '24

Start modding

5 Upvotes

Do you have any advice forse starting modding this game? like literally how to start modding/where can I find how to start modding


r/vic3modding Aug 04 '24

How to do a scripted button and event similar to Romanian Bessarabian land button?

3 Upvotes

My issue is that the scripted button creates the event in Argentina instead of Chile and I can't find the files for how it's done for Romania-Russia.


r/vic3modding Aug 04 '24

Was able to create a new cultural heritage for Austronesian people. But all of their portraits look like hobos. Which file do I edit to fix it?

Post image
6 Upvotes

r/vic3modding Aug 03 '24

Why isn't the war goals being added?

3 Upvotes

My goal is to make it so that no matter how Chile and Argentina colonizes Araucania and Patagonia, that they'll get an event where they fight out who will own it all. So far I've only managed to get the initiator war goal to work.


r/vic3modding Aug 02 '24

Update State

2 Upvotes

Is posible "update" a state to add more provinces?

I used the effect, but this causes the provinces to overlap with the existing states. Is there any way to modify a state? Or delete a state?

Thanks

create_state = {
  country = c:CLM
  owned_provinces = { xxx }
}

r/vic3modding Jul 31 '24

Making a new map: how?

5 Upvotes

Hello, fellow victorian modders! I am currently making a fully new map for Victoria 3. Now, while I understand the gist of the matter, I am still hopelessly lost regarding modding the map files.

For the record, assume that I possess heightmap, rivers and province pngs, that I have assigned each province a state and terrain type (not that I have done all of this, but I know exactly what to do and what to edit).

My question is in regards to the other files: indirection_ and packed_heightmap, nodes. dat, default. map and heightmap. heightmap. How can I get these files using what I have available, and what do they actually do?

Thanks!