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. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    506
    Location:
    Germany
    @Leoreth: Thanks for laying that out. Anything on the DoC forum that isn't too specific to the Rhye's & Fall rules I try to read. (One thing I've bookmarked for at least partial adoption is your set of changes around the acquireCity function.)
    Will this really make a big difference for cities without a Castle? 40% damage (30%?) should be enough to tip the scales heavily in favor of the attacker. Maybe my intuition is failing me here. Not so important – one could e.g. subtract city defense from the attacking unit's collateral damage limit if taking the minimum of those two values doesn't have enough impact. Actually, the first quoted sentence sounds like you might already be doing that, but I guess not:
    Code:
    int iMaxDamage = std::min(collateralDamageLimit(), (collateralDamageLimit() * (iCollateralStrength + iStrengthFactor)) / (iTheirStrength + iStrengthFactor));
    // Leoreth: city defense limits collateral damage
    if (pPlot->isCity())
    {
       int iCityDefenseLimit = std::max(0, 100 - pPlot->getPlotCity()->getDefenseModifier(false));
       iMaxDamage = std::min(iMaxDamage, iCityDefenseLimit);
    }
    (source) Perhaps my confusion about this is an indication that adding further complexity to the collateral damage rules is a bit problematic.

    One could also lower the regular damage limit of siege units in addition. On that note, I've taken a brief look at the K-Mod Unit AI code; CvUnit::collateralDamageLimit isn't called, so it seems like there's an implicit assumption that the the two damage limits are the same. Well, one would hope that the AI getting hurt less badly by collateral damage makes up for any minor inconsistencies in the AI calculations.

    I agree that the role of stack killers should not have fallen onto siege units, at least not the pre-modern ones, but, so long as splitting stacks up isn't usually a viable tactic, an anti-stack attacker is essentially just a powerful attacker. So, I'd argue that the problem isn't that siege units are much better at attacking cities than other tiles, but that they're generally too good at attacking.

    I've plans to make the target and damage limits of siege units much stricter overall, but I'm not ready to make such major balance changes. So, smaller temporary measures are a consideration for me, but I'm not sure if it makes sense to do (a little?) something for besieged cities and nothing against siege units in pitched battles.
     
  2. Pepo

    Pepo Prince

    Joined:
    Nov 27, 2012
    Messages:
    313
    So I finished the game I was playing, two things that I would like to add :
    - forest preserve doesn't appear in the civilopedia
    -Ai should evaluate wars on an opponent figthing against multiple opponents on a more conservative manner. If it's clearly losing it should try to peace out so as to not lose the game. In the game that I was playing Saladin refused to talk even though he got nuked 4 times and his army was way weaker than mine. He only talked when I peace out with Churchill (who lost 9 cities yet didn't want to give concessions) and even then he also didn't want to peace out. Vanilla Ai may sometimes peace out to soon, but with your mod they clearly underestimate the strength of nations figthing on multiple fronts
     
  3. Elkad

    Elkad Emperor

    Joined:
    Mar 26, 2007
    Messages:
    1,005
    Playing Dutch. 0.96d Just got astro and chem. No east indiamen, despite them showing in the civopedia.
    I get Frigates instead.

    Edit: I can't build Galleons either.
    Edit2: Navigation2 isn't working either.
     
    Last edited: Sep 29, 2019
  4. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    506
    Location:
    Germany
    What, will the line stretch out to th' crack of doom? :cry:
    I forgot to make East Indiaman the replacement of Frigate (instead of Galleon) in Assets\XML\Civilizations\Civ4CivilizationInfos.xml. I'm attaching the fixed file (just a one-line change). Will also put it on the main download page later. Galley and Trireme being unable to receive Navigation II is intentional. With their base speed increased to 3, I feel that +2 speed would make them implausibly fast compared with more advanced ships. I'd like to make Astronomy a requirement for Navigation II instead, but, currently, Astronomy doesn't have room for another icon.
     

    Attached Files:

  5. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    506
    Location:
    Germany
    Speaking of bugfixes:
    I had meant to exclude Ruins. Turns out that checking for 0 pillage gold is not the right way to do that as Forest Preserve also doesn't yield any. Will include the bugfix in the next version. Thanks.
     
  6. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    506
    Location:
    Germany
    To anyone who comes across bad retreat (AI city evacuation) behavior: I'd gladly take a look at a screenshot or savegame. I can see that leaving more than 4 or 5 units behind is unwise unless the defensive modifier is unusually high (in reference to Cruiser76's post); not sure how commonly that happens. The AI retreating too readily against technologically inferior units is also a know (or let's say: suspected) issue.
    It could be that the continental civs were tied up in internecine wars. If you had a large navy, that would also be a legitimate reason not to attempt a naval invasion. Oh, and Willem probably wasn't able to make any naval landings due to the error that Elkad just reported. :mischief: When a civ exposes itself military, is doing well in score or research, isn't protected through high relations modifiers and an AI civ on another continent has its hands free, a naval invasion should happen – but maybe (probably) it doesn't always. I've meant to run some more games on AI Auto Play on maps with multiple continents based on keldath's feedback; maybe that'll turn up some unknown problem in the AI code.
    That's also congruent with keldath's feedback – too few Barbarians on small continents. Which reminds me that I had made a change to increase the Barbarian creation rate on small continents a bit; forgot to include that in v0.96d. Beyond that, I'd like to expand the possibility of land units appearing aboard Barbarian Galleys. That happens very rarely currently. Though, if a continent is fairly circular (short shoreline) and has no nearby islands, then suppressing Barbarian Galleys isn't going to be difficult. For now, playing with Raging Barbarians might come closer to your expectations.
    It could be interesting because a revolt damages the garrison, so they could probably not immediately go after the Barbarians. But I don't think that revolts should be made more painful – don't want to make the calculation about war/peace too different from BtS nor wade into the territory of the Revolution mod.
    Thanks for letting me know what worked and what didn't.

    No promises, but thank you for the kind words.
     
  7. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    506
    Location:
    Germany
    @xyx reported similar problems a couple of months ago (see e.g. this post of his). So far I've only added the issue to my work-in-progress list in the manual (actually the top item). Do you happen to have a savegame or two that you could share? Or else a UWAI logfile (REPORT_INTERVAL=1 in GlobalDefines_devel.xml; gets written during AI turns) would also help. The Inca may have assumed that your focus was (solely) on Churchill – not a reasonable assumption here, but could be difficult to amend. Same for Saladin perhaps, though he should've at least realized that you might nuke him (again). For Churchill it has to be something else; it could be as you say that he overestimated the distraction posed by his war allies. Difficult to guess what's going wrong in such a complex war.
    I'm mostly holding off on balance changes to XML stats. I've inherited some from K-Mod and made a few myself that seemed urgent and some I perhaps shouldn't have made. So far, the idea is still that players can learn about all balance changes by reading through the four-page list in the manual (chapters "misc. changes" and "K-Mod"), which is already a lot to read. I would like to do a comprehensive overhaul for balance and historicity at some point (I have a draft for that on GitHub). All that being said, your suggestions mostly concern game elements that have already been altered; there's no harm in tweaking those.
    Spoiler Machine Gun :
    I agree with all this and was going to increase the K-Mod modifier to 25% along with other changes to Machine Gun. Might as well increase the modifier right away. +25% results in 7% victory odds for unpromoted Cavalry against Machine Gun according to dkor's combat odds calculator. (I wanted to link to it, but it has been taken down apparently.) +10% (as it is now), yields 17% victory odds. +50% would result in 2% victory odds. Either way, the high withdrawal chance (which the AI likes to increase through promotions) will still make Cavalry-on-MG attacks viable. Of course a higher combat bonus will result in less damage to the MG. Hard to say. The same bonus against Gunpowder and Mounted units would communicate that charging machine guns on horseback is just as suicidal as on foot. I don't know if that's more or less true. When in doubt, I like to keep closer to BtS.

    By the way, Cavalry is also too effective against Infantry, which I'd like to give 22 base strength and no bonus against Gunpowder units. But that would be a change for some later day.
    Spoiler Frigate :
    Frigate is cheaper and thus more efficient against Privateer and Galleon, but I guess that's a very minor advantage. A Ship of the Line with Coal is, in my mind, a steamship; so I wouldn't really mind if Frigate became effectively obsoleted by that. However, it seems that speed 5 for Frigate would be much more historically accurate. I had looked up typical speeds for some of the other ships in the game before but apparently never for frigate. The only figure I see on Wikipedia is 14 knots in the late 18th century, which is a bit late for Chemistry, and that's probably not the travel speed. The article also says though that even early frigates were fully rigged and that "the term 'frigate' implied a long hull-design, which relates directly to speed." So 10 knots seems like a reasonable guess, which is also what I've assumed for East Indiaman, which already has speed 5. East Indiaman's unique ability will then only be its cargo space – I guess that's fair enough, and simpler than cargo and +1 speed. Transport (speed 5 currently) could -among many other types of ships- represent WW2 Liberty ships, which only had a speed of (Wikipedia) 11-11.5 knots. So that seems fine. Frigate being faster than Privateer is perhaps not ideal. Early privateers were galleons (e.g. the Golden Hind), later ones frigates. I'd eventually like to move Privateer to the same tech as Galleon, with Gunpowder as an additional requirement, to give Privateer a longer window of opportunity. Slower speed than Frigate would then be OK, but, for now, since Privateer and Frigate have the same tech requirements, Privateer should also have speed 5. That leaves (I hope) only the question of Ship of the Line. My notes say that a speed of 5 knots should be assumed, which isn't much faster than caravels and galleons – make it speed 4 without Coal. That steamship I linked to could do 12.1 knots; about the same as a frigate. So I'm inclined to give Ship of the Line with Coal the same speed as Frigate. Edit: Or, since speed 4 is fast enough to make Ship of the Line usable (that was the main point of adding 1 speed with Coal), I could just scrap the steamship idea.

    (Given that frigates "scouted for the fleet, went on commerce-raiding missions and patrols, and conveyed messages and dignitaries," Caravel and Carrack should probably upgrade exclusively to Frigate, and Frigate should be allowed to enter foreign borders and to carry special units. But I'll only add this to my draft of future changes.)
    Spoiler Global Warming :
    @LeBashar has also suggested recently that GW should start later:
    I'm a little loath to experiment with the GW settings as I don't care much for the whole mechanism. But I guess it is kind of my responsibility as I've made the AI chop more Forests. In which year do you suppose should the "sustainability threshold reached" message appear?
    Spoiler Emancipation :
    Giving everyone else -1 happiness is somewhat similar to gaining 1 happiness. That's obviously not valuable enough; however, adopting Emancipation also creates an (escalating) incentive for everyone else to adopt Emancipation, forcing everyone out of Slavery, Serfdom and Caste System eventually. Ignoring the "eventually," Emancipation should be the best choice for whichever civ benefits the least from using a different civic. Of course we can't pretend that Emancipation immediately forces everyone to research Democracy (which is also going to be a greater inconvenience for some civs than for others) ...

    Another angle is that Serfdom (Medium upkeep in the mod) and Caste System sometimes (not so rarely?) provide almost no benefit by the time that Emancipation becomes available. Slavery is different story; I normally play with the "No Slavery" option and don't think that the other civics should be balanced around Slavery. (I'm hoping to add an optional replacement civic with a less powerful and less fiddly ability "soon".)

    There are already GP effects at Representation, Pacifism and Mercantlism, none mutually exclusive. Not to say that another would make those four civics an invincible combination, but it's a high number of civics reinforcing and representing the same thing. If anything, I'd try to dial one of the current Emancipation abilities up somehow.
    Spoiler Representation :
    Also on my list. One less research would make the decision between Representation and Universal Suffrage more interesting. But that will mostly cancel out the buff to specialists from Scientific Method. That buff isn't important as players will always assign specialists when they run out of decent tiles to work – it just seems wrong that specialists only get worse (through increasing GP birth thresholds) after Constitution while tile improvements get sizable bonuses at the start of the Industrial era. For what it's worth, karadoc, who had added the research bonus to Scientific Method, eventually moved it to Computers.
    Spoiler Forest Preserve :
    It's pretty much only good for National Park. I wouldn't want to increase the yields that much because that seems implausible. I'd like to replace the happiness bonus with health; my impression is that extra health tends to be more useful than happiness at that point of the game. (Health seems to be no worse a representation of livability than happiness.) The spread-Forest ability could also be improved; worthless currently. Is a commerce bonus from Genetics realistic, or is that mainly for balance? (I know little about plant preservation and genetics.)
     
    Last edited: Sep 29, 2019
  8. Elkad

    Elkad Emperor

    Joined:
    Mar 26, 2007
    Messages:
    1,005
    Thanks for the fix.
    I powered through to Combustion last night (on Marathon - Just One More Turn!), so I didn't even get to use my UU.

    At RealmsBeyond in RtR mod, we solved that by leaving them at spd2, and giving them nav1 for free. (does break Trading Post though, have it give Nav2 or something)
     
  9. Pepo

    Pepo Prince

    Joined:
    Nov 27, 2012
    Messages:
    313
    Here are attached some of the savegames from the game. Unfortunately I think i have fudge it up when installing the new version as i get a CTD everytime I try to open the mod, so I´m going to add the saves only going from memory (fortunately i did some savescumming for some risky attacks, so ther should be material to work with). I included 5 saves counting on that. Also I believe the saves don't reach the point where i was nuking saladin every few turns, or even if the last one is from when i had a winning position over churchill, so sorry for any inconvinance :(

    Edit: Ran the game again and this time it loaded after three hours. Sometimes software computers seems to obey evil spirits rather than the basic laws of physics. Anyways the 1909 save is perfectly valid, as both the arab and the english are in a bad position at this point
     

    Attached Files:

    Last edited: Sep 29, 2019
  10. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    506
    Location:
    Germany
    That's elegant in a way, but all galleys being good at navigation doesn't ring true. Nav II for non-oceangoing ships is generally weird.

    I was hoping to make Galley occasionally useful for troop deployment in land wars. Speed 3 doesn't seem to be enough for that. So my current plan (not sure whether and when) is to keep the speed at 3 but remove the Flanking requirement of Nav I. This should also solve the problem of having no decent promotion for a Galley that has defeated a Barbarian ship when no further Barbarian ships are likely to appear. So, easier Nav I instead of free Nav I. Flanking may have to be beefed up a bit then, and perhaps change Trading Post to free XP.

    Thanks a lot. Can't think of an explanation for those crashes. If they re-occur, it should be possible to diagnose them through logfiles; but let's hope not I guess. ;)

    The Churchill situation mostly results from a mundane mixup in my AI code. In 1884, after you've destroyed his main stack, but no cities taken yet, Churchill assumes that Tokugawa will conquer your colony of Sagres and that the surviving Japanese units will be too few to assail another city. As a result, Tokugawa's (simulated) offensive should stop; instead, yours is stopped and Churchill assumes that he will lose nothing. With this bug fixed, Churchill offers a square peace treaty, which seems reasonable to me at that point.

    The other, lesser issues remain, but I hope I can resolve or alleviate them with the help of those savegames.
     
  11. Cruiser76

    Cruiser76 Chieftain

    Joined:
    Feb 4, 2018
    Messages:
    46
    Gender:
    Male
    Adding an xml tag for health for improvements would be a very nice addition. I've added a new workshop improvement for the industrial age that needs a health penalty!
     
  12. Elkad

    Elkad Emperor

    Joined:
    Mar 26, 2007
    Messages:
    1,005
    Emancipation is brutal on maps with a lot of civs. I feel like it should cap at -5 or something.
     
  13. Pepo

    Pepo Prince

    Joined:
    Nov 27, 2012
    Messages:
    313
    I believe the problem isn't with your mod as I may have downloaded an infected file. Anyway I'm going to run an analysis later to confirm it

    Good to know about the ai. I started another game in the medium continents map and the Ai behave much more reasonable, offering gold if they see the war is going to go badly. I'm also far impressed by it counting allies plans to decide if it wants to keep figthing or not. When doing projections for wars, does it take into account future production by the rival? So that for example it may try to build up and rush an opponent with greater production capacity even though it may backfire?


    On some of the suggestions I've made:
    On global warming: In the new game I'am playing it reached the sustainability threshold before I even build a single coal plant. I think the problem with the mechanic is how the values are calculated: you get pollution per pop, from buildings, resources and from having power. If I was to change the mechanic, I think that power should be the main drive for climate change, as it can be a good representation of a developed city that polutes more, and energy production is one of the main contributor to Co2 emissions. On the other hand, buildings shouldn't add to the value as it only makes sense for a small set of buildings, and
    in general the polluting ones are related to the energy sector

    As for population and bonuses, while they are a factor of pollution, we do not know what is the standard of living of the people, that will be the main factor on deciding it.

    On forest preserve: Yeah I do think that adding a health bonus may be a good idea, and as forest preserves doesn't need to be worked on, it may be useful on some cases. And the changes I propose were all from a game balancing perspective: On the current world, the lack of economic value of forests is what leads to deforestation. The health benefit may be a way to represent the non-economic benefits it has (and in game forests already provide a health bonus)

    Also I was thinking of maybe finally making a small mod for civ IV. Would there be a problem if I use your mod as a base? Bear in mind that i'am a very lazy person so I would probably end up doing nothing, but if I managed to do something I would like to release it so that other people may enjoy it
     
  14. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,517
    Location:
    israel
    you can check my advc modmod if you are seeking something based off on advc.
    (i also created a platform for modding based on my modmod )
     
  15. Pepo

    Pepo Prince

    Joined:
    Nov 27, 2012
    Messages:
    313
    So if I understand properly did you incorporate the AdvAi to dawn of the overlords? Also I didn't notice that you were behind Song of the moon. I thought when I tried many years ago that it was quite a neat concept. If only we could get good multimaps like in Civ 2 Tot , getting a solar system civ would be great ( future mod kinda did this)
     
  16. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    506
    Location:
    Germany
    Ugh, I had expected this to exist already. I'll try to add it with v0.97.
    The unhappiness is computed as 0.4 times the percentage of cities under Emancipation times the population of the given city; as in BtS. So it shouldn't depend on the player count. I'd say that it's mainly the multiplication by the local population that can make it brutal. All the unhappiness effects work that way though.
    Per-turn production is estimated for all war parties based on the "Goods produced" graph (that's originally a K-Mod idea). Then the AI estimates how much each war party will prioritize unit production. That's done based on the strategic situation. If a civ has no particular reason to produce units, the gradient of the power curve is taken into account. So if a civ hasn't been producing many units lately, another AI civ might try to outproduce them despite having a lower production capacity. Of course, when considering war preparations, an AI civ will assume a fairly high build-up priority for itself.
    So long as it doesn't become too easy to avoid GW (and "Save the Planet" anger) by foregoing (fossil-fuel) power plants. It may well be that the real counterparts of the bad-health buildings add to GW primarily by consuming power, but, in the game, only Factory requires power.
    I'll have to look at the formulas. Counting bad health from population regardless of available tech sounds dubious if that's how it works.
    That's reassuring. I hope that can work sometimes; health plus yields that aren't terrible but don't veer into utopian fantasy.
    No problem at all. I didn't even ask karadoc or anyone else.
     
  17. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,517
    Location:
    israel
    it exists on doto...you can merge it from there f1rpo.
     
    f1rpo likes this.
  18. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,517
    Location:
    israel
    hey ya buddy,

    quick question, i asked before, but,

    im gonna pick up my mp play finally today.
    i wonder, can i merge in 096e without savegame break?
     
  19. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    506
    Location:
    Germany
    I'm not yet sure that there will be a version 0.96e. The errors that Pepo and Elkad uncovered don't seem quite severe enough for updating the main download. Anyway, all changes on the active GitHub branches should be savegame-compatible with 0.96. I've never consciously broken savegames, so even those from v0.8 should still work (probably with some hiccups).
    Older version I guess? Not seeing it in your CvInfos.cpp. Well, I've decided to make it a "HealthPercent" value, like the one for features, so that e.g. 1.5 health can be set for Forest Preserve. Turns out that there was no tile help text for happiness and health from features and improvements; so I've added that too. Could've merged it from BULL perhaps, but small things like that are usually faster to rewrite.
     
  20. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,517
    Location:
    israel
    yes, im playing right now with the latest.
    report below.

    humm, then i must have mixed, i do have some added tags there, probably i confused wheres what. my great people has health bonus. i thought my improvements also .

    ok so far in my mp:

    map trade - im able to trade with the ai map, before i leaned paper.
    first impression lasts long time?

    although , the bugs you fixed are gone :),
    ai behaviour - i guess allot of the game that i started is dependent on the previous code that lead to ai development.
    i still see very weird ai city build - the ai founded a city, on my island on the one spot that was free, desert, half of the tiles are water, really bad place for a city.(ghandi).
    ai diplomacy, quite well, i enjoy it. logical offers, although i made some money from map trade, but not so much.
    aggressiveness - i still see 0 ai activity on warring -
    we have too major ai powers, each on a semi island, no wars ai to ai or ai to human. ai ghandi can wipe me out, but, i never tried.
    i was at war with japan for a while, war is hard, units have much strength.
    even at war, tried once to attack me in my territory, i would have expected japan to try and strike me, it had the option.
    overall feel to the game, turn 400, that its very peaceful, no sudden wars, no ai surprises and ai risky attacks. ghandi...500 points above us.
    ai attitude never changes or shifts, still have first impression value. the rest is stable, unless i attack or something.

    not sure if the ai aggressive is save game related.
    i altered some of the values as we spoke, in the ai stuff over the globals.

    thats it for now,
    i can attach save games as usual.

    edit:
    i can offer defensive pact to an ai - if he learnt it ...but i didnt learn it.
    same goes for map trade.
    expected is that i wont be able to see this option at all if i hadnt lean its tech - or at least - it should be red, bot allowing me to even offer it.
    edit:
    turn 420 ai declare war on another ai ! yey! action time!
     
    Last edited: Oct 3, 2019

Share This Page