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

A Better AI.

Discussion in 'Civ4 - General Discussions' started by Blake, Nov 4, 2006.

  1. SmiteMeister

    SmiteMeister Chieftain

    Joined:
    Jun 28, 2004
    Messages:
    14
    Assert Failed

    File: .\CvPlayerAI.cpp
    Line: 4018
    Expression: ePlayer != getID()
    Message: shouldn't call this function on ourselves




    Assert Failed

    File: .\CvPlayerAI.cpp
    Line: 4032
    Expression: ePlayer != getID()
    Message: shouldn't call this function on ourselves


    i keep getting asserts...
     
  2. Iustus

    Iustus King

    Joined:
    Jul 18, 2006
    Messages:
    609
    Location:
    Sunnyvale, CA
    Please use the BetterAI forum for bug reports.

    This looks like a bug in a different python mod, as already reported in our bug reports thread in that forum. Some UI mods call AI_getAttitude on every player, which is not technically legal. You are not supposed to call that function on yourself.

    You can always run with the non-assert version, if you do not intend to report bugs and do not want to see the asserts.

    -Iustus
     
  3. Spocko

    Spocko Warlord

    Joined:
    Dec 18, 2005
    Messages:
    168
    Location:
    Dover, New Hampshire
    I'd like to know what settings I need to make in CodeBlocks in order to compile the source code for Better AI.

    I've followed Kael's instructions for setting up CodeBlocks (http://forums.civfanatics.com/showpost.php?p=3922687&postcount=1) and I've followed the instructions herein for pulling down the source code for Better AI (http://forums.civfanatics.com/showpost.php?p=4737311&postcount=127), but when I use CodeBlocks to compile this code, it crashes almost immediately (see below for the Build Log). It seems the most offensive error is "CvGameCoreDLL.h:27:20: hash_map: No such file or directory".

    I have successfully compiled the SDK several times and I have successfully downloaded the full set of source code files for BAI (updated today). Now I'd like to be able to tweak BAI and compile locally.

    Any advice?
    Thanks!

    Code:
    Project   : CvGameCoreDLL
    Compiler  : GNU GCC Compiler (called directly)
    Directory : C:\Documents and Settings\Owner\My Documents\My Received Files\Civ4 Downloads\SDK\Civ4_SDK_source\Better AI Warlords SDK\CvGameCoreDLL\
    --------------------------------------------------------------------------------
    Switching to target: Final Release|Win32
    Compiling: CvArea.cpp
    In file included from CvArea.cpp:3:
    CvGameCoreDLL.h:27:20: hash_map: No such file or directory
    In file included from CvArea.cpp:3:
    CvGameCoreDLL.h:147: error: `__forceinline' does not name a type
    CvGameCoreDLL.h:148: error: expected constructor, destructor, or type conversion before "float"
    CvGameCoreDLL.h:148: error: expected `,' or `;' before "float"
    CvGameCoreDLL.h:149: error: expected constructor, destructor, or type conversion before "float"
    CvGameCoreDLL.h:149: error: expected `,' or `;' before "float"
    In file included from CvGameCoreDLL.h:167,
                     from CvArea.cpp:3:
    FAssert.h:51:20: warning: no newline at end of file
    In file included from CvGameCoreDLL.h:171,
                     from CvArea.cpp:3:
    FFreeListTrashArray.h: In member function `int FFreeListTrashArray<T>::getNumSlots() const':
    FFreeListTrashArray.h:50: error: `m_iNumSlots' undeclared (first use this function)
    FFreeListTrashArray.h:50: error: (Each undeclared identifier is reported only once for each function it appears in.)
    FFreeListTrashArray.h: In member function `int FFreeListTrashArray<T>::getLastIndex() const':
    FFreeListTrashArray.h:55: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `void FFreeListTrashArray<T>::setLastIndex(int)':
    FFreeListTrashArray.h:59: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `int FFreeListTrashArray<T>::getFreeListHead() const':
    FFreeListTrashArray.h:64: error: `m_iFreeListHead' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `void FFreeListTrashArray<T>::setFreeListHead(int)':
    FFreeListTrashArray.h:68: error: `m_iFreeListHead' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `int FFreeListTrashArray<T>::getFreeListCount() const':
    FFreeListTrashArray.h:73: error: `m_iFreeListCount' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `void FFreeListTrashArray<T>::setFreeListCount(int)':
    FFreeListTrashArray.h:77: error: `m_iFreeListCount' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `virtual void FFreeListTrashArray<T>::init(int)':
    FFreeListTrashArray.h:168: error: `m_iNumSlots' undeclared (first use this function)
    FFreeListTrashArray.h:173: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListTrashArray.h:174: error: `m_iFreeListHead' undeclared (first use this function)
    FFreeListTrashArray.h:175: error: `m_iFreeListCount' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `T* FFreeListTrashArray<T>::add()':
    FFreeListTrashArray.h:213: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListTrashArray.h:213: error: `m_iNumSlots' undeclared (first use this function)
    FFreeListTrashArray.h:214: error: `m_iFreeListCount' undeclared (first use this function)
    FFreeListTrashArray.h:226: error: `m_iFreeListHead' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `virtual T* FFreeListTrashArray<T>::getAt(int)':
    FFreeListTrashArray.h:260: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `bool FFreeListTrashArray<T>::remove(T*)':
    FFreeListTrashArray.h:282: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `bool FFreeListTrashArray<T>::removeAt(int)':
    FFreeListTrashArray.h:309: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListTrashArray.h:317: error: `m_iFreeListHead' undeclared (first use this function)
    FFreeListTrashArray.h:319: error: `m_iFreeListCount' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `virtual void FFreeListTrashArray<T>::removeAll()':
    FFreeListTrashArray.h:343: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListTrashArray.h:344: error: `m_iFreeListHead' undeclared (first use this function)
    FFreeListTrashArray.h:345: error: `m_iFreeListCount' undeclared (first use this function)
    FFreeListTrashArray.h:347: error: `m_iNumSlots' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `void FFreeListTrashArray<T>::load(T*)':
    FFreeListTrashArray.h:371: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `virtual void FFreeListTrashArray<T>::growArray()':
    FFreeListTrashArray.h:390: error: `m_iNumSlots' undeclared (first use this function)
    FFreeListTrashArray.h: In member function `void FFreeListTrashArray<T>::Write(FDataStreamBase*)':
    FFreeListTrashArray.h:465: error: there are no arguments to `getCount' that depend on a template parameter, so a declaration of `getCount' must be available
    FFreeListTrashArray.h:465: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
    FFreeListTrashArray.h:467: error: there are no arguments to `getIndexAfterLast' that depend on a template parameter, so a declaration of `getIndexAfterLast' must be available
    In file included from CvGameCoreDLL.h:172,
                     from CvArea.cpp:3:
    FFreeListArray.h: In constructor `FFreeListArray<T>::FFreeListArray()':
    FFreeListArray.h:69: error: `m_iFreeListHead' undeclared (first use this function)
    FFreeListArray.h:69: error: `FLA_FREE_LIST_INDEX' is not a member of `FFreeList'
    FFreeListArray.h:70: error: `m_iFreeListCount' undeclared (first use this function)
    FFreeListArray.h:71: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListArray.h:72: error: `m_iNumSlots' undeclared (first use this function)
    FFreeListArray.h: In member function `virtual void FFreeListArray<T>::init(int)':
    FFreeListArray.h:92: error: `m_iFreeListHead' undeclared (first use this function)
    FFreeListArray.h:92: error: `FLA_FREE_LIST_INDEX' undeclared (first use this function)
    FFreeListArray.h:93: error: `m_iFreeListCount' undeclared (first use this function)
    FFreeListArray.h:94: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListArray.h:95: error: `m_iNumSlots' undeclared (first use this function)
    FFreeListArray.h: In member function `void FFreeListArray<T>::insert(T)':
    FFreeListArray.h:131: error: `m_iLastIndex' undeclared (first use this function)
    FFreeListArray.h:131: error: `m_iNumSlots' undeclared (first use this function)
    FFreeListArray.h:132: error: `m_iFreeListCount' undeclared (first use this function)
    FFreeListArray.h:139: error: `m_iFreeListHead' undeclared (first use this function)
    Process terminated with status 1 (0 minutes, 26 seconds)
    52 errors, 1 warnings
    
     
  4. jkp1187

    jkp1187 Unindicted Co-Conspirator

    Joined:
    Aug 29, 2004
    Messages:
    2,496
    Location:
    Pittsburgh, Pennsylvania
  5. Spocko

    Spocko Warlord

    Joined:
    Dec 18, 2005
    Messages:
    168
    Location:
    Dover, New Hampshire
    Thanks! I'll post it over there.
    Spocko
     
  6. braindamage

    braindamage Chieftain

    Joined:
    May 28, 2007
    Messages:
    3
    Would it be possible to merge this mod with "Blacksun's More Civs DLL" in any easy to do way?
    http://forums.civfanatics.com/archive/index.php/t-192620.html
    It adds the possibility to have 50 players on one map, and I'd like to try that with the better AI. I'm suspecting that I'll need the SDK to edit the DLL my self to merge the two, since both are using the CvGameCoreDLL.dll file.

    Maybe it's not such a crazy thing to add that feature to the mod anyway? It'd be a nice thing to have available. Even if everybody don't have to use it, it wont interfere, right?
    Too bad you can't chose how many players you want with a simple one click selection... if that was possible to implement with it, it'd be gold. It's quite a tedious task opening those 40 slots for the players.

    Anyways, good work lads. It's a great improvement of the AI what I've seen so far!
    Cheers
     

Share This Page