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

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
Is there a way to make a building unreplacable? As in, i place a building on a tile via script, and make it so the player cannot remove or replace it?
No. You could theoretically add a potential line on all buildable buildings that prevents it from being built on a tile with it, but that would only prevent the player from replacing it, not removing it. Unremovable tile blockers can be added, though I'm not sure if they are immune to the Mastery of Nature AP, which can emulate some of the functionality by providing modifiers and adjacency bonuses (see the wandering forests event line).
 

LogicSequence

Lightwave Alien
25 Badges
Sep 25, 2006
452
10
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Ancient Space
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Magicka
  • Crusader Kings II
No. You could theoretically add a potential line on all buildable buildings that prevents it from being built on a tile with it, but that would only prevent the player from replacing it, not removing it. Unremovable tile blockers can be added, though I'm not sure if they are immune to the Mastery of Nature AP, which can emulate some of the functionality by providing modifiers and adjacency bonuses (see the wandering forests event line).

Actually i found an easy way to do it via event, it simply replaces the building if you attempt to destroy or replace it:
Code:
event = {
    id = building_demolished.1
    hide_window = yes
    is_triggered_only = yes
 
    trigger = { 
        has_planet_flag = planet_whatever
        from = { has_prev_building = building_whatever}
    }
 
    immediate = {
        from = { set_building = building_whatever}
    }
}

Now i just need to find a way to prevent the building from being deactivated. Since there is no on_building_deactivated event, do you have any ideas?
 

TheDarkMaster

Field Marshal
72 Badges
Jan 1, 2012
6.845
2.231
  • Victoria 2: A House Divided
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Gettysburg
  • Heir to the Throne
  • Magicka
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Sword of the Stars II
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Warlock 2: The Exiled
  • Warlock 2: Wrath of the Nagas
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Charlemagne
  • Cities in Motion
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Rights of Man
  • Stellaris Sign-up
  • Tyranny: Archon Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
Actually i found an easy way to do it via event, it simply replaces the building if you attempt to destroy or replace it:
Code:
event = {
    id = building_demolished.1
    hide_window = yes
    is_triggered_only = yes
 
    trigger = {
        has_planet_flag = planet_whatever
        from = { has_prev_building = building_whatever}
    }
 
    immediate = {
        from = { set_building = building_whatever}
    }
}

Now i just need to find a way to prevent the building from being deactivated. Since there is no on_building_deactivated event, do you have any ideas?
Couldn't someone take their POP off the building for the same effect? It would also need to somehow force a POP to stay on the building at all times.
 

NilusBavarius

The grumpy Hermit
15 Badges
Aug 26, 2008
698
0
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Mount & Blade: Warband
  • Cities: Skylines - After Dark
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Crusader Kings III
  • Crusader Kings II
About firing arcs:

Is it possible to set firing arcs to Slots instead of weapons?
So actively avoiding the weapon firing "through" the own ships/ stations mesh and forcing them to be used only in certain angles to the enemy.
 

LogicSequence

Lightwave Alien
25 Badges
Sep 25, 2006
452
10
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Ancient Space
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Magicka
  • Crusader Kings II
What is the purpose of the building?

It's to nerf a starting advantage given by other conditions of the custom starting solar system.

I've actually found a way to prevent removing the pop from the tile. As the planet is filled with pops to begin with, they can't be moved to an empty tile. Then i simply gave them all a pop flag, and added a rule in rules.txt > can_resettle_pop that said you can't resettle pops with that tag.

Now the only thing left is to find a way to prevent deactivation of the building.
 

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
It's to nerf a starting advantage given by other conditions of the custom starting solar system.

I've actually found a way to prevent removing the pop from the tile. As the planet is filled with pops to begin with, they can't be moved to an empty tile. Then i simply gave them all a pop flag, and added a rule in rules.txt > can_resettle_pop that said you can't resettle pops with that tag.

Now the only thing left is to find a way to prevent deactivation of the building.
Yes, but what does the building do?
 

AlbertKerbin

