[MODCOMP]Immigration Mod

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Immigration Mod
By: TheLopez

Last Updated 11/08/06

Version: v0.5w
Patch Compatibility: Warlords v2.0.8.0
MP Compatible: ?
Download Mod v0.5w

Version: v0.4.5
Patch Compatibility: v1.61
MP Compatible: ?
Download Mod v0.4.5

Description:
Immigration has always been a part of the history of the world and now it can
be part of the history of your game. There are several conditions that can
cause a city to spawn immigrants war, sickness, unhappiness, lack of food, etc.
All of these can cause a group of immigrants to leave from one of your cities
to another city that may not necesarly be yours.


Installation Instructions:

1) Unzip this into the "civ4_install_folder\Mods\" folder.
2) Open the CivilizationIV.ini configuration file
3) Change the Mod line to read: Mod = Mods\Immigration Mod
4) Load the game.
5) Then play as normal.


-----Game Play-----
Spoiler :

- Immigrants cannot be controlled by any players, though immigrants from other
civilizations can be attacked and killed off.

- Newly conquered cities have a much higher chance of generating immigrants
that will return to their home civilization.

- 25+ configurable options provided to allow the fine tuning of the mod.

- Unhappiness, unhealthiness, lack of food, etc. can cause immigration from
one city to another city.

- Depending on the configuration of the mod it is possible for immigrants to
carry some of the culture from the city that created them to the city they
are traveling to.

- Depending on the configuration of the mod it is possible for immigrants to
carry the religion from the city that created them to the city they are
traveling to.

- Certain civics will prevent immigrants from immigrating from cities


-----Units-----
Spoiler :

- Immigrant:
[TAB]- Cannot be built
[TAB]- Movement: 3
[TAB]- Combat: 0
[TAB]- Can only defend
[TAB]


-----Notes to Modmakers-----

If you want to use the Immigration Mod in your mod I have tried to make
things as easy as possible for you. In the XML files modified sections are
enclosed by:
<!-- -->
<!-- Immigration Mod Start -->
<!-- -->
and
<!-- -->
<!-- Immigration Mod End -->
<!-- -->

In the Python files I have added # < Immigration Mod Start > and
# < Immigration Mod End > in all of the places that I have made changes
to the original files.

All I ask is that you give me credit.


-----Future Features-----
Spoiler :

- Allow immigrants heading to a ruined city to rebuild the city

- Allow immigrants to cross oceans

- Allow immigrants heading to newly found land to build colonies that can turn
into new cities after several turns.

- If an Immigrant leaves my city for an enemy city, I want to kill him. It
would be nice if you could have an option that let's the human player know
where that immigrant is headed. If a player moved a military unit of theirs
onto an Immigrant, you could display a popup that says "This immigrant is
headed towards [ImmigrantTargetCity]." Then you could have two options:
[TAB][Carry on] (Leave the immigrant alone)
[TAB][Slaughter them all!] (Kill the immigrant)
Requested by Shqype.

- Add an option setting a range of turns that an immigrant must be "unhappy"
before they leave their city. Requested by Shqype.

- Add an option allowing people to display the reason why an immigrant was
generated by one of their cities. Maybe using the happy/angry/sick/etc icons.
Requested by Jeckel.

- Add an option allowing players to have a tag added to the immigrants name
letting players know why the immigrant unit was generated. Requested by
Jeckel.


-----Version Information-----

-----v0.4.5------

- Changed the immigrant AI from UNITAI_SETTLE to UNITAI_SPY and
UNITAI_MISSIONARY which fixed the issue where immigrant units do not move
away from cities. Reported by Komori.

- Fixed the issue where culture was being taken to negative numbers. Reported
by Dom Pedro III and Komori.

Spoiler :

-----v0.4.x------

- Fixed the issue where immigrants would stop working when the city they
targetted was razed and they reached the plot where the razed city was
located. Reported by Shqype

- Fixed an issue causing immigrants to stop working after a barbarian city was
conquered and when a generated immigrant unit tried to pick a target city.
This issue made the immigrant unit flicker and become selectible. Reported by
White Rabbit.

- Fixed the issue where players could change the misson for the immigrants by
using the right-mouse button menu. Now at the begining of every turn
immigrant missions are checked and if they are not moving towards their
intended city target they will be retargetted. Reported by Jeckel.

- Fixed the issue where immigrants target unreachable cities. Reported by
Shqype.


-----v0.4------

- Added the configurable option allowing players to change the maximum chance
that any city will spawn an immigrant in the game.

- Fixed an issue causing immigrants to stop working when trying to pick a
religion from a city. This issue made the immigrant unit flicker and become
selectible. Reported by Civmansam.

- Fixed the issue that caused immigrants to lose their mission when coming into
contact with an enemy like barbarians.


-----v0.3------

- Commented all of the code

- Fixed the code that applies the culture carried by immigrants to a city

- Changed the default value for the "Immigrants Decrease Culture" configurable
option from False to True

- Reorganized the code so all of the event manager specific code is in its own
file and everything else immigration related is in its own file

