• 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.
Is it possible to create mod(s) that will:
1) save extra research point that wasn't needed to finish a tech. Example: empire produces 4999 points of research, starts to research some tech that costs 5000, finishes research in two months with 4998 research points overhead. Is it possible to save overhead in either way?
2) allow to auto-pick cheapest tech via policy? Can be usable in lategame, when all research came down to pick-alternative-techs-tier-by-tier routine.
 
hi, if a friend want to work with me on a mod....how this work? hed copied all files in his mod ordner and rewrite the path in the descriptor and the modname.mod file. but the launcher dont accept it.

how can he work with the mod, and upload it to the workshop too?
 
Hi,
Just need to know how to retrieve an empire name and how do you check if it matches a specific list of names. (im assuming its is with an if statement but unsure as to how that translate in stellaris)?
Thanks in advance
 
Could someone please tell me what I have to change in this event code in order to make the chance to steal Relics 100%?

### RELIC THEFT

# Relic Acquired (HIDDEN)
country_event = {
id = ancrel.6499
hide_window = yes

is_triggered_only = yes

trigger = {
From = {
is_country_type = default
num_owned_relics > 0
}
FromFrom = { is_capital = yes }
any_war = {
any_attacker = { is_same_value = root }
any_defender = { is_same_value = prev }
NOT = {
using_war_goal = {
type = wg_take_galatron
owner = attacker
}
}
}
}

immediate = {
FromFrom = { save_event_target_as = planet }
From = { save_event_target_as = victim }
random_list = {
100 = {}
10 = {
modifier = {
factor = 1.5
has_valid_civic = civic_barbaric_despoilers
}
country_event = { id = ancrel.6500 }
}
}
}
}

# Relic Acquired
country_event = {
id = ancrel.6500
title = "ancrel.6500.name"
desc = "ancrel.6500.desc"
picture = GFX_evt_victorious_army
show_sound = event_ground_battle
location = event_target:planet

is_triggered_only = yes

immediate = {
steal_relic = {
target = event_target:victim
relic = random
}
}

option = {
name = ancrel.6500.a
custom_tooltip = stole_relic
hidden_effect = {
event_target:victim = {
country_event = { id = ancrel.6505 }
}
}
}
}

# Relic Lost
country_event = {
id = ancrel.6505
title = "ancrel.6505.name"
desc = "ancrel.6505.desc"
picture = GFX_evt_ground_combat
show_sound = event_ground_battle
location = event_target:planet

is_triggered_only = yes

option = {
name = ancrel.6505.a
custom_tooltip = relic_lost
}
}

I have tried changing the random list values and the factor value to no avail. When I am testing, nothing happens on opponent capital occupation or conquest. I tested with a fresh game with a barbaric despoilers empire too. No combination of value changes seems to work.

