WoC Dependancy Question

Afforess

The White Wizard
Joined
Jul 31, 2007
Messages
12,239
Location
Austin, Texas
I've been using WoC lite for some time, and I like all the extra features it brings. However, I and another modder seem to have an issue with a module and dependancy. Here goes:

I have a module that adds a new tech, "Cloud Patterns". The other modder has another new tech which wishes to have Cloud Patterns as a AndPrereq for it. Since these are different modules, I figured that the best way would be to make the tech was this way, so it checked for the dependency, and if the player had my tech in his mod, it would add the AndPrereq. Here's what I'm talking about in XML:

Code:
<TechInfo>
            <Type>TECH_GEOMANCY</Type>
            <Description>TXT_KEY_TECH_GEOMANCY</Description>
            <Civilopedia>TXT_KEY_TECH_GEOMANCY_PEDIA</Civilopedia>
            <Help/>
            <Strategy>TXT_KEY_TECH_GEOMANCY_STRATEGY</Strategy>
            <Advisor>ADVISOR_GROWTH</Advisor>
            <iAIWeight>0</iAIWeight>
            <iAITradeModifier>0</iAITradeModifier>
            <iCost>240</iCost>
            <iAdvancedStartCost>100</iAdvancedStartCost>
            <iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
            <Era>ERA_CLASSICAL</Era>
            <FirstFreeUnitClass>NONE</FirstFreeUnitClass>
            <iFeatureProductionModifier>0</iFeatureProductionModifier>
            <iWorkerSpeedModifier>0</iWorkerSpeedModifier>
            <iTradeRoutes>0</iTradeRoutes>
            <iHealth>0</iHealth>
            <iHappiness>1</iHappiness>
            <iFirstFreeTechs>0</iFirstFreeTechs>
            <iAsset>16</iAsset>
            <iPower>0</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>7</iGridX>
            <iGridY>10</iGridY>
            <DomainExtraMoves/>
            <CommerceFlexible/>
            <TerrainTrades/>
            <bRiverTrade>0</bRiverTrade>
            <Flavors>
                <Flavor>
                    <FlavorType>FLAVOR_SCIENCE</FlavorType>
                    <iFlavor>6</iFlavor>
                </Flavor>
                <Flavor>
                    <FlavorType>FLAVOR_GOLD</FlavorType>
                    <iFlavor>4</iFlavor>
                </Flavor>
                <Flavor>
                    <FlavorType>FLAVOR_GROWTH</FlavorType>
                    <iFlavor>6</iFlavor>
                </Flavor>
            </Flavors>
            <OrPreReqs/>
            <AndPreReqs>
                <PrereqTech>TECH_CALENDAR</PrereqTech>
            </AndPreReqs>
            <Quote>TXT_KEY_TECH_GEOMANCY_QUOTE</Quote>
            <Sound>AS2D_TECH_GENERIC</Sound>
            <SoundMP></SoundMP>
            <Button>Modules/DancingHoskuld/ShintoAndShamanism/Button/geomancy.dds</Button>
        </TechInfo>
        <TechInfo>
            <Type>TECH_GEOMANCY</Type>
            <AndDependencyTypes>
                <DependencyType>TECH_CLOUD_PATTERNS</DependencyType>
            </AndDependencyTypes>
            <AndPreReqs>
                <PrereqTech>TECH_CLOUD_PATTERNS</PrereqTech>
            </AndPreReqs>
        </TechInfo>

The problem is, that even with my tech, the new dependency never shows up. I even checked the dependency logs in my log folder, and it clearly shows it reading the dependency, and saying "OK!" I'm completely miffed as to why that doesn't work. Any ideas?
 
OK here goes, a couple of things to look for. One is which tech loads first. If the tech that has a and dependency loads b4 the tech it is dependent on, it wont show it. Since i do not have your mod and do not know what you have in I will be generic. There is a couple of ways to fix this. If you have a mlf in, you can effect the loading there by having the tech that is required to load first.

Secondly a trick we use is to make zzz_cloud_techinfos.xml that loads after the regular tech. Here is a boating tech example.
Spoiler :
Code:
<TechInfo>
			<Type>TECH_BOATING</Type>
			<Description>TXT_KEY_TECH_BOATING</Description>
			<Civilopedia>TXT_KEY_TECH_BOATING_PEDIA</Civilopedia>		
			<Strategy>TXT_KEY_TECH_BOATING_STRATEGY</Strategy>
			<Advisor>ADVISOR_GROWTH</Advisor>			
			<iCost>40</iCost>
			<iAdvancedStartCost>100</iAdvancedStartCost>			
			<Era>ERA_ANCIENT</Era>			
			<iAsset>8</iAsset>			
			<bTrade>1</bTrade>
			<bGoodyTech>1</bGoodyTech>			
			<iGridX>6</iGridX>
			<iGridY>2</iGridY>
			<bRiverTrade>1</bRiverTrade>
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_PRODUCTION</FlavorType>
					<iFlavor>1</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_SCIENCE</FlavorType>
					<iFlavor>3</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_CULTURE</FlavorType>
					<iFlavor>2</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_GROWTH</FlavorType>
					<iFlavor>8</iFlavor>
				</Flavor>
			</Flavors>			
			<AndPreReqs>
				<PrereqTech>TECH_FISHING</PrereqTech>
			</AndPreReqs>
			<Quote>TXT_KEY_TECH_BOATING_QUOTE</Quote>
			<Sound>AS2D_TECH_Boating</Sound>
			<Button>Art/Interface/Buttons/TechTree/boating.dds</Button>
		</TechInfo>

