1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Frequently Asked Questions

Discussion in 'Rise of Mankind: A New Dawn' started by Afforess, Dec 3, 2009.

Thread Status:
Not open for further replies.
  1. thegreekweegee

    thegreekweegee Big Guy 4U

    Joined:
    Mar 20, 2013
    Messages:
    237
    Now that you mention it, I did notice that in a few play sessions. AFAIK, you can't disable that, so you have to consult 45* for that.
     
  2. Aquila SPQR

    Aquila SPQR Chieftain

    Joined:
    Jan 7, 2009
    Messages:
    462
    Location:
    Central Europe
    Strange thing. I reloaded a save and... problem disappeared. Settlers now work as usual, with no freezing. Maybe it's because of this graphics paging or something like that. When I heard about it for the first time I assumed it only loads features (trees, towns etc) when you look at the specific map region, and then unloads (sorry, forgot how the opposite of "loading" in this context is called in English, so I'll just use "unload" word) it again to save memory. But it seems that it works slightly different - it loads features when you look at them and then they stay loaded all the time. I reloaded save, so again a lot of map is still "unseen" by me - I discovered it, but did not look at it after reloading - so features there are not loaded. But I think that when I look at entire map during my playing I'll get this freezing again - because features all around the map will be loaded again and won't disappear. And that's why it'll take a lot more time to "unload" tile yields marks again.

    Surprisingly having this option to see tile yields on all the time does not help. I thought that if they are visible all the time and don't have to be "unloaded" - the problem will disappear, but no - even with tile yields visible option on I still had this freeze after deselecting my settler.
     
  3. Vokarya

    Vokarya Chieftain

    Joined:
    Mar 25, 2011
    Messages:
    5,538
    I can do a cruise missile strike with no problems. Are you trying to target a unit?

    cruise missile air strike.jpg
     
  4. TheNoseKnows

    TheNoseKnows Chieftain

    Joined:
    Sep 8, 2016
    Messages:
    21
    In the original BTS, the AI would take the average between its attitude towards you and its attitude towards your vassals, then round down. For example, it might be at Pleased with you, but Annoyed with your vassals, resulting in a rounding down to Annoyed towards you without your knowledge (the diplomacy screen would still show them as Pleased). Does this mod fix this bug?
     
  5. 45°38'N-13°47'E

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

    Joined:
    Jun 7, 2008
    Messages:
    5,621
    Location:
    Just wonder...
    I didn't know AI behave like this in standard BTS, so although this might have been changed by previous modders, the answer is I don't know.
     
  6. TheNoseKnows

    TheNoseKnows Chieftain

    Joined:
    Sep 8, 2016
    Messages:
    21
  7. 45°38'N-13°47'E

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

    Joined:
    Jun 7, 2008
    Messages:
    5,621
    Location:
    Just wonder...
    Some parts of K-Mod are included in RAND, I don't know about this specific part; I could check if I knew where the source files of this function has been changed in K-Mod
     
  8. TheNoseKnows

    TheNoseKnows Chieftain

    Joined:
    Sep 8, 2016
    Messages:
    21
    Someone looked in the SDK of vanilla Civ IV (sorry, I don't know exactly where; he didn't specify) and found this:
    http://forums.civfanatics.com/threa...ow-exactly-wfyabta-works.188183/#post-4602558
    Code:
    DenialTypes CvTeamAI::AI_techTrade(TechTypes eTech, TeamTypes eTeam)
    {
    ...
        if (eAttitude < ATTITUDE_FRIENDLY)
        {                                                                                                                            
           if ((GC.getGameINLINE().getTeamRank(getID()) < (GC.getGameINLINE().countCivTeamsEverAlive() / 2)) ||                                                                        
                 (GC.getGameINLINE().getTeamRank(eTeam) < (GC.getGameINLINE().countCivTeamsEverAlive() / 2)))                                                                          
            {
                iNoTechTradeThreshold = AI_noTechTradeThreshold();
             
               iNoTechTradeThreshold *= max(0, (GC.getHandicapInfo(GET_TEAM(eTeam).getHandicapType()).getNoTechTradeModifier() + 100));
                iNoTechTradeThreshold /= 100;
                if (AI_getMemoryCount(eTeam, MEMORY_RECEIVED_TECH_FROM_ANY) > iNoTechTradeThreshold)
                {
                    return DENIAL_TECH_WHORE;
                }
            }
        ....
        }
    ....
    }
    
    ...
    
    int CvTeamAI::AI_noTechTradeThreshold()
    {
        int iRand;
        int iCount;                                                      
        int iI;
    
        iRand = 0;                                            
        iCount = 0;                                                        
    
        for (iI = 0; iI < MAX_PLAYERS; iI++)
        {
            if (GET_PLAYER((PlayerTypes)iI).isAlive())                                                    
            {                                                  
                if (GET_PLAYER((PlayerTypes)iI).getTeam() == getID())                            
                {                                                  
                   iRand += GC.getLeaderHeadInfo(GET_PLAYER((PlayerTypes)iI).getPersonalityType()).getNoTechTradeThreshold();        
                    iCount++;                                                        
                }                                                  
            }                                                  
        }
    
        if (iCount > 0)                                                        
        {                                                  
            iRand /= iCount;                                                          
        }                                                  
    
        return iRand;                                                                                                        
    }
    
    As I understand it, it is the "CvTeamAI" instead of "CvPlayerAI" that makes the AI use the average of its diplomatic attitude towards you and your vassals when determining whether it should trade with you (I don't have other examples, but I suspect CvTeamAI also affects other things like peace vassaling, defensive pacts, and of course war declarations). The most dangerous aspect of this is, obviously, that Friendly AIs are not truly Friendly if they are not also Friendly towards every single one of your vassals.

    I hope this section of code is enough to help you pinpoint its location.
     
  9. 45°38'N-13°47'E

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

    Joined:
    Jun 7, 2008
    Messages:
    5,621
    Location:
    Just wonder...
    I'll have a look when I have some time but probably not very soon.
     
  10. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    I looked and the bug is still very much present. I checked, and the fix is a 1-liner, but I don't have a compiler set up at present. If 45* wants to fix, the change is in:

    Code:
    DenialTypes CvTeamAI::AI_techTrade(TechTypes eTech, TeamTypes eTeam) const
    
    The relevant section is fairly early in the function, here:

    Code:
    DenialTypes CvTeamAI::AI_techTrade(TechTypes eTech, TeamTypes eTeam) const
    ...
    ...
          if (isAtWar(eTeam))
            {
                    return NO_DENIAL;
            }
    
            if (AI_getWorstEnemy() == eTeam)
            {
                    return DENIAL_WORST_ENEMY;
            }
    
            eAttitude = AI_getAttitude(eTeam); // relevant line
    
            for (iI = 0; iI < MAX_PLAYERS; iI++)
            {
    ...
    
    So change the marked line to this:
    Code:
    eAttitude = GET_PLAYER(getLeaderID()).AI_getAttitude(eTeam);
    
    That will fetch the attitude of the team leader instead of using the aggreggate team AI attitude from vassals.
     
  11. 45°38'N-13°47'E

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

    Joined:
    Jun 7, 2008
    Messages:
    5,621
    Location:
    Just wonder...
    Wow, if this is so easy I upload it with my next revision. Thank you Afforess.
     
  12. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    Well I lied. I checked and there is no function to match CvPlayerAI::AI_getAttitude(TeamTypes eTeam), which is what I gave as the replacement. You could easily write one, it would just sum up the attitude of the player towards all players of the team.... But an even easier route would be to just do this:

    Code:
    eAttitude = GET_PLAYER(getLeaderID()).AI_getAttitude(GET_TEAM(eTeam).getLeaderID());
    
    And use their team leader as a proxy for how the AI player feels about the team. Lazy, less code and effective 99.99% of the time.
     
  13. 45°38'N-13°47'E

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

    Joined:
    Jun 7, 2008
    Messages:
    5,621
    Location:
    Just wonder...
    Yeah, I was just checking; I'll just pick the second solution because it's less time consuming :p
    Thanks again for looking into it
     
  14. Aquila SPQR

    Aquila SPQR Chieftain

    Joined:
    Jan 7, 2009
    Messages:
    462
    Location:
    Central Europe
    How exactly war reparations work? I clicked to offer war reparations, asked what that civ wants for it, they added a small amount of gold they wanted from me, I accepted but I received no bonus in relations.
     
  15. thegreekweegee

    thegreekweegee Big Guy 4U

    Joined:
    Mar 20, 2013
    Messages:
    237
    It doesn't add much in positive relation points, but removes the negative ones which have to do with war, like "you declared war on us!" or "you razed one of our cities!". Though it DOES add a "Past events have proven your good nature to ones" positive relations point.
     
  16. Aquila SPQR

    Aquila SPQR Chieftain

    Joined:
    Jan 7, 2009
    Messages:
    462
    Location:
    Central Europe
    Ah, ok, thx. Did I do it right? I offered to pay war repations, asked what they want in return and then accepted their proposal. Will giving war reparations, adding an amount of money and giving it as a gift work the same way? Or will I have to always ask them what they want as war reparations?
     
  17. thegreekweegee

    thegreekweegee Big Guy 4U

    Joined:
    Mar 20, 2013
    Messages:
    237
    Asking is the only way to go.
     
  18. Aquila SPQR

    Aquila SPQR Chieftain

    Joined:
    Jan 7, 2009
    Messages:
    462
    Location:
    Central Europe
  19. TaylorItaly

    TaylorItaly Chieftain

    Joined:
    Oct 24, 2016
    Messages:
    5
    Gender:
    Male
    Mayby stupid : But how can I sell buildings in the city screen ?
     
  20. Tolni

    Tolni trust the pillars with your s e c r e t s

    Joined:
    Feb 20, 2013
    Messages:
    10,293
    Location:
    Nightvale, US
    You can't. You used to be able to, but due to the AI not understanding how it works, as well as this being more or less a cheat, it's disabled in the XML.
     
Thread Status:
Not open for further replies.

Share This Page