Emigration

Any chance you can surround what you change din the NotificationPanel.lua with soem comments please? So us clueless Lua people can see what need to be merged with other mods that use this file?
 
Great Job on the Mod.
There could also be things built to counter this affect.
The Soviet Union, China, and many other nations over time have worked militarily to keep their 'citizens' within their own borders.
Culture could be gained and lost for a number of rounds, like a trade, to reflect the cultural impact of lost peoples or gained peoples.
Also, if a small city should be reduced to 0 from emmigration, then 2 things could happen. The city gets the cue to Raze, or the computer converts the city to a ruins.
Internal immigration isn't a bad idea, and should get easier with the advent of roads, highways, railroads, etc. But this would require adapting a new city field. Stability. Cities can be independently happy/unhappy from each other within the civ, and their independent ratings would affect overall civ happiness. Prolonged unhappiness would add up, as would prolonged happiness.
 
I love your mod, and like I mentioned in the PM, things I enjoy I tend to fiddle around with (like Civ V itself). I hope it's alright if looking around in the mod a bit can be an opportunity for me to learn Lua... I haven't had any experience with this programming language and you organized your code in a manner that was easier to understand than some other mods. You have very good coding practices.

I got that stuff I mentioned in the PM debugged, created some tools that might be helpful for this mod:

  • Queue class for tracking average happiness
  • Created an xml file containing two tables: constants and weights. The latter is just a branch-table of city functions executed in a loop to check status and multiply by the appropriate weights. There's also a weight for if the city has emigrated once already in the current turn. The other functions in the jump table are:
    • Razing
    • Resistance
    • Puppet
    • Occupied
    • Blockaded
    • Capital
    • GetGarrisonedUnit (for booleans nil evaluates to false, anything else is true).
  • Culture factored in, separately (since it's a divisor)... though it'd be easy enough to add a weight for that to the xml too.
  • Lots of debug output is dumped to FireTuner for these tools.

I included a savegame where you can see the effect when I tied these components in: capital almost never depopulates, while the puppet states lose more. I hope this can help more than just the rambling feedback I tend give. :)

Package.zip
 
Great mod! I'll try it out. Thanks! :goodjob: The revolution idea would also be good if someone made it..
 
I love the idea!

I was wondering for people have tried this, is this the best difficulty improving mod yet...as the AI is normally obssessed with happiness? Do you find at higher levels your people leave your empire in droves to the +50 happiness AI empires?
 
So Killmeplease. Any news on v2?

I'm actually waiting for it before I'll start a new Civ game

\Skodkim
 
I'm in a similar place. Though I'm not not-playing, I'm eager to see the progress!
 
In addition to the earlier stuff, with Afforess's help and his table serialization package I created a way to store average happiness in savegame files (previously was just in memory). Hopefully this might be useful for you, I attached the code. :)
 

Attachments

  • Package.zip
    315.5 KB · Views: 242
I don't know if it's this mod or a compatability issue with another mod, but abug occured while I was using this.

After a while I noticed that all the other notification pop ups stopes working. I would have to go into the notification log to see what happened. You pop ups continued to work fine, with the exception of the bug that says people migrated from my city to my city.

Your mod was the only only I was running that used the notification pop ups.
 
nice mod, will generally give AI advantage b/c they're typically so freakin' happy. AI needs all the help they can get, so this is a good think. :thumbsup:
 
I think this mod is a great idea... makes me wish I had thought of it especially because I have implemented something similar, yet not as robust in a mod I helped make for Civ IV (using a migrant unit) :).

However, IMHO there is a reality issue (tech based). In early days of civilization emigration was rare since feasibility was an issue. Sure... it happened from time to time. Sometimes we had parts of or even entire nations move (Israel and Native Americans come to mind). In such cases these nations often emigrated and formed their own empire (something else that could be implemented? The Revolutions mod for Civ IV comes to mind). Even so, these incidents were an enormous undertaking by the societies who did such things. I think the rate should change with the development with certain technologies. Emigration should be very rare early in the game and only occur when another empire is close by. Emigration should then become more likely as certain technologies are discovered (such as ocean faring and combustion engine or the CiV equivalents). Just a thought.
 
Emigration should then become more likely as certain technologies are discovered (such as ocean faring and combustion engine or the CiV equivalents). Just a thought.

Keep in mind that while emigration occurs often in turns...each of those turns is 100's of years in the early game.

Considering an arrow can fly the amount of land it takes a warrior to move in 100 years worth of a turn...I can let this one slide:)
 
Sounds like a great mod, going to try it out. Also I have some ideas.

If a civ has atleast 2 trad policys, then cities with baracks and a military unit present should be quite a bit more tolerant before people migrating, to illustrate how the noble pressures the people even when they are unhappy. But as an consequence these cities should recive less imigrants as well when happy.

If a nation drops down to angry population, then puppet-states and annexed cities will revolt and rejoin the civ they where taken from (if it still excists, else it will join some other nation) if there is no baracks+millitary units present. This will make warfare alot more intresting and realistic.

Also the speed of constructing courthouses should be affected by the happyness in the empire, maybe +1% building speed for each happyness, simulating that empires where the people are happy have alot easier time to convert the people. (althought might not be that relevant to emigration)
 
wanted to release Emigration v2 on saturday but there is a strange bug appeared (incorrect syntax near symbol '□'). so i am debugging it now. v2 will come in a few days.

A part of Thalassicus' code adopted so I added him to the authors.

Thalassicus, i've not included some stuff like modifiers for garrisoned units, occupied and puppeted cities, as i think there have to be more complex mechanics to introduce these. e.g. garrisoned unit lowering emigration has not much scence if player runs freedom policy (or liberty).
 
Looks fantastic, and I may try this out. Minor point-out though, on your image, why don't you change the text to something more...uh...professional looking? If that makes sense...er...for a suggestion: "An Unhappy citizen in [your city] city migrated to the [target civilization adjective] city of [target city], seeking a better life!"

Just a suggestion. But this has definitely piqued my interest.
 
Looks fantastic, and I may try this out. Minor point-out though, on your image, why don't you change the text to something more...uh...professional looking? If that makes sense...er...for a suggestion: "An Unhappy citizen in [your city] city migrated to the [target civilization adjective] city of [target city], seeking a better life!"

Just a suggestion. But this has definitely piqued my interest.
Thanks.
Currently in v2 messages look like this:
Unhappy citizen of <City> emigrated to the <Country> seeking a better life
Migrant from the <Country> arrived in our city of <City> seeking a better life

PS: any message text tweaks are greatly appreciated since English is not my native language ;)
 
PS: any message text tweaks are greatly appreciated since English is not my native language ;)

The messages should be more like this:

"An unhappy citizen from <City> emigrated to the <Other Civilization>, seeking a better life."

"A <Civilization Adjective> citizen arrived in our city of <City>, seeking a better life."

English seems to love leading articles (a, an, the, etc.), and I've noticed that other languages don't seem to share that love. I thought the Beatles fixed that a while back! ;)


"All you need is grammar... I mean, love!"
 
ok i'll correct messages.
there are no leading articles in Russian at all :rolleyes: also there are no "is", "am", "are" (e.g. "he is a doctor" = "he doctor"). so its quite hard to determine when to use an article and what an article to use as i'm completely unaccustomed with it.
 
Top Bottom