For the dependency i added a zz_Boating_techinfo.xml it looks like this.
Spoiler :
Code:
<TechInfo>
			<Type>TECH_BOATING</Type>
			<bTypeDependency>1</bTypeDependency>
			<AndDependencyTypes>
				<DependencyType>TECH_FISHING</DependencyType>
			</AndDependencyTypes>
			<AndPreReqs>
				<PrereqTech>TECH_FISHING</PrereqTech>
			</AndPreReqs>
		</TechInfo>

See if that helps at all.

Regard the mlf in our industrial era techs i had to load certain techs in order so the mlf looks like this
Spoiler :
Code:
<Modules>
				<Module>
					<Directory>Abolition</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Geology</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>MilitaryIndustry</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>MechanizedMining</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Social Economics</Directory>
					<bLoad>1</bLoad>
				</Module>				
				<Module>
					<Directory>ScientificMethod</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>SteamPower</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>MarketRegulation</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>PatentRight</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>MassProducedSteel</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>BreechLoadedRifle</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>MachineTools</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Textiles</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Tourism</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>ArmorPlating</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Imperialism</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Niroglycerine</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>BessemerConverter</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>MassConscription</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>OilExtraction</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>HumanRights</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Electricity</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Aeronautics</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>BarbedWire</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>RepeatingRifles</Directory>
					<bLoad>1</bLoad>
				</Module>				
				<Module>
					<Directory>Sanitation</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>FarmingMechanization</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>AllSteelHull</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Cinematograph</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>ModernPhysics</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>NavalBallistics</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>PowerProjection</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>EntertainmentIndustry</Directory>
					<bLoad>1</bLoad>
				</Module>																
				<Module>
					<Directory>LaborMovement</Directory>
					<bLoad>1</bLoad>
				</Module>
					<Module>
					<Directory>Fertilizers</Directory>
					<bLoad>1</bLoad>
				</Module>											
				<Module>
					<Directory>InfantryLogisitc</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>ModernChemistry</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Transistors</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>ArmorWarfare</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>MachineGuns</Directory>
					<bLoad>1</bLoad>
				</Module>												
				<Module>
					<Directory>MinorityRights</Directory>
					<bLoad>1</bLoad>
				</Module>				
				<Module>
					<Directory>Hydroelectricity</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Electronics</Directory>
					<bLoad>1</bLoad>
				</Module>													
				<Module>
					<Directory>Refining</Directory>
					<bLoad>1</bLoad>
				</Module>								
				<Module>
					<Directory>NuclearPhysics</Directory>
					<bLoad>1</bLoad>
				</Module>				
			</Modules>

So what if have there is about 30 new techs, and i wanted the techs that come first in the tech tree to load b4 the latter ones, So that is what i did by controlling the loading order in the mlf.
 
Basically all subfolders load alphabetically if there is no mlf, so 2 control the loading order, you can do it 2 ways. Through the MLF or through the Folders and xml names. Hope that helps. I am the process of finalizing WoC 3.19 and have working on the techs for 2 weeks now. Where is your mod at i'd like to look at it.
 
Sorry, I should have been more specific. The Tech Cloud Patterns loads BEFORE Geomancy does in the MLF file, so I don't see why that dependency doesn't work. If it hadn't worked, I shouldn't have gotten the "OK" message in the dependency logs, right?

[559119.891] AND - dependencies were ALL met for TYPE: TECH_GEOMANCY, in file: "modules\DancingHoskuld\Shinto\"
[559119.891] OK!

But the extra tech AndPreReq didn't get added...


My mod is really just a modmod, for RoM.
 
Oh try separating the second tech dependency out into a separate techinfos.xml. Then you one you want to load first leave as Geomancy_TechInfos.xml and the second one make it ZZ_Geomancy_TechInfos.xml or something similar.
 
Is it possible to rar or zip the files and let me take a look at them?

Yes. Don't expect the artwork to work or anything, but here. I didn't include anything but the main modules for which these are in.

View attachment 232595

Edit:

I just saw your latest post. I will try that.

Edit2:

Nope, that has no effect.
 
That's all you should need. Meteorology has the tech for Cloud Patterns, and DancingHoskuld has the Tech info for Geomancy.

Feel free to "use" anything in there for your own mod too...
 
IS all this in your beta 1.48? i just downloaded it and maybe see whats up that way.

Of course not. My beta8 is much larger than that. I just didn't feel like including everything, when it was just Meteorology that was having issues. (That and beta8 is like 40mb unpacked.) The DancingHoskuld folder is from another modder who wants to make the AndPreReq dependent on whether or not the player is using my stuff too.
 
Top Bottom