Bug Reports and Discussion

It is possible to get minor leaders or even "random alignment" leaders by going to the custom game window and selecting the "Unrestricted leaders" game option and choosing a civilization but not a leader. From looking at the code I think that this problem was present before the changes in r1280.

I'm attaching a rework of the random civilization/leader assignment code in CvGame::init. Besides fixing this issue, it also allows to select a specific civilization and an alignment by choosing the civilization you want and one of the "random alignment" leaders.

This code seems to be broken when Unrestricted Leaders is off. When you choose a "random leader by alignment" you get a random leader regardless of the alignment. I'll try to see why this happens and I'll upload a new version once it is fixed.
 
possible workarounds for hyborem woes:

1) demonic citizens sometimes missing: could make them buildable, supercheap and with high AI weight so they get built ASAP if the bug triggers. possibly linked to fallow trait?

2) OOS on city capture: when infernals capture and keep a city, have a special savant pop up with only AV spread available at 100% success chance and no movement speed. essentially the same as AV autospread but no OOS :D
 
exploit: moving a fireball onto an ancient forest tile never triggers treant defenders, and allows to move other units onto the tile with 0% chance of treants ( only works on unoccupied tiles, and the fireball makes the tile occupied )
 
[to_xp]Gekko;12164757 said:
possible workarounds for hyborem woes:

1) demonic citizens sometimes missing: could make them buildable, supercheap and with high AI weight so they get built ASAP if the bug triggers. possibly linked to fallow trait?

I much prefer the workaround that is already in place in my modmod:

Manes add the Demonic Citizens building to the city when they use their Add to City ability to boost the city population.

