Victoria 3

Victoria 3

Profiling-based Optimization (Performance Mod)
Danarca 7 May, 2024 @ 10:12am
Error in the Red Scare optimization part; and a (possibly?) speedier solution
So I went digging into your code a bit since my mod team for Imperia wanted to see what you had done (hope this causes no offense!) and found that your on_yearly_pulse_country on_action was broken. It was lacking the 'effect = {' bit :p

So I changed a few bits around, so in our mod it looks like this;
on_imperia_half_yearly_pulse_country = { effect = { # Resets the global list twice per year only # Instead of [every_country -> every_country] x yearly if = { limit = { has_global_highest_gdp = yes has_global_variable = labor_movement_researched } clear_global_variable_list ?= council_republics_list every_country = { limit = { has_law = law_type:law_council_republic country_rank > rank_value:minor_power } add_to_global_variable_list = { name = council_republics_list target = THIS } } } } }
As you can see, instead of doing this yearly pulse on every country in the world, it now fires twice a year for the highest GDP nation instead, only if its relevant (the labor movement researched).

I hope you don't mind us borrowing your logic on this, we can certainly credit you in the next version!
< >
Showing 1-1 of 1 comments
Brute  [developer] 9 May, 2024 @ 5:42am 
I feel so honored that my work might be of help to other fellow modders! I have realized that there's a problem with my implementation but I didn't have the time to figure it out, and your solution is definitely a huge progress compared to mine! (Mine was rather crude and something that I came up on the spot)
I will probably have to postpone my modding work after the release of the new DLC, as I've been quite occupied in real life, but thank you so much for your suggestion! And of course take whatever that might help you in your own mod! I am a modder for EU4's MT3.0 so I know how crucial optimization is for large mod projects. I would be glad if it does help!
< >
Showing 1-1 of 1 comments
Per page: 1530 50