1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Advanced Civ

Discussion in 'Civ4 - Modpacks' started by f1rpo, Apr 16, 2017.

  1. Elkad

    Elkad Emperor

    Joined:
    Mar 26, 2007
    Messages:
    1,009
    Re: Naval Invasions
    I think BetterAI addressed it at some point, but not sure.

    I just had a game where the AI was shuttling 4 galleons full of Knights past about 8 of my coastal cities (all of which had a single archer) to drop them adjacent to my capital. Where they were shredded by LandsKnechts every time. He'd head back and get another load and drop them off at the same place, sailing right past those nearly-naked cities every time.
     
  2. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    570
    Location:
    Germany
    Naval warfare is a focus of BBAI, but I doubt that karadoc or I have somehow broken the BBAI code for selecting destinations for naval landings; so I guess BBAI doesn’t address this particular issue or at least not thoroughly.
    There are similar problems with movement on land. City attack stacks will circle an empty city to avoid a river-crossing penalty. Still, with the ships, I'm not sure that the AI would gain that much by making opportunistic attacks on lightly defended cities; it doesn't sound like the AI could've held onto those cities in your game. I mean, better than getting "shredded by Landknechts" certainly, and the evident lack of flexibility makes the AI look bad.
    Done. Culture garrison strength is now equal to the current combat strength (i.e. damaged units have less strength) with the following modifiers:
    * City defense (Archery units, Garrison promotions)
    * Generic strength modifiers (Combat promotions)
    * -50% for non-lethal units (Siege except Machine Gun).
    So I've left out the Walls/Castle and fortify modifiers previously discussed.
    I've added a small breakdown for the revolt probability, but it seems more distracting than helpful. So I'll only show how much more garrison strength is needed for 0% revolt chance, or, if it's already 0, how much strength could be safely removed. Screenshot attached.
     

    Attached Files:

  3. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,477
    Gender:
    Male
    Location:
    Leblanc
    That's interesting to know. Maybe it's better to skip as many of the highest found value sites until all starting locations are within a certain deviation of each other? Although maybe some divergence in starting locations is desirable, and leaving those spots open could also advantage some players if they end up very closely.
     
  4. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    570
    Location:
    Germany
    Or keep picking the very best sites – where the emergence of a civilization is also the most plausible – and allow the normalization step to worsen sites by spreading bad features, bad terrain or removing a resource.

    I’ll probably do an AI Auto Play experiment first: See if I can get an early runaway civ on a Fractal map, then reload the initial save and repeat the game a couple of times with different seeds to verify that the starting position really is decisive. If so, then I can try to gauge if it’s primarily the capital’s workable tiles that make the site powerful (and check if the AI found value is as high as it should be, i.e. significantly higher than that of the other starting sites) or if it’s a matter of space for expansion or both. I'm pretty sure that overpowered capitals can still occur in the mod, but they might actually be pretty rare. Lately, I wanted to see a single riverside Gold on decent terrain and had to regenerate the 8-player map half a dozen times until one player got it.
     
    Leoreth likes this.
  5. xyx

    xyx Chieftain

    Joined:
    Aug 7, 2013
    Messages:
    29
    I'm always in favor of simulations, but with all the random factors involved, I doubt an effect of starting location can be observed using just say 10 repetitions. Maybe try to create a very strong starting location first to see whether this really leads to replicable runaways.
     
  6. Elkad

    Elkad Emperor

    Joined:
    Mar 26, 2007
    Messages:
    1,009
    Another huge game.

    I'm organized HRE and the uncapped city costs are still brutal. I'm at 30gpt number-of-cities maint on a sz1 city, (and another 5-15 for distance with 3 palaces well-spaced), and I'm just past 30% of land with 65 cities. A size15 city adds another 15gpt.
    Sure, the rathaus fixes it still (reduces it to 10-15 anyway), but it's not playable on a normal civ. And I have vassals turned off, so no colony maint.

    I'm still going to end up with cities that cost 100gpt until the courthouse is up. Which means Conquest (other than chasing your tail around burning everything as the AI resettles it all) isn't really possible, and Domination is darn hard. On a regular civ (without a 75% courthouse) and with colony maint on? It'd be over 100gpt WITH a courthouse.

    You've effectively removed two victory conditions on a big map. Put the number-of-cities cost cap back please. Raise it from 8 to 16 if you want, but put it back.
     
  7. Cruiser76

    Cruiser76 Chieftain

    Joined:
    Feb 4, 2018
    Messages:
    58
    Gender:
    Male
    Now that global warming removes forests, should the forest preserve provide protection from this mechanic (i.e. a forest improved with a forest preserve will not disappear)? This would also boost environmentalism as a late game civic, which it could probably use.
     
    Leoreth likes this.
  8. Elkad

    Elkad Emperor

    Joined:
    Mar 26, 2007
    Messages:
    1,009
    Great idea. Also keeps your national park city from turning into a wasteland not long after you build it.
     
  9. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    570
    Location:
    Germany
    As a short-term measure, setting a high-ish cap sounds good. I've looked at an Auto Play game state where, on turn 300, Emperor difficulty, Mansa Musa has 25 cities, three vassals with a total of 15 cities, 26% of the land area (51% required for victory) – vassal territory counts half for Domination and vassal cities count half for number-of-cities maintenance. Most of Musa's cities have 10-15 population and they pay about 15 gpt for number-of-city maintenance and 0 for distance maintenance because of State Property. If I switch out of that, distance maintenance is at worst 20 gpt – it's a pretty well-shaped empire with Forbidden Palace. The research slider for a balanced budget, even without State Property, is 70-80%, which is high, but perhaps fair enough for a Financial leader. (It means that Mint doesn't generate much gold, but, well, that's just the ill-conceived commerce system.)

    So it seems that costs only start to skyrocket around 40 or 50 cities (Musa effectively has 32). I've tentatively set the cap to 36 on Huge maps, a bit lower on smaller maps, and made the cap configurable through GlobalDefines.

    Just to be clear: It was karadoc's idea to remove the BtS city cap (changelog: "to weaken the power of huge civs"). I think the main point of number-of-cities maintenance, originally, was to slow down early-game expansion and, insofar, the limit of 4-8 (depending on difficulty level) made sense. Still, removing the cap was probably an improvement over the status quo ante all in all as it was too easy in BtS to max out the research slider. Anyway, I'd prefer to increase expenses in the midgame and late game through higher upkeep for civics in the Medium and (especially) the High category. And perhaps compute civics upkeep not just from the city count and total population but somehow measure how spread out the population is across cities, so that small cities that primarily claim resources aren't punished. On that note, distance maintenance should also be more sensitive to city population than it currently is. Trade route commerce ties in with all this and could also use work ...
    I've gone ahead and implemented that through an XML tag namend "GWFeatureProtection". It also protects the terrain from changing to Desert – but only because that would remove the (Forest or Jungle) feature. Other terrain changes, i.e. Snow -> Tundra- > Grassland -> Plains, remain possible.

    In K-Mod it was Forest -> Jungle -> removal. I thought that turning Forest into Jungle was rather bizarre. I hadn't thought of Forest Preserves. I agree that they should at least not get hit extra hard by GW. Apart from that – I guess its plausible enough that preservation measures could rein in fires or invasive pests (not sure what the removal of a Forest through GW represents). I don't love giving Forest Preserve an additional ability, but, well, couldn't really leave it as it was.
    I suppose that the impact of starting locations can't be extremely high because I've never once seen Tokugawa win an all-AI game. Good uncontested territory – especially if it's at the expense of a peaceful neighbor that gets boxed in and turns into a sitting duck –, sure seems like a strong predictor. But that's mostly based on incidental observations, not any systematic experiments. I did one little experiment recently where I restarted a map where Huayna Capac had gotten ahead by the midgame with rather a lot of land to himself - and replaced him with Qin Shi Huang. Qin did OK, but didn't win.
    Sounds interesting. Perhaps just give some leader that already has a pretty good start (but no Gold) a Gold source or two in addition ...

    Edit: I think I've made all the tweaks that I really wanted to make for the v0.97 release. Now I just need to write some AI code for city trades (or decide that I need to table that; but I don't think it should be too difficult) and do my usual rudimentary testing.
     
    Last edited: Jan 22, 2020
    Leoreth likes this.
  10. Cruiser76

    Cruiser76 Chieftain

    Joined:
    Feb 4, 2018
    Messages:
    58
    Gender:
    Male
    Hey, good to see you posting! If you think the permanent protection is too strong an effect, maybe just make them more resistant to removal? In my mod and style of play, the game usually lasts until the modern or future era, with lots of hammers being produced. I will usually see 4 to 5 GW events per turn in the end game. This absolutely decimates remaining forests and there is no way to do anything about it.
     
  11. VDNKh

    VDNKh Chieftain

    Joined:
    Sep 26, 2018
    Messages:
    18
    Gender:
    Male
    I for one am a fan of the uncapped city costs. It balanced the snowballing effect civs get if they grow too large pretty well, but could still maintain an advantage over smaller civs.

    The Earth map I played with before was extremely sensitive to starts. The worst offender was Russia, giving them 1 more riverside plains wheat resulted in them dominating the game most of the time, when they used to be pretty obscure. It's a pretty different situation with all the civs in close proximity though.

    Can't wait for 0.97!
     
    Leoreth likes this.
  12. Leoreth

    Leoreth 心の怪盗団 Moderator

    Joined:
    Aug 23, 2009
    Messages:
    33,477
    Gender:
    Male
    Location:
    Leblanc
    I also consider uncapped city costs an unalloyed good. If it's disproportionately punishing on large maps, maybe it's a good idea to scale the city costs according to map size, or keep the costs for the first n cities the same and then reduce the cost of all cities after n based on map size, instead of cutting them off completely.
     
  13. xyx

    xyx Chieftain

    Joined:
    Aug 7, 2013
    Messages:
    29
    Just tried this on standard size, normal speed, noble. Used the same map 10 times with random leaders assigned to fixed starting locations (so that each run a different leader got the relevant location). Half of the runs I added two additional gold to the same (good, but not extremely good) starting location. Given that an effect of starting location should show up most clearly in early game, I recorded the score and rank after 100 turns for the leader starting on that particular location. The average score for the unaltered location was 360, the average rank 3. For the same location with +2 gold, the average score was 375 and the average rank 2.8.

    So, basically, even adding two gold does not give that much of an advantage, at least not on the map and the location I used. Of course, 5 runs each might just be too few, there was quite a bit variability (+/-30 points)

    Edit: As a side note, the more important factor seems to be sufficient room to expand; in each of the 10 games above the highest ranking civs started on one of two locations with much uncontested room. Could be that this is somewhat offset a bit later in game because of lack of trading partners.
     

    Attached Files:

    • MCmap2.7z
      File size:
      4.8 KB
      Views:
      5
    • mc.JPG
      mc.JPG
      File size:
      332.4 KB
      Views:
      22
    Last edited: Jan 24, 2020
  14. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    570
    Location:
    Germany
    @xyx: That sounds very interesting. I'll take a closer look.
    You people usually make good points, so coming up with a response beyond just acknowledging that can take a while. Though I realize that a quick response is better than none.

    Too strong - not in the sense that it would make players much more likely to bee-line to Biology (the makeshift home of Forest Preserve). I guess the absolute protection could seem a bit strange when indeed every non-preserved Forest disappears. Actually, the tag I added works as a protection probability, like a saving throw. If the probability is 100, then the help text will just say "Gives vegetation a higher chance to spread and protects it from Global Warming". For non-trivial probabilities, the ability is shown on a separate line. So, to avoid complexity, which is really my main gripe with the new ability, I'd prefer to keep it at 100. Hm ...

    Considering that there is already too much deforestation through chopping, perhaps GW should, for the time being, only hit Forest and Jungle on Plains. Then I could (arguably) disable the new ability again and treat buffing Forest Preserve as a separate issue. On that note, I wish the forest growth ability was easier to fix. Requiring tiles to be unimproved is just a nonstarter. And the Forest should appear after a constant number of turns, not randomly. A health ability for improvements (mirroring Forest Preserve's current happiness ability) is ready to go for v0.97. So I could replace the happiness bonus with a health bonus (which is my eventual plan) or make it +1 happiness, +0.5 health (i.e. 1 health on a Forest, 0.25 on Jungle) for now. Or leave it alone (for now).

    The map-size adjustment could probably be improved a bit; I'll lay out some formulas below. And the cap, if any, could also be soft cap. Not so simple conceptually, but then, maintenance costs aren't really transparent anyway. Or one could always take the city count to the power of, say, 0.9 and times a normalization factor to get from a growth rate of n^2 down to n^1.9.

    For reference, the number-of-cities maintenance of a given city is computed as the product of:
    * Owner's city count. Vassal cities also count (only half in K-Mod/AdvCiv).
    * Population factor: (Population + 17) / 18, i.e. it starts at 1.0 and reaches 2.0 at size 19.
    * Owner handicap factor: Between 40% (Settler) and 100% (Deity)
    * World size factor: Originally between 45% (Duel) and 20% Huge. (40%/25% in AdvCiv because the mod assumes 16 players on Huge maps, not just 11.)

    So, let's let k be the constant factor from handicap and world size, e.g. 0.9*0.25 on Emperor/ Huge, let n be the owner's city count and refer to the population size of city i as p_i. Then the owner's total expenses for number-of-cities maintenance are
    k * n * ((p_1 + 17)/18 + (p_2 + 17)/18 + ... + (p_n + 17)/18)
    Get rid of the divisors by redefining the constant to c:=k/18:
    = c * n * ((p_1 + 17) + ... + (p_n + 17))
    Let P be the total population:
    = c * n * (17 * n + P)
    Let m=P/n be the mean population per city:
    = c * (17 + m) * n^2

    What fundamentally bothers me about this is, first, that the population distribution doesn't matter; apart from Courthouses (which eventually will become worthwhile everywhere), it might as well be a national cost paid for the number of cities and total population (like civic upkeep). Secondly, n-square will at some point make additional cities strictly undesirable. One can argue that managing exploding costs should be part of the challenge of winning a military victory, but, if that means razing half of the conquered cities, then it's not a good challenge. And, intuitively, I don't like how n-square brings to mind communication costs, suggesting that every city interacts equally with every other city – as if there were no hierarchical organization.

    As for the map-size adjustment, I'd say it should depend on how many cities a player (or specifically a human player) typically owns or is supposed to own. So it might be better to adjust not only to the map size, but also to the initial player count and sea level, i.e. the crowdedness of the map. But that won't solve the problem that typical city counts on Huge maps will differ greatly depending on the player's victory strategy. For Culture and Space, it might be typical to conquer one or two other civs (I don't think that depends much on the map size), which might mean owning less than 20% of the land area, whereas Domination always requires at least 51%. I'm pretty sure that Domination (or Conquest) isn't the easiest or safest way to win on Huge maps, but it can be the fastest, so it can't be treated as an aberration. Also, Diplo victory is arguably not all that difficult on Huge maps and will typically imply owning more than 20% of the world's cities. Currently, the maintenance multiplier on Huge maps is about 80% of the multiplier on Standard-size maps. In BtS, that ratio is 67%. (But BtS also has a default player count of only 11 and Huge maps are 8.6% larger than in AdvCiv.) Perhaps 80% is geared too much toward peaceful victories; maybe 75% would be a better baseline – to be adjusted to initial player count and sea level.
     
  15. Zeta Nexus

    Zeta Nexus Deity

    Joined:
    Jan 23, 2014
    Messages:
    3,517
    Gender:
    Male
    Location:
    In a constant brainstorm...
    How about adding Burnt Forest/Jungle? So GW would remove Forest/Jungle in 2 steps but building a Forest Preserve would instantly restore them. Maybe there could be a chance too for Burnt F/J to heal if there are healthy F/J tiles next to it.
    Just brainstorming.
     
  16. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    570
    Location:
    Germany
    @ Zeta: A new featue just to smoothen the interaction between GW and Forest Preserve (FP) would be a too high-visibility change for my taste. Making all vegetation with an FP immune to GW is mostly fine with me. Making all non-Plains vegetation immune sounds better, but I haven't really played much with GW, so I'm a little uncertain. GW on a Plains Forest should then remove the Forest (and, oh well, the FP), but not turn the terrain to Desert (only a subsequent GW event could do that).

    If the burnt forest feature could replace the current forest growth ability, then it would be interesting to me, but I'd want the growth ability to also replenish Forests that had been chopped down. Or even to grow forests where (at least in 4000 BC) none had existed, allowing players to run some sort of utopian green economy.

    My best idea is that FP shouldn't require Forest or Jungle to be present. If there's no terrain feature, FP will grow a Forest after a certain number of turns; akin to a Cottage except that the FP wouldn't have to be worked. The duration could depend on the number of adjacent Forests and Jungles. What's a bit tricky is that the happiness (or, in the future, perhaps health) ability shouldn't (fully) apply when there is no vegetation yet. Oh, and the AI code would be tricky.

    I'd also like to move 1 FP commerce from Environmentalism to Railroad (tracks), but then Environmentalism will need to be revised as well and maybe National Park too.
     
  17. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,535
    Location:
    israel
    hello hello,

    how you doing f1rpo :)
    busy here with RL...

    getting the civ4 itch again...

    hows ver097? any ETA?
    ill probably have a billion commits to update huh...
     
  18. LeBashar

    LeBashar Warlord

    Joined:
    Feb 1, 2012
    Messages:
    176
    Location:
    France
    I think it is not logical to try to preserve forest of GW, because in the real world, forest are nearly always be shop (or just destruct) before GW (and partially be a cause of it), so the normal gameplay of civ seem ok : all forests shopped, only a little part preserved. It forgot the fact that all civs have made not only a preservation trying but a real reforestation, which is impossible in vanilla's civ.
     
  19. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    570
    Location:
    Germany
    @LeBashar: Well, I've gone with the approach that lets Global Warming remove preserved and unpreserved Forests and Jungles from Plains, whereas Grassland gets turned into Plains without removing features. For Tundra, that's actually already how it works in K-Mod (gets turned into Grssland; no feature removal). But protection from Forest Preserves can be enabled through XML. Git commit

    @keldath: Welcome back. Good question; surely not before the end of the month. Still haven't gotten started on AI code for city trades. Currently trying to figure out why my usual benchmark test has recently become a minute slower. Then I wanted to start a thread about a data type for fixed-point arithmetic (once I'm sure that this isn't what slows the mod down), perhaps to entice someone to add a logarithm function. :mischief: I also still have to compile a legible changelog from the Git commit history.
    I don't know if it makes sense for you to cherrypick commits in the meantime. Based on your post from Dec 16, the commit "Fix animations lag caused by fly-out scoreboard" from Dec 25 would be the oldest one that might be relevant for you.
     
  20. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    570
    Location:
    Germany
    @xyx: Having looked at a few Auto Play games, your map indeed makes a pretty convincing case for Gold not being a major balance problem at least in all-AI games. Human players may benefit more, especially on difficulty levels with high expenses.
     

Share This Page