+ Reply to Thread
Results 1 to 10 of 10

Thread: A few modding questions.

  1. #1
    Modding Victoria 2 ZomgK3tchup's Avatar
    Deus Vult!Victoria: RevolutionsEU3 CompleteHearts of Iron IIIHeir to the Throne
    Semper FiVictoria 2Divine WindSword of the StarsDarkest Hour
    Crusader Kings IIFor the MotherlandVictoria II: A House DividedCrusader Kings II Holy Knight

    Join Date
    Dec 2009
    Location
    New Jersey, USA
    Posts
    2,273
    Blog Entries
    1

    A few modding questions.

    I have a few questions for you guys.

    1. What does "mutual = yes" in cb_types.txt mean? Does that mean if you get a CB against somebody then they get the same CB on you?

    2. Is it possible for a trigger to check for a certain infamy limit? I'm setting up some modifiers, and I don't want them to activate if a country has an infamy limit below 10.

    3. Is "any_country = { }" a valid trigger? For example, "trigger = { any_country = { has_country_modifier = { } } }"? This is unfortunately not the case in Victoria 2, so I would like to know if it will work for EU3.

    4. Is it possible to modify gain/lose core WITH conditions? What I'm asking is, is it possible to increase or decrease the default 50 year gain/lose core stipulation if X, Y, and X are true? For example, a core will be gained in 25 years if the province is of the same culture group and religion, etc.

    5. How does the AI choose National Ideas? Does it choose randomly, choose randomly from its "historic ideas" in the country file, or does it follow its historic ideas in order?

    Even if you can only answer one of these questions, I'd greatly appreciate your input. Thanks in advance.

  2. #2
    Scio quod nesciam. MrTaxman's Avatar
    EU3 OwnerHoI AnthologyNapoleonic MarshalEuropa Universalis: RomeVictoria: Revolutions
    Europa Universalis III: In NomineRome: Vae VictisSupreme Ruler 2020Hearts of Iron IIIHeir to the Throne
    Semper FiVictoria 2Divine WindCities in MotionCrusader Kings II
    For the Motherland

    Join Date
    Apr 2010
    Location
    Between here and there.
    Posts
    1,008
    Quote Originally Posted by ZomgK3tchup View Post
    I have a few questions for you guys.
    1. What does "mutual = yes" in cb_types.txt mean? Does that mean if you get a CB against somebody then they get the same CB on you?
    2. Is it possible for a trigger to check for a certain infamy limit? I'm setting up some modifiers, and I don't want them to activate if a country has an infamy limit below 10.
    3. Is "any_country = { }" a valid trigger? For example, "trigger = { any_country = { has_country_modifier = { } } }"? This is unfortunately not the case in Victoria 2, so I would like to know if it will work for EU3.
    4. Is it possible to modify gain/lose core WITH conditions? What I'm asking is, is it possible to increase or decrease the default 50 year gain/lose core stipulation if X, Y, and X are true? For example, a core will be gained in 25 years if the province is of the same culture group and religion, etc.
    5. How does the AI choose National Ideas? Does it choose randomly, choose randomly from its "historic ideas" in the country file, or does it follow its historic ideas in order?
    Even if you can only answer one of these questions, I'd greatly appreciate your input. Thanks in advance.
    1. Sorry, I don't know.
    2. Paradox claims to have done it - look in the vanilla events
    3. Yes, I have done this (under 5.2, I don't know about 5.1)
    4. Sorry, I don't know.
    5. I believe it follows the list from its file as closely as it can.
    EUIII: DW Mods
    Occultus Orbis Terrestre
    Ars Lingua

    "A language is a dialect with an army and navy" - Max Weinreich - Meyer Lazarevich Veynreykh - "אַ שפּראַך איז אַ דיאַלעקט מיט אַן אַרמיי און פֿלאָט"

  3. #3
    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,198
    1. It means that if a CB gives you a BB reduction for provinces that are your cores owned by war target, then the war target gets the same BB reduction on provinces that are its core and owned by you (if they beat you back in this war they can demand those provinces for same BB reduction as the one you got via CB when you started the war). Works the same way for all other CBs that have mutual thingy, and afaik prestige and peace costs modifiers are included.

    4. No, the 50 years thingy is a hardcodded mechanic that you cannot access or modify. (you can change the number but not the logic behind it).

    5. This question was raised a few times in past, last time that i saw it, it was proven that the AI has some VERY (surprisingly) complicated logic behind choosing NIs. IIRC theres a system that applies different values to different bonuses NIs give, so if you made a ridiculously overpowered NI, AIs would tend to choose it. The list of NIs you define in country file is primarily used for creating history if you start game on later dates. For example if you list NIs in order X > Y, and you start at a date that has government tech advanced high enough to allow 2 NIs, then the AI country will have NIs X and Y already selected. If, however, you start game from 1399., the first 2 NIs the same country chooses as it advances could be any other NIs instead. The list does however seem to impact the chances of listed NIs appearing more often than not, but, again, IIRC not that much.
    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!

  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,033
    4. You'd need to add your own events to give cores earlier than the hardcoded mechanic but it could be done. As DanubianCossak posted you can't change the mechanic itself though.

    5. The original research on this question over 5 years ago: http://forum.paradoxplaza.com/forum/...d.php?t=293349
    "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
    Prime Minister lukew's Avatar
    EU3 OwnerEU3 CompleteHearts of Iron IIIHeir to the ThroneDivine Wind
    EU3: ChroniclesCrusader Kings IIMount & Blade: With Fire and SwordPride of NationsSengoku
    Victoria II: A House DividedMarch of the Eagles

    Join Date
    May 2011
    Location
    HM Government
    Posts
    4,456
    4. Have a look at how MEIOU handled core gain.
    In this world nothing can be said to be certain, except death and taxes -Benjamin Franklin

    England to Great Britain in 'Newbie Collosseum I', 'Newbie Collosseum II', 'Death Taxes and Glory I', 'Death Taxes and Glory II' and 'Death Taxes and Glory IV', Castille to Spain in 'The Hotseat', Brittany in 'Victis Honor II', Milan to Italy in 'Dulce et Decorum Est I' and 'Fight for Supremacy', Venice in 'Nitman's', France in 'Novus Aevum', 'Dulce et Decorum Est II', 'Total War II', 'Total War III', 'Death Taxes and Glory III', 'Independence Day', 'Saturday Night's Alright for Fighting' and 'Rock n Roll', Sweden to Scandinavia in 'Game 7', Hindustan in 'Vacca Pugnax', Austria in 'Total War I' and 'Victis Honor', Muscovy to Russia in 'Glory Days', Ottoman Empire in 'Fight For Supremacy II', Brandenburg to Prussia in 'Diligimus Furorem Mammalia', Portugal in 'Slothurday Night's Alright for Slothing' and The Knights in 'Death, Taxes and Glory VI'

  6. #6
    5. Dharper's study, despite being masterly conducted, left its readers in the deepest sorrow: nobody could tell the formula nor have any influence over it. Fortunately some subversive modders stood against this injustice and decided to fight back. In Magna Mundi, ubik designed a generic idea picker which proved very powerful and easily moddable; let me show you the principle:

    First, set an AI-only requirement, for every idea
    Code:
    grand_army = {
    	trigger = {
    		NOT = { has_country_modifier = ni_changed }
    		OR = {
    			NOT = { ai = yes }
    			has_country_flag = grand_army_enabled
    		}
    	}
    	land_forcelimit_modifier = 0.5
    	land_tech_cost_modifier = -0.03  
    	global_manpower_modifier = 0.10  
    	infantry_cost = -0.10
    	war_exhaustion = -0.01
    	max_war_exhaustion = -1
    }
    
    military_drill = {
    	trigger = {
    		NOT = { has_country_modifier = ni_changed }
    		OR = {
    			NOT = { ai = yes }
    			has_country_flag = military_drill_enabled
    		}
    	}
    	global_manpower_modifier = 0.10 
    	land_morale = 0.80
    	discipline = 0.05
    	war_exhaustion = -0.01
    	max_war_exhaustion = -1
    }
    
    ### etc.
    Next, an event fires whenever an AI has a free idea slot (remember it can't choose any right now because it doesn't meet the requirement we've set previously). The event will help the AI decide which type of idea it needs, naval, land, exploration, state or culture. Here's a glimpse:
    Code:
    country_event = {
    
    	id = 623052
    	
    	trigger = {
    
    		free_ideas = 1
    		ai = yes
    
    		NOT = { has_country_flag = navy_ni_enabler }
    		NOT = { has_country_flag = army_ni_enabler }
    		NOT = { has_country_flag = exploration_ni_enabler }
    		NOT = { has_country_flag = state_ni_enabler }
    		NOT = { has_country_flag = culture_ni_enabler }
    
    		NOT = { has_country_flag = grand_navy_enabled }
    		NOT = { has_country_flag = sea_hawks_enabled }
    		NOT = { has_country_flag = superior_seamanship_enabled }
    		NOT = { has_country_flag = excellent_shipwrights_enabled }
    		NOT = { has_country_flag = naval_fighting_instruction_enabled }
    		NOT = { has_country_flag = naval_provisioning_enabled }
    		NOT = { has_country_flag = grand_army_enabled }
    		NOT = { has_country_flag = military_drill_enabled }
    		NOT = { has_country_flag = engineer_corps_enabled }
    		NOT = { has_country_flag = battlefield_commisions_enabled }
    		NOT = { has_country_flag = national_conscripts_enabled }
    		NOT = { has_country_flag = regimental_system_enabled }
    		NOT = { has_country_flag = merchant_adventures_enabled }
    		NOT = { has_country_flag = colonial_ventures_enabled }
    		NOT = { has_country_flag = shrewd_commerce_practise_enabled }
    		NOT = { has_country_flag = vice_roys_enabled }
    		NOT = { has_country_flag = smithian_economics_enabled }
    		NOT = { has_country_flag = improved_foraging_enabled }
    		NOT = { has_country_flag = bureaucracy_enabled }
    		NOT = { has_country_flag = vetting_enabled }
    		NOT = { has_country_flag = national_trade_policy_enabled }
    		NOT = { has_country_flag = espionage_enabled }
    		NOT = { has_country_flag = cabinet_enabled }
    		NOT = { has_country_flag = bill_of_rights_enabled }
    		NOT = { has_country_flag = church_attendance_duty_enabled }
    		NOT = { has_country_flag = divine_supremacy_enabled }
    		NOT = { has_country_flag = patron_of_art_enabled }
    		NOT = { has_country_flag = humanist_tolerance_enabled }
    
    	}
    	      
    	mean_time_to_happen = {
    		days = 8
    	}
    
    	title = "EVTNAME623052"
    	desc = "EVTDESC623052"
    
    	option = {
    	name = "EVTOPTA623052"
    		ai_chance = {
    			factor = 19 
    			days = 1
    
    			modifier = {						### put here any modifier you want, to refine the AI's choices
    				factor = 0 #exclusion
    				NOT = { num_of_ports = 1 }
    			}
    			modifier = { 
    				factor = 2
    				num_of_ports = 10
    			}
    			modifier = { 
    				factor = 0.5
    				NOT = { num_of_ports = 2 }
    			}
    			modifier = { 
    				factor = 2
    				land_naval = 1
    			}
    			modifier = { 
    				factor = 0.5
    				NOT = { land_naval = 0 }
    			}
    			modifier = { 
    				factor = 0
    				AND = {
    					idea = grand_navy
    					idea = sea_hawks
    					idea = superior_seamanship
    					idea = excellent_shipwrights
    					idea = naval_fighting_instruction
    					idea = naval_provisioning
    				}
    			}
    		}
    		set_country_flag = navy_ni_enabler
    	}
    
    	### There are 4 more options not listed here, for land, exploration, state, and culture ideas
    
    }
    Now the AI knows which type will fit best, and only has to pick among its family. Let's say it chose the naval type, the same principle applies here:
    Code:
    country_event = {
    
    	id = 623053
    	
    	trigger = {
    		has_country_flag = navy_ni_enabler
    	}
    
    	mean_time_to_happen = {
    		days = 8
    	}
    
    	title = "EVTNAME623053"
    	desc = "EVTDESC623053"
    
    	option = {
    	name = "EVTOPTA623053"
    		ai_chance = { 
    			factor = 18 
    			days = 1
    			modifier = { 
    				factor = 0
    				idea = grand_navy
    			}
    			modifier = { 
    				factor = 1.25
    				navy_size_percentage = 1.1
    			}
    			modifier = { 
    				factor = 1.25
    				navy_size_percentage = 1.25
    			}
    			modifier = { 
    				factor = 1.5
    				navy_size_percentage = 1.4
    			}			
    			modifier = { 
    				factor = 1.5
    				navy_size_percentage = 1.6
    			}
    			modifier = { 
    				factor = 2
    				navy_size_percentage = 1.8
    			}
    		}
    		set_country_flag = grand_navy_enabled ### here's the needed requirement! hurray!
    		clr_country_flag = navy_ni_enabler
    	}
    
    	### Same, 5 more options not listed here, for the other choosable naval ideas (Naval Glory being an exception)
    
    }
    Clever hey? Now it takes a little patience to find a good balance with these modifiers, but once you have it you won't see the difference between a human and an AI anymore!

  7. #7
    Scio quod nesciam. MrTaxman's Avatar
    EU3 OwnerHoI AnthologyNapoleonic MarshalEuropa Universalis: RomeVictoria: Revolutions
    Europa Universalis III: In NomineRome: Vae VictisSupreme Ruler 2020Hearts of Iron IIIHeir to the Throne
    Semper FiVictoria 2Divine WindCities in MotionCrusader Kings II
    For the Motherland

    Join Date
    Apr 2010
    Location
    Between here and there.
    Posts
    1,008
    Frank - that's a good guide to it, thanks
    EUIII: DW Mods
    Occultus Orbis Terrestre
    Ars Lingua

    "A language is a dialect with an army and navy" - Max Weinreich - Meyer Lazarevich Veynreykh - "אַ שפּראַך איז אַ דיאַלעקט מיט אַן אַרמיי און פֿלאָט"

  8. #8
    General Trin Tragula's Avatar
    Deus Vult!Victoria: RevolutionsEU3 CompleteRome GoldHearts of Iron III
    For The GloryArsenal of DemocracyHeir to the ThroneMount & Blade: Warband200k Club
    Semper FiVictoria 2Divine WindMagickaCrusader Kings II
    For the MotherlandSengokuVictoria II: A House DividedCrusader Kings II Holy KnightMarch of the Eagles
    Victoria 2: Heart of Darkness

    Join Date
    Aug 2003
    Location
    Sweden - Lund
    Posts
    1,769
    Before picking any idea the AI will evaluate all available ideas (based on utilityI would assume though it does seem to favour those in it's list) and that process is logged by the game when using debug mode. It might not tell us why the AI chose a particular idea but with some experimenting one might get it to pick a certain one more often.

    If you really want control of ideas for most purposes using events to steer the AI is probably going to be more effective though
    My mods:
    Oriental Mod for EU3 - For an EU3 experience with a more realistic Asia (and many other things as well).

    Minimal India Improvement Mod for EU3 - A mod that just focuses on improving the Indian map in EU3 without increasing the number of provinces.

  9. #9
    Quote Originally Posted by MrTaxman View Post
    Frank - that's a good guide to it, thanks
    Hey you're welcome

  10. #10
    Modding Victoria 2 ZomgK3tchup's Avatar
    Deus Vult!Victoria: RevolutionsEU3 CompleteHearts of Iron IIIHeir to the Throne
    Semper FiVictoria 2Divine WindSword of the StarsDarkest Hour
    Crusader Kings IIFor the MotherlandVictoria II: A House DividedCrusader Kings II Holy Knight

    Join Date
    Dec 2009
    Location
    New Jersey, USA
    Posts
    2,273
    Blog Entries
    1
    Hm, there's some very helpful information here. Thank you everyone.

+ 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