random_list = {
100 = {}
10 = {
modifier = {
factor = 1.5
has_valid_civic = civic_barbaric_despoilers

The event ancrel.6499 is listed in the 00_on_actions file too. I'm clueless on what goes wrong.

# Triggers country_event for the attacker upon victory
# (Before controller is switched)
# This = country, leader attacker
# From = country, planet owner
# FromFrom = planet
# IDENTITIES: attacker is the side that "IsHostile" to
# the planet controller; e.g. spawned monster armies
# are attackers, but if they win and the player attempts
# to retake the planet, the player is the attacker
on_planet_attackers_win = {
events = {
colony.114
crisis.201
crisis.219
action.8
action.14
colony.158
#crisis.2400
action.51
factions.12
crisis.2041
crisis.2042
crisis.2045
marauder.503
marauder.515
distar.37
distar.81
distar.235
graygoo.150
unrest.171
distar.5077
ancrel.2068
ancrel.6499
ancrel.4064
}
}



Thank you.
 
Last edited:
If I read the wiki page correctly, ancrel.6500 country event has 9.1% chance to be drawn each time ancrel.6499 is triggered when a capital world is occupied. The odds rise up to 13% in case of Barbaric Despoilers. Were you expecting higher chances, perhaps?



@shinooni : AFAIK, only full empire names can be retrieved, not their main component ('Empire', 'Union', 'Autocracy', etc), except if you know a text processing command, in which case I would be interested.
 
Last edited:
Hi, thanks for your reply.

I can't find mention of the ancrel6500 event in that wiki page. Could you please be more specific?

The code in ancient_relics_events_04 for ancrel6500 does not describe a 9.1% chance to trigger, it merely requires ancrel6499 to be triggered, which is the one with the supposed 10% chance. You can check the vanilla code in the above post inside the spoilers.
 
I referred to the wiki page only to recall what seems to be the syntax for the random_list = {} effect.
You are right, it's not the code for ancrel.6500 that determines the chances to get the relic, it's the code for ancrel.6499.

As I understand the scripts above, and the Wiki page, ancrel.6499 event will call ancrel.6500 event, based on a random draw:
Code:
immediate = {
    FromFrom = { save_event_target_as = planet }
    From = { save_event_target_as = victim }
    random_list = {
        100 = {}
        10 = {
            modifier = {
                factor = 1.5
                has_valid_civic = civic_barbaric_despoilers
            }
           country_event = { id = ancrel.6500 }
        }
    }
}
That should read as follows:
  • Immediate effect is to draw a random effect from a two effects list: a null effect and a country event;
  • in general case, it'll throw dice with 100/110 chance to no result, and 10/110 chance to launch ancrel.6500, where 110 is the sum of the two weights in the random list;
  • in case of Barbaric Despoilers, the 10 weight is to be factored by 1.5, hence new chances: 100/115 to no result, and 15/115 for ancrel.6500;
 
That should read as follows:
  • Immediate effect is to draw a random effect from a two effects list: a null effect and a country event;
  • in general case, it'll throw dice with 100/110 chance to no result, and 10/110 chance to launch ancrel.6500, where 110 is the sum of the two weights in the random list;
  • in case of Barbaric Despoilers, the 10 weight is to be factored by 1.5, hence new chances: 100/115 to no result, and 15/115 for ancrel.6500;
Thank you very much!

This should mean that the code below should trigger ancrel.6500 regardless of the dice outcome, however when I try it in-game nothing happens. What am I doing wrong? Is it my syntax?

Code:
immediate = {
        FromFrom = { save_event_target_as = planet }
        From = { save_event_target_as = victim }
        random_list = {
            100 = { country_event = { id = ancrel.6500 } }
            10 = {
                modifier = {
                    factor = 1.5
                    has_valid_civic = civic_barbaric_despoilers
                }
                country_event = { id = ancrel.6500 }
            }
        }
    }
}
 
Last edited:
Yes, this should be correct, but there's a curved bracket too many. You could also have simply reduced the 100 weight to say 1 for a 91% chance (94%). Then increase the second weight to go closer to 99%. It's kind of dumb to use the random list if you don't want any randomness: in this case, just place 'country_event = { id = ancrel.6500}' after the 'From = {...}' line, and basta. To comment out a line you don't want to erase, put a '#' anywhere before the commented part.
 
I've tried it all already, manipulating the values in the random list was among the first experiments actually. There could be something wrong with my test methodology but I can't think of anything at all.


If anyone has gotten the relic steal events to work I'd love to know how.
 
Last edited:
So, I would love to make a personal mod that stops the game from auto-transplanting pops to newly conquered planets as a fanatic purifier, at least for the player.

I understand the purpose of it and can see why it's necessary for the ai, but as, you know, a human, it's something I'm capable of taking care of myself. It drives me batty when I have to look through my planets every time I conquer a new one and repair buildings because they lost the necessary population.

Does anyone know which file(s) I would need to edit? I poked around a bit, but couldn't find it.
 
So, I would love to make a personal mod that stops the game from auto-transplanting pops to newly conquered planets as a fanatic purifier, at least for the player.

I understand the purpose of it and can see why it's necessary for the ai, but as, you know, a human, it's something I'm capable of taking care of myself. It drives me batty when I have to look through my planets every time I conquer a new one and repair buildings because they lost the necessary population.

Does anyone know which file(s) I would need to edit? I poked around a bit, but couldn't find it.
You want to edit policies, specifically, the land appropriation policy. You can find this in 00_policies, but you don't need to overwrite the whole file, just the policy you want (LIOS). Although can't purifiers already use that policy? I thought only gestalts were stuck with it.
 
  • 1
Reactions:
You want to edit policies, specifically, the land appropriation policy. You can find this in 00_policies, but you don't need to overwrite the whole file, just the policy you want (LIOS). Although can't purifiers already use that policy? I thought only gestalts were stuck with it.
Lol, I didn't think that there was an in-game fix for it! I feel dumb. Thanks anyway.
 
Ship designer window

how can I mod the lower utility/shield/armor section to make it wider so they do not overlap? I have edited the ship designs to allow more utilities / shields etc and it works but the boxes at the bottom for bow, mid, stearn overlap. I guess I need to modify a file in interface like ship_designer.gui but I don't know what to change.

thanks

EDIT: The UI Overhaul Dynamic mod seems to fix this.
 
Last edited:
Is it possible to have an event build a gateway? Or is it possible to combine two megastructures in one megastructure file to build a gateway automatically after the other megastructure is built?

I understand how the basic megastructure files work and they are all working in my mod. I am simply trying to automate things. For example every time I finish building a ringworld I build a gateway. Same for after building a starbase I build a gateway if the system meets the requirements for a gateway.

After a while it is a lot of finding an clicking which is not so bad except during a war.



thank you
 
Last edited:
  • 1
Reactions:
Is it possible to have an event build a gateway? Or is it possible to combine two megastructures in one megastructure file to build a gateway automatically after the other megastructure is built?

I understand how the basic megastructure files work and they are all working in my mod. I am simply trying to automate things. For example every time I finish building a ringworld I build a gateway. Same for after building a starbase I build a gateway if the system meets the requirements for a gateway.

After a while it is a lot of finding an clicking which is not so bad except during a war.



thank you

Yes, if you use the "on_megastructure_built" on action you can trigger a country event (for example, "utopia.2000").

Then use this:

Code:
immediate = {
    FROM = {
        solar_system = {
            spawn_megastructure = {
                type = "gateway_ruined"
                random_pos = yes
                orbit_angle = 360
            }
        }
    }
}
 
  • 1Like
Reactions: