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

Divine

Tech Lead
Paradox Staff
33 Badges
Dec 26, 2005
587
1.075
  • Semper Fi
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For the Motherland
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Magicka: Wizard Wars Founder Wizard
  • Magicka 2 - Signup Campaign
  • Stellaris Sign-up
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
This thread is meant to keep you updated on what modding features the Usermod Coordinators (currently myself and @Captain Gars). We will regularly post here on what we implement to the game. Feel free to comment or ask questions about the things that we have implemented in this thread. However this is NOT the thread for making suggestions for modding features or reporting bugs there are other threads for that purpose already.

FAQ:
Q:
When will we get these features that you post about?
A: In an upcoming patch. We don't really have too much to say about when our stuff will hit the live versions but if we deem them important or game-breaking for mods we are probably already pushing for releasing our fixes.
 
  • 12
  • 1Like
  • 1
Reactions:
There are some fixes in it that will not be posted here but should be available in the changelog for the patch. But from now on we will try to keep this thread updated with most of the relevant modding additions.

Updates:
- Added num_energy trigger.
- Reading a single on_action entry from multiple files will now append the events to the list entry rather than overwriting it. This should allow more mods to be compatible.
- Prescripted countries can now set the attribute "disallow_editing = yes" to disable the edit button in the Empire selection view before game start.
 
  • 9
Reactions:
Will you be adding the dummydefines.lua to the game like in ck2? I think it would make modding the defines a lot clearer to noobs and i believe Captain Gars had commented on the idea.
We've added a header comment in the 00_defines.lua explaining how to go about when modding define values.

If you want to replace a specific on_action, how can you do that after this change?
You have two options. The straight-forward version is to replace the 00_on_actions.txt with your own on_actions file (either by using the same name or by using replace_path in the .mod file). This will however require you to keep your own on_actions file with all the relevant on_action entries that you want to keep alive and will likely make your mod incompatible with other mods that are replacing the on_actions file.

The other way would be to instead replace the event files that keep the events that are fired from the on_action entry you would like to avoid. If you remake these events to hide_window events with either an empty immediate or option they are basically null events that will have no effect. If they have a place in the random events list then also make sure to put a modifier on the events weight_modifier with an always = yes trigger and factor = 0.

It will still be a bit messy to replace things in the on_actions file but at least it's easier to append things now. I hope this will help some modding efforts.
 
  • 4
Reactions:
On appending items to random_events in on_actions:

I would like to add some random colony events but I would like to keep the overall frequency the same. At the moment, in on_colony_1_year_old, the first line of random_events is "300 = 0", and the total weight of other events in core is around 25, leading to 10% event chance.

Let's say I now add another 25 total weight of new events, leading to roughly 50 event weight total in the modded version. Would I be able to add another "300 = 0" line in the modded on_colony_1_year_old.random_events, so that the total weight of "no event" is 600, and thus the original ratio of 10% is preserved?

Thanks!
 
Where would be the best place to request new effects/triggers or just more modding abilities in general?

Some effects I would love to see:
get_species_name =
set_species_name =
change_founder_species = (change_dominant_species seems to do nothing/be broken)

And the ability to set weights on species_classes being chosen by ai (rather than just randomized = yes/no)

Got plenty more, but I don't want to spam the thread if this isn't the place for it.
 
On appending items to random_events in on_actions:

I would like to add some random colony events but I would like to keep the overall frequency the same. At the moment, in on_colony_1_year_old, the first line of random_events is "300 = 0", and the total weight of other events in core is around 25, leading to 10% event chance.

Let's say I now add another 25 total weight of new events, leading to roughly 50 event weight total in the modded version. Would I be able to add another "300 = 0" line in the modded on_colony_1_year_old.random_events, so that the total weight of "no event" is 600, and thus the original ratio of 10% is preserved?

Thanks!
Yes, from reading the code I think it should be possible to have multiple empty entries (actually it also seems possible to have multiple entries with the same event-ids).

Where would be the best place to request new effects/triggers or just more modding abilities in general?

Some effects I would love to see:
get_species_name =
set_species_name =
change_founder_species = (change_dominant_species seems to do nothing/be broken)

And the ability to set weights on species_classes being chosen by ai (rather than just randomized = yes/no)

Got plenty more, but I don't want to spam the thread if this isn't the place for it.
https://forum.paradoxplaza.com/forum/index.php?threads/modding-suggestions.928316/
This thread is supposed to be dedicated to modding improvement suggestions.
 
  • 1
