• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Tech Tree Help

mechaerik

Tuturuu!
Joined
Oct 28, 2008
Messages
7,064
Location
Los Angeles
ARRGH!!!
Well, i was working on the MechaMod, adding in several new techs, but to my dismay, the game doesn't read them correctly. Here's an example of one of my new techs:
Code:
		<TechInfo>
			<Type>TECH_EARLY_FLIGHT</Type>
			<Description>TXT_KEY_TECH_EARLY_FLIGT</Description>
			<Civilopedia>TXT_KEY_TECH_EARLY_FLIGHT_PEDIA</Civilopedia>
			<Help/>
			<Strategy>TXT_KEY_TECH_EARLY_FLIGHT_STRATEGY</Strategy>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<iAIWeight>0</iAIWeight>
			<iAITradeModifier>10</iAITradeModifier>
			<iCost>4700</iCost>
			<iAdvancedStartCost>100</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<Era>ERA_INDUSTRIAL</Era>
			<FirstFreeUnitClass>NONE</FirstFreeUnitClass>
			<iFeatureProductionModifier>0</iFeatureProductionModifier>
			<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
			<iTradeRoutes>0</iTradeRoutes>
			<iHealth>0</iHealth>
			<iHappiness>0</iHappiness>
			<iFirstFreeTechs>0</iFirstFreeTechs>
			<iAsset>48</iAsset>
			<iPower>8</iPower>
			<bRepeat>0</bRepeat>
			<bTrade>1</bTrade>
			<bDisable>0</bDisable>
			<bGoodyTech>0</bGoodyTech>
			<bExtraWaterSeeFrom>0</bExtraWaterSeeFrom>
			<bMapCentering>0</bMapCentering>
			<bMapVisible>0</bMapVisible>
			<bMapTrading>0</bMapTrading>
			<bTechTrading>0</bTechTrading>
			<bGoldTrading>0</bGoldTrading>
			<bOpenBordersTrading>0</bOpenBordersTrading>
			<bDefensivePactTrading>0</bDefensivePactTrading>
			<bPermanentAllianceTrading>0</bPermanentAllianceTrading>
			<bVassalTrading>0</bVassalTrading>
			<bBridgeBuilding>0</bBridgeBuilding>
			<bIrrigation>0</bIrrigation>
			<bIgnoreIrrigation>0</bIgnoreIrrigation>
			<bWaterWork>0</bWaterWork>
			<iGridX>15</iGridX>
			<iGridY>1</iGridY>
			<DomainExtraMoves/>
			<CommerceFlexible/>
			<TerrainTrades/>
			<bRiverTrade>0</bRiverTrade>
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_MILITARY</FlavorType>
					<iFlavor>4</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_PRODUCTION</FlavorType>
					<iFlavor>1</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_GOLD</FlavorType>
					<iFlavor>2</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_SCIENCE</FlavorType>
					<iFlavor>7</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_GROWTH</FlavorType>
					<iFlavor>3</iFlavor>
				</Flavor>
			</Flavors>
			<OrPreReqs/>
			<AndPreReqs>
				[B]<PrereqTech>TECH_PHYSICS</PrereqTech>[/B]
				[B]<PrereqTech>TECH_ASSEMBLY_LINE</PrereqTech>[/B]
			</AndPreReqs>
			<Quote>TXT_KEY_TECH_FLIGHT_QUOTE</Quote>
			<Sound>AS2D_TECH_FLIGHT</Sound>
			<SoundMP>AS2D_TECH_MP_FLIGHT</SoundMP>
			<Button>,Art/Interface/Buttons/TechTree/Flight.dds,Art/Interface/Buttons/TechTree_Atlas.dds,4,10</Button>
		</TechInfo>
And here's the 'Pedia entry:
Spoiler :

earlyflightpedia.jpg

As you can see, although the tech does lead to flight, it does not require physics nor assembly line. This happens with all my new techs. WTH is going on?
btw- i'm modding revolutiondcm97, with inquisitions.
 
well, I do believe that the fact that it leads to flight, is defined in the TECH_FLIGHT define, not in the TECH_EARLY_FLIGHT. You should see how that is done see if there were any mistakes in your example compared to it. Could you have misspelled, renamed, or removed physics or assembly line?

other than than that, I don't see anything that looks wrong with the xml, but its been awhile since I played with techs.
 
I did not remove physics nor assembly line.
I did not include flight, but that is where the early flight pre-req is. I did not misspell anything, so i'm completely baffled.
 
How does it look in the tech tree? Have you defined the X and Y position correctly so it doesn't overlap another tech?
 
mmh, now, when you're saying this...im not sure :D.

There are 4 tags in the globalDefines, which define, how many units/tech-prereqs a tech can have, and i think, your flight is a pre-req for to many units...or so...something like this.
I would just try to set the number in the tag, i've mentionad above, higher, and look, what happens.
I'm not really sure, what the tag does, sorry :(.
 
If memory serves, that basically mean each tech can only be an AndPreReq 3 times. Perhaps physics and assembly line already lead to 3 other techs? I'm not completely sure, it hard to tell without actually looking through all the files myself.

you could change the value in the global defines and see what happens...
 
Code:
	<Define>
		<DefineName>NUM_OR_TECH_PREREQS</DefineName>
		<iDefineIntVal>4</iDefineIntVal>
	</Define>
	<Define>
		<DefineName>NUM_AND_TECH_PREREQS</DefineName>
		<iDefineIntVal>4</iDefineIntVal>
	</Define>

Using Notepad++, i counted the times each occured: 3 times, total.
 
well its been awhile since i played with techs. sorry if any info i said was wrong. I wish someone would port TheLopez's techtree mod to BTS! It was sooo simple to use... sad thing is it only works for warlords 2.08, so it would be a pain to try and use now.

I used it to create the main section of the ACW tech tree, then filled in the blanks... I never had any real problems with it.

I know for a fact its not messing up because of how many units you have assigned to it or whatever, like The J hinted at earlier. I have a couple techs in ACW mod that unlock like 20 units and it works fine (its as placeholder just for now).

I'd keep playing around with it, its probably something simple.
 
The strangest part is that it used to work before i upgraded to RevDCM97.
Afterwards, it mixed itself up.
 
Back
Top Bottom