Mod-Modders Guide to Fall Further

Is there a way to trigger a "We Love The King" thing? Either by XML>Spells or by python? I would simply create a spell that could do that, if it helps :)
 
If you want to use void CvCity::setWeLoveTheKingDay(bool bNewValue) in Python it seems you would have to write a function for it in CyCity first.
 
Oh yeah, right now we don't distribute EVERYTHING you need to compile. Next full release we will though. You need to have a directory which can already handle compiling code (FfH download or the BtS one) and then dump our code over the top of it. Oops, and you'll have to manually include the CyMapInterface1.cpp and CyMapInterface2.cpp files in your project, and remove CyMapInterface.cpp


So yeah... next full release (sometime after 041 of FfH so we get the nice repack on that side as well) it should be easier to handle our code.
 
What is wrong with collateral damage?

I'm trying to add collateral damage to monstrous creatures, as part of my module. It works, in concept, but not very well

I've been gradually bumping the values up, this is what I'm currently using:


Code:
<iCollateralDamage>9999</iCollateralDamage>
<iCollateralDamageLimit>100</iCollateralDamageLimit>
<iCollateralDamageMaxUnits>4</iCollateralDamageMaxUnits>
Yes. 9999. Because 100 didn't seem to be doing the job.

MY victim for the test is a stack of goblins on a hill. GOBLINS. Str2 nobodies. 10 of them

The creature I'm testing with, Auric Ascended. Whose Strength I've increased to 75.

So with these kind of numbers, I'd expect 4 enemies to die, in every single attack.
I attack. one dies. 4 of the goblins take 33% damage.

33%

What is going on?
 
I'm trying to create a unit on a successful pillage but it doesn't seem to work.

Here's the code I'm using:

Code:
	def onUnitPillage(self, argsList):
		'Unit pillages a plot'
		pUnit, iImprovement, iRoute, iOwner = argsList
		iPlotX = pUnit.getX()
		iPlotY = pUnit.getY()
		pPlot = CyMap().plot(iPlotX, iPlotY)
		
# Legion
		iSlave = gc.getInfoTypeForString('UNIT_SLAVE')
			if eTeam.isHasTech(gc.getInfoTypeForString('TECH_LEGION')):
			i = 3
				for i in range( i > CyGame().getSorenRandNum(4, "Create Slaves")):
					spawnUnit = pPlayer.initUnit(iSlave, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
# End Legion

		if (not self.__LOG_UNITPILLAGE):
			return
		CvUtil.pyPrint("Player %d's %s pillaged improvement %d and route %d at plot at (%d, %d)" 
			%(iOwner, PyInfo.UnitInfo(pUnit.getUnitType()).getDescription(), iImprovement, iRoute, iPlotX, iPlotY))
 
Yes, you seem to have an error in your indentation. The 'if' should be at the same column than the 'iSlave'. Plus, your 'i=3' isn't indented correctly to be considered a result of the 'if'.
Code:
# Legion
		iSlave = gc.getInfoTypeForString('UNIT_SLAVE')
		if eTeam.isHasTech(gc.getInfoTypeForString('TECH_LEGION')):
			i = 3
			for i in range( i > CyGame().getSorenRandNum(4, "Create Slaves")):
				spawnUnit = pPlayer.initUnit(iSlave, UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
# End Legion
This should do the trick. And the callback too :)
 
Don't suppose anyone knows about my collateral damage issue?

Is there some other tag I need to change, to raise the maximum per-attack ?
 
I assume you are using the UnitInfos tags? PromotionInfos ones don't do anything yet. Haven't dealt with Collateral much at all, so don't know what sort of limitations naturally exist.

Yes, I'm using the unitinfos.

Don't suppose there's an indepth explanation of all the collateral damage tags anywhere?
 
Back
Top Bottom