Dragons Can't Fly

Magister is right about what your issue is (most of the way there).

What you did was to modify what the promotion "Dragon" does for a unit. Problem is that promotions only alter the unit when they are actually applied (except for a very few where it is easier to scan all promotions when you wonder about it). So the way to get Dragon to provide Flying would be to either create a completely new Coatlann via Worldbuilder and then modify him to have the same promotions/XP/Level as the old one, OR to change the XML back to normal (non-flying), load the game, Worldbuilder to remove Dragon from Coatlann, save, exit, add Flying to Dragon, load the game, Worldbuilder to replace Dragon on Coatlann. Now he is able to fly appropriatly.

Did you miss the part about this being a Multiplayer (Hotseat) game, meaning that Worldbuilder cannot be used?
 
Sure did... In that case it is a lot harder. You could use python to do the removal/addition for you. Or create a spell to do it:

prerequnit = Coatlann, PromotionRemove = Dragon, bHasCast = 0. Load (Dragon doesn't give flying), cast, save, modify Dragon to give Flying, modify spell to GIVE dragon. Load, cast, save. Remove useless spell, continue playing.
 
Creating a spelll.....

I'm piecing together the XML from various other spells....

Would I have to add this spell to Coatlann somehow? Or just create the spell specifying Coatlann as the prereq, and it would be automatically given?

To set prereq, Would I be correct in assuming that I need this tag? <UnitPrereq>UNIT_COATLANN</UnitPrereq>

And to give the promotion:
<AddPromotionType1>PROMOTION_DRAGON</AddPromotionType1>

bHasCast. I presume you mean this?
<bHasCasted>0</bHasCasted>
I'm guessing that determines whether or not it uses the unit's spell for that turn.
 
Spell with Coat as prereqUnit will automatically show up for him and be castable. Looks like the right tag (as long as it exists at all). And yes, that AddPromotionType would put the promotion on him, should be a similar field to remove it from him as well. And <bHasCasted> would be what I meant and you guess the reason correctly. If you have already cast something with Coat this turn, you'll also want to set <bIgnoreHasCasted> tag
 
doesn't seem to be working.

I added these entries in civ4spellinfos.xml

Code:
<SpellInfo>			<!-- Dragon Fix Give -->
			<Type>SPELL_DRAGON_FIX</Type>
			<Description>TXT_KEY_SPELL_DRAW_STRENGTH</Description>
			<Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
			<UnitPrereq>UNIT_COATLANN</UnitPrereq>
			<bHasCasted>0</bHasCasted>
			<AddPromotionType1>PROMOTION_DRAGON</AddPromotionType1>
			<Effect>EFFECT_SPELL1</Effect>
			<Sound>AS3D_SPELL_HOPE</Sound>
			<Button>Art/Interface/Buttons/Spells/corpus1.dds</Button>
		</SpellInfo>
		<SpellInfo>			<!-- Dragon Fix Take -->
			<Type>SPELL_DRAGON_TAKE</Type>
			<Description>TXT_KEY_SPELL_DRAW_STRENGTH</Description>
			<Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
			<UnitPrereq>UNIT_COATLANN</UnitPrereq>
			<bHasCasted>0</bHasCasted>
			<RemovePromotionType1>PROMOTION_DRAGON</RemovePromotionType1>
			<Effect>EFFECT_SPELL1</Effect>
			<Sound>AS3D_SPELL_HOPE</Sound>
			<Button>Art/Interface/Buttons/Spells/corpus1.dds</Button>
		</SpellInfo>

Thought it would be better to do two spells.

Nothing shows on Coatlann when I load a game though.
 
doesn't seem to be working.

I added these entries in civ4spellinfos.xml

Code:
<SpellInfo>			<!-- Dragon Fix Give -->
			<Type>SPELL_DRAGON_FIX</Type>
			<Description>TXT_KEY_SPELL_DRAW_STRENGTH</Description>
			<Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
			<UnitPrereq>UNIT_COATLANN</UnitPrereq>
			<bHasCasted>0</bHasCasted>
			<AddPromotionType1>PROMOTION_DRAGON</AddPromotionType1>
			<Effect>EFFECT_SPELL1</Effect>
			<Sound>AS3D_SPELL_HOPE</Sound>
			<Button>Art/Interface/Buttons/Spells/corpus1.dds</Button>
		</SpellInfo>
		<SpellInfo>			<!-- Dragon Fix Take -->
			<Type>SPELL_DRAGON_TAKE</Type>
			<Description>TXT_KEY_SPELL_DRAW_STRENGTH</Description>
			<Civilopedia>TXT_KEY_SPELL_PLACEHOLDER_PEDIA</Civilopedia>
			<UnitPrereq>UNIT_COATLANN</UnitPrereq>
			<bHasCasted>0</bHasCasted>
			<RemovePromotionType1>PROMOTION_DRAGON</RemovePromotionType1>
			<Effect>EFFECT_SPELL1</Effect>
			<Sound>AS3D_SPELL_HOPE</Sound>
			<Button>Art/Interface/Buttons/Spells/corpus1.dds</Button>
		</SpellInfo>

Thought it would be better to do two spells.

Nothing shows on Coatlann when I load a game though.


The first problem I see is that these spells are set up to effect the whole stack. The ability to make all your units dragons is probably too much. Of course, when a promotion is given to more than just the caster it only goes to units with unitcombats that could normally purchase the promotions (if they didn't have impossible prereqs lime iMinLevel -1). Dragon is not available to any unitcombat. You should probably add bBuffCasterOnly>1</bBuffCasterOnly> after the add/remove promotion tags.


Also, I don't think that a spell will work if all it does is add a promotion the unit already has, and a spell that remove a promotion won't work if the unit doesn't have said promotion (assuming the spells don't have other effects). SPELL_DRAGON_FIX thus won't work until SPELL_DRAGON_TAKE does. I'm not really sure why SPELL_DRAGON_TAKE isn't working though.


You may want to add <bDisplayWhenDisabled>1</bDisplayWhenDisabled> so it shows up even when you can't cast it to make sure it is registering at all.

Just to be clear, these spells are added before the </SpellInfos>and </Civ4SpellInfos> at the end of the file, right? If they were after either of these they would not be read at all.
 
Ok, I've added the display when disabled. The spells appeared, and worked perfectly. yay.

But removing then re-adding the promotion still doesn't make him fly. Do I have to do what xienwolf said? change the dragon promo back before removing it, then change it to flying again before re-adding it? I can't understand why doing that would be necessary...
 
Yes, you have to remove the flying before you remove the promotion (so you remove exactly what he originally gained) then add flying before you re-apply it.


When a unit gains/loses a promotion, the code tells the unit to carry all the information from the promotion. So a unit with Combat 4 doesn't say "I have 4 promotions which give me 20% each!" it just says "I have an 80% strength bonus! Oh yeah, and 4 pretty icons..."

So changing what a promotion does won't affect any units already having the promotion, because they don't CARE what the promotion does, they just carry around this pretty picture, and incidentally happen to be better than when they were first built.


The same process happens when you remove a promotion though. Since the unit doesn't remember what that pretty picture meant, he looks up what the promotion does and subtracts that ability from himself. So by removing Dragon (which allows flying) from a unit who was never able to fly, the unit gains a NEGATIVE flight capacity. Thus the next promotion he gains which allows flight just returns him to zero and he still cannot fly.
 
Doesn't flying promotion forbid the use of roads? I sure wouldn't want to restrict a dragon to a mere 4 tiles per turn movement compared to 12 on a road. Unless you play on archipelago maps.
 
Well, I don't know how appropriate it is for a dragon to gain a benefit from a road anyway. One would imagine they don't quite fit on most of them. It'd be like saying that the tight-rope suspended between two tables set 5 inches apart at shin level makes it easier for you to get across the room.
 
Well, I think the biggest lakes are 9 tiles or so, but "lorewise" I don't know how big that is. Ang why couldn't a dragon enjoy tuna, swordfish and shark?

Well it's sort of moot, unless there is a way to allow them to only move over lakes, and not oceans?

I'd guess adding the Water Walking, and Cannot Enter Ocean flags would allow them to zoom over any lake 1-2 tiles wide, as well as cross straights and sounds to nearby landmasses - without opening the can of worms of trans-oceanic travel.

(EDIT- Thought I was reading on the last page, forgive me if these comments are superfluous at this point. :p)
 
Well, I don't know how appropriate it is for a dragon to gain a benefit from a road anyway. One would imagine they don't quite fit on most of them. It'd be like saying that the tight-rope suspended between two tables set 5 inches apart at shin level makes it easier for you to get across the room.

I agree with this.

However, I don't think 4 movement is appropriate for dragons, either. I think they need more. Maybe 8.

Consider their massive size. A tall person walks faster than a short person, on average. the dragons are stupidly huge, and even when walking on the ground, they're going to be taking big steps. When flying, they're not constrained by ground friction, only by wind resistance.
 
You know, it is weird to see ground troops and horsemen outrunning a dragon if dragon only gets 4 movements...
 
I agree with this.

However, I don't think 4 movement is appropriate for dragons, either. I think they need more. Maybe 8.

Just remember, with every buff you give them for flavor, you have to increase their cost to compensate - an eight movement, flying, 23 strength Magic Immune unit that has Roar?

That needs to cost a LOT of hammers.
 
Just remember, with every buff you give them for flavor, you have to increase their cost to compensate - an eight movement, flying, 23 strength Magic Immune unit that has Roar?

That needs to cost a LOT of hammers.

Why does it need to cost a lot of hammers? The hammer cost for pretty much all heroes aside from meshabber/mythril golem is really irrelevant

The cost for them comes in the tech. Acheron is probably the easiest to get, as you can capture him with beastmasters at Animal Mastery. Coatlann needs Arcane Lore, Theology, and Righteousness, three fairly late techs. And Drifa, eurabatres, and Abashi, all require divine essence.

If you can manage to tech that far, the hammer costs are pretty much irrelevant. Hell, in my current Mazatl game, my capital city has about 350 :hammers: production per turn. And that's with almost no mines. IIt's a financial city. If playing a different civ that doesn't have deep jungle everywhere, I'd pack every available tile with mines/lumbermills instead, my production could have been much higher, even.

Meshabber is reduced to what...1200:hammers: is it now? that's 4 turns of work, if I decide to actually build it. More likely, I'll just use the huge bank balance I always have saved up for exactly that sort of purpose, and rush him 1-2 turns anyway

The game is usually won by the time divie essence comes around, in any case. It's one of those points where game balance starts to become irrelevant, and the game's mostly about destroying the world with your shiny new toys.

"an eight movement, flying, 23 strength Magic Immune unit that has Roar" is a powerful thing to be sure, but so are 4 archmages, 4 paladins, 4 immortals, 4 phalanxes, 4 berserkers, 4 knights, 4 high priests, your choice of religious heroes, and however many musketmen you desire to back them up. That sort of military power is not hard to come by when you have several cities that can make almost any unit in a single turn, and compared to that, no matter how powerful they are, a dragon is just icing on the cake.
 
Point taken. I look at things with more of an eye to balance now that the AIs tend to survive and not be drooling idiots at that stage now. (Archos at high techs are actually pretty nasty. They ate Valin Phanuel this morning :_( ) The AI is still dumb with it's heroes though.

Mass off topic there though - if hammer cost is unimportant, why NOT balance it?
 
Point taken. I look at things with more of an eye to balance now that the AIs tend to survive and not be drooling idiots at that stage now. (Archos at high techs are actually pretty nasty. They ate Valin Phanuel this morning :_( ) The AI is still dumb with it's heroes though.

Mass off topic there though - if hammer cost is unimportant, why NOT balance it?

To be fair, Archos at any tech post-hunting are nasty. They're very efficient at building decent stacks and going rampaging...

===

Regarding the original topic - Dragons could fly during the Age of Dragons and were significantly more powerful whilst they were directly linked to their respective Angels (as Drifa is in Age of Ice). The dragons of the Age of Rebirth might not reflect the full strength of those creatures... Acheron in his original form would certainly never be defeated by a stack of courageous axemen...

(Yes, that does mean that Drifa should probably be stronger once Auric ascends, but still...)
 
Back
Top Bottom