Help with ModModMod(ules)

Another problem I seem to have caused. The Perfect Sight promotion normally gives +50% against Illusion.

But my civilopedia now says "+50% against ???"
The ??? is blue and underlined, like it's a link. but clicking it goes nowhere

Gah, even worse. Perfect Sight seems to be ignoring it's prereqs. playing a game now, A scout was able to learn it at lv2 without having any other promotions at all.

MY promotionsinfo.xml for this module:

Spoiler :
Code:
<?xml version="1.0"?>
<!-- Formatted by Xienwolf -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Promotion Infos -->
<Civ4PromotionInfos xmlns="x-schema:archery_CIV4UnitSchema.xml">
	<PromotionInfos>
		<PromotionInfo>		<!-- Dexterous -->
			<Type>PROMOTION_DEXTEROUS</Type>
			<Description>TXT_KEY_PROMOTION_DEXTEROUS</Description>
			<bAutoAcquire>1</bAutoAcquire>
			<bNoXP>1</bNoXP>
			<iPower>4</iPower>
			<PrereqCivilizations>
				<PrereqCivilization>CIVILIZATION_LJOSALFAR</PrereqCivilization>
			</PrereqCivilizations>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<Button>Art/Interface/Buttons/Promotions/Dexterous.dds</Button>
			<iAirCombat>1</iAirCombat>
			<bValidate>1</bValidate>
			<iExtraCombatStr>1</iExtraCombatStr>
		</PromotionInfo>
		<PromotionInfo>		<!-- Perfect Sight -->
			<Type>PROMOTION_PERFECT_SIGHT</Type>
			<Description>TXT_KEY_PROMOTION_PERFECT_SIGHT</Description>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<PromotionPrereq>PROMOTION_SENTRY2</PromotionPrereq>
			<iPower>2</iPower>
			<SeeInvisible>INVISIBLE_ANIMAL,INVISIBLE_LAND</SeeInvisible>
			<iVisibilityChange>3</iVisibilityChange>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_RECON</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<Button>Art/Interface/Buttons/Promotions/PerfectSight.dds</Button>
			<PromotionCombatType>PROMOTION_ILLUSION</PromotionCombatType>
			<iPromotionCombatMod>50</iPromotionCombatMod>
		</PromotionInfo>
		<PromotionInfo>		<!-- Wall Defender -->
			<Type>PROMOTION_WALL_DEFENDER</Type>
			<Description>TXT_KEY_PROMOTION_WALL_DEFENDER</Description>
			<bAutoAcquire>1</bAutoAcquire>
			<bMustMaintain>1</bMustMaintain>
			<bNoXP>1</bNoXP>
			<iPower>2</iPower>
			<PrereqBuildingORs>
				<PrereqBuilding>BUILDING_WALLS</PrereqBuilding>
				<PrereqBuilding>BUILDING_PALISADE</PrereqBuilding>
			</PrereqBuildingORs>
			<iVisibilityChange>1</iVisibilityChange>
			<iFirstStrikesChange>1</iFirstStrikesChange>
			<iCityDefense>20</iCityDefense>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_ARCHER</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<Button>Art/Interface/Buttons/Buildings/Wall.dds</Button>
			<iAirCombat>1</iAirCombat>
		</PromotionInfo>
	</PromotionInfos>
</Civ4PromotionInfos>
 
Try to copy the whole CIV4TechInfos.xml into your module and then change the icosts you want to change.
 
Try to copy the whole CIV4TechInfos.xml into your module and then change the icosts you want to change.

That's a horrible idea, and I refuse to do it, sorry.

The point of a module, is that it changes only a few select things.
If I did what you're suggesting here, my mod would overwrite every other mod that changes techs. Farthermore, it would also automatically revert any changes to techs in future FF patches.
I do intend to release my modules as soon as I get them properly working.

There's a reason I specifically only changed those two techs.
 
You can absolutely NEVER refer to another item in the same file with a module (no prereqpromotions on promotioninfos, no bonuses against other promotions either, no prereqTechs for Technologies). In general, anything which isn't a pure number is unlikely to work properly.
 
You can absolutely NEVER refer to another item in the same file with a module (no prereqpromotions on promotioninfos, no bonuses against other promotions either, no prereqTechs for Technologies). In general, anything which isn't a pure number is unlikely to work properly.

Well that's a problem.

Would including the entry for the Illusion promotion fix this ?

Is this something you could fix in general? It seems to be a pretty nasty limitation.
Although, my Radiant Guard module doesn't seem to have an issue giving the Guardsman promotion to RGs, what's going on there ?
 
The only thing which can fix it is to include the entire XML file up to the last item which you modified. It is an error in how Firaxis set up modular loading to work, they reference by index instead of by Type when coming back through to re-read the information (instead of saying "Oh, this is Illusion, let's change Illusion's data!" They say "Oh, this is the 3rd promotion in the file, let's change the 3rd promotion ever loaded!"
 
this makes me sad

Likewise - I had originally started with Modules (as did Xien and Tarq I believe) but they just don't work well enough to do big projects (or even specific types of small project)...
 
I guess I'll scrap my Perfect Sight changes :(
Unless you're willing to roll the Visibility Range increase into main FF. It does make sense....

But what about the tech stuff?

I can't see why changing the costs of a few specific techs wouldn't work.
 
That's a horrible idea, and I refuse to do it, sorry.

The point of a module, is that it changes only a few select things.
If I did what you're suggesting here, my mod would overwrite every other mod that changes techs. Farthermore, it would also automatically revert any changes to techs in future FF patches.
I do intend to release my modules as soon as I get them properly working.

There's a reason I specifically only changed those two techs.

Yeah, it is a horrible idea, but the only one that seems to work :(
 
Problem is that it doesn't know you just changed the cost, it just knows that there is a value listed for the second or third readpass, and attempts to load them, but attempts to load them into the wrong techs and messes everything up.
 
Problem is that it doesn't know you just changed the cost, it just knows that there is a value listed for the second or third readpass, and attempts to load them, but attempts to load them into the wrong techs and messes everything up.

I don't quite understand the logic here.

Is there any way to make it work, as a module?
 
If you want to change tech XY, you have to put into your file also all technologies that are listed before tech XY in the civ4technologies file. It does work as a module, but only with this limitation.

when the program goes through your file, it doesn't say "ah, warkirby wants archery tech changed", it simply assumes you want tech nr.1 changed and the result is that agriculture is changed to archery with your module.
 
The inability to do promotion prereqs is crippling. . .. .. .. .. I hate firaxis.

Guardsman, perfect sight and formation are now all first level options for units :(

As a possible workaround, I'm thinking of adding a level prereq (instead of promotion prereq). Would this work?
 
Shhh. I don't want modmodmod competition :P

Kidding, of course.

That gives me more things to ste- I mean improve on.

But yeah, if you want to do anything remotely MAJOR, modular is kinda out.
 
Back
Top Bottom