Ok so we are in
<UnitInfo>
<Class>UNITCLASS_SUBDUED_COW</Class>
<Type>UNIT_SUBDUED_COW</Type>
Code:
<Outcome>
<OutcomeType>OUTCOME_BUILD_DOMESTICATED_HERD_WITH_PASTURE</OutcomeType>
<iChance>100</iChance>
<PlotCondition>
<Greater>
<Python>canBuildCowBonusAndPasture</Python>
<Constant>0</Constant>
</Greater>
</PlotCondition>
<PythonCallback>doBuildCowBonusAndPasture</PythonCallback>
</Outcome>
The python function doBuildCowBonusAndPasture(argsList) seems to assume that it is getting a specific plot as a function argument, when it is really getting the unit info for any UNIT_SUBDUED_COW.
It is then trying to use plot methods on a unit, resulting in the malfunction.
The function canBuildCowBonusAndPasture(argsList) that is called by the <PlotCondition> is getting a specific plot as an argument.
A possible solution might be if canBuildCowBonusAndPasture could store which plot it is getting in a global python variable and then the doBuildCowBonusAndPasture could use that, perhaps...
It would probably be better to solve it on the dll side.
In CvOutcomeMission.cpp :
I think this is where the dll gives a plot to the canBuild function:
--------------------------------------------
isPossible(CvUnit* pUnit, bool bTestVisible)
...
if (m_pPlotCondition)
if (!m_pPlotCondition->evaluate(pUnit->plot()->getGameObject()))
--------------------------------------------
And this is where a unit is given as the argument to doBuild:
--------------------------------------------
execute(CvUnit* pUnit)
...
getOutcomeList()->execute(*pUnit);
--------------------------------------------
Since the unit info is probably used by some of the mission functions I would suggest to just add in a second argument for the plot.