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

Miinosh

Private
38 Badges
Mar 20, 2020
17
5
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Crusader Kings II: Jade Dragon
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Digital Anniversary Edition
  • Shadowrun Returns
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Stellaris: Galaxy Edition
  • Cities: Skylines
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Stellaris: Galaxy Edition
  • Stellaris
  • 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
  • Cities: Skylines Deluxe Edition
Short summary of your issue Friendly Counsel and Sound Foundation bugged

Game Version 1.2.1

What OS are you playing on?
Windows

What platform are you using?
Steam

Do you have mods enabled? No

Have you tried verifying your game files (Steam only)?
Yes

How much "pain" is this causing you?
8

Please explain the issue you experienced in the most condensed way possible
The perk "Friendly Counsel" does not give any skillpoints for having friends. There is also a missing ")" in the tooltip for this perk; might be related.

On the other hand you keep skillpoints from "Sound Foundations" even if you reset your perks and do not chose this perk again.

Please explain how to reproduce the issue


Is there anything else you think could help us identify/replicate the issue?
Savegame is from the previous patch

typo can be found in steamapps\common\Crusader Kings III\game\localization\english\effects_l_english.yml

line 1600:

EACH_FRIEND_ADDS_RANDOM_SKILL_POINT:3 "Each of your [friend|E] Relations gives you #P 2#! random [skill|E] points (To the Maximum of [EmptyScope.ScriptValue('friendly_counsel_max')|0]"

Changing the language did not do anything.

Creating a ruler with kids with the new ruler designer does not give any skills either through Sound Foundation.

I have attached a save game
Yes

Upload Attachment
File(s) attached
 

Attachments

  • Mother of us All.ck3
    38,2 MB · Views: 0
Upvote 0
Friendly Counsel:

The problem is the effect code is basically counting friends twice since friends also count as best friends with their relation aliases. The other problem is that the code actually had a max of 4 bonuses, not 5 as stated in the perk's description since the code was checking current_friendly_counsel_perk_value < friendly_counsel_max instead of current_friendly_counsel_perk_value <= friendly_counsel_max when checking if it should add a bonus or not. Basically, if you already had 2 friends this perk wouldn't work since they were a) double-counted and b) you could only reach a max of 4 bonuses so once you had two friends you were maxed out with bonuses.

Then there's the third problem that this perk effect will only trigger when you get a new friend (see second code sample further below for fixing this issue).

And there's also the issue that this is only adding 1 random skill point, not 2 as the description states...

Much simpler modified code that's working:

Code:
friendly_counsel_skill_gain_effect = {
    if = {
        limit = {
            has_perk = friendly_counsel_perk
            any_relation = {
                type = friend
                count <= friendly_counsel_max
            }
        }
        random_list = {
            1 = {
                add_character_modifier = {
                    modifier = friendly_counsel_martial_gain
                }
            }
            1 = {
                add_character_modifier = {
                    modifier = friendly_counsel_diplomacy_gain
                }
            }
            1 = {
                add_character_modifier = {
                    modifier = friendly_counsel_intrigue_gain
                }
            }
            1 = {
                add_character_modifier = {
                    modifier = friendly_counsel_stewardship_gain
                }
            }
            1 = {
                add_character_modifier = {
                    modifier = friendly_counsel_learning_gain
                }
            }
        }
    }
}

To get the effect working right away when it's picked, we just need to modify the perk itself with a hidden effect to initialize the bonuses properly like so:

Code:
friendly_counsel_perk = {
    lifestyle = diplomacy_lifestyle
    tree = family
    position = { 1 3 }
    icon = node_diplomacy
    
    parent = flatterer_perk
    parent = thicker_than_water_perk
    
    effect = {
        custom_description_no_bullet = {
            text = friendly_counsel_perk_effect
        }
        hidden_effect = {
            # first clean up any existing effects in case perks were reset...
            every_relation = {
                type = friend
                root = { friendly_counsel_random_removal_effect = yes }
            }
            if = {
                limit = {
                    any_relation = {
                        type = friend
                        count <= friendly_counsel_max
                    }
                }
                # ...then initialize the friendly counsel bonuses for existing friends if we have fewer or equal than the max...
                every_relation = {
                    type = friend
                    root = { friendly_counsel_skill_gain_effect = yes }
                }                
            }
            else = {
            # ...or else in case we have friendly_counsel_max > # of friends already, add modifiers equal to friendly_counsel_max
                ordered_relation = {
                    type = friend
                    max = friendly_counsel_max
                    root = {
                        random_list = {
                            1 = {
                                add_character_modifier = {
                                    modifier = friendly_counsel_martial_gain
                                }
                            }
                            1 = {
                                add_character_modifier = {
                                    modifier = friendly_counsel_diplomacy_gain
                                }
                            }
                            1 = {
                                add_character_modifier = {
                                    modifier = friendly_counsel_intrigue_gain
                                }
                            }
                            1 = {
                                add_character_modifier = {
                                    modifier = friendly_counsel_stewardship_gain
                                }
                            }
                            1 = {
                                add_character_modifier = {
                                    modifier = friendly_counsel_learning_gain
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
 
Last edited:
  • 2
Reactions:
Sound Foundations:

This has an issue similar to Friendly Counsel in that if you already had too many children it wouldn't work. Modified code for sound_foundations_skill_gain_effect is below which is again much simpler and doesn't involved checking variable state:

Code:
sound_foundations_skill_gain_effect = {
    if = {
        limit = {
            # has_perk isn't really needed since it should be checked on calls to this effect, but just in case...
            has_perk = sound_foundations_perk
            any_child = {
                count <= sound_foundations_max
            }
        }
        random_list = {
            1 = {
                add_character_modifier = {
                    modifier = sound_foundations_martial_gain
                }
            }
            1 = {
                add_character_modifier = {
                    modifier = sound_foundations_diplomacy_gain
                }
            }
            1 = {
                add_character_modifier = {
                    modifier = sound_foundations_intrigue_gain
                }
            }
            1 = {
                add_character_modifier = {
                    modifier = sound_foundations_stewardship_gain
                }
            }
            1 = {
                add_character_modifier = {
                    modifier = sound_foundations_learning_gain
                }
            }
        }
    }
}

And for the initialization with the perk we do a similar thing to Friendly Counsel above...

Code:
sound_foundations_perk = {
    lifestyle = diplomacy_lifestyle
    tree = family
    position = { 1 4 }
    icon = node_diplomacy
    
    parent = friendly_counsel_perk
    
    effect = {
        custom_description_no_bullet = {
            text = sound_foundations_perk_effect
        }
        hidden_effect = {
            # first clean up any existing effects in case perks were reset...
            every_child = {
                root = { sound_foundations_random_removal_effect = yes }
            }
            # ...then see if we have fewer children than the max...
            if = {
                limit = {
                    any_child = {
                        count <= sound_foundations_max
                    }
                }
                every_child = {
                    root = { sound_foundations_skill_gain_effect = yes }
                }
            }
            # ...otherwise, apply the max bonus
            else = {
                ordered_child = {
                    max = sound_foundations_max
                    root = {
                        random_list = {
                            1 = {
                                add_character_modifier = {
                                    modifier = sound_foundations_martial_gain
                                }
                            }
                            1 = {
                                add_character_modifier = {
                                    modifier = sound_foundations_diplomacy_gain
                                }
                            }
                            1 = {
                                add_character_modifier = {
                                    modifier = sound_foundations_intrigue_gain
                                }
                            }
                            1 = {
                                add_character_modifier = {
                                    modifier = sound_foundations_stewardship_gain
                                }
                            }
                            1 = {
                                add_character_modifier = {
                                    modifier = sound_foundations_learning_gain
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
 
Last edited:
  • 1
Reactions:
"Savegame is from the previous patch"

Well I would say that's likely an issue right there....I encountered problems with older versions. Just start anew. Forget pre 1.2.1 saves.
 
"Savegame is from the previous patch"

Well I would say that's likely an issue right there....I encountered problems with older versions. Just start anew. Forget pre 1.2.1 saves.

The issue is the code is broken in certain circumstances and both are not being applied when the perk is gained as I explained in my post above. I fixed it with the code I posted.
 
"Savegame is from the previous patch"

Well I would say that's likely an issue right there....I encountered problems with older versions. Just start anew. Forget pre 1.2.1 saves.

If you have to start the game over every time they release a new patch (those things that are usually for fixing bugs), something is fundamentally broken in the game. I have literally never played any other game that expects you to not continue your saved game just because they released a patch.
 
  • 1
  • 1
Reactions:
Playing on Mac (specifically Big Sur 11.0.1, M1 chip with Rosetta 2) and I've had problems with these two as well. Though in my case it was that I got no skill points from Friendly Counsel but also only one from Sound Foundations, even though I have 5 living children. It did give me a helpful tip that I'd hit the maximum number of points from that perk, though, so I guess it at least started counting my children correctly after it finished applying the points?

Anyway, that's 2 perks out of nine completely not working and they're 2 of the best in the entire tree, so... a cap of 5 is fine. A cap of 5 that actually works would be even better.
 
Last edited:
If you have to start the game over every time they release a new patch (those things that are usually for fixing bugs), something is fundamentally broken in the game. I have literally never played any other game that expects you to not continue your saved game just because they released a patch.

This patch changed the 00_defines.txt file and new things were added dealing with mercenary and holy order men-at-arms. I can't say anything about perks, but I know your game would DEFINTELY be bugged from these things alone if you tried to load an old save. Just accept that big patches = new game or else don't buy from them anymore lol.
 
This patch changed the 00_defines.txt file and new things were added dealing with mercenary and holy order men-at-arms. I can't say anything about perks, but I know your game would DEFINTELY be bugged from these things alone if you tried to load an old save. Just accept that big patches = new game or else don't buy from them anymore lol.

Why definitely? None of that stuff is serialized in the save (or serialized in some wrong state or anything).
 
Why definitely? None of that stuff is serialized in the save (or serialized in some wrong state or anything).

Because the save would have been made with figures utilizing the old pre-1.2.1 defines for MAA in both Mercenaries and Holy Orders. Again, I don't know anything about perks, but 1.2.1 would affect any game figures dealing with MAA.
 
  • 1
Reactions:
Thanks a lot durbal!

I had some trouble locating the correct files but it works.
I also changed the max bonus to 10, because I think the intent is max 5 friends giving 2 each.
 
Can someone please specify the files that need the edited code posted by Durbal?

I cannot locate any references to friendly counsel in 00_defines.txt and that is the only file mentioned in this thread.
 
Can someone please specify the files that need the edited code posted by Durbal?

I cannot locate any references to friendly counsel in 00_defines.txt and that is the only file mentioned in this thread.

He posts two sets of corrected code. The "skill gain effect" snippets for both Friendly Counsel and Sound Foundations are meant to override code found in the folder: common\scripted_effects , where they override code from 00_diplomacy_perk_effects.txt.

To override this, simply make a mod (using the launchers mod tools), and then create a path called common\scripted_effects, and place a .txt file with ANY name in it ( I called mine effect_override.txt) copy and paste the two "skill gain effect" snippets.

Similarly, for the perk initialization code, create a folder in your mod in common\lifestyle_perks, and within your override file, paste his two snippets. It doesn't matter that the original game file is named 00_diplomacy_3_family_tree_perks. The game doesn't care about file name, only folder structure.

Make sure you do this with a mod. Modifying the original game files means you won't be able to go back without re-verifying game files in Steam.
 
Looking at the code, what lines in what files did you alter to set the max bonus to 10?

And thanks Idleray for explaining it, worked like a charm!

Hmm, it worked for you? It actually didn't end up working for me lol, probably due to a crapton of mods I have installed.

It's all moot though, the bug will be officially fixed in 1.2.2 patch in a few days.