Sergeant
49 Badges
May 6, 2016
79
38
  • Stellaris: Synthetic Dawn
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Cities: Skylines Deluxe Edition
  • Stellaris
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Green Cities
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Industries
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Cities: Skylines - Mass Transit
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • BATTLETECH
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Surviving Mars
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Imperator: Rome
  • Stellaris - Path to Destruction bundle
Ok, another sort of dumb question-

How would one go about coding a weight_modifier for a technology so that the tech would only be likely to appear if an empire had colonized a specific type of planet?
 

NilusBavarius

The grumpy Hermit
15 Badges
Aug 26, 2008
698
0
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Mount & Blade: Warband
  • Cities: Skylines - After Dark
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Crusader Kings III
  • Crusader Kings II
Ok, another sort of dumb question-

How would one go about coding a weight_modifier for a technology so that the tech would only be likely to appear if an empire had colonized a specific type of planet?

Try to reverse engineer the Tileblocker Tech, due to being only reseachable if you have the specific one present on any colony. At least that's what I would look up to try to get it sorted ;)
 

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
Ok, another sort of dumb question-

How would one go about coding a weight_modifier for a technology so that the tech would only be likely to appear if an empire had colonized a specific type of planet?


Try to reverse engineer the Tileblocker Tech, due to being only reseachable if you have the specific one present on any colony. At least that's what I would look up to try to get it sorted ;)

The important part is this one, which removes the probability of it showing up if you don't have an owned (colonised) planet which has a tile with a specific blocker type.
Code:
        modifier = {
            factor = 0
            NOT = {
                any_owned_planet =  {
                    any_tile = {
                        has_blocker = "tb_mountain_range"
                    }
                }
            }
        }

For you in this case remove the any_tile bracket and have the condition is_planet_class checking for the class you want (pc_desert, pc_gaia, pc_toxic, etc). If you don't want to remove it entirely then change the 0 to 0.1 or something similar.
 

Gaussia

Major
32 Badges
Jan 21, 2014
688
1.167
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Magicka
  • Europa Universalis IV: Res Publica
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Crusader Kings II: Reapers Due
  • Crusader Kings III: Royal Edition
  • Stellaris: Nemesis
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris Sign-up
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Mare Nostrum
Is there a good way to put a modifier on a planet that got a Governor?

I have been trying to look at the "Faith in Science" Tradition which gives +10% happiness to planets with assist research going on. I have found the the entry in 00_static_modifiers.txt
Code:
faith_in_science = {
    pop_happiness = 0.10

    icon = "gfx/interface/icons/planet_modifiers/pm_assist_research.dds"
    icon_frame = 1
}
and I have found the tradition it self in ==_discovery.txt
Code:
tr_discovery_faith_in_science = {
    cost = { unity = @cost }
    possible = {
        has_tradition = tr_discovery_polytechnic_education
    }
    on_enabled = {
        set_country_flag = faith_in_science
    }
   
    ai_weight = {
        factor = 5000
    }
}
The tradition sets the country_flag faith_in_science, but I have been unable to find the connection for having that flag and getting the faith_in_science static modifiers on planets with assist research. My idea would be to do the same thing with a static modifier and flag, but the middle step I haven't found (Assist research in their case, having a governor on the planet in my case).
 

NilusBavarius

The grumpy Hermit
15 Badges
Aug 26, 2008
698
0
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Mount & Blade: Warband
  • Cities: Skylines - After Dark
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Crusader Kings III
  • Crusader Kings II
Is there a good way to put a modifier on a planet that got a Governor?...

You could simply alter the normal Governor modifiers. Here you go:

...\SteamApps\common\Stellaris\common\static_modifiers\ 00_static_modifier.txt , Line: 900 and following...

Code:
skill_governor = {
#pop_happiness = 0.02 # Adding this line will give +2% happines per lvl, up to a total of 10% on lvl 5
 planet_unrest_add = -5
 planet_building_build_speed_mult = 0.05
 planet_clear_blocker_time_mult = -0.06
}
 

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
Is there a good way to put a modifier on a planet that got a Governor?

