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

K-Mod: Far Beyond the Sword

Discussion in 'Civ 4 - K-Mod: Far Beyond the Sword' started by karadoc, Jan 8, 2011.

  1. Charles555nc

    Charles555nc Chieftain

    Joined:
    May 3, 2010
    Messages:
    522
    Does anyone know what these values are?

    From the lead from behind mod.

    <DefineName>LFB_DEFENSIVEADJUSTMENT</DefineName>
    <iDefineIntVal>1</iDefineIntVal> <!-- negative 'value' for defensive promotions when defending, to encourage defenders to actually fight -->

    <DefineName>LFB_USECOMBATODDS</DefineName>
    <iDefineIntVal>1</iDefineIntVal>

    <DefineName>LFB_ADJUSTDENOMINATOR</DefineName>
    <iDefineIntVal>6</iDefineIntVal>

    <DefineName>LFB_USESLIDINGSCALE</DefineName>
    <iDefineIntVal>1</iDefineIntVal>
     
  2. Charles555nc

    Charles555nc Chieftain

    Joined:
    May 3, 2010
    Messages:
    522
    Another thing I wanted to talk about was that I think if your only source of oil is offshore, then you will lose for a really long time, to equally sized people, who get their oil on land through combustion, since it takes a long time to get to plastics before you can get to use that offshore oil.

    Any thoughts about moving offshore platforms to electricity? I did a web search for early offshore drilling and got quotes for offshore drilling in the late 1890s. Of course I have to think of something to add to Plastics now...but it feels like a reasonable change.

    Edit: Ive been modding the xml alot and I ran into a weird bug (probably of my own making). When i start a game, I cant lower my research to produce gold....if I lower my research, my espionage goes up the same amount and if I lower my espionage, my research goes up the same amount.

    If I go negative in gold, I have instant troop riots.

    What did I mess up?
     
  3. Zholef

    Zholef Chieftain

    Joined:
    Feb 20, 2014
    Messages:
    188
    Did you perhaps screw with CommerceFlexible?

    Off-shore platforms do come late, but is that really a bad thing? I'm not saying it isn't. I just don't yet see the benefit in moving them.
     
  4. Charles555nc

    Charles555nc Chieftain

    Joined:
    May 3, 2010
    Messages:
    522
    EDIT: Ya it was Commerce that was the problem....kmod is unique in that it requires that gold commerce to be "flexible". I did a fresh reinstall and slowly when through every file I edited to see which files reproduced the problem.

    I just think that oil platforms show up too late when in history they appeared much earlier and there is precious few oil supplies. I like the conflict it inspires but if you are behind, and at higher difficulties you usually are, then attaking someone with oil and you dont, is almost impossible. I think making it require electricity and combustion would be fair, slow you down some but not be crippling.

    What do you guys think?
     
  5. Windsor

    Windsor Flawless

    Joined:
    Feb 14, 2008
    Messages:
    1,350
    Location:
    Norway
    Only having offshore oil is like not having oil at all so I see your point. There's a couple of counter-arguments though:

    - Combustion opens Standard Ethanol so you can get oil that way
    - Trading for the resource is an option
    - Tanks and aircrafts isn't necessary.
    - Ships can be constructed with oil or uranium. Enabling offshore oil @ electricity makes uranium-powered ships even rarer since you literally place offshore-oil 1 tech earlier.

    Not having iron or copper is a lot more crippling than not having oil. Overall though I have no strong opinion on this since late-game balance isn't as important as early-mid balance.
     
  6. Blitzconfusion

    Blitzconfusion Chieftain

    Joined:
    Jul 30, 2014
    Messages:
    67
    Found and corrected a civilopedia promotion bug:

    CvPediaPromotion file never checks for the third or-prerequisite promotion for "Leads to"-box, and thus, if Promotion X has a third or-prerequisite Y, Y's Promotion page does not show X in "leads to"-box. Found this as I toyed around the Promotion tree and got frustrated when I couldn't map the tree properly in Civilopedia afterwards.
     
  7. DarkLunaPhantom

    DarkLunaPhantom Chieftain Supporter

    Joined:
    Feb 4, 2013
    Messages:
    399
    I think I've found a bug which could be somewhat significant if true.

    When forming a Permanent Alliance a bug can cause you to retain espionage visibility over every city visible at that moment indefinitely. It probably happens because the game still gives you espionage visibility of your former Team although it shouldn't anymore if your Team number has changed.

    This is similar to that what happens with circumnavigation bonus which doesn't transfer to your new Team. Other similar things could also be affected by Permanent Alliances.
     
  8. Charles555nc

    Charles555nc Chieftain

    Joined:
    May 3, 2010
    Messages:
    522
    Maybe I found a bug also....

    the enemy drops off 10-12 melee attackers next to my capital the turn before...I build another crossbow the turn they attack....so 2 crossbows, an axeman, and a swordsman (plus something like 60 to 80% city defenses and some fortify bonuses) vs 10-12 melee ai attackers.

    I think the smart move would be to go around pillaging (on a plot with defense bonuses to survive counter attacks) or to have (in the past) attacked a city that was quicker to get to, ie closer to their borders, before landing.

    So the worst case scenario for AI shows up, ai attacks, loses everything, and I gain a free great general. If the ai took into account the extra crossbow unit showing up the the turn they attacked, shouldnt they know that they have no chance and do something else that would at least hurt me a little more?

    What do you think?

    Edit: Btw does anyone remember how to increase the frequency of auto saves? Karadoc told me one a long time ago but I just did a fresh install and have forgotten.
     

    Attached Files:

  9. Mr.M

    Mr.M Chieftain

    Joined:
    Feb 20, 2015
    Messages:
    77
    To increase the frequency of auto saves, open the .INI file in the BTS folder and search for the specific line.
    Maybe its relevant to say which leader did that; many AI leaders "think" that they have better odds than they actual have for flavour reasons. Its not necessarily a bug, the AI will never be human (they don't gain experience with each game) and there's a lot of randomness despite the better k-mod calculations.
    Of course, if it can get better, then great.
     
  10. DarkLunaPhantom

    DarkLunaPhantom Chieftain Supporter

    Joined:
    Feb 4, 2013
    Messages:
    399
    "Require complete kills" option maybe shouldn't require you to kill all enemy spies because this makes it unattractive and annoying.
     
  11. Charles555nc

    Charles555nc Chieftain

    Joined:
    May 3, 2010
    Messages:
    522
    Ai leaves its cannon stack next to my attack stack. 3 is before at Timbuktu and 4 is after at Timbuktu.
     

    Attached Files:

  12. Blitzconfusion

    Blitzconfusion Chieftain

    Joined:
    Jul 30, 2014
    Messages:
    67
    Two small questions for anyone willing to answer:
    AI extra starting techs are in HandicapInfo. As I added Chariot Archer and Scout Archer into my version of k-mod, I found Archery too strong for AI to start with, and thus I intend to tweak those bonus techs around a bit. The question 1 (easy): Can I be certain that by adding the HandicapInfo into k-mod I won't incidentally re-apply any cheats the AI does not have in k-mod? I just want to change the techs.

    I also intend to simulate WWII German submarine fun against US merchant ships by altering Attack Submarine to be AlwaysHostile. Now no-one parks Bomb-armed Subs outside my capital to annoy me either. The question 2 (harder): How does AI react to Always Hostile unit that is not HiddenNationality (Both using them, threath they pose, and/or being assaulted with them)?

    The reason I ask is for (1) is a bit hard to detect and (2) goes to very late game to see properly.
     
  13. Tickler66

    Tickler66 Chieftain

    Joined:
    Jun 1, 2010
    Messages:
    8
    Find it really odd that I still check this thread almost everyday when I`ve been playing Civ5 for the last few years and no longer even have Civ4 installed anymore........

    Why???
     
  14. AbsintheRed

    AbsintheRed Chieftain

    Joined:
    Jul 27, 2009
    Messages:
    8,212
    Location:
    Szeged, Hungary
    The question should be this:
    Why???
     
  15. Gavagay

    Gavagay Chieftain

    Joined:
    Jul 4, 2008
    Messages:
    112
    Location:
    Moscow
  16. Zholef

    Zholef Chieftain

    Joined:
    Feb 20, 2014
    Messages:
    188
    That is very interesting indeed. I was looking, without success, for something like that before making K-Mod-Z.
     
  17. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    402
    Location:
    Germany
    I had noticed in my modmod that the City/Worker AI had some trouble with Forts. I've run the latest K-Mod versions (1.45 and 1.44) on AIAutoPlay to verify that the problem lies with BtS/K-Mod.

    The AI (always?) connects resources on unworkable tiles through Forts. This is -- not always, but often -- a waste of worker turns, especially when the tile ends up in a city's cross eventually.
    Worse, the AI also builds Forts on workable tiles, and sometimes refuses to replace them.
    The gemstone Fort was a smart move in 500 BC when there was jungle and the Khmer didn't have Iron Working. (The people of Philadelphia eventually pillaged the Fort, cutting the Gordian Knot so to speak.)

    The American banana Fort is actually worked for food for at least 500 years (75 turns).
    I think I've managed to fix the problem now, but I'm not sure how. I've made changes in the following places.
    Spoiler :
    In CvUnitAI::AI_improveBonus, in the loop that computes the best build, it says:
    Code:
    for (int iJ = 0; iJ < GC.getNumBuildInfos(); iJ++)
    // ...
    int iBestTempBuildValue = MAX_INT;
    // ...
    int iValue = 10000;
    iValue /= (GC.getBuildInfo(eBuild).getTime() + 1);
    if (iValue < iBestTempBuildValue) {
      iBestTempBuildValue = iValue;
      eBestTempBuild = eBuild;
    }
    
    This loop computes the costliest build, which is always a Fort. This may be a bug or deliberate. (I've replaced it with a simple heuristic that evaluates Forts vs. yield improvements. AI_irrigateTerritory and AI_fortifyTerritory also select the most expensive build, but in these cases, there is only one build to select from.)
    This only explains why the AI likes to connect non-workable resources with Forts. Workable resources are (supposed to be) handled by CvCityAI::AI_getBestBuild.

    In CvCityAI::AI_getImprovementValue (which AI_getBestBuild relies on), I've (explicitly) lowered the value assigned to Forts to 25%:
    Code:
    if (kOwner.doesImprovementConnectBonus(eFinalImprovement, eNonObsoleteBonus)) {
      // K-Mod
      iValue += (kOwner.AI_bonusVal(eNonObsoleteBonus, 1) * 50);
      iValue += 100;
      // K-Mod end
      [color=blue]
      CvImprovementInfo& imp = GC.getImprovementInfo(eImprovement);
      if(imp.isActsAsCity() && pPlot->getWorkingCity() != NULL)
        iValue /= 4;[/color]
    }
    That said, the Forts in my (debug-mode) screenshots are marked red for replacement, so the AI already seems aware that yield improvements are better.

    I've also increased ExtraFoodForGrowth a bit in CvCityAI::AI_getYieldMultipliers, which affects the evaluation of improvements. And I'm assigning slightly more workers in CvCityAI::AI_updateWorkersNeededHere (based on Forests to be chopped).
     
    Last edited: Aug 17, 2017
  18. DarkLunaPhantom

    DarkLunaPhantom Chieftain Supporter

    Joined:
    Feb 4, 2013
    Messages:
    399
    All your spoilers except the last one are empty. I presume they were supposed to contain screenshots.
     
  19. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    402
    Location:
    Germany
    Thanks. Should be OK now. Really a drag to embed images from Google Drive.
     
  20. DarkLunaPhantom

    DarkLunaPhantom Chieftain Supporter

    Joined:
    Feb 4, 2013
    Messages:
    399
    I was looking at the post-game timeline of one of my games and I noticed that the amount of ice on the map is the same in 3000BC and 1968AD altough the game ended with severe global warming which destroyed most of the ice on the map. It seems that the timeline shows the same map (the one from the end of game) for each turn despite possible differences in terrain.
     

Share This Page