LittleRedPoint
Slaver
Hi,
I made skin for slave unit.
LRP unit skins contain:
- Black slave skin
- White slave skin
- Inquisitor skin
- Copper age warrior skin
How to use it for slave:
1. Make a copy of worker folder in C:/.../Sid Meier's Civilization 4/Assets/Art/Units/...
2. rename this copy folder to "Slave"
3. unpack and copy this skin to slave folder (re-write worker_128.dds)
now you have the graphics
To have the unit you have to mod XML
Mod this in custoAssets folder! Do not mod xml in original game folder!
You have to mod xml files
1. make new unit class slave into UnitClasInfos.xml
2. then make new unit slave into UnitInfos.xml
3. make new entri into CIV4ArtDefines.xml make copy of worker lines
4. rename the Type ART_DEF_WORKER to ART_DEF_SLAVE
4. rename the folder worker to slave inside NIF and KFM tags
5. change the UnitMeshGroup in UnitInfos.xml to a ART_DEF_SLAVE
now you have the unit
To get slave as a combat result you just have to mod Snaitf's "Unit Allegence mode" code in CvEventManager.py:
So now it is possible to make event to combat that you have chance to get some units what you like. This has a condition that active player must have civic slavery then you have cance 20% to get slave as combat result. First you must add slave to your Civ4UnitInfos.xml
I keep the Snaitf-s code in game and i put this new code under Snaitf-s code. The random condition must be changed to "if (iRand >= 80):" that you can't get both. Now itis possible to get slave or unit.
But you have 25% overall chance to get something from battle.
So download Snaift Unit Allegence mod and update this with my modification.
Here is a code what is mixed wit Sanitf's unit allegence mod code. It is shorter and useful if you are interested using both options.
Snaitf is genius!!! He made good option to add new functionality! He is my hero!
I made some new skins, if you find these useful, then take them.
About Inquistor - i don't like spy image, so i reskin Great prophet so that he looks like cardinal, even have red hat .
Have fun
I made skin for slave unit.
LRP unit skins contain:
- Black slave skin
- White slave skin
- Inquisitor skin
- Copper age warrior skin
How to use it for slave:
1. Make a copy of worker folder in C:/.../Sid Meier's Civilization 4/Assets/Art/Units/...
2. rename this copy folder to "Slave"
3. unpack and copy this skin to slave folder (re-write worker_128.dds)
now you have the graphics
To have the unit you have to mod XML
Mod this in custoAssets folder! Do not mod xml in original game folder!
You have to mod xml files
1. make new unit class slave into UnitClasInfos.xml
2. then make new unit slave into UnitInfos.xml
3. make new entri into CIV4ArtDefines.xml make copy of worker lines
4. rename the Type ART_DEF_WORKER to ART_DEF_SLAVE
4. rename the folder worker to slave inside NIF and KFM tags
5. change the UnitMeshGroup in UnitInfos.xml to a ART_DEF_SLAVE
now you have the unit
To get slave as a combat result you just have to mod Snaitf's "Unit Allegence mode" code in CvEventManager.py:
Code:
def onCombatResult(self, argsList):
'Combat Result'
pWinner,pLoser = argsList
playerX = PyPlayer(pWinner.getOwner())
unitX = PyInfo.UnitInfo(pWinner.getUnitType())
playerY = PyPlayer(pLoser.getOwner())
unitY = PyInfo.UnitInfo(pLoser.getUnitType())
#############################
## Start Modifaction Block ##
#############################
xType = unitX.getUnitCombatType()
yType = unitY.getUnitCombatType()
if (yType != gc.getInfoTypeForString("UNITCOMBAT_SIEGE") and yType != gc.getInfoTypeForString("UNITCOMBAT_ARMOR") and yType != gc.getInfoTypeForString("UNITCOMBAT_HELICOPTER") and yType != gc.getInfoTypeForString("UNITCOMBAT_NAVAL") and yType != gc.getInfoTypeForString("NONE")):
if (xType != gc.getInfoTypeForString("UNITCOMBAT_HELICOPTER") and xType != gc.getInfoTypeForString("NONE")):
iRand = random.randint(1, 100)
if (iRand <= 5):
newUnit = playerX.player.initUnit(pLoser.getUnitType(), pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI)
newUnit.finishMoves()
newUnit.setDamage(50, False)
newUnit.setExperience(pLoser.getExperience(), -1)
newUnit.setLevel(pLoser.getLevel())
for iCount in range(gc.getNumPromotionInfos()):
if (pLoser.isHasPromotion(iCount)):
newUnit.setHasPromotion(iCount, True)
##End Snaitf code and start LittleRedPoint slavery code :) code#################################################
player = gc.getActivePlayer()
xType = unitX.getUnitCombatType()
yType = unitY.getUnitCombatType()
unitSlave = gc.getInfoTypeForString("UNIT_SLAVE")
if (player.isCivic(gc.getInfoTypeForString("CIVIC_SLAVERY"))):
if (yType != gc.getInfoTypeForString("UNITCOMBAT_SIEGE") and yType != gc.getInfoTypeForString("UNITCOMBAT_ARMOR") and yType != gc.getInfoTypeForString("UNITCOMBAT_HELICOPTER") and yType != gc.getInfoTypeForString("UNITCOMBAT_NAVAL") and yType != gc.getInfoTypeForString("NONE")):
if (xType != gc.getInfoTypeForString("UNITCOMBAT_HELICOPTER") and xType != gc.getInfoTypeForString("NONE")):
iRand = random.randint(1, 100)
if (iRand >= 80):
newUnit = playerX.player.initUnit(unitSlave, pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI)
newUnit.finishMoves()
#############################
## End Modifaction Block ##
#############################
So now it is possible to make event to combat that you have chance to get some units what you like. This has a condition that active player must have civic slavery then you have cance 20% to get slave as combat result. First you must add slave to your Civ4UnitInfos.xml
I keep the Snaitf-s code in game and i put this new code under Snaitf-s code. The random condition must be changed to "if (iRand >= 80):" that you can't get both. Now itis possible to get slave or unit.
But you have 25% overall chance to get something from battle.
So download Snaift Unit Allegence mod and update this with my modification.
Here is a code what is mixed wit Sanitf's unit allegence mod code. It is shorter and useful if you are interested using both options.
Code:
def onCombatResult(self, argsList):
'Combat Result'
pWinner,pLoser = argsList
playerX = PyPlayer(pWinner.getOwner())
unitX = PyInfo.UnitInfo(pWinner.getUnitType())
playerY = PyPlayer(pLoser.getOwner())
unitY = PyInfo.UnitInfo(pLoser.getUnitType())
#############################
## Start Modifaction Block ##
#############################
xType = unitX.getUnitCombatType()
yType = unitY.getUnitCombatType()
player = gc.getActivePlayer()
unitSlave = gc.getInfoTypeForString("UNIT_SLAVE")
if (yType != gc.getInfoTypeForString("UNITCOMBAT_SIEGE") and yType != gc.getInfoTypeForString("UNITCOMBAT_ARMOR") and yType != gc.getInfoTypeForString("UNITCOMBAT_HELICOPTER") and yType != gc.getInfoTypeForString("UNITCOMBAT_NAVAL") and yType != gc.getInfoTypeForString("NONE")):
if (xType != gc.getInfoTypeForString("UNITCOMBAT_HELICOPTER") and xType != gc.getInfoTypeForString("NONE")):
iRand = random.randint(1, 100)
if (iRand <= 5):
newUnit = playerX.player.initUnit(pLoser.getUnitType(), pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI)
newUnit.finishMoves()
newUnit.setDamage(50, False)
newUnit.setExperience(pLoser.getExperience(), -1)
newUnit.setLevel(pLoser.getLevel())
for iCount in range(gc.getNumPromotionInfos()):
if (pLoser.isHasPromotion(iCount)):
newUnit.setHasPromotion(iCount, True)
elif (iRand >=80):
if (player.isCivic(gc.getInfoTypeForString("CIVIC_SLAVERY"))):
newUnit = playerX.player.initUnit(unitSlave, pWinner.getX(), pWinner.getY(), UnitAITypes.NO_UNITAI)
newUnit.finishMoves()
Snaitf is genius!!! He made good option to add new functionality! He is my hero!
I made some new skins, if you find these useful, then take them.
About Inquistor - i don't like spy image, so i reskin Great prophet so that he looks like cardinal, even have red hat .
Have fun