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

Bug Reports and Discussion

Discussion in 'More Naval AI Modmod' started by Tholal, Jan 3, 2013.

  1. Terkhen

    Terkhen King

    Joined:
    Aug 1, 2011
    Messages:
    909
    Gender:
    Male
    Location:
    United Kingdom
    In ExtraModMod I found that any unit was able to free itself from a cage. I suspect that this is possible since the "Acheron can now cast its spells" bugfix. If this is the case, this bug must also be present in More Naval AI. Can anyone confirm if this is true?

    If this is true, the small bugfix I made for EMM should be valid for More Naval AI too. The files to modify and the required changes can be checked here: https://bitbucket.org/Terkhen/extramodmod/commits/a77c4bf92e73f189f727608ee153fabbf337a842

    EDIT: I also noticed that when a Chanter uses Escape from inside a cage, it would move to the capital but would be held there forever. I case you are interested, the following changes to the python methods related to the Escape spell prevent this issue by correctly removing the Held promotion and also removing the cage if they were the last unit inside of it: https://bitbucket.org/Terkhen/extramodmod/commits/9d80011ccea32db31311e0ae35199c016563f49b
     
  2. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Hmmm... I think my plan was to use the <bCastingBlocked> tag added in r1442 but I guess I let that issue drop off the radar. I'll enter a bug and look into this again. Thanks for the report!
     
  3. Calavente

    Calavente Richard's voice

    Joined:
    Jun 4, 2006
    Messages:
    2,794
    Location:
    France
    HI,

    it might already be reported :

    in world builder, when I gift flaming arrows to an archer and then DUPLICATE the archer, each duplicate get : +1str as compared to the previous one:
    first is 3/5+1
    2nd is 4/6+1
    3rd is 5/7+1
    n is 18/19 +1

    it was embarassing when I tried to compared archers with flaming arrows vs axes.. couldn't get an accurate battle and found this was the issue.
     
  4. Freesmog

    Freesmog Skeptic1938222569

    Joined:
    Nov 15, 2007
    Messages:
    176
    Location:
    outside the city
    Again, thank you Tholal for all these great updates! I found on the internet that you used to be quite the blogger ;)

    Anyways, I have a few issues to report:

    Calabim had a stack of warriors trapped from a lair, and never sent a unit to free them from a nearby city.

    Sheaim kept sending savants to eradicate Order in my cities, before and after AC100. Religious victory turned off.

    Sheaim and Elohim kept building to raise and lower AC after reaching 100. Mostly Sheaim. Sheaim already cast world spell. AC stable between 95-100.

    Luichurp casts world spell on turn 2. I have also seen them cast around turn 15 or sometime too early in the game.

    Luichurp AI seems to suck. My latest game they were taken out early. I only put them in to add an extra good civ, but Varn would have been better (I have no desert).

    I don't know for sure, but Perpentach AI seems to crash my late game. Might be all the puppets. I've had this happen more than once. I don't have crashes if they are left out, or play them.

    If I play Basium, the other jointed AI can build a wonder or hero before me.

    That's all for now.
     
  5. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Units with UNITAI_EXPLORE will look for nearby Caged units to free, but otherwise it's a difficult thing for the AI to understand. I'll add a report for it.

    They weren't trying to eradicate Order, they were trying to spread AV. Most likely because they had the Shrine or simply because it is their Favorite Religion.

    OK. Entered a bug report for this.

    That's a matter of opinion. I think that getting those Great Engineers sooner rather than later makes a huge difference. That being said, there could certainly be a more complex AI decision for when to cast World Spells and I am open to suggestions that present a logical throught process for World Spell casting that the AI can easily follow.

    They are a difficult civ to play well.

    I can track down the issue with a savegame that demonstrates a repeatable crash.

    Not a bug.



    Thanks for the reports!
     
  6. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    727
    EVENT_ENEMY_CITY_CRIME is bugged (it will not trigger, since all it's event options are always invalid). The fix is simply to set the <bPickCity>s from EVENT_ENEMY_CITY_CRIME_1/2/3 from 1 to 0.
     
  7. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    9,145
    Location:
    Hiding
    Help! It crashes whenever I try to open a game. I've tried saves and new games, and the result is the same: "Civ IV has stopped working."
     
  8. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    OK. Thanks!

    What version are you trying to run? When was the last time you were able to play MNAI? What about FFH?
     
  9. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    9,145
    Location:
    Hiding
    Fixed. I tried a regular RevDCM game and it turned out that I had the grid checked on. It seems that FFH2 couldn't handle it.
     
  10. lfgr

    lfgr King

    Joined:
    Feb 6, 2010
    Messages:
    727
    I think I found a bug in the AI_exploreLair() Function in CvUnitAI.cpp:

    Line 27654:
    Code:
    iValue = 20 + getLevel();
    iValue /= (iPathTurns + 1);
    
    if (GC.getImprovementInfo(pLoopPlot->getImprovementType()).isUnique())
    {
    	// ... adjust iValue ...
    
    	if (iValue > iBestValue)
    	{
    		pBestPlot = pLoopPlot;
    	}
    }
    
    The inner if block belongs after the outer if, instead of inside it. This way only Unique Improvements are ever visited with this code.
     
  11. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Good catch! I'll fix it for 2.53

    What is the grid?
     
  12. Mouthwash

    Mouthwash Escaped Lunatic

    Joined:
    Sep 26, 2011
    Messages:
    9,145
    Location:
    Hiding
    It appears that clicking on the "Marksman" promotion link in the description of a unit that has it directs you to the Civlopedia page for a unit called Marksman, not the promotion. This was extremely confusing. :crazyeye:
     
  13. Calavente

    Calavente Richard's voice

    Joined:
    Jun 4, 2006
    Messages:
    2,794
    Location:
    France
    this happens for many things : I think Aureleis has the same issue : clicking on unit links to the spell and we can't get the stats of the unit;

    it appears anytime 2 different elements have the exact same name..
     
  14. Azhral

    Azhral Let's get Tactical!

    Joined:
    Jul 9, 2008
    Messages:
    622
    Location:
    Dunedin, New Zealand
    Just some bugs I've noticed playing some FFH since the good ol' days. Chances are most of these aren't caused by the your mod, but figured you could fix em anyways.

    • Once a city has been set to Growth Control it's impossible to turn it off, the city will never ever grow beyond its happy cap.
    • Civilizations are never removed from the total number of voting civs for either Overcouncil or Undercouncil elections. I.e. If a civ is a member of a council and is destroyed, the remaining civs still have to vote with those no longer existing civs as a part of the total, it counts as all of those civs just abstain. So there can be 2 civs left in a council but require 3 votes of 6 in order to pass anything (so never). Been an issue for a while, but I've never bothered to report / fix it.
    • Nicholas Cage is a terrible actor.
    • Units with the Black Mirror can create clones, and these clones are able to vote in Council elections, So if you give the Mirror to Chalid or Teutorix (or any other units with the extra vote XML tag), their clones count as an extra vote in whatever council. Not too much of an issue with Human players (unless they know the council voting turns), but the AI create a clone every single turn. Unsure if this extra vote triggers the other bug of extra members you still have to vote against.
    • Nicholas Cage should never use the word 'Gosh' ever again.
    • White Russians are tasty, and I've been drunk since about 10am this morning.
    • Summoning / Building Hidden Nationality units (i.e. Mistforms, NightWatch) on a tile with units belonging to another civ can cause a CTD. Unsure if this is caused at all / only with HN Units summoned by Lair results.
    • John C. McGinley should be in more films. He's way better than Nicholas Cage.
    • I'm pretty sure the 'United States Congressional Medal of Jesus' doesn't exist.
    • Lurchuirp Warriors upgrade path only goes Warrior -> Dwarven Slinger -> Crossbowman. Not exactly a bug, but it's pretty restrictive, especially considering the importance of comparable units with XP in the Lurchuirp armies. Suggest Warriors with the Dwarven Race / Promotion be able to upgrade to Soldiers of Kilmorph.
    • I'm pretty drunk right now.

    If you fellas want me to provide any savegames, or my XML balance changes, or want me to work on the DLL for a bit, then just let us know.
     
  15. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    I did fix one of these types of issues a while back, but I dont remember the specifics. I'll see if I can't fix these two instances as well.


    Thanks for the reports! Here are some responses.

    1) Growth Control has a button within the city screen. You can turn it off and on there. I used it recently in a Calabim game to over-grow my cities for feasting.

    2) Cage was good in Raising Arizona (probably his best film IMO) and Leaving Las Vegas

    3) I'll enter a bug about the Council issues

    4) I got sick on White Russians once and never went back. Dairy and alcohol are a dangerous mix!

    5) I'll also enter a bug about the HN crash issue

    6) You've been watching The Rock haven't you?

    7) That's just part of the Luchuirp game. It is a bit restrictive, but allowing Warriors to upgrade to SoK is probably too powerful

    I'm always willing to accept help with the mod! You can see the open bug reports and feature requests on Sourceforge. Just let me know if you see something that you're interested in working on!
     
  16. [to_xp]Gekko

    [to_xp]Gekko QCT junkie

    Joined:
    Dec 16, 2005
    Messages:
    7,943
    Location:
    Seyda Neen, Vvardenfell
    Azhral, balance changes are outside the scope of MNAI but check out ExtraModMod, your changes will be discussed and possibly included in that one :)
     
  17. Azhral

    Azhral Let's get Tactical!

    Joined:
    Jul 9, 2008
    Messages:
    622
    Location:
    Dunedin, New Zealand
    Yip, I used that button to switch on some growth control, but even after turning it off via the same button that city refused to grow beyond its happy cap. Weirdest thing was, a later game as the Illians I had the same thing, despite not using the Growth Control button at all. The city just refused to grow any larger.

    I ended up eating too much pizza later that evening, and then decided to go for a run whilst still pretty drunk. No idea how I managed to finish that without puking everywhere. Still, I hope the randoms I met enjoyed my drunken words of encouragement.

    Was wondering if anybody would catch that. Kudos to you.
     
  18. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Unable to replicate this issue with either Nightwatch or Mistforms.
     
  19. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,118
    Location:
    Kael's head
    Kael said that the Gambling Ring resolution should reduce the cost of Gambling houses by 75%, but it actually only reduced it to 50% of its normal cost.

    I think that Kael assumed that iCostMod under def getBuildingCostMod(self, argsList): is supposed to be the new cost of the building, but my test shows that it is pretty clearly the percentage of the original cost that the new cost will be.

    Where he uses
    Code:
    	def getBuildingCostMod(self, argsList):
    		iPlayer, iCityID, iBuilding = argsList
    		pPlayer = gc.getPlayer(iPlayer)
    		pCity = pPlayer.getCity(iCityID)
    
    		iCostMod = -1 # Any value > 0 will be used
    
    		if iBuilding == gc.getInfoTypeForString('BUILDING_GAMBLING_HOUSE'):
    			if pPlayer.isGamblingRing():
    				[COLOR="Red"]iCostMod = gc.getBuildingInfo(iBuilding).getProductionCost() / 4[/COLOR]
    		
    		return iCostMod
    He probably should have used
    Code:
    	def getBuildingCostMod(self, argsList):
    		iPlayer, iCityID, iBuilding = argsList
    		pPlayer = gc.getPlayer(iPlayer)
    		pCity = pPlayer.getCity(iCityID)
    
    		iCostMod = -1 # Any value > 0 will be used
    
    		if iBuilding == gc.getInfoTypeForString('BUILDING_GAMBLING_HOUSE'):
    			if pPlayer.isGamblingRing():
    				[COLOR="Red"]iCostMod = 25[/COLOR]
    		
    		return iCostMod

    Since this is one of the files that I have to modify for worldbuilder, I could include this change if you wish.
     
  20. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    Sounds good. Thanks MC!
     

Share This Page