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

General A New Dawn discussion

Discussion in 'Rise of Mankind: A New Dawn' started by Rezca, Mar 29, 2014.

  1. dbkblk

    dbkblk Chieftain

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    That is complex way to make something simple: checking if barbarian in the CvCity production!

    EDIT: BTW Sgtslick, do you know how the building cache works ? If i ask an AI to build something, it will change some turns later even if changeProduction is disabled. Is there something that overpass this in C2C which should have been merged in AND ?
     
  2. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    I guess that depends on your perspective. A new trait is just a bit of XML and requires no C++ changes. So 99% of Civ4 modders would say that's the easier solution.

    But I agree, C++ changes are easier than XML. :p

    Are you talking about the building value cache? What building cache are you referring to?
     
  3. dbkblk

    dbkblk Chieftain

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    Yes, I don't understand how the building cache work. My problem is quite simple:
    - An AI is building a wonder (let's say 30 turns)
    - At turn 15 it will change to an archer whereas there is no danger
    - I've disabled the changeProduction function.

    Something is making the AI to change its building choice and I can't find what!

    EDIT C++ power :)
     
  4. Noyyau

    Noyyau Privateer Captain

    Joined:
    Jun 9, 2012
    Messages:
    1,435
    Location:
    Italy
    My opinion is that Noble difficulty and above should have no bonus against barbarians.
    Lower difficulties can have a small bonus.
     
  5. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    The Building Value cache is used to cache the results of AI_buildingValueThresholdOriginal in CvCityAI. It should be updated each turn, or when conditions change. I don't think it's responsible for what you are seeing, it's just a cache of values for buildings, it does not affect actual decision making.

    If you need to debug why the AI is switching production, get a save from the turn before it occurs, and then in debug mode, set a breakpoint on CvCity::clearOrderQueue(). That is the function that actually does the queue clearing. See what in the call stack is triggering it.

    If nothing is triggering clearOrderQueue, something may be popping the order from the stack, in which case try a breakpoint at CvCity:: popOrder.
     
  6. dbkblk

    dbkblk Chieftain

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    @Afforess: Ok. Thank you. I'll try that and will keep you informed!
     
  7. Noyyau

    Noyyau Privateer Captain

    Joined:
    Jun 9, 2012
    Messages:
    1,435
    Location:
    Italy
    I noticed there are some interesting building sounds in Assets\Sounds\Afforess that I've never heard in game. Seems like they were for building for older versions that have been cut from the mod?
    Though we do have the Apiary for example, and it'd be nice to have its own sound.
     
  8. Sgtslick

    Sgtslick Chieftain

    Joined:
    Mar 15, 2002
    Messages:
    1,675
    Location:
    Melbourne
    No idea sorry
     
  9. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Good eye. Yes, some of them are defunct. Some of them seem to be not hooked up correctly. I will clean up the audio that is no longer used, and fix the audio that is not hooked up.
     
  10. dbkblk

    dbkblk Chieftain

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    @Afforess: I've found the cause, this was caused by the unit contracting system of C2C. The check was made on production that are not buildings (CvCity::doTurnChooseProduction). Now I can safely make the AI to change production on danger but it will not stop randomly. I'm glad to have found this because it prevented the AI from being a rock star :D
     
  11. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Great. I recommend putting Unit contracting code inside of the #ifdef UNIT_TENDERING blocks instead of outright deleting it. The define is disabled so it should not be compiled in.
     
  12. dbkblk

    dbkblk Chieftain

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    Ok. I'll do that! BTW, your fix pace is impressive these days ;)
     
  13. 45°38'N-13°47'E

    45°38'N-13°47'E Chieftain

    Joined:
    Jun 7, 2008
    Messages:
    5,852
    Location:
    Just wonder...
    Guys, I've just started a game with autoplay and I've seen that AI isn't expanding. Some civs still have 1 city after 300 turns, normal speed, although they have a lot of military units. I'll try again but I wonder if there's something wrong in the last revisions.

    Edit: confirmed, they expand a lot less, I've tested two other games with autoplay. I really can't tell how they behave in war as I've not paid too much attention but since they expand more slowly, research is also slower. Hence if this behaviour is intended, provided it doesn't cause troubles with humans spamming cities and becoming stronger, I'll have to rebalance research rates.
     
  14. 45°38'N-13°47'E

    45°38'N-13°47'E Chieftain

    Joined:
    Jun 7, 2008
    Messages:
    5,852
    Location:
    Just wonder...
    This is something new, I don't have a save because I've seen it on autoplay but I've seen a barbarian trade caravan moving between two cities
     
  15. dbkblk

    dbkblk Chieftain

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    Yeah, all of those are fixed now. I'll release the fix in a few hours. I'm finalizing the support for Bulgarian, Catalan and Dutch.
     
  16. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    I'd say adjusting research rates is very premature. Expansion issues are almost 100% as a result of recent changes to city AI. Give dbkblk a bit more time to get it right.
     
  17. 45°38'N-13°47'E

    45°38'N-13°47'E Chieftain

    Joined:
    Jun 7, 2008
    Messages:
    5,852
    Location:
    Just wonder...
    Yeah, I didn't mean I wanted to do it now. I was asking if this was an intended behaviour or if it was something to fix. Actually AI is expanding a little less but it's not dramatic, except for a couple of civs with just one city.
     
  18. dbkblk

    dbkblk Chieftain

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    With the new behavior, some civs should have a skyrocket development and military civs should be a little slower than that but more agressive! A bug was preventing them from making something else than archers.
    From my tests (normal map, rev on, agressive barbarians), at turn 100, I had 5 wonders, some 3/4 cities civs, only recent emerged civs with 1 city. Some barbarians or little civs razed.
    I was astonished by the dev of one civ. It had 4 cities, 2 wonders and a lot of military!
     
  19. 45°38'N-13°47'E

    45°38'N-13°47'E Chieftain

    Joined:
    Jun 7, 2008
    Messages:
    5,852
    Location:
    Just wonder...
    Damn, I've got a freeze while updating, next restart the launcher tried to fix the broken installation but game was hanging when loading any save. I deleted most folders except usersettings and config and fixed again with launches but now I get a GFC error. I'll have to reinstall everything later.
     
  20. dbkblk

    dbkblk Chieftain

    Joined:
    Oct 28, 2005
    Messages:
    1,781
    Location:
    France
    You can try to fix the installation with Menu -> Fix -> Check files again. BTW, the update is live.
     

Share This Page