(In my modmod they also add their religion and turn their XP into culture and production, but you don't have to copy that part to make adding demons to the city population dive the city demonic citizens.)
 
right clicking a tech in the upper middle portion of the screen ( above GP bar ) to jump to its pedia page gives a python exception.
 
It is possible to get minor leaders or even "random alignment" leaders by going to the custom game window and selecting the "Unrestricted leaders" game option and choosing a civilization but not a leader. From looking at the code I think that this problem was present before the changes in r1280.

I'm attaching a rework of the random civilization/leader assignment code in CvGame::init. Besides fixing this issue, it also allows to select a specific civilization and an alignment by choosing the civilization you want and one of the "random alignment" leaders.

The previous code did not work correctly in some cases. I'm attaching a corrected version created against r1304 :)
 

Attachments

Found this old post from Magister Cultuum

I think one of the big issues that led to gifting being removed is the existence of units like mages that get free promotions whenever they are initialized. Each time the unit is gifted the game technically creates a new unit and then passes on data from the old one. Every time it is gifted the unit gains a free promotion, which would allow two human players to just pass a unit back and forth until it has every possible promotion.

Can anyone verify this? Looking at the code, it seems like this would indeed be an issue. It also seems like it would be possible to drive up the Armageddon Counter by gifting a unit back and forth, and also to give a race to a unit with no race by gifting it to a player with a default race setting.
 
yes, that is indeed the reason it was blocked in the first place. too easy to get infinite promotions on spellcasters by gifting back and forth.
 
bad spot for a 1st city, seems like AI values water tiles too much
 

Attachments

  • Civ4ScreenShot0011.JPG
    Civ4ScreenShot0011.JPG
    235 KB · Views: 121
scutarii reported an issue in ExtraModMod thread (see http://forums.civfanatics.com/showpost.php?p=12177531&postcount=51).

Code:
Traceback (most recent call last):
File "BugEventManager", line 361, in _handleDefaultEvent
File "CvEventManager", line 648, in onCombatResult
ArgumentError: Python argument types in
CyTranslator.getText(CyTranslator, str, unicode)
did not match C++ signature:
getText(class CyTranslator {lvalue}, char const *, class boost::python::tuple {lvalue})

From what I see, it should be present in More Naval AI too. The following lines are part of Advanced Tactics code for capturing naval units. In More Naval AI, these are lines with numbers 642 and 644 in CvEventManager.py.

Code:
if (pPlayer.isHuman()):
	CyInterface().addMessage(pWinner.getOwner(),false,20,CyTranslator().getText("TXT_KEY_WEHAVECAPTUREDSOMETHING",(pLoser.getName())),'',0,'Art/Interface/Buttons/General/warning_popup.dds',ColorTypes(gc.getInfoTypeForString("COLOR_GREEN")), pWinner.getX(), pWinner.getY(), True,True)
elif (pPlayerLoser.isHuman()):
	CyInterface().addMessage(pLoser.getOwner(),false,20,CyTranslator().getText("TXT_KEY_WEHAVELOSTSOMETHING",(pLoser.getName())),'',0,'Art/Interface/Buttons/General/warning_popup.dds',ColorTypes(gc.getInfoTypeForString("COLOR_RED")), pLoser.getX(), pLoser.getY(), True,True)

The problem is that CyTranslator().getText is missing a comma to have the right number of arguments. Changing these lines for the following prevents the python error:

Code:
if (pPlayer.isHuman()):
	CyInterface().addMessage(pWinner.getOwner(),false,20,CyTranslator().getText("TXT_KEY_WEHAVECAPTUREDSOMETHING",(pLoser.getName()), ),'',0,'Art/Interface/Buttons/General/warning_popup.dds',ColorTypes(gc.getInfoTypeForString("COLOR_GREEN")), pWinner.getX(), pWinner.getY(), True,True)
elif (pPlayerLoser.isHuman()):
	CyInterface().addMessage(pLoser.getOwner(),false,20,CyTranslator().getText("TXT_KEY_WEHAVELOSTSOMETHING",(pLoser.getName()), ),'',0,'Art/Interface/Buttons/General/warning_popup.dds',ColorTypes(gc.getInfoTypeForString("COLOR_RED")), pLoser.getX(), pLoser.getY(), True,True)
 
Khazad captured and kept this city from the Sheaim, seems like razing would have been a better option
 

Attachments

  • Civ4ScreenShot0012.JPG
    Civ4ScreenShot0012.JPG
    219.1 KB · Views: 139
The problem is that CyTranslator().getText is missing a comma to have the right number of arguments. Changing these lines for the following prevents the python error:

Thanks for the report! Fixed in revision 1311. While fixing this I also found an error in the XML related to this feature and made it display the unit icon rather than the ugly exclamation point.
 
Some questions about events -
  • Why are some units that appear from events set to bGraphicalOnly so they don't show up in the 'Pedia? Examples: Azer, Gaelan
  • I got the event that says an "aging explorer offers to sell you a map" but I could not buy the map even though I had plenty of money. Is this a bug or are there other requirements to buy it?
 
I noticed that neither the bug report nor feature request trackers included what I mentioned in this post a week and a half ago.

I think a least this part of it probably belongs here in the bug report thread, even though the bugs in questions don't really occur in base MNAI because you never use the bAlwaysHostile tag.

I also just discovered that units with <bAlwaysHostile>1 are able to capture Super Forts without war. That probably should not be allowed to happen.

Edit2: I just discovered a much bigger problem with the bAlwaysHostile tag. When a rival unit with that tag is in one of your cities, it blocks your own units from entering the city. Your units can be built or summoned there just fine, but not moved from an adjacent tile or airlifted to reinforce the city. They are not allowed to attack the bAlwaysHostile unit in a city, but also cannot move into the same tile as the bAlwaysHostile unit. bHiddenNationaltiy units can be used to kill such bAlwaysHostile units, but regular unis cannot and neither can other bAlwaysHostile units under your own control. If you don't have an HN unit handy, you have to declare war on the units owner before your units are allowed to enter your own city.


Also, it really seems to me that the AI is functioning under the false assumption that spells that create buildings in cities are useful in Super Forts. In my modmod I keep seeing the AI placing mages with Force II or Creation II in forts and not placing said units in cities where their spells could actually be useful.
 
MC - I'll take a look at those bugs when I get a chance since most of them concern Super Forts. It would still be good of Tholal to add them to the tracker so I don't forget.
 
[to_xp]Gekko;12178242 said:
bad spot for a 1st city, seems like AI values water tiles too much

Does the AI take into account how long it would take to move to a better spot?

Aside from that, I don't know if its the best site for a capital, but having only one land route in, and 3 pillage-free squares that provide you with 3 food/2 gold (after lighthouse) seems pretty nice to me.
 
Playing as Kuriotates, at the beginning of each turn, I get some unrelated popup sounds (but no popups). Since I thought it was related to me messing around with events (a triggered Eventtrigger without available events causes that sound), I investigated and found it was related to the settlements trying to open a "what to build" popup, but being cancled.
I inserted
Code:
if( isSettlement() )
	return;
at the beginning of the CvCity::chooseProduction() function in CvCity.cpp (about line 1650 in my build), before a CvPopupInfo object is created.
 
Back
Top Bottom