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

Pancakelord

Lord of Pancakes
44 Badges
Apr 7, 2018
3.375
12.292
  • Cities: Skylines - Green Cities
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Ancient Relics
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Imperator: Rome
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Imperator: Rome Deluxe Edition
  • Magicka: Wizard Wars Founder Wizard
  • Stellaris: Nemesis
  • Europa Universalis IV
  • Stellaris: Necroids
  • Sword of the Stars
  • Crusader Kings III
  • War of the Roses
  • Cities: Skylines
  • Stellaris: Federations
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris: Lithoids
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Stellaris - Path to Destruction bundle
  • Stellaris: Megacorp
  • Stellaris: Synthetic Dawn
  • Crusader Kings II
  • Stellaris
  • Cities: Skylines Deluxe Edition
  • Sword of the Stars II
  • March of the Eagles
  • Darkest Hour
So I'm trying to make first contact longer, and whilst I could just increase the cost, or pick a large number of days, that doesnt feel right if you encounter more aliens later in the game and already understand lots about languages. Also, I dont like locking up society research with special projects for ages. Time makes more sense (decoding alien languages would probably involve a multi-disciplinary approach anyway).

The wiki stipulates that the day or cost component of the project must be an integer, but does anything preclude it from being a nested integer?
I.e. the special project could take 5 years to complete the first time, or if it sees you have a flag, that time drops to 2 years.​
Code:
    days_to_research = {
                        if = {
                            limit = { has_flag = decoded_a_xeno_language } days = 720
                            else_if = { days = 1800 }
                            }
                        }

Code:
# First Contact

    #days     = 1800    #5 Years to decode 1st alien language
    #days2    = 720    #2 years to decode 2nd+ alien language

special_project = {
    key = "ESTABLISH_COMMUNICATIONS"
    picture = GFX_evt_star_chart
    icon = "gfx/interface/icons/situation_log/situation_log_radar.dds"
    #cost = 500            No more Soc cost.
    sound = no
    tech_department = society_technology
    days_to_research = {
    if = {
        limit = { has_flag = has_decoded_a_xeno_language } days = 720
        else_if = { days = 1800 }
        }
    }
  
    location = no
    timelimit = -1
    AI_wait_days = {
        weight = 80
        modifier = {
            weight = 30
            has_ethic = ethic_fanatic_xenophile
        }
        modifier = {
            weight = 40
            has_ethic = ethic_xenophile
        }
        modifier = {
            weight = 120
            has_ethic = ethic_xenophobe
        }
        modifier = {
            weight = 130
            has_ethic = ethic_fanatic_xenophobe
        }
        modifier = {
            weight = 1000
            NOT = { has_technology = tech_colonization_1 }
        }
        # these are just to add some variance so all AIs don't do it at the same time
        modifier = {
            factor = 0.95
            OR = {
                has_ethic = ethic_egalitarian
                has_ethic = ethic_fanatic_egalitarian
            }
        }
        modifier = {
            factor = 1.1
            OR = {
                has_ethic = ethic_authoritarian
                has_ethic = ethic_fanatic_authoritarian
            }
        }
        modifier = {
            factor = 0.9
            OR = {
                has_ethic = ethic_spiritualist
                has_ethic = ethic_fanatic_spiritualist
            }
        }
        modifier = {
            factor = 1.15
            OR = {
                has_ethic = ethic_materialist
                has_ethic = ethic_fanatic_materialist
            }
        }
        modifier = {
            factor = 0.85
            OR = {
                has_ethic = ethic_pacifist
                has_ethic = ethic_fanatic_pacifist
            }
        }
        modifier = {
            factor = 1.25
            OR = {
                has_ethic = ethic_militarist
                has_ethic = ethic_fanatic_militarist
            }
        }         
    }

    event_scope = planet_event

    requirements = {
        #shipclass_science_ship = 1
        #leader = scientist
        ##skill = 3
    }

    abort_trigger = {
        OR = {
            NOT = { exists = FROMFROM }
            has_communications = FROMFROM
        }
    }

    on_success = {
        owner = { establish_communications = FROM }
        FROM = {
            set_country_flag = has_communications@root.owner
            set_country_flag = decoded_a_xeno_language        #Added
        }
    }

    on_fail = {
    }
}
 
Last edited: