Brainstorming Unit Idea

Magness

Chieftain
Joined
Jul 31, 2008
Messages
6
Location
Madison, WI
I recently played through a game where I made extensive use of Gibbon Goetia, and it got me thinking about his lore. Specifically, about various shape-changing critters.

Out of this I'd like to try creating a new world unit, but so far I haven't figured out how to make these things happen.

1) The unit does not gain experience.
- I'm guessing that I'm just not seeing a line in the UnitInfos.

2) The unit gains one promotion from any unit it defeats in combat.
- Clarification, the promotion gained is one that the defeated unit had.
- It might be more fun if the promotion gained was at random.
- There are probably certain promotions that shouldn't transfer. (such as Hero, spell effects, race, ect...)

3) The unit may "upgrade" to any non-unique unit type it has previously defeated.
- Should be able to do so anywhere and regardless of resource prereqs.
- Race could be included as an upgrade type.

Thoughts?
 
That would be easy to do if you are comfortable editing python. If you give the unit a python postcombat that removes all experience that could take care of a combat related XP.

The Mimic postcombat is exactly two.

I do have a code that could work for number three but it simply changes Gibbon into the unit he defeated not what you describe.

Code:
def postCombatGibbon(pCaster, pOpponent):
	pUnit = pOpponent
	if pOpponent.isAlive():
		CyInterface().addMessage(pCaster.getOwner(),True,25,CyTranslator().getText("TXT_KEY_MESSAGE_GIBBON", ()),'',1,'Art/Interface/Buttons/Units/Gibbin Goetia.dds',ColorTypes(8),pCaster.getX(),pCaster.getY(),True,True)
		pPlayer = gc.getPlayer(pCaster.getOwner())
		newUnit = pPlayer.initUnit(pUnit.getUnitType(), pCaster.getX(), pCaster.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
		newUnit.convert(pCaster)
 
Top Bottom