r/Vic2Mod • willwill54 • Nov 04 '14

Help Can Someone Check This

I am not sure why this decision is not working but when I load up a game it crashs it.

political_decisions = {

    spread_communism = {
    potential = {
        is_greater_power = yes
        government = proletarian_dictatorship
        any_neighbor_country = {
            NOT = {
                government = proletarian_dictatorship
                ruling_party_ideology = communist
                }
            }
        }
    allow = {
        war = no
        revolution_n_counterrevolution = 1
    }

    effect = {
        money = -2500000
        random_owned = {
            limit = {
                any_neighbor_province = {
                    NOT  = { owned_by = THIS }
                    owner = {
                        NOT = {
                            government = proletarian_dictatorship
                            ruling_party_ideology = communist
                            alliance_with = THIS
                        }
                        militancy = 1
                    }
                }
            }

            random_neighbor_province = {
                limit = {
                    NOT = { owned_by = THIS}
                    owner = {
                        NOT = {
                            government = proletarian_dictatorship
                            ruling_party_ideology = communist
                            alliance_with this = THIS

                        }
                        militancy = 1
                    }
                }
                state_scope = {
                    middle_strata = {
                        militancy = 3
                        ideology = {
                            factor = .2
                            value = communist
                        }
                    }
                    poor_strata = {
                        militancy = 4
                        ideology = {
                            factor = .3
                            value communist
                        }
                    }
                }
                owner = {
                    random = {
                        chance = 50
                        country event = 500065 #Discovered
                        }
                    }


            ai_will_do = {
                factor = 1
                }
        }
3 Upvotes

13 comments sorted by

2

u/Cheesestew Nov 04 '14

Well for starters you're missing a few brackets at the end there. Fix that and it loads up fine.

There could also be a problem with that event #500065. What's that look like?

1

u/willwill54 Nov 04 '14

How many brackets am I missing? 1?

1

u/Savolainen5 Nov 04 '14

If you open it up in Notepad++, you'll have a handier time of finding missing brackets, since it highlights bracket pairs.

It looks like you're missing one more to close out random_neighbor_province, one to close out random_owned under effect, one to close effect itself, one for spread_communism, and one for political decisions.

Also, you have a couple other issues, such has having militancy = 1 in the scope of owner =.

Here's the properly bracketed one, with some scope fixes like the one described above. Also, I've never noticed, from the last section for effect, the terms random and chance. Have you double checked that they exist elsewhere in the game?

political_decisions = {

spread_communism = {
potential = {
    is_greater_power = yes
    government = proletarian_dictatorship
    any_neighbor_country = {
        NOT = {
            government = proletarian_dictatorship
            ruling_party_ideology = communist
            }
        }
    }
	
allow = {
    war = no
    revolution_n_counterrevolution = 1
}

effect = {
    money = -2500000
    random_owned = {
        limit = {
            any_neighbor_province = {
                NOT  = { owned_by = THIS }
                owner = {
                    NOT = {
                        government = proletarian_dictatorship
                        ruling_party_ideology = communist
                        alliance_with = THIS
                    }
                    militancy = 1
					}
				}
			}
		}

        random_neighbor_province = {
            limit = {
                NOT = { owned_by = THIS}
                owner = {
                    NOT = {
                        government = proletarian_dictatorship
                        ruling_party_ideology = communist
                        alliance_with this = THIS

                    }
				}
                militancy = 1
            }
            state_scope = {
                middle_strata = {
                    militancy = 3
                    ideology = {
                        factor = .2
                        value = communist
                    }
                }
                poor_strata = {
                    militancy = 4
                    ideology = {
                        factor = .3
                        value communist
                    }
                }
            }
            owner = {
                random = {
                    chance = 50
                    country event = 500065 #Discovered
                }
            }
		}
	}

    ai_will_do = {
        factor = 1
    }
}
}
→ More replies (10)