+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 26

Thread: Cultural migrations

  1. #1
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639

    Cultural migrations

    Hey guys.

    Based on my Religious Migrations mini-mod, I was thinking of doing a mod that focuses on cultural migrations.

    The problem is, I have no idea how to code the events without them being ultra-large, due to the enormous amount of different cultures that are present in the game (even on vanilla, let me not get started on MMP).

    I'm learning new ways of coding in "paradoxian language" every day, but still, there are great limitations on what we can do without repeating large portions of code.

    This is a call to all experienced modders out there: do you have any ideas on how to make a culture spread from a province to another without making a specific event for each culture?

    Feedback very much appreciated on this, since I think this set of events would add a great new depth to the game.
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  2. #2
    Well, I can't mod , but I'd be very interested in a mod like this, so I guess I just bumped your post.

  3. #3
    First Lieutenant EvilCartyen's Avatar
    Crusader Kings IIDeus VultEuropa Universalis 3For the MotherlandHearts of Iron III
    Heir to the ThroneEuropa Universalis III: In NomineMajesty 2EU3 Napoleon's AmbitionVictoria: Revolutions
    Europa Universalis: RomeSemper FiSengokuVictoria 2Rome: Vae Victis
    Mount & Blade: WarbandCK2: Holy Knight500k clubEuropa Universalis IV

    Join Date
    Jan 2008
    Location
    Copenhagen,Denmark
    Posts
    283
    I don't think there is an easy way of tracking culture, without coding events for every culture in your mod, triggering only for them. Not to mention modifiers for every culture. Correct me if I am wrong though
    This is a really neat signature.

  4. #4
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    Quote Originally Posted by EvilCartyen View Post
    I don't think there is an easy way of tracking culture, without coding events for every culture in your mod, triggering only for them. Not to mention modifiers for every culture. Correct me if I am wrong though
    Yes I do also think so. But this thread is more of an invitation to "think outside the box" and come up with a clever idea. If it is possible.
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  5. #5
    Dei Gratia author dharper's Avatar
    Crusader Kings IIEU3 CompleteDivine WindFor The GloryHearts of Iron III
    Heir to the ThroneEuropa Universalis III: In NomineMarch of the EaglesEU3 Napoleon's AmbitionVictoria: Revolutions
    Europa Universalis: RomeSengokuVictoria 2Victoria II: A House DividedVictoria II: Heart of Darkness
    Rome: Vae VictisEU3 Collectors Edition500k clubEuropa Universalis IV: Pre-orderEUIV: Wealth of Nations
    EUIV: Conquest of ParadiseEUIV: Res Publica

    Join Date
    Aug 2002
    Location
    Province #989 (EU3/4)
    Posts
    15,223
    Good luck! I can't think of any way, but hopefully someone will surprise me.
    A mod for Europa Universalis IV that enhances religion in the age of faith and reason
    Over 700 events for over 30 religions
    Wiki
    Version 1.7.02 compatible with the Res Publica expansion
    Download available (July 24, 2014) or subscribe on Steam to get updates automatically
    Project Cryptic: 10% complete

  6. #6
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    Okay, here's my idea of how to make this as simple as possible.

    The main event is a single huge event that encompasses code for every other culture, but simplify the rest of the coding process.

    Here's my draft for the "copy culture" code:

    (it isn't working yet, btw. I have to think of a better way to do it, $&$% scopes. but you get the idea)

    Code:
    country_event = {
    
    #MAIN COPY CULTURE EVENT
    
      	id = 719001
    
    	trigger = {
    		has_global_flag = migration_in_progress
    		NOT = { has_global_flag = copy_in_progress }
     	}
    
    	mean_time_to_happen = { 
    		days = 1
    	}
    
    	title = "EVTNAME719001"
    	desc = "EVTDESC719001"
    
    	immediate = { 
    		clr_global_flag = migration_in_progress
    		set_global_flag = copy_in_progress
    	}
    	
    	option = {
    		name = "EVTOPTA719001"
    		ai_chance = { factor = 100 }
    		
    		clr_global_flag = copy_in_progress
    		
    		#NOW FOR EACH AND EVERY CULTURE...
    		any_country = {
    			any_owned = {
    				limit = {
    					has_province_flag = spread_culture					
    					culture = flemish
    					
    				}
    				random_country = {
    					random_owned = {
    						limit = { has_province_flag = copy_culture }
    						change_variable = { which = flemish_culture value = +0.1 }
    						clr_province_flag = copy_culture
    					}
    				}
    
    			}
    		}
    		#EVERY OTHER CULTURE GOES HERE
    		#END
    		
    		any_country = {
    			any_owned = {
    				limit = {
    					OR = {
    						has_province_flag = spread_culture
    						has_province_flag = copy_culture
    					}
    				}
    				clr_province_flag = spread_culture
    				clr_province_flag = copy_culture
    			}
    		}		
    
    	}
    }
    Get it?

    To copy/spread a culture from one province to another, we simply need to assign a province the "spread_culture" flag, and then the other province the "copy_culture" flag. Then this huge event will deal with transferring the cultures appropriately.

    Of course we could play a lot better with this, though. Instead of assigning the culture directly, we could assign a variable value to it.

    Code:
    change_variable = { which = danish_culture value = +0.1 }
    Then, in another event, when this value surpasses a certain number, we assign the correct new culture to the province. Obviously, this would be another huge event, though. This "variable" idea is based on my religions migrations mod. This way provinces can have different values for different cultures, allowing us to play with minority cultures and the such.

    This is still an immense job, but I think it's the simplest way we can do this. What do you guys think?
    Last edited by aenariel; 09-04-2009 at 21:04.
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  7. #7
    Colonel Elmokki's Avatar
    Crusader Kings IIEuropa Universalis 3Victoria 2Victoria II: A House DividedMount & Blade: Warband
    CK2: Holy Knight500k clubEuropa Universalis IV: Pre-order

    Join Date
    Jun 2003
    Location
    Finland
    Posts
    809
    As with the idea of a simplified dynastic system for EU3 this suffers from the limited moddability of EU3.

    You can't put modifiers to general categories (or in the ideal solution of being able to mod by proper programming, can't have them be specific instances of "culture_spread_modifier") and therefore many good and interesting things come either with horrible blocks of triggers and hundreds of nearly the same events for different cultures/dynasties/whatever or they won't come at all.

    It's sad, really.
    I'm rock. Scissors are fine, but the paper needs some nerf.

  8. #8
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    Well, I've been thinking about this; even if I can't solve the scope problem in the draft I posted here, just creating a global flag to "transport" the culture, and then in another mega-event doing the transition, the whole thing is still very much doable, although hella boring to code.
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  9. #9
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    Quote Originally Posted by Elmokki View Post
    As with the idea of a simplified dynastic system for EU3 this suffers from the limited moddability of EU3.

    You can't put modifiers to general categories (or in the ideal solution of being able to mod by proper programming, can't have them be specific instances of "culture_spread_modifier") and therefore many good and interesting things come either with horrible blocks of triggers and hundreds of nearly the same events for different cultures/dynasties/whatever or they won't come at all.

    It's sad, really.
    Yea, it's sad, because there are a lot of good ideas around and a lot of people to code them, but with these kind of obstacles there's few of us willing to spend time with this.
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  10. #10
    Major hyme's Avatar
    Hearts of Iron 2: ArmageddonCrusader Kings IIDeus VultEuropa Universalis 3For the Motherland
    Hearts of Iron IIIHeir to the ThroneEuropa Universalis III: In NomineLost Empire - ImmortalsEU3 Napoleon's Ambition
    Victoria: RevolutionsEuropa Universalis: RomeSemper FiSengokuSword of the Stars II
    Supreme Ruler 2020Victoria 2Victoria II: A House DividedRome: Vae VictisMount & Blade: Warband
    Warlock: Master of the ArcaneCK2: Holy Knight500k club

    Join Date
    Jan 2007
    Location
    Muscoda WI, US
    Posts
    770
    keeping an eye on this,
    "Berlin is the testicle of the West. When I want the West to scream, I squeeze on Berlin." Nikita Khrushchev

    "Under my command, every mission is a suicide mission."- Zapp Brannigan, Futurama


    "Capitalists will always find a way of buying themelves out of any crisis. As long it's the workers that foot the bill" Lenin

  11. #11
    Major hyme's Avatar
    Hearts of Iron 2: ArmageddonCrusader Kings IIDeus VultEuropa Universalis 3For the Motherland
    Hearts of Iron IIIHeir to the ThroneEuropa Universalis III: In NomineLost Empire - ImmortalsEU3 Napoleon's Ambition
    Victoria: RevolutionsEuropa Universalis: RomeSemper FiSengokuSword of the Stars II
    Supreme Ruler 2020Victoria 2Victoria II: A House DividedRome: Vae VictisMount & Blade: Warband
    Warlock: Master of the ArcaneCK2: Holy Knight500k club

    Join Date
    Jan 2007
    Location
    Muscoda WI, US
    Posts
    770
    Quote Originally Posted by aenariel View Post
    Yea, it's sad, because there are a lot of good ideas around and a lot of people to code them, but with these kind of obstacles there's few of us willing to spend time with this.
    well you write the base code and I could make sure each culture get it.
    Last edited by hyme; 11-04-2009 at 04:18.
    "Berlin is the testicle of the West. When I want the West to scream, I squeeze on Berlin." Nikita Khrushchev

    "Under my command, every mission is a suicide mission."- Zapp Brannigan, Futurama


    "Capitalists will always find a way of buying themelves out of any crisis. As long it's the workers that foot the bill" Lenin

  12. #12
    I could really use something like this in my mod, to simulate the historical migrations of cultural groups like the Mexica or Taino.
    Romance of the Americas: A Mesoamerican Mod for EU3

  13. #13
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    I've come up with a set of events to copy cultures from an undetermined province to another, fully functional. All modders will need is to adapt this to their own mods, by adding/removing cultures as needed.

    Will post here in a few minutes the draft (as I said, it works).
    Last edited by aenariel; 11-04-2009 at 06:31.
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  14. #14
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    Here's the copy culture set and an example of an event that uses it:

    Code:
    province_event = {
    
      	id = 719000
    
    	trigger = {
    		NOT = { has_global_flag = copyculture }
    		any_neighbor_province = {
    			NOT = { culture = THIS }
    		}
     	}
    
    	mean_time_to_happen = { 
    		days = 14
    	}
    
    	title = "EVTNAME719000"
    	desc = "EVTDESC719000"
    
    	immediate = { 
    		set_global_flag = migration_in_progress 
    		set_global_flag = copyculture
    	}
    	
    	option = {
    		name = "EVTOPTA719000"
    		ai_chance = { factor = 100 }
    		set_province_flag = spread_culture
    		random_neighbor_province = {
    			limit = { NOT = { culture = THIS } }
    			set_province_flag = copy_culture
    		}
    	}
    }
    Last edited by aenariel; 11-04-2009 at 10:48.
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  15. #15
    Major hyme's Avatar
    Hearts of Iron 2: ArmageddonCrusader Kings IIDeus VultEuropa Universalis 3For the Motherland
    Hearts of Iron IIIHeir to the ThroneEuropa Universalis III: In NomineLost Empire - ImmortalsEU3 Napoleon's Ambition
    Victoria: RevolutionsEuropa Universalis: RomeSemper FiSengokuSword of the Stars II
    Supreme Ruler 2020Victoria 2Victoria II: A House DividedRome: Vae VictisMount & Blade: Warband
    Warlock: Master of the ArcaneCK2: Holy Knight500k club

    Join Date
    Jan 2007
    Location
    Muscoda WI, US
    Posts
    770
    I going to give it a try will let you know how it goes.
    "Berlin is the testicle of the West. When I want the West to scream, I squeeze on Berlin." Nikita Khrushchev

    "Under my command, every mission is a suicide mission."- Zapp Brannigan, Futurama


    "Capitalists will always find a way of buying themelves out of any crisis. As long it's the workers that foot the bill" Lenin

  16. #16
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    Quote Originally Posted by hyme View Post
    I going to give it a try will let you know how it goes.
    Good, let me know. I've made all that in less than 1 hour, but it's 7 am so something might be off. I'll be testing it (and making some events I had in mind for a while) during the day.
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  17. #17
    hmmm...This is basicly what I wanted to do with the accepted culture idea that somebody had and i tried to make the event for him and TN mod. I wanted only accepted cultures to spread....but the limits seemed to refuse to allow a accepted culture command or perhaps it was not properly accepting the THIS command on it. you should eventualy add modifiers to the starting spread events IMO. anyway good job and if you get accepted culture to spread let us know please (then maybe I could use your work in TN mod if you dont mind ).
    Shalom
    John F. Kennedy
    "For we are opposed around the world by a monolithic and ruthless conspiracy that relies primarily on covert means for expanding its sphere of influence--on infiltration instead of invasion, on subversion instead of elections, on intimidation instead of free choice, on guerrillas by night instead of armies by day."

    John 8:32
    "And ye shall know the truth, and the truth shall make you free."
    Martin Luther King
    "A nation that continues year after year to spend more money on military defense than on programs of social uplift is aproaching spiritual death."

  18. #18
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    This is just to copy cultures from a province to another. Basically it allows doing (in)directly what the game doesn't allow with direct coding... Now we can code whatever events we want and tell the main events to copy the culture from province X to province Y.

    I will code a few standard events but obviously anyone may use this as they wish.

    The events are nothing special really, and they need to be further changed if there are different cultures than the ones in vanilla.

    Well, I'm going to mess around a bit and let you guys know if this is working properly.
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  19. #19
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    There was a stupid bug on the first event (forgot to close a bracket), I'll reupload shortly after making some tests, posted along with another event I coded that uses the new events. No sleep = dimished coding skillz. :P
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

  20. #20
    Major aenariel's Avatar
    Crusader Kings IIEuropa Universalis 3Divine WindFor The GloryHeir to the Throne
    Victoria 2500k clubEuropa Universalis IV: Pre-order

    Join Date
    Apr 2008
    Location
    Porto, Portugal
    Posts
    639
    This one is so good I want to cry.

    Code:
    province_event = {
    
    	id = 454549
    
    	trigger = {
    		is_overseas = no
    		owner = { NOT = { accepted_culture = THIS } }
    		NOT = { has_global_flag = copyculture }
    		owner = {
    			any_owned_province = {
    				is_colony = yes
    				has_owner_culture = yes		
    			}
    		}
    	}
    
    	mean_time_to_happen = {
    		months = 1
    	}
    	
    	title = "EVTNAME454549"
    	desc = "EVTDESC454549"
    
    	immediate = {
    		set_global_flag = copyculture
    		set_global_flag = migration_in_progress
    	}
    	
    	option = {
    		name = "EVTOPTA454549"
    		owner = {
    			random_owned = {
    				limit = {
    					is_colony = yes
    					has_owner_culture = yes					
    				}
    				set_province_flag = copy_culture
    				citysize = 500
    			}
    		}
    		citysize = -500
    		set_province_flag = spread_culture
    		
    	}
    }
    In case you have a province without an accepted culture, it sends 500 pop from that province to a colony, and changes the colony's culture to the culture of the province that sent the pop.

    Works like a charm!

    Here's the copy_culture file with the fixed events!
    Attached Files
    /aeni
    Europa Universalis IV über alles!
    Try out Haftetavenscrap's Realistic Map Generator!

    Maker of:
    » Religious Migrations Mini-Mod (for EU3): Event system that simulates religious minorities and migrations.
    » copy_culture Event Set (for EU3): Copy any province's culture to another province of your choice.

+ Reply to Thread
Page 1 of 2 1 2 LastLast

Posting Permissions

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