A little modding help

Yep, the shape's just fine. Everything that ought to be there is there, but only the treetops have colour on them. The rest of the building is bright pink.
 
Well, hopefully the treetop is the WRONG color then, it could just be that your skin is assigned a higher z-plane setting than your model. Doesn't seem like a sound way to design things, but I wouldn't put it past a program to have that flaw.
 
It looks like the right colours. As I said, I didn't make the model, it's the Jade College model from the link in page 1. It came with a whole bunch of .nifs and .dds-es, and I'm not sure what they actually do. I just picked the most obvious one.
 
Well, if you aretistically geared, you can check out White Rabbit's Signature for some help files on how you might be able to fix it. Not completely sure, but I think that the .nif is the shape, and the .dds is the color, so check to make certain you nabbed all the appropriate dds files.
 
Say, Magister: You know if I wanted to make it so that adepts of my new civ could only use life, spirit, nature, mind, body, earth, air, water and shadow mana, how would I do that?

I thought of making it happen when the unit was made, but I can't quite figure out how... I got as far as "if the building civ is Villalfar, if the unit is of UNITCLASS_ADEPT," and then I couldn't get much further than that. I thought of making a new unit type with XML, but then I thought "Nah, I'd rather do it with one short script in Python".

Edit: Decided to approach this from a different direction. I thought it might be possible to write something triggered at the start of every turn (in Python, not English) like:
"If the building civ is Villalfar,
If the unit has gained enough XP to gain a level (or 'if the unit can gain a promotion')
Do not allow the unit to promote to Chaos 1, Entropy 1, etc."

I made another script to ensure that any unit built that started with any of the promotions that aren't allowed would lose them, so it wouldn't need to include the 2 and 3 levels of that magic type, as it would be impossible for the unit to gain any beyond 1 from promotion.
 
In the "def onUnitBuilt(self, argsList):" define of CvEventManager.py (the same place as the other changes I showed you), there is this function which gives out free promotions to adepts based on mana:
Code:
		if unit.getUnitCombatType() == gc.getInfoTypeForString('UNITCOMBAT_ADEPT'):
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_AIR'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_AIR2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_BODY'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_BODY2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_CHAOS'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_CHAOS2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_DEATH'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEATH2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_DIMENSIONAL'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DIMENSIONAL1'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_EARTH'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_EARTH2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_ENCHANTMENT'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENCHANTMENT2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_ENTROPY'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_ENTROPY2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_FIRE'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_FIRE2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_LAW'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LAW2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_LIFE'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_LIFE2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_MIND'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MIND2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_NATURE'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_NATURE2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_SHADOW'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SHADOW2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_SPIRIT'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SPIRIT2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_SUN'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_SUN2'), True)
			iNum = city.getNumBonuses(gc.getInfoTypeForString('BONUS_MANA_WATER'))
			if iNum > 1:
				unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER1'), True)
				if iNum > 2:
					unit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_WATER2'), True)

You could add an if pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_NEW_CIV'): statement before the section that gives out the mana types that you don't want your civ to use would work. (remembering to change the indentations, ect). If I were you, I'd probably rearrange the if statements for each mana type, so that you could use only one added if statement to block all the unwanted promotions.

Bear in mind that if you capture Govannon (can you still capture heroes? I forget. Anyway, you could cheat in world builder to get him) that he could still teach your adepts spells from other spheres.
 
That would mean that if you had an Entropy mana node, they could still promote to Entropy 1, though; right? I think I already blocked the script above from working.
 
You could always give them a unique adept that was incapable of building certain nodes. They'd still be able to get the mana through trade and wonders, but that's neccessary so a ToM victory isn't impossible with them.
 
Okay! At last: everything, except the world spell (which I still need an idea for) and a few minor graphical problems, is working.
As to those few minor graphical problems: There was the one I mentioned above about the palace (I might just use a different model), and there's a new one surrounding the adept replacement/mage replacement. The adept and mage replacements are set to work off the adept and mage art defines, but they appear as human mages rather than Ljosalfar mages, which is what they should be (all the unit models are Ljosalfar). Can anyone offer help with that?
 
Are they getting the Elven racial promotion properly? The art defines for the Elven units are set by their racial promotion, not by civ.
 
To remedy whatever was causing that problem, I added the PROMOTION_ELF promotion to the replacement units, since the new civ are the only one can build them anyway. Another problem has occured to me: the caster line for my new civ goes:

Preserver -> Warden -> Druid

The problem is, the Druid there is actually a replica of the Druid that replaces the Archmage and can learn spells from spheres other than Life and Nature. The reason that's a problem is that it can be built - meaning that, instead of needing a level 6 Warden to promote to it, it can just be trained in a city. Is there a XML tag for that, or is that done with Python?
 
I would imagine there is one of two problems. For one, there is an XML tag somewhere in the unit infos that sets "required level to upgrade to". Check that.

For two, you did give the unique druid a different name other than UNIT_DRUID, right? Because UNIT_DRUID is already used for the actual druid, so creating a duplicate will likely cause problems.

You might want to give a name to your unique druid of something other than Druid...
 
UNIT_VILLALFAR_DRUID is the unit's XML name, and its English name is just "Druid", so it appears that the player has 6 druids rather than the usually allowed 3. <iMinLevel>, I think the tag is for "required level to upgrade to" is set to 6, like the Archmage. Maybe I'm just confusing it with the regular, buildable druid. I'll check that.
 
Need a negative hammer cost to prevent building normally. Labelling them something other than Druid seems like a good idea to me, otherwise they're a bit confusing in terms of how you get them - 3 built with groves and 3 upgraded from mages isn't very intuitive.
 
And I face my first post-release problem. What would a line of Python to check whether the number of animal units in the world is less than 40 look like? Belonging to all players, that is.
 
Back
Top Bottom