Thread Tools
Old February 1, 2001, 19:59   #1
Dale
Emperor
 
Dale's Avatar
 
Local Time: 19:52
Local Date: October 31, 2010
Join Date: Dec 2000
Posts: 3,944
MOD IDEA: Immigration......
I know a few folks have said some things about immigration. I agree with them. Immigration should be a thing in civ-type games. Therefore, my next big project is going to be to implment immigration into CTP2. Now I'm looking for ideas on how this should be implemented. I've come up with a few things, but maybe others can find more.

- Immigration depends on city happiness. If city[a] is happier than city[b] then we should see some immigration from b to a.
- When immigration occurs it spawns a settler (either as an independant civ or barb maybe) and moves to a happier city and adds it pop point to it. This can be either a city in its home civ or another civ's city.
- If an immigrant can't find a happier city close enough it trundles off to an unexplored area and creates a new city and civ. They can inherit the technologies that its home civ has. Or it could even pronounce allegiance to an existing civ.
- Immigration could also encompass refugees as well. If a civ takes over a city, then there's a chance a refugee settler is created which then heads towards another city of it's home civ.

This could get big folks, but what do you think could go into a project like this?

Dale - Thinking big is just the beggining.

------------------
Author of Diplomod. The mod to fix diplomacy.

Rommell to a sub-commander outside Tobruk: "Those Australians are in there somewhere. But where? Let's advance and wait till they shoot, then shoot back."
Dale is offline  
Old February 1, 2001, 21:18   #2
JSnider
Settler
 
Local Time: 09:52
Local Date: October 31, 2010
Join Date: Dec 2000
Location: Boiling Springs, PA
Posts: 11
Two points maybe ...

represive gov types lead to higher immigration, facto in to unhappiness and refugees .. also could factor in war, some people just don't wanna fight (or so i've heard).. coupled with 'unhappy' folks this then makes sense to me as don't view unhappiness as a prime reason to move over the horizon.

Economics (which drives some unhappiness) was always a big reason to pull up stakes and move on to greener pastures, just not sure how could implement this into the game unless factor in economic state .. and given that the AI doesn't seem to be all that great at building the infrastructure here ... not sure how would factor.

just ramblin'

jsnider
JSnider is offline  
Old February 1, 2001, 22:27   #3
David Murray
Prince
 
Local Time: 09:52
Local Date: October 31, 2010
Join Date: Dec 2000
Posts: 525
Excellent idea!

Immigrants don't usually form new cities, they join existing ones. While a small number cause overcrowding and use benefits, the overwhelming majority of immigrants pay their taxes and add skilled labor to the labor pool (real life fact). So perhaps immigrants/refugees should add additional workers to random cities.

However, it's not just that simple to desert your country...tyrannical regimes will keep a strangehold of their population...although a fair few escape from Communist Cuba.

I think it's a good idea to lose citizens because of unhappiness/pollution, i.e. against your own will. How about having the option to voluntarily drive citizens out as well? Like ethnic cleansing, as an alternative way to deal with pollution....

Just my thoughts
[This message has been edited by David Murray (edited February 01, 2001).]
David Murray is offline  
Old February 2, 2001, 01:16   #4
Alpha Wolf
Chieftain
 
Local Time: 09:52
Local Date: October 31, 2010
Join Date: Feb 2001
Location: Prince of the Barbarians
Posts: 0
dont forget to factor in the capital factor. people seem to like to live in capitals or we just have too many politicians, or both

------------------
History is written by the victor.
Alpha Wolf is offline  
Old February 2, 2001, 04:22   #5
heardie
Prince
 
heardie's Avatar
 
Local Time: 20:52
Local Date: October 31, 2010
Join Date: Aug 1999
Posts: 684
quote:


represive gov types lead to higher immigration, facto in to unhappiness and refugees .. also could factor in war, some people just don't wanna


Im fairly sure you cant read in what gov type is used.

But sounds like another great idea Dale. Also search CTP_Creation as I think i read something about that there.
heardie is offline  
Old February 2, 2001, 05:53   #6
Alpha Wolf
Chieftain
 
Local Time: 09:52
Local Date: October 31, 2010
Join Date: Feb 2001
Location: Prince of the Barbarians
Posts: 0
according to the SLIC doc, player.govttype. I sure hope thats a valid option because this weekend I was going to start working on changes so that certain criteria had to be met to progress to a new gov type. Say in order to be a theocracy, you had to have researched religion, half your cities must have shrines (or hagia sophia) and a certain happiness level, probably 75 since the AI always seems to be at least 75. each gov type will have criteria unique to it and based on the strategy being played by the AI, only certain buildings will be built and new buildings will that have the same effect for different government paths, ie religious strategy would build buildings necessary to lead it towards theocracy, whereas a militarist strategy would build buildings aimed at getting it to monarchy then fascism and technocracy. Another example is that for fascism, you'd need industrial rev, an unhappy population (<75) and a strong military (say # units > 12 * # cities). i always thought it wacky that the population had no say in any empire decisions. This way if you keep the people unhappy, or too warlike, they might revolt within the civ and force changes. You can always change it back but if you havent changed the underlying reason for the gov change, they'll just rebell again. means your empire could be under anarchy for a long time, unless you make changes.

If anyone has ideas on government progressions, i'd love to see them. Besides the shipped governments, I've already added city alliance and socialism.

