+ Reply to Thread
Results 1 to 8 of 8

Thread: Creating event for vassalising small countries in spheres

  1. #1
    Second Lieutenant Umega's Avatar
    EU3 CompleteHearts of Iron IIISemper FiVictoria 2Divine Wind
    For the MotherlandVictoria II: A House DividedWarlock: Master of the ArcaneVictoria 2: Heart of Darkness

    Join Date
    Feb 2012
    Location
    UK
    Posts
    129

    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.
    "There is no avoiding war, it can only be postponed to the advantage of others."
    "Destiny favours the opportunistic."

  2. #2
    Field Marshal DanubianCossak's Avatar
    EU3 CompleteHeir to the ThroneDivine WindCities in MotionDarkest Hour

    Join Date
    Nov 2009
    Location
    Hiding somewhere along the Danube river!
    Posts
    6,204
    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.
    So comrades come, gather, last battle let us face, the Internationale unites the human race!

    MPM - More Provinces Mod is now available > http://forum.paradoxplaza.com/forum/...rk-in-progress!

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

  4. #4
    Field Marshal jdrou's Avatar
    EU3 Collectors Edition OwnerHoI AnthologyNapoleonic MarshalDeus Vult!Hearts of Iron 2: Armageddon
    Victoria: RevolutionsEuropa Universalis III: In NomineEU3 CompleteRome GoldEast India Company
    Hearts of Iron IIISupreme Ruler 2020 GoldFor The GloryArsenal of DemocracyHeir to the Throne
    200k ClubSemper FiVictoria 2Divine WindEU3: Chronicles
    Darkest HourCrusader Kings IIFor the MotherlandHOI3: Their Finest Hour

    Join Date
    Jun 2002
    Location
    Michigan, USA
    Posts
    22,041
    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 EU3 Divine Wind 5.2 latest beta

    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
    Second Lieutenant Umega's Avatar
    EU3 CompleteHearts of Iron IIISemper FiVictoria 2Divine Wind
    For the MotherlandVictoria II: A House DividedWarlock: Master of the ArcaneVictoria 2: Heart of Darkness

    Join Date
    Feb 2012
    Location
    UK
    Posts
    129
    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
    "There is no avoiding war, it can only be postponed to the advantage of others."
    "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 19:00.

  8. #8
    Field Marshal jdrou's Avatar
    EU3 Collectors Edition OwnerHoI AnthologyNapoleonic MarshalDeus Vult!Hearts of Iron 2: Armageddon
    Victoria: RevolutionsEuropa Universalis III: In NomineEU3 CompleteRome GoldEast India Company
    Hearts of Iron IIISupreme Ruler 2020 GoldFor The GloryArsenal of DemocracyHeir to the Throne
    200k ClubSemper FiVictoria 2Divine WindEU3: Chronicles
    Darkest HourCrusader Kings IIFor the MotherlandHOI3: Their Finest Hour

    Join Date
    Jun 2002
    Location
    Michigan, USA
    Posts
    22,041
    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 EU3 Divine Wind 5.2 latest beta

    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