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

Unofficial BTS 3.13 patch

Discussion in 'Civ4 - General Discussions' started by Bhruic, Oct 5, 2007.

  1. gps

    gps Chieftain

    Joined:
    Oct 6, 2007
    Messages:
    885
    OK, but if they are grouped (for a good reason, as stronger units are there to protect weaker ones), that behaviour seems to be correct. Only the movement indicator display for the whole group is wrong.
     
  2. jray

    jray Chieftain

    Joined:
    Jan 31, 2006
    Messages:
    925
    Location:
    North Carolina (USA)
    Yeah, I hear ya, but it'd be cool if the algorithm could check whether it's possible for the units to end up at the destination tile together, not necessarily walking hand in hand. I suppose there could be complications, though, when passing through a fog of war with possible enemy combatants.

    I think there should also be a mechanism asking you "Are You Sure?" if one of the layovers for a unit would (as known in advance) stop next to an enemy. I can't tell you how many times I've gotten the Great Wall and stopped worrying about barbs, only to have my Great Engineer that I sent from east coast to west coast get eaten by a barb when laying over at a tiny gap between cities!
     
  3. Quagga

    Quagga Former Dictator

    Joined:
    Aug 31, 2006
    Messages:
    663
    Location:
    Li'l Rhody
    I disagree. The problem is too many executives. Who cares whether the AI can spread its corporations? Corporations don't even have much impact on the game.

    Plus, if the analysis is correct, the reason why they can't spread corporations is because they don't leave enough money in their treasuries. Fix that, if fix something one must.
     
  4. jkp1187

    jkp1187 Unindicted Co-Conspirator

    Joined:
    Aug 29, 2004
    Messages:
    2,496
    Location:
    Pittsburgh, Pennsylvania
    Standard speed, standard-sized map. I wonder if there are other variables that impact the ultimate cost of spreading a franchise?

    I have not noticed the AI having difficulty in spreading corporations, although they do tend to lag a bit behind what a human would have done. In my last game, the Japanese (on an overseas continent) founded and started spreading Sid's Sushi to my territory. At first, I welcomed it (as it helped me out in a couple of culture border pushing matches I was having with other civs.) But the Japanese spread it so fast that it started impacting my bottom line, so I sent a Cereal Mills (which I'd founded) exec to buy out a couple of the Sushi franchises.

    I DO see the AI building more execs than it can apparently use, though. I am starting to think, along with Quagga, that absent a better AI routine for AI spreading of execs, that a return to a cap on execs might be the better solution.... (I disagree with his assessment of Corporation impact on the game as a whole -- they are desirable if used intelligently.)

    If it weren't for the fact that (a) the franchise cost was probably established to act as a break on massive expansion of corporations and (b) with no barriers to "buy-outs", it becomes too easy for the human player to micromanage the franchises that do exist in his cities, I'd be in favor of Roland's suggested fix.

    Just some random thoughts here..... Perhaps Roland's fix would be more palatable to me if the cap on execs was re-instated (maybe even lower -- like one or two execs per corporation) and, at the same time, the % chance of franchise "failure" was increased significantly when a "buy-out" was attempted. So if you have a Cereal Mills branch in a city and send a Sushi exec to the city, there would be a 50% chance of failure.
     
  5. Bhruic

    Bhruic Chieftain

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    No, you are confusing cause and effect. Too many executives is the effect. The cause is the AI not having the money to spread its corporation. It's possible to minimize the effect (which is what I've tried to do), but as long as the cause is there, the problem remains.

    Leaving aside the debate over how important corporations are, I think it's pretty important that the AI can spread its corporations. As long as it has the imperative to do so, but not the means, there's going to be a problem. If you're advocating removing the imperative, that's fine. But at that point one might as well argue to remove corporations in general. You're welcome to do that, but it's certainly not something I'd do in a patch.

    I'd like to fix it. But it's not a simple fix.

    Bh
     
  6. Bhruic

    Bhruic Chieftain

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    With that set up, the two warriors will correctly move A->C->O in a single turn. Or so they did when I set that scenario up.

    Bh
     
  7. Mesousa

    Mesousa -8.38 -6.67

    Joined:
    Apr 19, 2006
    Messages:
    478
    Whether the AI can build only three Executives or an unlimited number, the problem is that it lacks the funds to spread. As long as that isn't fixed, wouldn't it make sense to limit the number of Executives so that the effect isn't as bad as it is now? As long as the AI doesn't know how to handle the financial aspect, we're making it only weaken itself by wasting production on the Execs.

    I don't think a limit of say, six Executives would be a problem for the human player, and it would deal with the effect fine as long as the cause can't be fully fixed.

    As for that, I like the idea of increasing the hammer cost of Executives and removing the cost to spread.
     
  8. SaltyNuts

    SaltyNuts Chieftain

    Joined:
    Jun 13, 2006
    Messages:
    1
    Hi Bhruic,

    First, thanks for all the hard work you have put into this project. You are a tremendous asset to the community.

    I was reading the posts regarding corporate executives, and if I understand correctly, it seems the AI checks if it has enough money to build a corporate office before sending the exec to a target city. It also seems this check occurs after the build phase, once the AI has depleted its reserves, so the test usually proves false. Would it be possible to have the exec sent to the target city without such a check? Once the exec is in the target city, the AI may consider it has all the necessary resources in place to actually create the branch office during it build phase.
     
  9. kralore

    kralore Chieftain

    Joined:
    Nov 3, 2005
    Messages:
    6
    I think there is a small problem with the latest versions of the dll. The specialists page in the civilipedia shows a blank page for each of the specialists. It shows the picture of the specialist, but nothing else. v1.07 of the dll is fine. I don't have a copy of 1.08 or 1.09 to check if they were ok, but v1.10 and v1.105 both have the problem with the specialists page.
     
  10. Roland Johansen

    Roland Johansen Chieftain

    Joined:
    Apr 29, 2003
    Messages:
    4,292
    Location:
    the Netherlands
    Removing the spreading cost isn't a perfect solution for the inability of the AI to spread corporation, it's more of a hack. Instead of improving the AI so that it has the money to spread the corporation, I adjust the game rules so the AI can handle the rules. Because the spreading cost is only a small part of the cost of spreading a corporation, I don't think this changes the game a lot. There even was a player who responded in this thread who hadn't noticed the spreading cost.

    If Firaxis hadn't introduced the gold cost to spreading a corporation, then I don't think players would have complained about adding them. We're also not complaining about adding a gold cost to spreading a religion and there are many parallels between those two.

    This change to the spreading rules was one that I wondered if it would work and I'm thankful to Bhruic for answering that question. For me, the game is more bugged if the AI cannot efficiently spread a corporation and has lots of executives sitting around doing nothing compared to a game where the spreading costs are set to 0.

    By the way, I've not suggested to make this an official of even unofficial rule change. It's just my way to get a more challenging AI.

    Weird. I've spread about 60 corporations to my own cities and every single time it cost 50 gold (at epic speed). I guess, you've spread it a lot to foreign cities.

    That would be a very interesting approach to increasing the (hammer) cost of buying out a franchise. The chance of failure must work somehow similar to how spreading a religion to a city with multiple religions works (each extra religion becomes more difficult to spread), but I don't know the details and don't know how to increase the chance of failure.
     
  11. Quagga

    Quagga Former Dictator

    Joined:
    Aug 31, 2006
    Messages:
    663
    Location:
    Li'l Rhody
    Whether one wants to call it an effect or symptom, the buggy behavior is that the AI produces legions of corporate executives that it can do nothing with.

    Sometimes all one can do is treat the symptoms and not the disease. That may be the case here. My opinion is that restoring the corporate executive limit is a better treatment than zeroing the corporation spread cost.
     
  12. bmarnz

    bmarnz Chieftain

    Joined:
    Mar 19, 2007
    Messages:
    441
    Location:
    Pennsylvania, USA
    If you want a limit, it's an easy fix. Check post #336.
     
  13. KrikkitTwo

    KrikkitTwo Immortal

    Joined:
    Apr 3, 2004
    Messages:
    12,316
    Well there are a few most basic issues with the problem

    At the most basic level the AI is not spreading its corporation
    The problem is that spreading it requires gold + building a unit, and the checks on 'getting' those seem to be seperate

    Ideal solution is to make the AI save the gold + build corporate executives
    (The gold spending should check if there is an executive, or as a lesser option, The build executives should check the gold reserves)

    Secondary solution is to make sure the AI doesn't waste hammers that it can't /won't use
    A possible solution here is to give the AI a limit on the number of executive it has so if executives >3? then don't build any more executives
    That way the 'limit' is in place (through AI behavior) but it isn't a game rule.

    Last solution is to change the game rules so that the AI doesn't waste hammers it can't/won't use (here executive limit is a better opion than gold limit)


    One side note: getting the AI to limit its gold expenditure is probably a good idea anyways, because that way it can use the Event system, perhaps a formula for 'Reserves' that is only violated by
    buying units in a threatened city or
    upgrading units in a threatened city or
    buying a world wonder

    Looked at the Hurry system a little.. it seems much more focused around whipping than Gold... it could be that it is not properly considering the AI target gold when Gold Rushing
     
  14. jkp1187

    jkp1187 Unindicted Co-Conspirator

    Joined:
    Aug 29, 2004
    Messages:
    2,496
    Location:
    Pittsburgh, Pennsylvania
    I try to spread corporations to friendly civs and vassals wherever possible, you are correct on that, but I typically spread JUST to home cities first, and the cost is still higher. I also try to get at least two corporations (cereal/sushi or mining/creative) if possible. Perhaps that's driving the cost? Although I seem to recall the cost for spreading inside my own cities/vassal cities still being a variable one, usually starting at $75-$80 and up. (IIRC. I haven't played a full game in a week or so thanks to work and a vacation.)

    Maybe a slightly more sophisticated "hack" solution (at least until an elegant AI solution is available) would be:

    1.) Eliminate cost for spreading corporations.
    2.) Restore the cap on the total number of execs available.
    3.) Significantly increase the hammer cost of executives. Maybe double it.


    This way, the human player won't be able to get away with just spamming corporations left and right, and a facsimile of the 'opportunity costs' of buying out a competing branch are restored, while at the same time the computer will be able to actually spread corporations within its own territory (and overseas) more efficiently.

    Certainly, if it's feasible to increase the chance of failure during an attempted "buy-out" (in addition to the above suggestions,) that would, at the end of the day, make things balanced a little more toward the way the designers intended. Does anyone have an idea where I could look to find this? (Is it available in the usual python/XML files? Or do I have to crack into the SDK?)

    Thoughts?
     
  15. Duuk

    Duuk Doom-Sayer Supporter

    Joined:
    Dec 16, 2005
    Messages:
    1,836
    Gender:
    Male
    Location:
    Detroit, Michigan, USA
    Positive. I'm a huge fan of Paradox Interactive, where when something is buggy we at least get a response from someone that works for Paradox along the lines of "Bug noted - Working on it" or "Bug noted - Not gonna fix it", etc. And we also know when a patch is being worked on and when it isn't.

    Even a line like, "This is the last patch for at least a long while." lets people know that the priorities have shifted OFFICIALLY, instead of just sitting around wondering.

    But thanks Bhruic for making the unofficial patch!
     
  16. Roland Johansen

    Roland Johansen Chieftain

    Joined:
    Apr 29, 2003
    Messages:
    4,292
    Location:
    the Netherlands
    I like options 1 and 2, but not 3, or at least not double it. The hammer costs of executives are a lot bigger than the gold cost of spreading the corporation. And hammers are a lot harder to earn than gold is and are thus more valuable. So if you remove a gold cost of 50-100, then I'd add a hammer cost of 25-50.

    But I like the chance to buy-out thing more since it would make buying out corporations harder (and thus more expensive) than creating new corporations which is not only in line with what the designers intended but also a good game mechanic.
     
  17. Innocence

    Innocence Chieftain

    Joined:
    Oct 7, 2003
    Messages:
    63
    Been playing with the 1.105 fix for several hours but suddently the game is haging at end of turn (Waiting for other Civilizations...).

    I killed the game process and reloaded three time with the same happening at end of turn. If I revert to the original CvGameCoreDLL.dll and end the turn it proceeds as normal.

    Savegame attached - I'm the Innocent civilization (naturally :jesus: )
     

    Attached Files:

  18. jkp1187

    jkp1187 Unindicted Co-Conspirator

    Joined:
    Aug 29, 2004
    Messages:
    2,496
    Location:
    Pittsburgh, Pennsylvania
    :goodjob: Why not split the difference and add 32h to the cost? (or round down to 30 if it's better to have it divisible by five.)

    I do, too. I might poke around tonight if I have some free time and see if the failure % chance is hidden in one of the files. I hope it isn't just piggy-backing off the failure % chance for religion-spreading...I definitely don't want to increase failure chance for that.

    Unless someone else already knows the answer.... :mischief:
     
  19. Aquatic

    Aquatic Child of Surprises

    Joined:
    Dec 17, 2005
    Messages:
    91
    Personally, I would rather regret not having to spent gold to spread corporations. It seems to me to be part of how the game is supposed to work. This is partly a matter of flavour. Corporations, at least in some significant ways, are about money! It is also potentially a good mechanism for limiting buy-outs - because they are actually 'buy-outs' and cost quite a bit. If at all possible, therefore (while I understand what Bhruic means when he says, 'I'd like to fix it. But it's not a simple fix'), it would be better to keep the financial mechanism... if possible...
     
  20. ori

    ori Repair Guy Super Moderator

    Joined:
    Dec 17, 2005
    Messages:
    16,551
    Location:
    Baden-Württemberg, Germany
    @jkp1187 & Roland Johansen:
    Corporation Spread Cost scales with inflation so you might have different numbers in mind from looking at different times...

    Regarding the spread factor, its determined by the corporationspread factor in civ4unitinfos.xml. The code itself does not seem to discriminate between buyout and spreading to city that has no competing corp, but it should not be too difficult to add such a check, look for
    CvUnit::spreadCorporationCost
    and
    CvUnit::spreadCorporation
    for the code :)
    But this is going way offtopic since I don't believe this will make it into this great project, so I'll refrain from derailing this thread even more ;)
     

Share This Page