I have been trying to look at the "Faith in Science" Tradition which gives +10% happiness to planets with assist research going on. I have found the the entry in 00_static_modifiers.txt
Code:
faith_in_science = {
    pop_happiness = 0.10

    icon = "gfx/interface/icons/planet_modifiers/pm_assist_research.dds"
    icon_frame = 1
}
and I have found the tradition it self in ==_discovery.txt
Code:
tr_discovery_faith_in_science = {
    cost = { unity = @cost }
    possible = {
        has_tradition = tr_discovery_polytechnic_education
    }
    on_enabled = {
        set_country_flag = faith_in_science
    }
  
    ai_weight = {
        factor = 5000
    }
}
The tradition sets the country_flag faith_in_science, but I have been unable to find the connection for having that flag and getting the faith_in_science static modifiers on planets with assist research. My idea would be to do the same thing with a static modifier and flag, but the middle step I haven't found (Assist research in their case, having a governor on the planet in my case).

My guess is that faith in science is hardcoded to trigger on assist research, so you can't really emulate that.

For what you want my suggestion is rather to have the modifier be a trait that you assign to all your governors, similar to how the Flesh Is Weak AP is done.
 

Wise Strategist

First Lieutenant
78 Badges
Aug 12, 2007
271
125
  • Stellaris: Synthetic Dawn
  • King Arthur II
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Sengoku
  • Sword of the Stars II
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron III
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Divine Wind
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis III Complete
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Crusader Kings II: Conclave
  • Stellaris: Nemesis
  • Crusader Kings II: Way of Life
  • Mount & Blade: Warband
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Rome: Vae Victis
  • Victoria 2
A question on initializers and planet generation:

Is there any way to prevent randomly deposits from generating in prescripted resource tiles? See pics for reference?
bzGf2j87xHiD_peDm7VX6miaac_vo6yp5tSm29w05ZU

1i4BXDcJPVEcPKq30CIeY4HwjmzkrZBEQhe1n4N0pH8
 
Last edited:

ViolentBeetle

Colonel
40 Badges
Mar 2, 2017
989
0
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Reapers Due
  • Stellaris - Path to Destruction bundle
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Tyranny: Archon Edition
  • Stellaris: Federations
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Victoria 2
  • Europa Universalis IV
  • Stellaris: Synthetic Dawn
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Art of War
1. I want a tech that is unlocked by an event and ai might get it too. Do I set weight = 0, and ai_weight high? Is AI subjected to the same rules?

2. Examples of planet initializers and ship designs say "Use localization string", but I can't quite figure out how to use them. I couldn't make them work by just typing something in the name part and then typing it in localization file.

Is there a way to make a building unreplacable? As in, i place a building on a tile via script, and make it so the player cannot remove or replace it?
I'm pretty sure you can't remove various buildings such as toxic dump from failed terraforming or plague memorial. I suspect event_building = yes is the cause. And maybe ai_replace = no. Test it.
 
Last edited:

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
I want a tech that is unlocked by an event and ai might get it too. Do I set weight = 0, and ai_weight high? Is AI subjected to the same rules?

ai_weight is the chance of the AI to pick the tech if it is available as an option, if the option to take it has been unlocked by an event that the AI got then it will choose to pick it or not according to the ai_weight. AI follows all the same game rules.
 

LogicSequence

Lightwave Alien
25 Badges
Sep 25, 2006
452
10
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Ancient Space
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Magicka
  • Crusader Kings II
Yes, but what does the building do?

I don't know what you mean by do, so here's the building entry:

Code:
nerftown= {
    is_listed = no
    icon = "building_hab_cultural_center"
    cost = { }
    required_resources = {
        minerals = 2
        energy = 4
        food = 2
        unity = 1
    }
    planet_modifier = {
        pop_happiness = 0.05
        planet_unrest_add = -5
    }
    army_modifier = {
        army_damage_mult = 0.05
    }
    upgrades = { }
    ai_replace = no
    allow = {
        custom_tooltip = {
            text = "ONLY_ON_LUA"
            planet = { is_planet_class = pc_lua }
        }
    }
}