• 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.
It gives this message when I try to do that:


1604173117729.png
 
Way to count districts?

I'd like to write a script that destroys half the number of a specific district on a planet. Since there doesn't seem to be an iterator for districts like "every_district", the usual method of counting stuff with a variable seems like a no-go.

Does anyone know of a solution?
 
Would greatly appreciate some help with system initializers and the game error log: :)

I am trying to update for my own personal use a mod that is no longer being updated by the author. There are a some errors that I have no idea how to fix. If someone could help me understand the basic logic with the one example it would give me a starting point.

Basically my question is how does the math add up to more than 500 for the outer radius??????

The initializer ( I think ) is attached and the game error log entry is:

Code:
[20:45:23][galactic_object.cpp:1877]: System Coggan with initializer FEE_fallen_8 is too big. Make sure the outer radius is smaller than 500.

The mod seems to run fine so maybe I can just keep ignoring the errors?

thanks
 

Attachments

  • FEE_homeworld_eternal_citadel_initializer.txt
    10,4 KB · Views: 0
Last edited:
Code:
[20:45:23][galactic_object.cpp:1877]: System Coggan with initializer FEE_fallen_8 is too big. Make sure the outer radius is smaller than 500.

The mod seems to run fine so maybe I can just keep ignoring the errors?

Yes, you can safely ignore that particular error if the custom system is working fine.
 
  • 1
Reactions:
Code:
planet_event = {
    id = test.2
    hide_window = no
    is_triggered_only = yes

    pre_triggers = {
        has_ground_combat = no
        is_occupied_flag = no
    }

trigger = {
        is_majority_species = event_target:test_species
    }
   
    <...>

I'm having trouble getting this planet event I'm working on to work. It's supposed to trigger when the target planet has at least two species, and a species with a particular trait outnumbers the other. The set-up event (which checks for the conditions and saves the global event target) appears to be working fine, but every time I test this event, the trigger condition comes up false, even when there's clearly more of test_species.

Am I misinterpreting how is_majority_species works, or just using it wrong?

Edit: By the way, this is the code in the set-up event that saves the event target.

Code:
                    random_owned_species = {
                        limit = {
                            species = {
                                has_trait = trait_test_trait
                            }
                        }
                        species = { save_global_event_target_as = test_species }
                    }
 
I'm looking to create a new weapon. I've added the technology, the component template, and component set. Now I'm looking to add the game data (range, rate of fire, damage per shot, etc.). I found the .ods/.csv files in the common/component_templates folder, but I am unsure if I should copy the existing file and add my rows or if I should create a new file of just my rows for my mod.

Basically, are mod versions additive or do they replace the base game version?
 
Hello there !

I'm doing some event modding here, nothing crazy but I have a small problem (curious yeah ? ^^) I can't find how to put the ethic icons in the options of the event like here :

If someone know how to do it or have a small portion of code which show it I would be grateful !

EDIT : It seems that it is in fact implicit. Like in theses examples the "trigger" is linked to the presence of the icon or not.

Code:
    option = {
        name = crisis.1050.g
        trigger = {
            owner_species = { has_trait = trait_psionic }
        }
        response_text = crisis.1050.g.response
    }
    option = {
        name = crisis.1050.a
        response_text = crisis.1050.a.b.response
        trigger = {
            OR = {
                has_authority = auth_machine_intelligence
                owner_species = { has_trait = trait_mechanical }
            }
        }
    }
 
Last edited:
How to give all AI-player +5000 f.e society research points in an event directly after start in their storage?

For me in the event
Code:
add_resource = {
    unity = 10000
    physics_research = 100000
    society_research = 100000
    engineering_research = 100000
}

just unity works but not the research-adds to storage
 
Hello ! Is there a condition that checks the admin_capacity of a given empire? Or percentage of admin_cap used? Or count over admin_cap? I've searched but am unable to find one. The closest condition I could find is empire_size, which measures empire sprawl. However, I want my trigger to be based on empire_size - admin_cap (as in how much over or under admin_cap an empire is). I am trying to write AI weighting for a set of policies that add/remove admin_cap and other benefits/maluses, and want the weights to be dependent on how much admin_cap the AI is utilizing.
 
Hello ! Is there a condition that checks the admin_capacity of a given empire? Or percentage of admin_cap used? Or count over admin_cap? I've searched but am unable to find one. The closest condition I could find is empire_size, which measures empire sprawl. However, I want my trigger to be based on empire_size - admin_cap (as in how much over or under admin_cap an empire is). I am trying to write AI weighting for a set of policies that add/remove admin_cap and other benefits/maluses, and want the weights to be dependent on how much admin_cap the AI is utilizing.
There is:
empire_sprawl_over_cap

Used like this (country scope)
empire_sprawl_over_cap > 20
 
  • 1Like
Reactions:
Way to count districts?

I'd like to write a script that destroys half the number of a specific district on a planet. Since there doesn't seem to be an iterator for districts like "every_district", the usual method of counting stuff with a variable seems like a no-go.

Does anyone know of a solution?
I'd probably brute-force it, use something like:
Code:
if = {
    limit = {
        num_districts = {
            type = your_district
            value <= 2
        }
    }
    set_variable = {
        name = your_variable
        value = 1
    }
}
else_if = {
    limit = {
        num_districts = {
            type = your_district
            value <= 4
        }
    }
    set_variable = {
        name = your_variable
        value = 2
    }
}
...etc
while = {
    count = your_variable
    remove_district = your_district
}
And you can alter that depending on whether you want to round up or down.
 
So is there an effect that you can run on a system to get sensor data of it? Essentially what I mean is make it look like a science ship has been sent to explore but not survey it.
 
So is there an effect that you can run on a system to get sensor data of it? Essentially what I mean is make it look like a science ship has been sent to explore but not survey it.

Only thing in vanilla is to get better sensors. I'm sure there are quite a few mods that would allow you to do that though.
 
Is there a pop happiness modifier for synths, similar to biological_pop_happiness and lithoid_pop_happiness?