- Fixed the exploit found by Shqype allowing players to redirect immigrant
units from their intended target to somewhere else.

- Added the configurable option allowing players to specify if immigrant units
should not carry a religion from the city they were created from.

- Added the configurable option allowing players to specify the chance that an
immigrant unit will carry a religion from the city they were created from.
Valid values are from 1 to 100.

- Added the configurable option allowing players to specify if immigrant units
should carry a mix of the religion from the city where they were spawned.


-----v0.2------

- Implemented the code needed to hide all action buttons from use when players
select a immigrant unit.

- Implemented the code that makes an immigrant unit join a city when they reach
their targetted city.

- Implemented the code needed by immigrants to select the best city possible
for resettlement

- Implemented the code used to determine the culture carried by immigrants


-----v0.1------

- Setup Immigration Mod infrastructure

- Added the configurable option allowing players to specify if civilization
capital cities should be allowed to spawn immigrant units.

- Added the configurable option allowing players to specify if immigrants
should not be spawned in cities with an unhappy population.

- Added the configurable option allowing players to specify how much the
unhappy population value will influence the calculations for spawning an
immigration unit.

- Added the configurable option allowing players to specify if immigrants
should not be spawned in cities with an unhealthy population.

- Added the configurable option allowing players to specify how much the
unhealthy population value will influence the calculations for spawning an
immigration unit.

- Added the configurable option allowing players to specify if immigrants
should not be spawned in cities with a starving population.

- Added the configurable option allowing players to specify how much the
starving population value will influence the calculations for spawning an
immigration unit.

- Added the configurable option allowing players to specify if immigrants
should not be spawned in cities with an unpacified population. Cities with
an unpacified population are cities that have been recently conquered but
continue to have an active resistance.

- Added the configurable option allowing players to specify how much the
unpacified population value will influence the calculations for spawning an
immigration unit.

- Added the configurable option allowing players to specify if immigrants
should not be spawned in cities with a pacified population. Cities with a
pacified population are cities that have been conquered and all active
resistance has been removed and quashed. Also, part of the pacified
population continues to be influenced by and identifies with other cultures
found in the city.

- Added the configurable option allowing players to specify how much the
pacified population value will influence the calculations for spawning an
immigration unit.

- Added the configurable option allowing players to specify if there should be
a limit to the number of active immigrant units per city.

- Added the configurable option allowing players to specify how many units
should be allowed per city.

- Added the configurable option allowing players to specify if there should be
a limit to the number of active immigrant units per civilization.

- Added the configurable option allowing players to specify how many immigrant
units should be allowed per civilization.

- Added the configurable option allowing players to specify if immigrants
should be allowed to ignore closed borders between two civilizations.

- Added the configurable option allowing players to specify if immigrants
should not be spawned in cities where a part of the population identifies the
culture the current owner of the city is at war with.

- Added the configurable option allowing players to specify if immigrants
should not be spawned when a city is lost by a civilization. When set to true
this option enables the simulation of part of the population of a city
fleeing.

- Added the configurable option allowing players to specify if immigrant units
should not carry any culture from the city they were created from. The
culture immigrants carry depends on the reason for their creation. For
instance if an immigrant unit is created due to a city being captured by
civilization x from civilization y then the immigrant unit would carry
culture belonging to civilization y. The amount of culture an immigrant unit
carries is proportional to the population and culture of the city that
created them. So if city A with a population of 10 and 12000 culture creates
an immigrant unit then the immigrant unit would carry 1/10th of the cities
culture.

- Added the configurable option allowing players to specify if immigrant units
should carry a mix of the culture from the city where they were spawned. The
culture they carry will be the same ratio of culture from the city they were
spawned from. For example if an immigrant unit is spawned from city A with
10% culture from civilization X and 90% culture from civilization Y then the
immigration unit will carry 10% culture from civilization X and 90% culture
from civilization Y.

- Added the configurable option allowing players to specify if when an
immigrant unit is spawned in a city they should take/decrease the appropriate
amount of culture from the city that spawns them.

- Added the configurable option allowing players to specify if inner
civilization immigration should be allowed even if Serfdom has been selected
for the labor civic.

- Added the configurable option allowing players to specify if immigration
should not be allowed to cause a to be abandoned if a city has a population
of one and an immigrant is generated.

- Implemented the code needed to determine if an immigrant should be generated
by a city or not depending on the configuration of the mod.


-----===Credits & Thanks===-----

- Exavier
[TAB]Composite Mod - readme.txt format

- Stone-D
[TAB]SD-Toolkit

- Dr Elmer Jiggle
[TAB]For providing the INI file parser code allowing for players to customize
[TAB]this mod without having to touch the python code!!!

- Sevo
[TAB]For the new settler unit and the different models used within it.

- Wikipedia
[TAB]immigrant entry[TAB]

- Testers
[TAB]Dom Pedro II, Shqype, White Rabbit, Civmansam, woodelf, Kael, Jeckel
 
