ModModder's Guide

I have encountered something strange.
I had a number of text entries that worked fine while they were all in a single file.

But now that I have seperated them into a number of files half of them work, the other half don't.


So, are there any rules to this? I mean like specific file names?
For example this does not work.

PPQ_CIVGameText_Promotions.xml
Spoiler :
Code:
<?xml version="1.0"?>
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Game Text - Misc -->
<Civ4GameText xmlns="http://www.firaxis.com">
	<TEXT><!-- Promotions -->
		<Tag>TXT_KEY_PROMOTION_PPQ_CREATION2</Tag>
		<English>Rebirth</English>
		<French></French>
		<German></German>
		<Italian></Italian>
		<Spanish></Spanish>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_PROMOTION_PPQ_BAN</Tag>
		<English>Promotion that banns all non Fire and Creation Spells</English>
		<French></French>
		<German></German>
		<Italian></Italian>
		<Spanish></Spanish>
	</TEXT>
</Civ4GameText>

But this works just fine.

PPQ_CIV4GameText_CIV.xml
Spoiler :
Code:
<?xml version="1.0"?>
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Game Text - Misc -->
<Civ4GameText xmlns="http://www.firaxis.com">
	<TEXT><!-- CIV -->
		<Tag>TXT_KEY_CIV_PPQ_DESC</Tag>
		<English>placeholder civ description</English>
		<French></French>
		<German></German>
		<Italian></Italian>
		<Spanish></Spanish>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_CIV_PPQ_SHORT_DESC</Tag>
		<English>placeholder</English>
		<French></French>
		<German></German>
		<Italian></Italian>
		<Spanish></Spanish>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_CIV_PPQ_ADJECTIVE</Tag>
		<English>placeholder</English>
		<French></French>
		<German></German>
		<Italian></Italian>
		<Spanish></Spanish>
	</TEXT>
	<TEXT>
		<Tag>TXT_KEY_CIV_PPQ_PEDIA</Tag>
		<English>placeholder</English>
		<French></French>
		<German></German>
		<Italian></Italian>
		<Spanish></Spanish>
	</TEXT>
</Civ4GameText>

Now mind you that just 15 minutes ago they all worked fine when they were in the same file.

Am I missing something? :eek:
 
There are several files that work, and several that don't.
 
This post seems to completely miss the point of Flavour Start. Amurites get a +4 affinity for Reagents (and +2 for Mana). Bannor gets affinity towards all metals, Hippus towards Horse, etc...

I'd agree with you, if it wasn't for the fact that you started talking about changing where Gems spawn in order to make it more likely that there would be a good position for your civ to claim.

I might even agree with it making no sense that Gems spawn only in Jungle, but that is an entirely separate issue.

And Hippus having an affinity for Horse does not support your argument.

*if* there is a Gems bonus near the edge of the jungle and near an otherwise acceptable start, then that spot will be preferred.

From my limited understanding, that is the way it works. All you'd have to do is increase the value of Gems until it balances the amount of Jungle you are prepared to accept.
 
Is there a possibility for a unit with a promotion or something similar to not gain any XP or any Promotion ?
 
Is there a possibility for a unit with a promotion or something similar to not gain any XP or any Promotion ?

There is an iExperiencePercent tag in promotions that you can set to a negative number. Like -100. That might still allow for XP gain if they get a bonus to XP gain, but should otherwise be sufficient.

I'm not sure how it works for Golems, because they don't seem to use the iExperiencePercent tag, at least not as far as I can tell.
 
Aside from my question on the text files, I have another one.
What is the <tier> tag for?

I mean, what does it do? I know there are 4 tiers of units etc. but why? Is there any reason behind it?
 
I am getting a funny error when loading my Underground module. I get an error when loading my Underground_CIV4SpellInfos.xml file referring to a promotion I added called PROMOTION_GROUND_SHIFTER. Now I have checked the Underground_CIV4PromotionInfos.xml file as thoroughly as I can and can't see any problem with the coding of that promotion, or the one before it. Furthermore, I don't get any error messages about that file when it loads, or any messages about any of the other promotions included in the file. Which are referred to in other places. Any ideas on what might cause this issue?
 
I am getting a funny error when loading my Underground module. I get an error when loading my Underground_CIV4SpellInfos.xml file referring to a promotion I added called PROMOTION_GROUND_SHIFTER. Now I have checked the Underground_CIV4PromotionInfos.xml file as thoroughly as I can and can't see any problem with the coding of that promotion, or the one before it. Furthermore, I don't get any error messages about that file when it loads, or any messages about any of the other promotions included in the file. Which are referred to in other places. Any ideas on what might cause this issue?

Maybe upload both files so we can take a look?
 
