+ Reply to Thread
Results 1 to 8 of 8

Thread: Creating event for vassalising small countries in spheres

  1. #1

    Creating event for vassalising small countries in spheres

    So I came up with an event that could force-vassalise countries with 1 or 2 provinces and that country was in another country's sphere for 25 years.

    Here's the coding. I haven't tried it yet, but it probably won't work...

    Code:
    country_event = {
    
    	id = 99500
    
    	is_triggered_only = yes
    
    	trigger = {
    		any_sphere = { months = 300 }
    		NOT = { num_of_cities = 3 }
    	}
    
    	mean_time_to_happen = {
    		days = 1
    	}
    
    	title = "EVTNAME99500"
    	desc = "EVTDESC99500"
    
    	option = {
    		name = "EVTOPTA99500
    		ai_chance = { factor = 40 }
    		vassalise = FROM
    		badboy = 2
    	}
    
    	option = {
    		name = "EVTOPTB99500
    		ai_chance = { factor = 60 }
    		any_neighbor_country = {
    			relation = { who = THIS value = 30 }
    		}
    	}
    }
    Please tell me if this will work or any other way I could get around it.

    Option A is obviously to vassalise the small country at a small infamy cost, while Option B is to not vassalise it, but mend relations with your neighbors.
    "The only thing that is certain is uncertainty"
    "Destiny favours the opportunistic"

  2. #2
    Game Breaking Bug DanubianCossak's Avatar
    Cities in MotionCrusader Kings IIDarkest HourEU3 CompleteDivine Wind
    Heir to the Throne500k clubEuropa Universalis IV: Pre-orderEUIV: Art of War

    Join Date
    Nov 2009
    Location
    Belgrade to Москва
    Posts
    9,349
    It wont work because of "is_triggered_only = yes" part, unless you code it as a part of bi yearly pulse thingy, so make sure thats done properly, if you dont know how to do that, remove that line and add proper MTTH code (old style random events).

    At quick glance the rest of it look OK, and it should work provided that you used proper syntax, in particular the part about spheres - i honestly dont know, never used it myself.
    While Chosen One in absentia, Temporary Chosen One Of The Exalted Church of YEShans

    http://forum.paradoxplaza.com/forum/...-Provinces-Mod

  3. #3
    Is there such a trigger as any_sphere?

  4. #4
    Field Marshal jdrou's Avatar
    200k clubHoI AnthologyArsenal of DemocracyHearts of Iron 2: ArmageddonCrusader Kings II
    Darkest HourDeus VultEuropa Universalis: ChroniclesEU3 CompleteDivine Wind
    For The GloryFor the MotherlandHearts of Iron IIIHOI3: Their Finest HourHeir to the Throne
    Europa Universalis III: In NomineEU3 Napoleon's AmbitionVictoria: RevolutionsRome GoldSemper Fi
    Victoria 2Victoria II: A House DividedVictoria II: Heart of DarknessEU3 Collectors Edition500k club
    Europa Universalis IV: Pre-orderEUIV: Wealth of NationsEUIV: Conquest of ParadiseEUIV: Res Publica

    Join Date
    Jun 2002
    Location
    Michigan, USA
    Posts
    22,792
    Quote Originally Posted by The Impaler View Post
    Is there such a trigger as any_sphere?
    No.
    There is an any_sphere scope but I don't think that does what he's trying to do.
    The only sphere triggers are has_sphere and in_sphere and they don't include any duration.
    You'd probably need to create an event that sets a flag in a country when it joins your sphere (and another event to clear the flag if it leaves).
    Then you could use something like
    Code:
    any_sphere = {
    	had_country_flag = { flag = in_my_sphere years = 25 }
    }
    If you want the AI to use the system too then dealing with countries "stolen" from someone else's sphere would be an additional complication since the flag wouldn't get cleared.
    "The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." --H. L. Mencken

    Playing EU4

    Download the Fix-it-Yourself Pack for HoI 1.06c (updated 11/14/05)
    Download the Unofficial fixpack for EU3 4.1b 4/29 beta or final 11/24 patch (updated 12/25/10)
    Download the text fixpack for EU3 Divine Wind (updated 2/11/11)

  5. #5
    Hmm ok thanks all, seems quite tricky with what I'm trying to do, but seemed pretty simple when I had the idea pop into my head. xD
    "The only thing that is certain is uncertainty"
    "Destiny favours the opportunistic"

  6. #6
    Quote Originally Posted by Umega View Post
    Hmm ok thanks all, seems quite tricky with what I'm trying to do, but seemed pretty simple when I had the idea pop into my head. xD
    That is the way it always is, you have a great idea but realize that it is impossible to implement within the restraints of the EU III code that is open for modding. Sometimes your able to find work arounds though, so don't give up on a good idea until you've tried everything.

  7. #7
    What about Creating one event triggered by any_country = { in_sphere = THIS } which sets a flag for that country. Then have another event or decision triggered by
    Code:
    any_sphere = {
    had_country_flag = { flag = ???? years = 25 }
    NOT = { size = 3 }
    }
    which vassalizes the country in question...?
    Last edited by The Impaler; 25-07-2012 at 20:00.

  8. #8
    Field Marshal jdrou's Avatar
    200k clubHoI AnthologyArsenal of DemocracyHearts of Iron 2: ArmageddonCrusader Kings II
    Darkest HourDeus VultEuropa Universalis: ChroniclesEU3 CompleteDivine Wind
    For The GloryFor the MotherlandHearts of Iron IIIHOI3: Their Finest HourHeir to the Throne
    Europa Universalis III: In NomineEU3 Napoleon's AmbitionVictoria: RevolutionsRome GoldSemper Fi
    Victoria 2Victoria II: A House DividedVictoria II: Heart of DarknessEU3 Collectors Edition500k club
    Europa Universalis IV: Pre-orderEUIV: Wealth of NationsEUIV: Conquest of ParadiseEUIV: Res Publica

    Join Date
    Jun 2002
    Location
    Michigan, USA
    Posts
    22,792
    Sounds like what I said.
    "The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels. For it is against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning if it is to be stopped at all." --H. L. Mencken

    Playing EU4

    Download the Fix-it-Yourself Pack for HoI 1.06c (updated 11/14/05)
    Download the Unofficial fixpack for EU3 4.1b 4/29 beta or final 11/24 patch (updated 12/25/10)
    Download the text fixpack for EU3 Divine Wind (updated 2/11/11)

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts