LuxArdens / Stellaris---RPG-Traits-mod

Stellaris mod: RPG Traits
MIT License
10 stars 9 forks source link

Outdated Ascendancy Perks #49

Closed TheLynx01 closed 5 years ago

TheLynx01 commented 5 years ago

With all the changes that the Stellaris team has made over the last few months, some of RPG's Ascension Perks are now out of date and in need of a quick tune up:

I can confirm the Following Perks are affected:

Description

Master Builders: Paradox added an 'on_enabled' event that boosts the total spaces of each player owned habitat by 3 retroactively. Currently, RPG will only add these slots to Habitats built after the perk is selected.

Enigmatic Engineering: A Recent change in the 2.0 update added a second type of sensor range: 'Hyperlane Sensor Range'. Vanilla Enigmatic Engineering boosts this by 4 in addition to the standard boost to sensor range of 2.

Mod Version

These are confirmed for CORE.

I haven't specifically checked HEAVY, but I suspect the perks are outdated in that version as well.

*Code Comparison

Below, I've put for your convenience the code differences between the vanilla file and the RPG file.

The RPG snippet is listed first, and the newer vanilla snippet is listed after it with the altered section in bold type.

Enigmatic Engineering: (Starts at Line 7, Ends at Line 41) RPG Version:

ap_enigmatic_engineering = { potential = { host_has_dlc = "Apocalypse" NOT = { has_ascension_perk = ap_enigmatic_engineering } }

possible = {
    custom_tooltip = {
        fail_text = "requires_ascension_perks_1"
        num_ascension_perks > 0
    }
}

on_enabled = {
    custom_tooltip = "no_rev_engineering"
}

modifier = {        
    ship_sensor_range_add = 2
}

ai_weight = {
    factor = 10
    modifier = {
        factor = 2
        has_ethic = ethic_materialist
    }
    modifier = {
        factor = 3
        has_ethic = ethic_fanatic_materialist
    }
}

}

Vanilla Version: (Starts at Line 7, Ends at Line 42) ap_enigmatic_engineering = { potential = { host_has_dlc = "Apocalypse" NOT = { has_ascension_perk = ap_enigmatic_engineering } }

possible = {
    custom_tooltip = {
        fail_text = "requires_ascension_perks_1"
        num_ascension_perks > 0
    }
}

on_enabled = {
    custom_tooltip = "no_rev_engineering"
}

modifier = {        
    ship_sensor_range_add = 2
    **ship_hyperlane_range_add = 4**
}

ai_weight = {
    factor = 10
    modifier = {
        factor = 2
        has_ethic = ethic_materialist
    }
    modifier = {
        factor = 3
        has_ethic = ethic_fanatic_materialist
    }
}

}

Mega Engineering: RPG Version: (Starts at Line 954, Ends at Line 1002) ap_master_builders = { on_enabled = { if = { limit = { NOT = { has_technology = tech_mega_engineering } } add_research_option = tech_mega_engineering } } possible = { custom_tooltip = { fail_text = "requires_ascension_perks_2" num_ascension_perks > 1 } custom_tooltip = { fail_text = "requires_ap_voidborn_OR_ap_galactic_wonders" OR = { has_ascension_perk = ap_voidborn has_ascension_perk = ap_galactic_wonders } } custom_tooltip = { fail_text = "requires_technology_zero_point_power" has_technology = tech_zero_point_power }
} modifier = { megastructure_build_speed_mult = 1 }

potential = {
    host_has_dlc = "Utopia"
    NOT = {
        has_ascension_perk = ap_master_builders
    }
}

ai_weight = {
    factor = 10
    modifier = {
        factor = 2
        has_ethic = ethic_pacifist
    }
    modifier = {
        factor = 3
        has_ethic = ethic_fanatic_pacifist
    }
}

}

Vanilla Version: (Side Note: The code was also reformatted on this one) (Starts at Line 955, ends at Line 1021) ap_master_builders = { possible = { custom_tooltip = { fail_text = "requires_ascension_perks_2" num_ascension_perks > 1 } custom_tooltip = { fail_text = "requires_ap_voidborn_OR_ap_galactic_wonders" OR = { has_ascension_perk = ap_voidborn has_ascension_perk = ap_galactic_wonders } } custom_tooltip = { fail_text = "requires_technology_zero_point_power" has_technology = tech_zero_point_power }
} modifier = { megastructure_build_speed_mult = 0.5
}

on_enabled = {
    **custom_tooltip = "ap_master_builders_habitat_size"
    hidden_effect = {
        every_owned_planet = {
            limit = {
                is_planet_class = pc_habitat 
                planet_size < 15
            }
            set_planet_size = 15
        }   
        every_planet_within_border = {
            limit = {
                is_planet_class = pc_habitat 
                planet_size < 15
            }
            set_planet_size = 15    
        }           
    }**
    if = {
        limit = { 
            NOT = { has_technology = tech_mega_engineering }
        }
        add_research_option = tech_mega_engineering
    }       
}

potential = {
    host_has_dlc = "Utopia"
    NOT = {
        has_ascension_perk = ap_master_builders
    }
}

ai_weight = {
    factor = 10
    modifier = {
        factor = 2
        has_ethic = ethic_pacifist
    }
    modifier = {
        factor = 3
        has_ethic = ethic_fanatic_pacifist
    }
}

}

I'll keep on the lookout for other Perks that have been changed in Vanilla, but these are the two big ones that caught my eye thus far.

TheLynx01 commented 5 years ago

Side question, is there a way to stop this system from segmenting the snippets the way it did? My attempt to make them more readable seems like it made them less readable given how it separated them

LuxArdens commented 5 years ago

Side question, is there a way to stop this system from segmenting the snippets the way it did? My attempt to make them more readable seems like it made them less readable given how it separated them

Not sure, generally TAB governs it, which is pretty annoying since TAB also has functions in the browser itself.

0 TAB

1 TAB

    2 TAB
    2 TAB and single ENTER instead of 2
LuxArdens commented 5 years ago

Anyway, cheers. I ran comparison on the file and ported the changes. Didn't check whether it works yet though.

TheLynx01 commented 5 years ago

I should have a test done in about 20 mins or so. Going to see if the retroactive change to habitats that were already built works.

TheLynx01 commented 5 years ago

Took longer than expected, but I can confirm that the change worked as intended, and habitats will retroactively add 3 new spaces to habitats that your team owns. (Enigmatic engineering also functions as intended and gives 4 extra hyperlane vision)

I did this test using just the CORE version, but it should also apply to HEAVY as well.