January 30, 2003, 16:02
|
#1
|
King
Local Time: 15:25
Local Date: November 1, 2010
Join Date: May 1999
Posts: 1,528
|
Poor Get Richer: a new mod for CtP2
Having considered the current state of modding for CtP2, I've come up with some concepts that I want to see in a mod... one I intended for CtP1... but will work so much better in CtP2.
The basis for the mod is the colonization idea of Dale's Ages of Man mod... although the code is (mostly) being rewritten from scratch.
For those who haven't seen it, the colonization idea removes the building of settlers for a long period of the game (for both the human and AI). New cities are founded automatically, when cities reach certain sizes, and priority can be given to inland or coastal cities.
===
A concept that i've been giving a hell of a lot of thought to, is continental awareness... that is... that the AI can figure out.
a) how big the continent that its settling on is
b) whether it is alone on the continent
c) when its attacked, if...
i) the city is on its home continent
ii) whether the attacker is on the same continent as its home continent
I figure if this is possible then a few 'clever tricks' should be possible...
a) favoring enough coastal cities if its a small enough island, to promote a strong navy
b) moving its capital to another continent if and when it has a higher population on a new continent it colonizes
c) being more friendly with 'foreign' AI's. More wary with AI's on the same continent... (thoughts?)
d) theoretically getting the AI to act appropriately in war time, as it regards to the navy (not sure about this)
I tested IsContinentBiggerThan to see it it would be viable, but as far as I can tell, it always returns 1, whether you pass it 1, 500 or 4000000000.
I've got some ideas and concerns with implementation... my thought is to use a map in a very long array. I was a little sceptical about the viability, due to limits on sizes of arrays... but I created a 400000 int array (and the values were saved and reloaded perfectly...)
the searching of the continent... I imagine, could be done with a recursive function, that starts at the capitol of each civ, and recursively moves in all directions, stopping at the sea and in directions that have already been 'discovered'. The function would mark the 'map' in the array.
There are a couple concerns with the viability of the approach; that it will be slow... that recursion won't work... but the upside is simply too big to avoid trying.
===
I see demographics... particularly trends of demographics, as critically useful in terms of AI diplomatic stance... to make for a more fulfilling game. Trends more than individual stats make for more accurate pictures of threats. A human who is on the same continent, growing 30% faster, and producing military units 42% faster (over 50 turns) is clearly a threat and diplomacy should reflect that negatively versus a human who is growing slower (over 50 turns), and is not on the same continent.
===
I see making early (prior to modern) conquest far, far more difficult is very important. A few very good ideas regarding this have already been bandied about, but I do see giving bigger city wall bonuses and so on, as (probably) important.
===
To counter the 'bigger is better' theme, Wes has been talking for some time, about reviewing the support cost ideas... and mentioned something about needing to increase the scale of gold across the board, by 10.
I'm not 100% sure about this... I'm not clear on the exact reasoning... but I do agree with the idea.
I did a little testing and found that you can have negative values for goldperpop, in city improvements... as opposed to a positive value, like... say... the city clock, or TV.
This whole aspect, I see, needs balancing... to make bigger cities not necessarily massively better in all ways.( yes I know pollution through population is a balance, but entertainers can easily counter this unhappiness.)
===
Also in my mind is knowledge disemination; that is... when a civilization gets a particular tech, subsequent civs that develop that tech get bonuses.
The basic implementation fundementals have been worked out. The actual values will need thought and play testing.
===
I'll be implementing limited wonders as a part of the mod... as and when I get to them, however.. there is a lot of work to get to them.
For the tech tree... I would like to borrow from Cradle... although I'm looking at Age Of Man and MedMod in addition.
Well... Thats pretty much it.
MrBaggins
Last edited by MrBaggins; January 30, 2003 at 16:10.
|
|
|
|
January 30, 2003, 17:29
|
#2
|
Emperor
Local Time: 15:25
Local Date: November 1, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
|
Sounds very nice indeed, i'm sure you'll get all the help you need from the folks here(if you can get them away from the DG long enough ), and i can always stick my oar in about this and that detail if you like.
__________________
'The very basis of the liberal idea – the belief of individual freedom is what causes the chaos' - William Kristol, son of the founder of neo-conservitivism, talking about neo-con ideology and its agenda for you. info here. prove me wrong.
Bush's Republican=Neo-con for all intent and purpose. be afraid.
|
|
|
|
January 30, 2003, 19:00
|
#3
|
King
Local Time: 12:25
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
|
Re: Poor Get Richer: a new mod for CtP2
Quote:
|
The basis for the mod is the colonization idea of Dale's Ages of Man mod... although the code is (mostly) being rewritten from scratch.
|
My interest in the colonization is not that much. I just think too much hard work for too small benefit. The idea is very good once done i am pretty sure i would like to use it! I have given some thought in a algorithim for it. Yet is way down the things i want to see for CTP2 list. although it is in the list
Quote:
|
I've got some ideas and concerns with implementation... my thought is to use a map in a very long array. I was a little sceptical about the viability, due to limits on sizes of arrays... but I created a 400000 int array (and the values were saved and reloaded perfectly...)
|
If only slic had at leat 2D arrays
As i thought the best would be ran trhough the map when needed:
Code:
|
for(x = 0; x < GetMapWidth(); x = x + 1) {
for (y = 0; y < GetMapheight(); y = y + 1){
MakeLocation(tmpLoc, x, y); |
From a good location you would search the best location with less distance and you would look for the near by tiles until the city location to see if there is only land in the path. Avoiding building of cities in 2 different continents. This resource is valid using a code similar to the City Expansion Code (the version 2.0 is my mod).
Quote:
|
Originally posted by MrBaggins
I tested IsContinentBiggerThan to see it it would be viable, but as far as I can tell, it always returns 1, whether you pass it 1, 500 or 4000000000.
|
Re-test it. This is like one of the worst warnings from Slic2 i have ever heard!
Quote:
|
I see demographics... particularly trends of demographics, as critically useful in terms of AI diplomatic stance... to make for a more fulfilling game. Trends more than individual stats make for more accurate pictures of threats.
|
I think the whole diplomacy model has to be re-written. I like Peter Triggs ideas but his code doesnt improves a lot but doenst do half of what i would love to see in a game. Thats like one of the first things in my to do list!!!
Quote:
|
I see making early (prior to modern) conquest far, far more difficult is very important. A few very good ideas regarding this have already been bandied about, but I do see giving bigger city wall bonuses and so on, as (probably) important.
|
I see how this helps but i would never implement it. The good thing about strategy games is the militay strategies. Dont decrease its importance!
Quote:
|
I did a little testing and found that you can have negative values for goldperpop, in city improvements... as opposed to a positive value, like... say... the city clock, or TV.
This whole aspect, I see, needs balancing... to make bigger cities not necessarily massively better in all ways.( yes I know pollution through population is a balance, but entertainers can easily counter this unhappiness.)
|
GoldPerPop is the best way to give maintance cost. But to hard to balance!!! I am afraid though that may incentivate ICS.
Quote:
|
Also in my mind is knowledge disemination; that is... when a civilization gets a particular tech, subsequent civs that develop that tech get bonuses.
|
I lik the idea since i have seen it in AoK. But not only bonus for research but for TI, buildings, etc...
Quote:
|
I'll be implementing limited wonders as a part of the mod... as and when I get to them, however.. there is a lot of work to get to them.
|
Limited wonder are indeed a nice balance!
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
|
|
|
|
January 30, 2003, 21:38
|
#4
|
King
Local Time: 08:25
Local Date: November 1, 2010
Join Date: Jul 2002
Location: Berkeley
Posts: 1,375
|
id love to see it
|
|
|
|
January 30, 2003, 21:52
|
#5
|
King
Local Time: 15:25
Local Date: November 1, 2010
Join Date: May 1999
Posts: 1,528
|
Re: Re: Poor Get Richer: a new mod for CtP2
Quote:
|
Originally posted by Pedrunn
My interest in the colonization is not that much. I just think too much hard work for too small benefit. The idea is very good once done i am pretty sure i would like to use it! I have given some thought in a algorithim for it. Yet is way down the things i want to see for CTP2 list. although it is in the list
|
I am pretty close to done on the majority of the colonization slic.
To me its very important... and here is why; it forces the AI to be intelligent in the way it settles, since the exact manner can be controlled through weightings and required distances. The AI left to its own devices, builds too dense, and in, frankly, odd places.
Quote:
|
If only slic had at leat 2D arrays
As i thought the best would be ran trhough the map when needed:
Code:
|
for(x = 0; x < GetMapWidth(); x = x + 1) {
for (y = 0; y < GetMapheight(); y = y + 1){
MakeLocation(tmpLoc, x, y); |
From a good location you would search the best location with less distance and you would look for the near by tiles until the city location to see if there is only land in the path. Avoiding building of cities in 2 different continents. This resource is valid using a code similar to the City Expansion Code (the version 2.0 is my mod).
|
I'll check out the code... thanks
Quote:
|
(Regarding IsContinentBiggerThan) Re-test it. This is like one of the worst warnings from Slic2 i have ever heard!
|
Can you get IsContinentBiggerThan to work, then? I tried for about an hour... getting 1 as the return result, every time, regardless of map size and/or input.
Quote:
|
(Regarding increasing defensive bonus of walls) I see how this helps but i would never implement it. The good thing about strategy games is the militay strategies. Dont decrease its importance!
|
Heres the concept: the game *should*, generally speaking, last into the late game. Early conquest should be theoretically possible, but extremely difficult. When nations become established, complete conquest by another power, with equivalent tech should be tough. Late game should be where the game is won or lost. War shouldn't be a constant state... if theres no war, diplomacy and trade are possible.
Increasing city defensive strength, simply makes early conquest more difficult. With sufficient effort... and force concentration, city sieges are still possible... but you might waste a few 12 stacks in an assault.
Quote:
|
GoldPerPop is the best way to give maintance cost. But to hard to balance!!! I am afraid though that may incentivate ICS.
|
There isn't a catch-all advantage to having a small city... the small city is more efficient, but massive size will still ultimately be necessary to have serious production and science generation; necessary resources. However... there will be a modicum of intelligence required in city management, otherwise, huge cities may be counter productive.
Quote:
|
(Regarding knowledge disemination) I like the idea since i have seen it in AoK. But not only bonus for research but for TI, buildings, etc...
|
Can you explain how a bonus for TI, buildings, etc. would work? Doesn't the AI already get bonuses for being behind?
MrBaggins
|
|
|
|
January 31, 2003, 07:11
|
#6
|
King
Local Time: 16:25
Local Date: November 1, 2010
Join Date: Jun 2002
Location: France
Posts: 1,986
|
MrBaggins,
sounds nice, hope it will finish soon
Quote:
|
b) moving its capital to another continent if and when it has a higher population on a new continent it colonizes
|
be careful about this one, espacially a human player could make use of it. Take a city of an empire, which is on two continents, so that the other ones becomes 'bigger', he will start to build it's capitol over there, give back the city and so on.
It would keep at least one city away for the AI's production........
I hope you understood what I wanted to say.
With the rest, sorry can't help, haven't even started reading all doc's :ashamed:
|
|
|
|
January 31, 2003, 08:02
|
#7
|
King
Local Time: 15:25
Local Date: November 1, 2010
Join Date: May 1999
Posts: 1,528
|
true... you don't want it getting too twitchy... so higher might mean 3x higher... at which point it would be silly NOT TO move the capital.
I *just* had a thought about the theoretical possibility of using SLIC rather than the AI to improve/terraform. If we could develop some good 'rules' for what works, and the AI could be aware of a need for more production/trade/growth... then a SLIC terrain improvement script *might* be able to respond...
or we could improve the improvement AI to a point where it did more that just farm... and yes i've seen the recent post regarding this... just don't know if it has enough flexibility to be 'ideal'.
Just a maybe...
MrBaggins
|
|
|
|
January 31, 2003, 08:17
|
#8
|
King
Local Time: 16:25
Local Date: November 1, 2010
Join Date: Jun 2002
Location: France
Posts: 1,986
|
it is normally already worth changing, if it is twice the size.
I'll guess we'll have to play-test it
For the improvement's/tiles:
I followed some other threads about this...........
Can we actually tell the AI, to do the same as the HP?
Make couple of production cities (i.e. in mountain region/forest) and couple of science (in plain/....) ones?
I have no idea, if it is possible........
|
|
|
|
January 31, 2003, 09:26
|
#9
|
King
Local Time: 15:25
Local Date: November 1, 2010
Join Date: May 1999
Posts: 1,528
|
Here is the big issue with the AI... period...
It lacks strategic vision. The game creators programmed it to be very general; it only thinks about happiness on an empire wide level... it only founds cities based on very limited 'local' awareness... it only improves around cities one way.
The computer is capable tactically... and capable in a very limited strategic sense, given a finite picture; a 'close' continental enemy.
Here is my concept. SLIC is capable of decision making. You can discover things about the world and the imediate environs, and 'force' the AI to act a certain way.
Only certain decisions are finite enough to be made. The more limited the situation, the easier it is to fully simulate. City management, seems... at first sight to be pretty finite:
An AI aided by SLIC could, indeed choose different 'roles' for a city. Science, production, or growth. SLIC could affect which cities are which, what those cities build and how the area around them is improved.
There is a downside to all of this... discovery... especially, is code intensive... it will require more code to happen than runs as stands. The game will probably slow a little. Not *THAT* much slower... but that depends on how much additional work is done. The 'upside' is that CtP2 itself is a static product, and computers get faster... as people upgrade to newer systems.
MrBaggins
|
|
|
|
January 31, 2003, 11:38
|
#10
|
King
Local Time: 16:25
Local Date: November 1, 2010
Join Date: Aug 1999
Location: aachen, germany
Posts: 1,100
|
Re: Re: Poor Get Richer: a new mod for CtP2
Quote:
|
Originally posted by Pedrunn
I see how this helps but i would never implement it. The good thing about strategy games is the militay strategies. Dont decrease its importance!
|
well, of course i like the military part of the game, but its too much overweighted against diplomacy, maybe because that part was easier to program.
|
|
|
|
January 31, 2003, 13:17
|
#11
|
King
Local Time: 12:25
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
|
Re: Re: Re: Poor Get Richer: a new mod for CtP2
The bonus to the TIs is given by placing a invisible TI over it or by placing a better TI rather then the old old one (using the CreateImprovement event)
The bonus to the Buildings are more difficult
I dont know how since there has to be a max number of 64 builngs in the building.txt
Quote:
|
Originally posted by Zaphod Beeblebrox
well, of course i like the military part of the game, but its too much overweighted against diplomacy, maybe because that part was easier to program.
|
Military is what gives best game play but the diplomacy of CTP2 need urgent aid. It sucks big time!!! Thats why it is in the top of my list.
Quote:
|
a) how big the continent that its settling on is
b) whether it is alone on the continent
c) when its attacked, if...
i) the city is on its home continent
ii) whether the attacker is on the same continent as its home continent
|
How do you plan to do this if the IsContinentBigger is broken!
BTW, I will test it for sure! I just cant believe!
Anyway we can make a similar function on our own
IDEA - I guess the best would be a code that runs ove all beach terrains until gets back to the same tile it started. Saving every tile in a array: something like
Code:
|
location_t MapLoc[n]
int_t XCoord[n];
int_t YCoord[n]; |
From this we get the distances of the locations with the same x-coordinate.
The sum of every distance found is the size of the continent.
Actually, this three array system is a much better way to make a memory of the map than your only one array system . (I think)
Quote:
|
b) moving its capital to another continent if and when it has a higher population on a new continent it colonizes
|
I rather use a code that sum the distance to all the cities. The one with the samlle sum. Should be the capital to decrease the possibility of happiness loss.
Quote:
|
a) favoring enough coastal cities if its a small enough island, to promote a strong navy
(...)
c) being more friendly with 'foreign' AI's. More wary with AI's on the same continent... (thoughts?)
d) theoretically getting the AI to act appropriately in war time, as it regards to the navy (not sure about this)
(and other comments about strategies from you)
|
Navy is other thing that is even more broken than diplomacy. I would love to work in a AI code with you indeed. including diplomacy, navy, and map recognition. We can leave military strategy to the end since the current Goals/Strategies system in the text works fine if well balanced. But we could improve it through slic later
So what do you say?
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Last edited by Pedrunn; January 31, 2003 at 13:23.
|
|
|
|
January 31, 2003, 13:55
|
#12
|
Emperor
Local Time: 16:25
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
|
Quote:
|
Originally posted by MrBaggins
An AI aided by SLIC could, indeed choose different 'roles' for a city. Science, production, or growth. SLIC could affect which cities are which, what those cities build and how the area around them is improved.
|
Specialized cities never work in CtP2, a good strategy is to grow every as fast as possible and the give it as much commerce as possible without sacrificing a good growth rate. Production doesnt matter, because any slower building time can be offset by rush buying and by the continued growth of the city, so every city grows and contributes as much in production and commerce as it possibly can. This tactic depends alot on when to mobilize alot of forces, because units are supported by production obviously, but a swift build up of military is easy because of all the rush buy money available and larger cities.
I noticed messing with strategies.txt is that the AI uses far too many specialists. In general you only ever need a couple of scientists (in large cities) and rarely entertainers, merchants and laborers are useless as it stands, even in cradle.
This all depends on good city placement by the AI to begin with. IMO good AI city locations would have a bigger impact on gameplay than improvements in diplomacy or combat, because the AI slows down alot when it cities start overlapping, even after 2 border bumps, whereas your cities are placed perfectly and keep contributing more and more well into the game and this is when you overtake the AI in science and production. End of ramble.
|
|
|
|
January 31, 2003, 14:04
|
#13
|
King
Local Time: 15:25
Local Date: November 1, 2010
Join Date: May 1999
Posts: 1,528
|
Right... but this mod is going to be revising improvement support costs, to make for viable choices in city development.
Having one choice= a dumb game...
However, having multiple choices, which the player can utilize, and the AI can't = a dumb game too.
Thats why we are considering the AI (using SLIC) when thinking about these changes.
MrBaggins
|
|
|
|
January 31, 2003, 14:29
|
#14
|
King
Local Time: 15:25
Local Date: November 1, 2010
Join Date: May 1999
Posts: 1,528
|
Re: Pendrunn
I still don't get why you are talking about upgrades to tile improvements and buildings.
My original point was that when one or more civs learns a particular advance, it should be easier for subsequent civs to learn that same advance, as knowledge disseminates. Perhaps a wonder could make the effect more profound.
I don't understand what how buildings and tile improvements are related to knowledge disemination, except through needing prequisites.
===
Re IsContinentBiggerThan...
I was only going to use IsContinentBiggerThan because it would be a simple way to figure out that two locations were on the same size of continent.
Ultimately, you need a simple way to find out which continent a particular unit or city is on. The best way of doing this, is having a map, in some kind of array, where each coordinate can easily and immediately be referenced, giving which continent 'index' the unit or city is on.
The 'indexing' could be done at the time of city creation... and if a city is built on an already referenced continent, of course, the continent it sits on doesn't need to be referenced. As far as I'm aware, and I remember, recursion is the best algorithm for mapping.
===
regarding capitol changing... its simplistic to say that a simple 'squaredistance' is sufficient, in terms of determining distance. Roads, Rail, Maglevs, Water, Tunnels and Terrain all play a role in determining Distance penalties.
Its a simplistic fix... but you want the capitol where it can do most good. If a new continent has more population, then it is likely to be your 'home' continent, and basically the center of your empire.
You *could* do a complex calculation system to check exact distances from each and every city... but it doesn't seem viable, or worthwhile.
===
I wouldn't mind collaborating on something thats turning into a bit of a grand project.
I'll post the code of the new colonization stuff soon.
MrBaggins
|
|
|
|
January 31, 2003, 15:54
|
#15
|
King
Local Time: 12:25
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
|
Quote:
|
Originally posted by Maquiladora
I noticed messing with strategies.txt is that the AI uses far too many specialists.
|
I thought the specialists for the AI were bugged. The AI never uses them!
Quote:
|
Originally posted by MrBaggins
Re: Pendrunn
|
Pedrunn
Quote:
|
Originally posted by MrBaggins
I still don't get why you are talking about upgrades to tile improvements and buildings.
|
Just a suggestion. Because i misunderstood what you've said. Just forget about it.
Quote:
|
Originally posted by MrBaggins
My original point was that when one or more civs learns a particular advance, it should be easier for subsequent civs to learn that same advance, as knowledge disseminates. Perhaps a wonder could make the effect more profound.
|
Now i get it! Good idea
Do you have any idea how to do it?
I can only think about a invisible research building in all cities!
But i cant find a way to know which advance a certain civ is current researching.
Quote:
|
Originally posted by MrBaggins
I was only going to use IsContinentBiggerThan because it would be a simple way to figure out that two locations were on the same size of continent.
|
I know. I will test the function as soon as i can!
I was just giving a suggestion in case it does not work
Quote:
|
Originally posted by MrBaggins
Ultimately, you need a simple way to find out which continent a particular unit or city is on. The best way of doing this, is having a map, in some kind of array, where each coordinate can easily and immediately be referenced, giving which continent 'index' the unit or city is on.
The 'indexing' could be done at the time of city creation... and if a city is built on an already referenced continent, of course, the continent it sits on doesn't need to be referenced. As far as I'm aware, and I remember, recursion is the best algorithm for mapping.
|
If the IsContinentBiggerThan works every thing will be easier
Quote:
|
Originally posted by MrBaggins
regarding capitol changing... its simplistic to say that a simple 'squaredistance' is sufficient, in terms of determining distance. Roads, Rail, Maglevs, Water, Tunnels and Terrain all play a role in determining Distance penalties.
|
True!
Quote:
|
Originally posted by MrBaggins
Its a simplistic fix... but you want the capitol where it can do most good. If a new continent has more population, then it is likely to be your 'home' continent, and basically the center of your empire.
|
Not always true!
Quote:
|
Originally posted by MrBaggins
You *could* do a complex calculation system to check exact distances from each and every city... but it doesn't seem viable, or worthwhile.
|
True! (if you mean considering the roads and stuff)
Quote:
|
Originally posted by MrBaggins
I wouldn't mind collaborating on something thats turning into a bit of a grand project.
|
Actually i am offering and confirming my help for this grand project if you want to start it. I will only do it alone when i have some projects done like the new unit updater and the special attack from city click (removal of special units).
Quote:
|
Originally posted by MrBaggins
I'll post the code of the new colonization stuff soon.
|
Cool! I want to see it
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Last edited by Pedrunn; January 31, 2003 at 16:04.
|
|
|
|
January 31, 2003, 20:42
|
#16
|
King
Local Time: 15:25
Local Date: November 1, 2010
Join Date: May 1999
Posts: 1,528
|
A few of these 'missing functions' are a pain to sort out.
I struggled with the missing 'what am I researching?' function for a while... but i figured out the basic implementation, just need to sort out a few things...
effectively... it works like this...
you need to keep track of how much research each government does... (culmulative sum of GetProjectedScience, subtracting the cost of the advance, when you gain the advance)
each turn you set a flag, turn off the science picker with DisableChooseResearch and use SetScience(player[x],999999);
when this happens, you check for the flag in the GrantAdvance event record what type the advance was (through checking the value[0].value) remove the research, then reset the research, science amountand flag, then EnableChooseResearch...
its pretty complex, and I haven't implemented the culmulative sum bit (although I know that works... however, I have some code reporting at the start of turn, what index the tech I am researching is...) I have to test it with the AI too... but I am very confident.
MrBaggins
|
|
|
|
February 1, 2003, 13:58
|
#17
|
King
Local Time: 15:25
Local Date: November 1, 2010
Join Date: May 1999
Posts: 1,528
|
I posted yet another 'concepts for discussion' thread here.
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 11:25.
|
|