View Full Version : The Problem With Sprawling
MaxAstro Jul 11, 2008, 10:59 AM Don't misunderstand me, Sprawling is a fun mechanic for the Kuriotates and this isn't another "Cardith Lorda is underpowered" thread. No, the problem with Sprawling is something entirely different: The amount of damage it does to the game for everyone ELSE.
This is something I have been noticing a lot in games for a long time; I've only recently realized that it must be because of Sprawling, however. Here is the problem: The game knows that some cities can work the third ring. Because of that, a lot of things assume EVERY city can work the third ring. Namely:
-When normalizing start positions, the game will place resources only accessible from the third ring, and count them as being available for the start location, generally damaging start location quality.
-Events that target a tile near a city quite frequently target a tile in the third ring, thinking the city can still make use of the bonus food/commerce/whatever.
-Ocean resources often spawn three tiles away from land, thinking that third ring coastal cities will be able to work them.
Now... I'm not saying take Sprawling out of the game. However, I really think something needs to be done about these issues, as they really detract from the game for everyone except Cardith (especially #1, which BADLY hurts start locations sometimes, and #3, which makes coastal cities often much less attractive).
Of course, it's possible I'm wrong and Sprawling has nothing to do with this... however, if that's the case, then what IS the explanation for #2 and #3 (I could see #1 just being consistant bad luck, I guess)?
Verily Jul 11, 2008, 11:07 AM I'm not sure #1 is caused by Sprawling, but, even if it is, your starting Settler has a great deal of mobility to use to find a good start location.
hbar Jul 11, 2008, 11:48 AM I've actually had a lot of games lately that suffered from #1. Even if my initial settler has 4:move:, it doesn't help if there are three food/health/happy resources around, spread so only one is accessible to any 2-tile BFC.
tharg Jul 11, 2008, 12:17 PM -When normalizing start positions, the game will place resources only accessible from the third ring, and count them as being available for the start location, generally damaging start location quality.
-Events that target a tile near a city quite frequently target a tile in the third ring, thinking the city can still make use of the bonus food/commerce/whatever.
-Ocean resources often spawn three tiles away from land, thinking that third ring coastal cities will be able to work them.
Are these three things true? Particularly 1 & 3?
It has not appeared that way to me but I might be confused.
MrPopov Jul 11, 2008, 12:32 PM #3 is very annoying. a 3ring coastal city isn't that great anyway, but to nerf the rest of the coastal cities with resources they can't reach is frustrating. Sometimes I world-builder resources too far away back in, but it's such a spoiler for the rest of the game when I see things I shouldn't
Adrogans Jul 11, 2008, 12:52 PM Yeah I've never really had an issue with #1 and 2, but #3 really blows cause I love coastal cities.
rocklikeafool Jul 11, 2008, 01:08 PM I've never had trouble with any of these.
Why does the game does these 3? Well, let's look at em each specifically. Oh, keep in mind, the game doesn't cater to you as much as you wish.
#1 The game knows you can use such resources simply for the health bonus or the ability to trade them.
#2 The game figures that you might build a city less than 2 rings away from that spot, especially since it now has that lil bonus.
#3 Read no. 1, man.
Btw, I think you'll find these are all true in BTS or Vanilla Civ if you go back and try a few games of those. So, this ain't an FfH thing. And, imho, it ain't a problem. But if you hate it so much, use WB to fix it. Cuz I doubt anyone will fix it for you. It's virtually impossible to do without a preloaded map (i.e. Nikis-Knight's Erebus Map or somethin similar). But most mapmakers find that, in order to maintain balance, it's best they place resources in a manner similar to how the map generator does. Or least as close as they can do so.
Verily Jul 11, 2008, 02:14 PM Sea-based resources never appear more than two tiles away from the coast in BtS (or any other non-modded version of Civ4).
kumquatelvis Jul 11, 2008, 02:15 PM I rarely have trouble with #1. In fact, I regularly get awesome starts. #3 might be an issue with pearls (you have pearls taking up a slot in the first two rings, but you can't see them so you don't know).
sandroba Jul 11, 2008, 02:44 PM I always get shitty starts in FfH and i have witnessed all the things you are saying, and it does make a lot of sense for the reason to be the sprawling thing. Kael could you please look into this?
Morni Jul 11, 2008, 02:57 PM Sea-based resources never appear more than two tiles away from the coast in BtS (or any other non-modded version of Civ4).
Yes they do. It actually happens a lot. It's called whales.
sandroba Jul 11, 2008, 03:47 PM I think he is refering to the unaccessible fish resourse that usually appear out of range from any possible cities.
Just try an archipelago map type, open the world builder and check out for yourselves.
Crazy_Ivan Jul 11, 2008, 05:53 PM I've noticed 1, 2 and 3 often enough to be annoying. Never game breaking of course, but very annoying indeed.
Could it be easier to just remove the Sprawling trait and give Kurio Cities a national wonder (capped at their max number of cities) that works like a slums? Then the game would seed according to the 2 tiles rule and we can all go on our merry way.
Adrogans Jul 11, 2008, 05:59 PM Interesting concept Crazy Ivan. If sprawling is actually the cause then that seems like a nice solution provided it gets built automatically.
rocklikeafool Jul 11, 2008, 06:42 PM I spose someone could do wat you suggest, Crazy_Ivan. But I doubt it will solve anythin.
Nikis-Knight Jul 11, 2008, 06:45 PM Could it be easier to just remove the Sprawling trait and give Kurio Cities a national wonder (capped at their max number of cities) that works like a slums? Then the game would seed according to the 2 tiles rule and we can all go on our merry way. I'm pretty sure that the slums only work because of the work done in implementing sprawling. In otherwords, the issue is third ring workability, not sprawling in general. Well, I shouldn't really say anything, I'm clueless about the details.
Iirc, the expanded range on bonuses is an automatic side effect of allowing an extra city ring, not something intentionally done. Maybe Kael has figured out a work-around since he first did it, but this was the easiest way at the time, I think.
DrStalker Jul 11, 2008, 11:52 PM Sometimes I world-builder resources too far away back in, but it's such a spoiler for the rest of the game when I see things I shouldn't
This is something I can help with: Places something in front of your monitor to cover up the minimap. Then you can tweak things without revealing more than one screen of terrain.
RogueThunder Jul 12, 2008, 12:31 AM Yes they do. It actually happens a lot. It's called whales.
Given 5 separately generated huge Archipelago maps combed left to right through the entire map.
No, they don't in base BTS.
Although a subnote, the smallest 2 map sizes, duel and tiny, I think can cause resources to place where they normally shouldn't, at least I would swear so. Some sort of crowding issue. But really this is most prevalent with Blessings on in FFH2... never cared about BTS long enough to play that much base.
And indeed, I imagine Slums is causing it too. Its cus its possible.
Kael Jul 12, 2008, 12:33 AM its intentional. The advantage of the kuriotates is that they get to use 3 rings. To make that valuable the things that happen around cities have to happen within 3 rings. It wouldnt be fair to have them happen in 2 rings for everyone else and 3 rings for the kuriotates (in which case where is their real advantage?).
Yes, it means that you won't always get to take advantage of some things. Just like you cant take advantage of religion additions with the Grigori.
Lets take the 3rd tile fish resources for example. I dont know if that results in less workable fish overall compared to without the sprawling mechanic (it isnt as simple as the game placing 10 fish resources so they are now spread out over a larger area). But we do offer the "Blessings of Amathaon" game option that will definitly provide more resources than a game without sprawling. So if you want more resources, that the option I would use.
rocklikeafool Jul 12, 2008, 01:48 AM And there's the obvious answer y'll were missin. Now, I spose someone will say, "Why do we have to select the 'Blessings of Amathaon'? Why can't you jus remove sprawlin?" Why can't people jus accept certain things and quit whinin? I'm pretty sure Kael has to answer tons of useless threads like this. And I doubt he finds it refreshin. If everyone used their heads and the pedia, we wouldn't get threads like this.
Sureshot Jul 12, 2008, 05:00 AM i noticed there was a slight increase in sea resources from 30 to 32, but given that theres 2/3 the number of sea resources reachable now, perhaps it could use a higher amount (pearls are added but oil is gone so they cancel out), like 30*3/2=45 to compensate
Kael Jul 12, 2008, 08:54 AM And there's the obvious answer y'll were missin. Now, I spose someone will say, "Why do we have to select the 'Blessings of Amathaon'? Why can't you jus remove sprawlin?" Why can't people jus accept certain things and quit whinin? I'm pretty sure Kael has to answer tons of useless threads like this. And I doubt he finds it refreshin. If everyone used their heads and the pedia, we wouldn't get threads like this.
Please try to be nicer in your replies. I certainly dont mind anyone pointing out questions or concerns they have with the game, thats why we created the forum.
Jenaelha Jul 12, 2008, 10:45 AM No, that was a good observation MaxAstro which has enlightened my understanding of the bigger picture. Thanks for the thread. Thanks for the revealing response Kael.
I've had also been wondering about the starting positions in 32, it used to be certain that I would start with nice resource bonuses for my starting city, now I've often got to go find them. This has also changed my strategy in beelining to the opponents capitals, which are not always the sweet target they once were ceratin to be.
MaxAstro Jul 12, 2008, 01:38 PM Unfortunately it seems the clean and simple answer is, as Kael basically said and others have implied, there's no way to fix these issues without removing Sprawling, which I don't want to happen. It would be nice if #2 and #3 could be fixed (#1 is partly counterbalanced by the increase in the normalization range, I suppose), but they certainly aren't game-breaking enough to warrant removing Sprawling. I don't think Blessings is a 100% fix, especially for #1 and not at all for #2, but it's a valid point.
eerr Jul 12, 2008, 03:34 PM the third tile is only a problem with spawns because capitols have a minimum threshold for how good they are. if the third row is counted, the whole delicate balance process could be thrown out of wack. maybe as much if not more than the bug that placed excessive amounts of trees(and less resources).
you did fix that, right?
unreachable water resources are only problem because they annoy people thats why the game normally wouldn't spawn them in the first place.
xienwolf Jul 12, 2008, 04:50 PM Personally I'd just like the normalization routine for start locations to be removed completely. If the area generated randomly wasn't good enough, we can move.
CyberChrist Jul 12, 2008, 04:56 PM Making the best-spot-for-city calculation include the 3rd ring for all civs cause severe problems for the AI, since the AI will follow the best-spot-for-city suggestions without any further investigation meaning that what might be a best-spot for a city with 3 rings it is more often than not less than optimal for a city with just 2 rings (to the point of being completely useless).
I often see the non-Kurioate AI civilizations start out severely crippled from founding their capitol city on a city spot that would only really work with 3rd ring available - while Kurioates surge ahead in every game.
The solution would simply be to only include 3rd ring in best-spot-for-city calculations when the Kurioates civilization is directly involved.
Kael Jul 12, 2008, 05:27 PM Making the best-spot-for-city calculation include the 3rd ring for all civs cause severe problems for the AI, since the AI will follow the best-spot-for-city suggestions without any further investigation meaning that what might be a best-spot for a city with 3 rings it is more often than not less than optimal for a city with just 2 rings (to the point of being completely useless).
I often see the non-Kurioate AI civilizations start out severely crippled from founding their capitol city on a city spot that would only really work with 3rd ring available - while Kurioates surge ahead in every game.
The solution would simply be to only include 3rd ring in best-spot-for-city calculations when the Kurioates civilization is directly involved.
I wouldnt say that it is simple, but I think your right. Its all a part of improving the AI, which we've started doing (we tackled military strategy first) but we will cover features like this as well. typically this just helps the Ai, but in this case it should help the humans a little bit too because the "computer recommended" city sites should become more accurate.
CyberChrist Jul 12, 2008, 07:53 PM I think it is more simple than you realize. I noticed some time ago (looking at your code) that you made the number of workable city plots include the 3rd ring by default and then in some of the checks you switch it back to only include 2 rings.
It should be the other way around to avoid the current problems - keep 2 rings the default and only increase to include 3rd ring when Kurioate is involved.
I am assuming you made this change to make it easier for the AI to handle the Kurioate work properly (without too much extra coding required), but the side effects is causing serious problems for AI when trying to handle all of the other civs.
Wouldn't you agree that it would require less work to switch back to the original working plot/ring number and then including custom functions to handle 1 civ - rather than keeping the current way and having to add work arounds for all the rest of the civs? :)
Kael Jul 12, 2008, 11:30 PM I think it is more simple than you realize. I noticed some time ago (looking at your code) that you made the number of workable city plots include the 3rd ring by default and then in some of the checks you switch it back to only include 2 rings.
It should be the other way around to avoid the current problems - keep 2 rings the default and only increase to include 3rd ring when Kurioate is involved.
I am assuming you made this change to make it easier for the AI to handle the Kurioate work properly (without too much extra coding required), but the side effects is causing serious problems for AI when trying to handle all of the other civs.
Wouldn't you agree that it would require less work to switch back to the original working plot/ring number and then including custom functions to handle 1 civ - rather than keeping the current way and having to add work arounds for all the rest of the civs? :)
Its all relative I suppose. When you say its currently causing serious problems you are talking about picking plots that arent as ideal for city locations, resources spawning in places normal civs cant get to, etc. Done the other way (kept at 2 and increased to 3 where needed) causes CtD's when any function tries to interogate a plot that isn't in the list. So I opted for non-optomized over crashes, with the understanding that Id rather do work to optomize rather than fix ctd's.
The real crazyiness is the city plot order functions. Im sure you've looked at them, but they are a pain in the butt to consider for 2 different ring sizes. In short the game orders the plots a round a city 1,2,3,4... where 1 may be the plot 2 west and 2 north, 2 may be 2 west and 1 north, etc (i forget what the actual order is). A 3 ring city would still have 1,2,3,4... (though it goes on for longer) but 1 maybe 3 west and 3 north, 2 would be 3 west and 2 north, etc.
That doesnt sound to bad until you start mixing functions with one function using the 3rd ring model and one using the 2nd ring list. The first function could trigger when something occurs in plot 12, then call to another one to do something in plot 12 that is using 2 ring numbers and comes up with a different plot. Which could cause all sorts of issues.
Add in the fact that the number of city plots is called over 150 times in different places in the code and it becomes (at least to my programming skill), a significant challenge. Not insurmoutable, but there is work to do.
MagisterCultuum Jul 12, 2008, 11:53 PM That reminds me of the bug I noticed a long time ago, where a city with both the City Hub and Planar Gate buildings (cheating, of course) would spawn the planar gate units up and to the right of the city, which was often a water tile. I haven't tried to see if this still happens in BtS versions, but I suspect it might (except of course that City Hub isn't a building now). That could be a problem when the Sheaim build the City of a Thousand Slums, or if the Capture All Buildings (or Assimilation, if it is added) game option(s) allow the Kuriotates to get Planar Gates.
Kael Jul 12, 2008, 11:57 PM That reminds me of the bug I noticed a long time ago, where a city with both the City Hub and Planar Gate buildings (cheating, of course) would spawn the planar gate units up and to the right of the city, which was often a water tile. I haven't tried to see if this still happens in BtS versions, but I suspect it might (except of course that City Hub isn't a building now). That could be a problem when the Sheaim build the City of a Thousand Slums, or if the Capture All Buildings (or Assimilation, if it is added) game option(s) allow the Kuriotates to get Planar Gates.
Yeah, the City of a Thousand Slums adds an additional wrinkle into the code since we cant assume thi sis just a Kurio thing. Though for the AI it may be good to adjust its logic to the most common situation (2 ring cities).
CyberChrist Jul 13, 2008, 03:49 AM Its all relative I suppose. When you say its currently causing serious problems you are talking about picking plots that arent as ideal for city locations, resources spawning in places normal civs cant get to, etc.It is more serious than you appear to realize. More often than not it is outright crippling for the AI to constantly be choosing less than optimal(sometimes useless) city locations.
Done the other way (kept at 2 and increased to 3 where needed) causes CtD's when any function tries to interogate a plot that isn't in the list. The problem appears to be that the default values (NUM_CITY_PLOTS and CITY_PLOTS_RADIUS) are also used for determining the size of the CityPlot arrays and FAssert checks as well as for any other ingame functions.
I would suggest returning these 2 global vars to their default value (so that the regular uses of them are normalized) and creating 2 new MAX_* global vars and replace the current vars with the MAX_* vars whereever they are used for array defining and FAssert.
MagisterCultuum Jul 13, 2008, 04:03 AM While you are dealing with city placement, may I suggest that you somehow stop the AI from placing cities close enough to rivers and coasts to prevent other cities being built there but not close enough to take advantage of the river/coasts?
MondSemmel Jul 13, 2008, 10:38 AM The city location advisor does seem bad right now, which seriously harms the AIs. To be honest, making the whole game worse for the sake of one civ and one wonder seems like a suboptimal outcome.
I know this is not intentional, but sacrificing playability for additional features doesn't seem like the way to go.
Anything that makes the AI inherently worse than human players at essential choices like city placement (which should be a trivial problem for an AI except for maybe border cities etc.) is a huge problem, but in this case this same mechanic also causes other problems...
What would happen if one would give all civs sprawling/the ability to work three rings, but all civs except for Kuriotates would get 0 yields on the third ring? Would this change the city placement advisor/AI city settlement preferences? Would the AI know that it makes more sense to let another city for a tile instead of working it yourself for 0 yields (which isn't even possible as far as I know)?
Kael Jul 13, 2008, 12:05 PM It is more serious than you appear to realize. More often than not it is outright crippling for the AI to constantly be choosing less than optimal(sometimes useless) city locations.
Maybe. My belief is that using non-optimal city placement is a lesser issue than crashes. But I suppose its a judgement call. ;)
The city location advisor does seem bad right now, which seriously harms the AIs. To be honest, making the whole game worse for the sake of one civ and one wonder seems like a suboptimal outcome.
I know this is not intentional, but sacrificing playability for additional features doesn't seem like the way to go.
Anything that makes the AI inherently worse than human players at essential choices like city placement (which should be a trivial problem for an AI except for maybe border cities etc.) is a huge problem, but in this case this same mechanic also causes other problems...
What would happen if one would give all civs sprawling/the ability to work three rings, but all civs except for Kuriotates would get 0 yields on the third ring? Would this change the city placement advisor/AI city settlement preferences? Would the AI know that it makes more sense to let another city for a tile instead of working it yourself for 0 yields (which isn't even possible as far as I know)?
Better to just fix the issue. The plan is to teach the AI to compensate for the FfH changes. We will get it worked out. If worse comes to worse and we cant fix the problem we will look at cutting features, but we arent close to that yet.
CyberChrist Jul 13, 2008, 12:15 PM Maybe. My belief is that using non-optimal city placement is a lesser issue than crashes. But I suppose its a judgement call. ;)The solution for both are not mutually exclusive - and I believe I already outlined the main reason for the CTD that you seem to have had some problems with.
|
|