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

ExtraModMod

Discussion in 'More Naval AI Modmod' started by Terkhen, Jan 19, 2013.

  1. Freesmog

    Freesmog Skeptic1938222569

    Joined:
    Nov 15, 2007
    Messages:
    176
    Location:
    outside the city
    Exactly. I know Forts provide a combat bonus depending on what type it is, however it there was a catapult effect as well I think it makes more sense. Already the AI isn't very smart about Fort efficiency, and it isn't hard enough IMO to overtake them. I think a Fort should have a turn limit before it turns neutral without any units occupying them.
     
  2. Red Key

    Red Key Modder

    Joined:
    Sep 24, 2011
    Messages:
    408
    Gender:
    Male
    Location:
    USA
    Thanks those saves helped. I took a look last night and I think I figured out a problem (and it isn't my fault). Read about it in the spoiler if you want.

    Spoiler :
    Due to a bug, AI_guardFortMinDefender() can sometimes tell a high number of units to move to a fort and guard it. However, units in the fort think there should be 2 defenders max, so if there are more than 2 in the fort the extras will move out. Once the units are out of the fort a cycle starts because the AI again thinks it needs to send more defenders to the fort, but the units in the fort will continue thinking 2 should be the max. My original intent with AI_guardFortMinDefender() was to put just one defender in each fort because there is also an AI_guardFort() function to put more defenders in if needed. Someone else *cough*Tho*cough*lal changed it. I'll fix it and move some of it to AI_guardFort().


    Sorry I have no plans to add a bombardment/catapult effect. It is beyond the scope of what I want to do in Super Forts.
     
  3. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Thanks for tracking down this issue. Didn't realize that I was mis-using AI_guardFortMinDefender() :blush: I guess the name should have warned me! Look forward to seeing your fix!
     
  4. Red Key

    Red Key Modder

    Joined:
    Sep 24, 2011
    Messages:
    408
    Gender:
    Male
    Location:
    USA
    No problem. ;) I think what you did in the code was good - using more defenders if there is danger. The main problem is the iNeededDefense variable that determines the # of defenders is never reset in the loop that uses it, so it keeps incrementing for each fort that is in danger. If the AI has a lot of forts in danger then they will be sending a lot of defenders to whichever forts they loop through last. I'll move it over to AI_guardFort(), and fix the bug.
     
  5. Freesmog

    Freesmog Skeptic1938222569

    Joined:
    Nov 15, 2007
    Messages:
    176
    Location:
    outside the city
    Another effect I forgot to mention was the AI built forts in icy areas with enough resources to build cities, but the cities were never later built :(
     
  6. ArkhanTheBlack

    ArkhanTheBlack Warlord

    Joined:
    Sep 29, 2008
    Messages:
    142
    This is a very nice mod. Good AI combined with stability and balancing in MP.
    The only thing I miss is Erebus Continent map type.
     
  7. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    910
    Gender:
    Male
    Location:
    United Kingdom
    Thank you for the kind words :)

    I have made a note to check that mapscript for inclusion in the next version. I don't have much time lately for developing, though.
     
  8. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    910
    Gender:
    Male
    Location:
    United Kingdom
    I'm in the middle of an update to More Naval AI 2.5 and Events Enhanced 1.6, and I am getting the message shown in the screenshot after creating the first game since launching ExtraModMod. Since that file has not been modified, I have no clue of what can be causing the error. Anyone has any idea about what might be causing it?
     

    Attached Files:

  9. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    766
    Great that development is going on again :)
    Events Enhanced 1.6 adds a BUG python mod; so it's possible that it causes the error (BUG does some odd exception catches that really mess up error messages). Does the message show up without it? Or maybe you forget to merge it's config file, or messed up Config/init.xml?
    PythonDbg.log should contain more precise error messages, IIRC.
     
  10. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    910
    Gender:
    Male
    Location:
    United Kingdom
    I'm afraid that it is going to be just an update to take advantage of your work and Tholal's work; I don't have much time lately.

    This is the relevant part of pythondbg.log:

    Code:
    23:27:51 TRACE: BugConfig - failure parsing C:\Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\Fall from Heaven 2\Assets\Config\EventSigns.xml at line 21
    23:27:51 TRACE: invalid syntax (CvRandomEventInterface, line 3609)
    23:27:51 DEBUG: BugUtil - looking up EventSigns.EventSignsEventHandler
    23:27:51 TRACE: BugConfig - failure parsing C:\Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\Fall from Heaven 2\Assets\Config\EventSigns.xml at line 26
    23:27:51 TRACE: Module 'EventSigns' must define function or class 'EventSignsEventHandler'
    23:27:51 TRACE: BugConfig - failure parsing C:\Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\Fall from Heaven 2\Assets\Config\EventSigns.xml at line 28
    23:27:51 TRACE: Module 'EventSigns' must define function or class 'applyLandmarkFromEvent'
    23:27:51 TRACE: BugConfig - failure parsing C:\Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\Fall from Heaven 2\Assets\Config\EventSigns.xml at line 29
    23:27:51 TRACE: Module 'EventSigns' must define function or class 'applySaltpeter'
    It seems that my error was a messed up merge in one of the event conditions in CvRandomEventInterface, and it is now fixed. I don't understand why it caused a BUG warning in a completely unrelated file, though.

    Thank you for your help :)
     
  11. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,943
    Location:
    Seyda Neen, Vvardenfell
    I've tried adding the python for linear planar gate spawn chance to 2.5, and somehow the game doesn't start anymore :confused:
     
  12. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    910
    Gender:
    Male
    Location:
    United Kingdom
    That is very strange. In my experience python errors only make the GUI dissapear or things like that, but never somethig that drastic. Is the python log giving any clues?
     
  13. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,943
    Location:
    Seyda Neen, Vvardenfell
    where's the python log stored?

    edit: well, I've tried it again and it works now. must have been just an indentation mistake on my part :D
     
  14. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,943
    Location:
    Seyda Neen, Vvardenfell
    where do I find the code that changes Liches from per team to per player? :)
     
  15. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    910
    Gender:
    Male
    Location:
    United Kingdom
  16. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,943
    Location:
    Seyda Neen, Vvardenfell
    thanks! it's actually set to 3 per team in MNAI 2.5 , weird
     
  17. LightofAbraxas

    LightofAbraxas Chieftain

    Joined:
    Sep 9, 2011
    Messages:
    30
    Hey Terkhen, I love your modmod. Any idea when the next version (with 2.5 integration) will be out?
     
  18. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    910
    Gender:
    Male
    Location:
    United Kingdom
    Thank you for your kind words :) 0.3.0 has been in the works for a while already, but I lacked the time for actually making a proper release.

    0.3.0 is now available. It is a new release based on More Naval AI 2.5. It includes all changes in MNAI 2.5 and in lfgr's Events Enhanced 1.6 along with Seven05's Erebus Continent mapscript. Enjoy, and please report any issues :)
     
  19. Y T

    Y T Kourier

    Joined:
    Mar 28, 2008
    Messages:
    99
    Location:
    Europe
    Hmm, thought I forgot my PW to this account ages ago..
    Anyway, longtime lurker back again just wanting to express my tys for u guys to keep this mod alive & I esp. waited for Events Enhanced to be updated, adds so much more immersion !
    Keep up the good work !
     
  20. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,943
    Location:
    Seyda Neen, Vvardenfell
    great job as usual :)
     

Share This Page