TheLopez said:
- If an Immigrant leaves my city for an enemy city, I want to kill him. It
would be nice if you could have an option that let's the human player know
where that immigrant is headed. If a player moved a military unit of theirs
onto an Immigrant, you could display a popup that says "This immigrant is
headed towards [ImmigrantTargetCity]." Then you could have two options:
[tab][Carry on] (Leave the immigrant alone)[/tab]
[tab][Slaughter them all!] (Kill the immigrant)[/tab]
Requested by Shqype.
Seems to me this isn't the best way to implement it. The mouseover info should tell you where it's going (or you should be able to select it but not give orders to), and military units should have an action button to kill them, rather than spamming popups every time it happens.
 
The Great Apple said:
Seems to me this isn't the best way to implement it. The mouseover info should tell you where it's going (or you should be able to select it but not give orders to), and military units should have an action button to kill them, rather than spamming popups every time it happens.
TGA, just because it's in the future features doesn't mean its going to happen or happen as described... but you bring up some good points.
 
Good point :D. I will probably make it a configurable option anyways.
 
This one has alot of potential, different types of units being spawned and all the different reasons units could leave your city. I am going to work this in with my JUnitReligion Mod as soon as I get done with the code to have more detailed city religion, so groups of persiquted religions can leave one city and move to another.

I'm going to make a recording of me saying 'Good mod TheLopez.' and have it play every couple days ;)
 
Dom Pedro II said:
This is very interesting. I'll be sure to try this one out. You produce some very creative mods, TheLopez. Keep up the good work!

Thank you Dom, thanks for you criticisms of my work. It only helps me to improve the quality and playability of the mods I put out. Please keep providing me with feedback!!!
 
can this be used in the customassets folder or is it only a mod. Just asking because will it conflict with the regiments mod and the random unit names mod
 
No, because it contains too many files and would confile with the mods that you have specified.
 
TheLopez said:
No, because it contains too many files and would confile with the mods that you have specified.

I plan to add it to my customAssets folder. I don't see anything in it that would be harder to merge than any other mod.

Roger Bacon
 
Awesome, TheLopez!

TheLopez said:
- Immigrants cannot be controlled by any players, though immigrants from other civilizations can be attacked and killed off.

Does that mean you've worked out how to attack units without instigating war? Or "non-national" units?
 
RogerBacon said:
I plan to add it to my customAssets folder. I don't see anything in it that would be harder to merge than any other mod.

Roger Bacon

Well you would have to merge a bunch of stuff, if you don't have a problem doing that.
 
I think I'd be a bigger fan of this if it didn't work in terms of units. It's not like an immigrant population is so concentrated that they travel in an organized unit like a military troop. Plus units add a lot of tedium and clutter to the game.

Just my own personal opinion, of course. I know lots of people love that 'board game' kind of feel.
 
I`m not sure if your mod already implements this, but
is there any way to:
1.make the immigrants more likely to pick the non-state religion [unless free religion is running]
2.favour cities owned by civs with emancipation.
3.favour civs that are of same religion.
4.favour civs that have peaceful history with their civilization.
5.favour civs with high/reasonable GDPs
 
The Great Apple said:
Seems to me this isn't the best way to implement it. The mouseover info should tell you where it's going (or you should be able to select it but not give orders to), and military units should have an action button to kill them, rather than spamming popups every time it happens.
Yea, I suppose that is a better way, I modelled my request after the vanilla mechanic/option in that if you move onto a neutral tile with a unit from a rival civ, you get the option of instigating war or not. If you decide to, then you attack the unit, if you decide against it, then you just move onto the same tile. I thought to keep it as vanilla as possible, but your way works too TGA :)
 
dh_epic said:
I think I'd be a bigger fan of this if it didn't work in terms of units. It's not like an immigrant population is so concentrated that they travel in an organized unit like a military troop. Plus units add a lot of tedium and clutter to the game.

Just my own personal opinion, of course. I know lots of people love that 'board game' kind of feel.
dh_epic, then tell me how you would do it? Would you rather it just automagically happen?
 
TheLopez said:
dh_epic, then tell me how you would do it? Would you rather it just automagically happen?

Well, you could have the population be removed from one city and then added to a destination city without having the units... I was thinking this would be better at first, but then I realized that having the units provides for some other interesting dynamics. I guess it just comes down to a matter of preference...

I would like to point out to dh_epic, that many times, refugees DO travel in large groups choking up roads and blocking both civilian and military traffic. Sometimes that exodus in and of itself becomes the humanitarian crisis.

EDIT: Actually, this raises some interesting possibilities for new civics as well... Maybe a country could impose isolationist anti-immigrant policies that would keep these people out.
 
Shqype said:
Yea, I suppose that is a better way, I modelled my request after the vanilla mechanic/option in that if you move onto a neutral tile with a unit from a rival civ, you get the option of instigating war or not. If you decide to, then you attack the unit, if you decide against it, then you just move onto the same tile. I thought to keep it as vanilla as possible, but your way works too TGA :)
IIRC that only happens the first time you do it, right?
 
Top Bottom