Reactions:
My question has to do with Name Lists. We can see the official name lists, and by digging through the army name files I found titan armies could be named, while the planet classes showed pc_nuked, and pc_gaia which weren't on the name lists.

Would it be possible to get an official list of rules, and list of things that can be named?
 
Was something changed with the country_types in 1.1.0? A country I created before the patch perfectly fine is now getting some error about colonies even though it is set to not need colonies and its hostile even with is_hostile = no set.
 
Any chance of giving users a way to order mods?
Current issues:
  • FIles with the same name in multiple mods - only the file in the mod highest in the alphabet loads. This means older steam mods (which have a lower number) take precedence.
  • Files with different name in multiple mods - the file lowest in the alphabet loads. (zz_* > aa_*)
  • If the file is alphabetically higher than "00_" then it loads before the default game files (you can see the problems with that)
Most of these problems are documented here:
https://forum.paradoxplaza.com/foru...-problems-with-mods-solution-proposed.934510/

I'd also like to mention it would be lovely if there were more variables in the UI files.
ie: At the top of each UI file:
@containersize = 660
And then reference @containersize & use it for sub-containers/scroll bars etc

ie: customize_species_editors.gui
Code:
@containersize = 660

containerWindowType = {
        name = "species_portrait_editor"
        moveable = @movable_editors
        position = { x = -400 y = -10 }
        size = { width = 1030 height = @containersize }
}
        smoothListboxType = {
            name = "categories"
            position = { x = 12 y = 50 }
            size = { x = 150 y = { @containersize -95} } #instead of a fixed number
}
(code simplified)
Oh I didn't see the suggest thread. I also put the UI variable suggestion over there.
 
Was something changed with the country_types in 1.1.0? A country I created before the patch perfectly fine is now getting some error about colonies even though it is set to not need colonies and its hostile even with is_hostile = no set.

After some testing it seems something was changed, I have reported it as a bug.
 
- The Ruler entry in pre-scripted countries now allow ruler traits to be defined.
- change_dominant_species now allows last_created as argument.
- create_new_species effect now allows a namelist entry. Valid right-hand-side arguments for namelists are random which picks a random namelist, random_class which picks a random namelist but limits it to the same class (namelists must be named <tag># to be considered as a member of that classtag), a tag for a namelist or a scope of country/pop/species/leader-type.
 
Last edited:
- change_dominant_species now allows last_created_species as argument.
That already works? I'm using the line:
Code:
change_dominant_species = last_created_species
And it works perfectly already. Did you mean something else?

And can these changes be expected when 1.1 comes out or are we looking at 1.2?
 
Does max_influence exist as a modifier, or can it be added?
 
That already works? I'm using the line:
Code:
change_dominant_species = last_created_species
And it works perfectly already. Did you mean something else?

And can these changes be expected when 1.1 comes out or are we looking at 1.2?
Oh, you learn something new every day. I actually meant that last_created should now be a valid argument. Another modder pointed out that last_created worked in some other effects but not this one. So at least now it's consistently overdone with other effects.

About the relevant patch for our changes it's not in our power and we don't know either unless we're pushing a fix for specific problems that would be total showstoppers for modders. So it's just to keep an eye on the changelogs.

Does max_influence exist as a modifier, or can it be added?
max_influence exists as a modifier and should work in the same way as max_energy or max_minerals. Trying to keep things tidy in this thread however I would prefer if these questions are asked in the quick questions thread and if it's a non-existent mod functionality that you would request then post in the suggestions thread. This thread is meant to give the possibility to comment or ask questions about the implemented changes.
 
Last edited:
- The Ruler entry in pre-scripted countries now allow ruler traits to be defined.

So like this?

Code:
    # Ruler
    ruler={
        gender=female
        name="Kathleen Savage"
        portrait="human_female_04"
        texture=0
        hair=1
        clothes=4
        ruler_title="King"
        ruler_title_female="Queen"
        trait="trait_ruler_logistic_understanding"
        trait="leader_trait_fleet_organizer"
    }
 
- Added calc_true_if trigger.
Example usage:
Code:
calc_true_if = {
    amount = 2
    has_monthly_income = { 
        resource = energy
        value > 5
    }
    has_monthly_income = { 
        resource = minerals
        value > 5
    }
    has_monthly_income = { 
        resource = influence
        value > 5
    }
}
Which will return true if you have more than 5 monthly income in at least 2 out the three resources designated by the triggers. Inside the calc_true_if block any trigger should work.
 
  • 2
  • 1
Reactions: