So long as you tell CB to use the 2003 compiler, it should be compatible. 2008 is completely incompatible, and I didn't even try with MinGW.
<ActionButtonInfo>
<Type>Conscript2Archer</Type>
<Description>Conscript</Description>
<Civilopedia>TXT_KEY_PEDIA_USELESS</Civilopedia>
<Strategy>TXT_KEY_STRATEGY_USELESS</Strategy>
<Help>Change into [COLOR_UNIT_TEXT]archer[COLOR_REVERT] ([COLOR_HIGHLIGHT_TEXT]25 gold[COLOR_REVERT])</Help>
<PromotionPrereq1>NONE</PromotionPrereq1>
<PromotionPrereq2>NONE</PromotionPrereq2>
<PyResult>Conscripts.doConscript(pUnit,'UNIT_ARCHER','PROMOTION_CONSCRIPT',25)</PyResult>
<PyRequirement>Conscripts.canDoConscript(pUnit,'UNITCLASS_WORKER','TECH_ARCHERY')</PyRequirement>
<HotKey></HotKey>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<Button>,Art/Interface/Buttons/Units/Archer.dds,Art/Interface/Buttons/unit_resource_atlas.dds,4,1</Button>
</ActionButtonInfo>
def canDoConscript(pUnit,replace_class,tech_req):
if pUnit.getUnitClassType() == gc.getInfoTypeForString(replace_class):
player = gc.getActivePlayer()
team = gc.getTeam(player.getTeam())
return team.isHasTech(gc.getInfoTypeForString(tech_req))
else:
return false
def doConscript(old_unit,new_unit_str,promo,price):
player = gc.getActivePlayer()
replace = old_unit.getName()
old_unit.kill(true,PlayerTypes.NO_PLAYER)
newUnit = player.initUnit(gc.getInfoTypeForString(new_unit_str), old_unit.getX(), old_unit.getY(), UnitAITypes.NO_UNITAI)
if promo <> '':
newUnit.setHasPromotion(gc.getInfoTypeForString(promo),true)
newUnit.finishMoves()
player.changeGold(-price)
m = "%s changed into %s"%(replace,newUnit.getName())
doMessage(m)