------------------
History is written by the victor.
Alpha Wolf is offline  
Old February 2, 2001, 07:00   #7
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 11:52
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Heardie is probably right. govttype is a string and there's no way to compare strings with eachother, you can only use them in messageboxes.
Locutus is offline  
Old February 2, 2001, 14:51   #8
Alpha Wolf
Chieftain
 
Local Time: 09:52
Local Date: October 31, 2010
Join Date: Feb 2001
Location: Prince of the Barbarians
Posts: 0
quote:

Originally posted by Locutus on 02-02-2001 06:00 AM
Heardie is probably right. govttype is a string and there's no way to compare strings with eachother, you can only use them in messageboxes.


thats a MAJOR bummer.


------------------
History is written by the victor.
Alpha Wolf is offline  
Old February 4, 2001, 18:22   #9
Dale
Emperor
 
Dale's Avatar
 
Local Time: 19:52
Local Date: October 31, 2010
Join Date: Dec 2000
Posts: 3,944
Locutus and others:
I've had player.govttype working with a check against GovernmentDB in the diplomacy mod. So it does work guys. That'd be the easiest way to check.

Code:
tmpgovt = GovernmentDB(GOVERNMENT_FASCISM);
if(player[0].govttype == tmpgovt) {
     //code if govt is fascism
}
I'll begin the coding tonight. I didn't have a chance to start on the weekend. To start with, I'll just get settlers immigrating between cities of their own civ. Factors I'll take note of will be:
- happiness
- pollution
- economy
- captial closeness

That's enough to start with.

------------------
Author of Diplomod. The mod to fix diplomacy.

Rommell to a sub-commander outside Tobruk: "Those Australians are in there somewhere. But where? Let's advance and wait till they shoot, then shoot back."
Dale is offline  
Old February 5, 2001, 11:52   #10
Radical_Manuvr
Chieftain
 
Local Time: 09:52
Local Date: October 31, 2010
Join Date: Dec 2000
Location: Maryland, USA
Posts: 80
Thanks Dale! I've been waiting for what seems like a month for a reply to my thread about how to check gov. type. I thought I had found something that might lead to the answer in info_str.txt the other day but hadn't had time to look into it yet. Now if I could just remember what I needed it for...
Radical_Manuvr is offline  
Old February 5, 2001, 16:15   #11
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 11:52
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Dale, that is some really weird but good news The GovernmentDB function should not return anything other than the number of the government in govern.txt and govttype is a string so in theory that can't possibly work (I'm glad it does though ). So either the Activision documentation is incorrect or the DB-functions work in ways I never expected. Probably both...
Locutus is offline  
Old February 5, 2001, 19:10   #12
Dale
Emperor
 
Dale's Avatar
 
Local Time: 19:52
Local Date: October 31, 2010
Join Date: Dec 2000
Posts: 3,944
Locutus:
The way I found out was pure trial 'n error. I wanted to find out what strategy the AI was employing, so I used the above with StrategyDB. It worked. I thought "Cool, but isn't that different to Loco's doco's?" A funny pun but what I call your doco.

So I tested it with GovernmentDB and it seemed to work too. Wierd, I know. But no-one ever accused me of being sane.

------------------
Author of Diplomod. The mod to fix diplomacy.

Rommell to a sub-commander outside Tobruk: "Those Australians are in there somewhere. But where? Let's advance and wait till they shoot, then shoot back."
Dale is offline  
Old February 6, 2001, 05:14   #13
ALPHA_WOLF
Guest
 
Posts: n/a
I thought SLIC doc said that we could access any DB field. Its just a matter of knowing what to reference. I've been looking for a way to start gov city limits at low levels then increase them upon certain advances like printing press, telegraph, telephone, mass media and tv. maybe I can get lucky and stubble upon something like this

------------------
History is written by the victor.
 
Old February 6, 2001, 05:22   #14
ALPHA_WOLF
Guest
 
Posts: n/a
quote:

Originally posted by Dale on 02-04-2001 05:22 PM

I'll begin the coding tonight. I didn't have a chance to start on the weekend. To start with, I'll just get settlers immigrating between cities of their own civ. Factors I'll take note of will be:
- happiness
- pollution
- economy
- captial closeness

That's enough to start with.




Too bad theres not an easy way to track how often a specific city has been attacked. Alot of people would leave frequently attacked cities. How are you going to use capital closeness? Seems like people would immigrate towards the capital but also far away where theoretically the land would be cheaper (new world settling). Or even go towards towns with goods vs ones without (california gold rush).

------------------
History is written by the victor.
 
Old February 6, 2001, 16:21   #15
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 11:52
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
AW,
Yeah, accessing DB fields is possible but that's not quite the same as comparing integers to strings (that's what I call a small wonder, a Feat of Wonder to be precise ).

You can read fields from the database but you can't change them AFAIK (that would truly be a miracle). So changing city limits based on technology can't be done by simply saying GovernmentDB(GOVERNMENT_COMMUNISM).TooManyCitiesTh reshold = 100 or whatever. If it's possible at all it's by making a duplicates of all governments with only city limits different and somehow using SetGovernment or something to change a civ's government. The problem is that this has to happen through messages and it probably forces you to go through a couple of turns of Anarchy first.

Actually, using two arrays (one that contains all cities and one that contains the number of attacks on that city) you *can* keep track of how often specific cities are attacked. It would probably take up a fair amount of resources though, esp. towards the end of the game. But I think it might be worth a try, if it's too demanding you can always take it out again...
Locutus is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:52.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team