Actually, I am an idiot, but it was a hard problem to find since there was no clear way to see it. I accidentally named the module file Underground_CIV4PromotionsInfos.xml (notice the extra s? I didn't) Ugh, any way, small fix and everything is working in the xml, now just checking the python.
 
I guess I will just merge the text back into one file. It ain't as ordered and neat as it should be but at least it will work.
 
Is there a reason why no routes or features can be placed on peaks? It is REALLY annoying and means my module is on the rock until I can find a work around. I can't even worldbuilder them in. Everything else in the module is working so far.
 
Aside from my question on the text files, I have another one.
What is the <tier> tag for?

I mean, what does it do? I know there are 4 tiers of units etc. but why? Is there any reason behind it?

For one thing, there are some "PrereqTier" tags available. I don't know if they serve any game purpose other than being available as requirements for other things.
 
Aside from my question on the text files, I have another one.
What is the <tier> tag for?

I mean, what does it do? I know there are 4 tiers of units etc. but why? Is there any reason behind it?

IIRC, it is used in some AI calculations. It can also be used as the prereq of a promotion (see: Unready_Block for Tya's trait).

Is there a reason why no routes or features can be placed on peaks? It is REALLY annoying and means my module is on the rock until I can find a work around. I can't even worldbuilder them in. Everything else in the module is working so far.

Because the Mountaineer modcomp only added the ability for Improvements and Bonuses, apparently. I'll see what I can do.
 
Because the Mountaineer modcomp only added the ability for Improvements and Bonuses, apparently. I'll see what I can do.

Much appreciated. I would be willing to give it a go myself, if you would promise to merge my changes. But I really don't want to have to maintain a completely compatible non-modular mod.

And of course, I may need some help in knowing where to look to make some changes.

ps. Do you know how to edit the RifE mapscripts? I.E - would you know how to add the capability for the option that places kelp, reefs, etc to place tunnels and destroyed tunnels on tiles as well? I gave it a look, but I get completely lost looking at that mapscript.
 
I have added a terrain where some Bonuses can be, in BonusInfos

Code:
		<BonusInfo>		<!-- Copper -->
			<Type>BONUS_COPPER</Type>
			<TerrainBooleans>
				<TerrainBoolean>
					<TerrainType>TERRAIN_PEAK</TerrainType>
					<bTerrain>1</bTerrain>
				</TerrainBoolean>
			</TerrainBooleans>
		</BonusInfo>

it didn't work :confused: which (second) file I have to change?
 
Swinkscalibur, were you to implement the code I'd merge it, so long as it's done well. :lol: Which it should be, just a clone of existing tags to new files.

And I'm not sure about the maps.


I have added a terrain where some Bonuses can be, in BonusInfos

Code:
		<BonusInfo>		<!-- Copper -->
			<Type>BONUS_COPPER</Type>
			<TerrainBooleans>
				<TerrainBoolean>
					<TerrainType>TERRAIN_PEAK</TerrainType>
					<bTerrain>1</bTerrain>
				</TerrainBoolean>
			</TerrainBooleans>
		</BonusInfo>

it didn't work :confused: which (second) file I have to change?

Peaks are not terrains. They are heights. A mountain can be a Grassland Peak, a Plains Peak, a Desert Peak... You just don't see the underlying terrain type.

To set a resource to show on peaks, use the <bPeaks> tag, works the same way as bHills and bFlatlands.

Please note: The resource will show on top of the mountain. May not look the best. :p
 
Is it possible that the PrereqUnitClassNOTOnTile tag for promotions doesn't work? I've got a unit called the Warp Beast. Warp Beasts start with the Untamed promotion. The Untamed promotion blocks/overwrites Tame, is bMustMaintain, bNoXP, and bAutoAcquire. It requires UNIT_WARP_BEAST, and it has (EDIT: I realized I wrote the tag wrong in this post and someone might have thought that was the reason it didn't work. The actual tag is: <PrereqUnitClassesNOTOnTile> <UnitClassType>UNITCLASS_BEASTMASTER</UnitClassType> </PrereqUnitClassesNOTOnTile>). It gives the unit a 5% chance to turn Barbarian (I'm going to have to reduce to 2% - 5% is way too high).

The auto-generated help text says what I would expect (automatically granted if requirements are met, removed if requirements are no longer met, requires Beastmaster not on tile). However, when a Beastmaster moves onto the tile, the promotion is not lost. Neither is it lost the next turn. And after hitting end turn a few times, one of them goes barbarian and attacks the Beastmaster. Luckily, they're half his strength and lose, but that's not how it's supposed to work...

Maybe it's because the unit gets Untamed as a free promotion? Are free promotions exempt from being removed by bMustMaintain? That's the next thing I'll check. And after that, the next thing I'll try is a separate promotion that's autoAcquired when there's a Beastmaster in the stack and blocks/overwrites Untamed (which reminds me - when using Clerics with the Bannor, often times the March (Cleric) promo would show for me to click on and choose (like a free promotion that's not autoacquired... like the boat crews) instead of just being automatically applied... so maybe the unitontile prereq is broken too???).
 
Is it possible that the PrereqUnitClassNOTOnTile tag for promotions doesn't work?
Probably. There were problems with PrereqPromotionsNOTOnTile, though they might have been fixed by now. You could try PrereqUnitTypesNOTOnTile and list all Beastmaster units. I know from experience that tag works.
when using Clerics with the Bannor, often times the March (Cleric) promo would show for me to click on and choose (like a free promotion that's not autoacquired... like the boat crews) instead of just being automatically applied...
That's just a timing issue, each unit moves independently and the autopromotion happens when they move. Units that move to the tile before the Cleric don't see a Cleric there and thus lose the promotion; when the Cleric moves there they are not updated. Xienwolf said something about fixing that at the expense of being able to promote when you have enough experience; but then Fall Further went into limbo.
 
Top Bottom