Capture Slaves

@DH
can you do a Great Doctor and Great Diplomat in a modular form? strategy has those working in his.

You'd probably have to look at 004 or 005 to get them i think that is when i changed over to regular RoM?
 
@DH
can you do a Great Doctor and Great Diplomat in a modular form? strategy has those working in his.

I have had a quick look at the originals of these two - they have stuff in them that I have not done before so it wont be easy. I am not sure I am up to the chalenge at the moment.
 
OK, I figured out what was wrong with the modular version of Capture Slaves and have attached the new version.

Installation
1. Uncompress - it contains the Assets folder and lower folders
2. Check that your MLF file in your Assets\Modules folder includes a StartegyOnly element
3. Edit your Assets\Config\init.xml file to add <load mod="Capture Slaves"/> at the end. The last lines should look like.

Code:
	<load mod="Capture Slaves"/>
</bug>

btw the error was on the first comment line ;)
 
OK, I figured out what was wrong with the modular version of Capture Slaves and have attached the new version.

Installation
1. Uncompress - it contains the Assets folder and lower folders
2. Check that your MLF file in your Assets\Modules folder includes a StartegyOnly element
3. Edit your Assets\Config\init.xml file to add <load mod="Capture Slaves"/> at the end. The last lines should look like.

Code:
	<load mod="Capture Slaves"/>
</bug>

btw the error was on the first comment line ;)

OK i got everything in-line but i get this error:confused:


Can't find type enum for type tag UNITCLASS_SLAVE
Traceback (most recent call last):
File "BugEventManager", line 361, in _handleDefaultEvent
File "CaptureSlaves", line 35, in onCombatResult
File "PyHelpers", line 290, in initUnit
RuntimeError: unidentifiable C++ exception



Spoiler :
Code:
iRandNum = CyGame().getSorenRandNum(99, "Slave")
							if iChance > iRandNum:
								[B][COLOR="Red"]attacker.initUnit(gc.getCivilizationInfo(gc.getPlayer(iAttacker).getCivilizationType()).getCivilizationUnits(CvUtil.findInfoTypeNum(gc.getUnitClassInfo, gc.getNumUnitClassInfos(), 'UNITCLASS_SLAVE')), pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI)[/COLOR][/B]
								CvUtil.pyPrint('Player %d Civilization %s Unit %s has defeated Player %d Civilization %s Unit %s creating a slave.' 
									%(playerX.getID(), playerX.getCivilizationName(), unitX.getDescription(), 
									playerY.getID(), playerY.getCivilizationName(), unitY.getDescription()))
 
What if you replace the CvUtil.findInfoTypeNum... with gc.getInfoTypeForString("UNITCLASS_SLAVE")

Nope, now i get two errors?

Traceback (most recent call last):
File "BugConfig", line 110, in unknown_endtag
File "BugConfig", line 334, in endChild
File "BugConfig", line 337, in end
File "BugConfig", line 318, in process
File "BugConfig", line 565, in handle
File "BugUtil", line 642, in getFunction
File "BugUtil", line 631, in lookupFunction
ConfigError: Module 'CaptureSlaves' must define function or class 'onCombatResult'

Traceback (most recent call last):
File "BugConfig", line 110, in unknown_endtag
File "BugConfig", line 334, in endChild
File "BugConfig", line 337, in end
File "BugConfig", line 318, in process
File "BugConfig", line 565, in handle
File "BugUtil", line 642, in getFunction
File "BugUtil", line 631, in lookupFunction
ConfigError: Module 'CaptureSlaves' must define function or class 'onCityRazed'
 
OK i got everything in-line but i get this error:confused:


Can't find type enum for type tag UNITCLASS_SLAVE
Traceback (most recent call last):
File "BugEventManager", line 361, in _handleDefaultEvent
File "CaptureSlaves", line 35, in onCombatResult
File "PyHelpers", line 290, in initUnit
RuntimeError: unidentifiable C++ exception



Spoiler :
Code:
iRandNum = CyGame().getSorenRandNum(99, "Slave")
							if iChance > iRandNum:
								[B][COLOR="Red"]attacker.initUnit(gc.getCivilizationInfo(gc.getPlayer(iAttacker).getCivilizationType()).getCivilizationUnits(CvUtil.findInfoTypeNum(gc.getUnitClassInfo, gc.getNumUnitClassInfos(), 'UNITCLASS_SLAVE')), pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI)[/COLOR][/B]
								CvUtil.pyPrint('Player %d Civilization %s Unit %s has defeated Player %d Civilization %s Unit %s creating a slave.' 
									%(playerX.getID(), playerX.getCivilizationName(), unitX.getDescription(), 
									playerY.getID(), playerY.getCivilizationName(), unitY.getDescription()))

I had that error on a much earlier version - I will check my version control and make sure I gave you the latest, but not for an hour or two.
 
I had that error on a much earlier version - I will check my version control and make sure I gave you the latest, but not for an hour or two.

Great, thx;)
 
Sorry but the one I posted is the one which is working fine on my machine.

Can i get a copy of your RoM then, that way i can see what the heck is going on, thx:blush:

I hope you have something like Filefront?
 
Sorry but the one I posted is the one which is working fine on my machine.

OK i re-tried it again and i get this? sorry

Can't find type enum for type tag UNITCLASS_SLAVE
Traceback (most recent call last):
File "BugEventManager", line 361, in _handleDefaultEvent
File "CaptureSlaves", line 35, in onCombatResult
File "PyHelpers", line 290, in initUnit
RuntimeError: unidentifiable C++ exception

same as post # 148
 
Yes its for the new slave.
Do you have two of them - I think that was what I fixed. One of AArand's units had a unitclass of slave also.

I can't give you a copy of my RoM because I have almost used up my upload/download limit. It gets reset on the 27th and next month it gets increased.
 
Top Bottom