+ Reply to Thread
Results 1 to 10 of 10

Thread: A few modding questions.

  1. #1
    Modding Victoria 2 ZomgK3tchup's Avatar
    Crusader Kings IIDarkest HourDeus VultEU3 CompleteDivine Wind
    For the MotherlandHearts of Iron IIIHeir to the ThroneVictoria: RevolutionsSemper Fi
    Sword of the StarsVictoria 2Victoria II: A House DividedCK2: Holy Knight500k club
    Europa Universalis IV: Pre-order

    Join Date
    Dec 2009
    Location
    New Jersey, USA
    Posts
    2,456
    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
    Crusader Kings IIEuropa Universalis 3Divine WindFor the MotherlandHearts of Iron III
    HOI3: Their Finest HourHeir to the ThroneEuropa Universalis III: In NomineEU3 Napoleon's AmbitionVictoria: Revolutions
    Europa Universalis: RomeSemper FiVictoria 2Victoria II: A House DividedVictoria II: Heart of Darkness
    500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2010
    Location
    Between here and there.
    Posts
    1,029
    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
    Game Breaking Bug DanubianCossak's Avatar
    Cities in MotionCrusader Kings IIDarkest HourEU3 CompleteDivine Wind
    Heir to the Throne500k clubEuropa Universalis IV: Pre-order

    Join Date
    Nov 2009
    Location
    Belgrade to Москва
    Posts
    9,286
    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.
    While Chosen One in absentia, Temporary Chosen One Of The Exalted Church of YEShans

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

  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,768
    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 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
    MEIOU and Taxes lukew's Avatar
    Cities in Motion 2Crusader Kings IIEuropa Universalis 3Europa Universalis: ChroniclesEU3 Complete
    Divine WindHearts of Iron IIIHeir to the ThroneMarch of the EaglesSengoku
    The Showdown EffectVictoria 2Victoria II: A House DividedVictoria II: Heart of DarknessMount & Blade: With Fire and Sword
    Pride of Nations500k clubEuropa Universalis IV: Pre-order

    Join Date
    May 2011
    Location
    Nottingham, UK
    Posts
    5,118
    4. Have a look at how MEIOU handled core gain.
    MEIOU and Taxes for EUIV - Download Now!
    Development Diary | Wiki | Release announcement | Facebook
    'In this world nothing can be said to be certain, except Death MEIOU and Taxes' -Benjamin Franklin
    Death and Taxes - an EUIII DW mod
    'Is this version save game compatible?' -Everyone

  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!

    Christmas momod for MMU
    "an evil MM on steroids" -Deus ret.
    Z-Plan for DIG and FTM
    "playing - so far so good" -marwis

  7. #7
    Scio quod nesciam. MrTaxman's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor the MotherlandHearts of Iron III
    HOI3: Their Finest HourHeir to the ThroneEuropa Universalis III: In NomineEU3 Napoleon's AmbitionVictoria: Revolutions
    Europa Universalis: RomeSemper FiVictoria 2Victoria II: A House DividedVictoria II: Heart of Darkness
    500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2010
    Location
    Between here and there.
    Posts
    1,029
    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
    Scripter Paradox Dev Team Trin Tragula's Avatar
    200k clubArsenal of DemocracyCrusader Kings IIDeus VultEU3 Complete
    Divine WindFor The GloryFor the MotherlandHearts of Iron IIIHeir to the Throne
    MagickaMarch of the EaglesVictoria: RevolutionsRome GoldSemper Fi
    SengokuVictoria 2Victoria II: A House DividedVictoria II: Heart of DarknessMount & Blade: Warband
    CK2: Holy Knight500k clubEuropa Universalis IV: Pre-order

    Join Date
    Aug 2003
    Location
    Sweden - Lund
    Posts
    2,866
    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

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

    Christmas momod for MMU
    "an evil MM on steroids" -Deus ret.
    Z-Plan for DIG and FTM
    "playing - so far so good" -marwis

  10. #10
    Modding Victoria 2 ZomgK3tchup's Avatar
    Crusader Kings IIDarkest HourDeus VultEU3 CompleteDivine Wind
    For the MotherlandHearts of Iron IIIHeir to the ThroneVictoria: RevolutionsSemper Fi
    Sword of the StarsVictoria 2Victoria II: A House DividedCK2: Holy Knight500k club
    Europa Universalis IV: Pre-order

    Join Date
    Dec 2009
    Location
    New Jersey, USA
    Posts
    2,456
    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