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

Strategic resources & AI

Discussion in 'Civ5 - Creation & Customization' started by Frossa, Oct 23, 2013.

  1. Frossa

    Frossa Chieftain

    Joined:
    Apr 29, 2012
    Messages:
    409
    Gender:
    Male
    Location:
    Sweden
    I'm making a mod that adds a very scarce resource to the game, and I made it so that some vital units require this resource to be built. My worry is that the AI will never succeed in acquiring the resource, messing up the game completely.
    My question is, when an AI aims to build something that requires a strategic resource, but it does not have said resource in its territory, will the AI attempt to buy the required resource from another player who has it, or will it just not build whatever it was trying to produce?
    It seems to me that when a leader makes a trade, it just randomly adds any spare strategic resources you or it happens to have, whether they need it or not. I get the feeling that the AI does not know how to use them properly. :confused:
     
  2. snarko

    snarko DLLer

    Joined:
    Dec 9, 2003
    Messages:
    1,512
    Location:
    Sweden
    The AI will not understand that it is more important than other strategic resources. It will value it the same as all the other ones, at least as far as trading goes. I haven't checked things like building cities but it's likely similar.

    I don't think the AI ever suggest strategy resource deals on it's own. As you write, it does it to even out deals.
     
  3. Frossa

    Frossa Chieftain

    Joined:
    Apr 29, 2012
    Messages:
    409
    Gender:
    Male
    Location:
    Sweden
    Okay. I'll just have to hope my mod doesn't break the game balance then :undecide:
     
  4. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,342
    Location:
    Near Portsmouth, UK
    The logic in the AI is very shallow (pretty much depth one everywhere). Take nukes, there is a military strategy that says "do I need a nuke" (depth 1), but all it does is up the desire for things with "FLAVOR_NUKE" attached to them, which will result in nukes being built if they can. BUT, there is no associated (depth 2) "do I need Uranium" economic strategy to either trade for, prioritise improving existing, settling near, or looking for the uranium resource.

    So to answer the question in the OP, the AI will only every select what to build (based on the currently dominant flavours) from the list of things it can currently build.
     
  5. Frossa

    Frossa Chieftain

    Joined:
    Apr 29, 2012
    Messages:
    409
    Gender:
    Male
    Location:
    Sweden
    Thanks for the information. I'm gonna run a test game with the new resource, and see how far the AI will get on an average map.
     
  6. askhan1209

    askhan1209 Chieftain

    Joined:
    Oct 23, 2013
    Messages:
    1
    I want to change the Building Costs for Brave new world. anybody can help me how to change that through XML file.
    I tried to edit the Technology file, changed the cost of "Writing", it worked...
    But when I try to change the values on CIV5Buildings file. located in
    Sid Meier's Civilization V\Assets\DLC\Expansion2\Gameplay\XML\Buildings
    It does not make any difference...
    Am i editing wrong file for BNW.?
     
  7. Horem

    Horem Chieftain

    Joined:
    Apr 1, 2010
    Messages:
    1,718
    Location:
    Wales, UK
    @ askhan1209 - Hijacking other peoples threads is not nice :(

    @ Frossa - I have a mod that adds a lot of very important(more like needed tbh) resources, I had too up the flavors of those so it was higher than the base games resources to get the AI to go for them and the buildings associated with them, 32 seemed to be a nice balance for the resources and 20 - 32 for the buildings. It makes them priority over anything else.
     
  8. Frossa

    Frossa Chieftain

    Joined:
    Apr 29, 2012
    Messages:
    409
    Gender:
    Male
    Location:
    Sweden
    That's interesting, I thought the values couldn't be above any of the values in the original files. Thanks a lot :)
    But just 20 - 32 for a building? Some buildings have over 100 what I have seen.
     
  9. Horem

    Horem Chieftain

    Joined:
    Apr 1, 2010
    Messages:
    1,718
    Location:
    Wales, UK
    Aye 'Special' buildings, wonders, unique, high output etc. I didn't want to be bias to them as they are generally more important :)
     
  10. Frossa

    Frossa Chieftain

    Joined:
    Apr 29, 2012
    Messages:
    409
    Gender:
    Male
    Location:
    Sweden
    I see.
     

Share This Page