1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

WoC Dependancy Question

Discussion in 'Civ4 - World of Civilization' started by Afforess, Oct 28, 2009.

  1. Afforess

    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?
     
  2. rockinroger

    rockinroger WoC Team Member

    Joined:
    Feb 6, 2006
    Messages:
    1,312
    Location:
    Overland Park, Kansas
    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.
     
  3. rockinroger

    rockinroger WoC Team Member

    Joined:
    Feb 6, 2006
    Messages:
    1,312
    Location:
    Overland Park, Kansas
    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.
     
  4. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    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?

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


    My mod is really just a modmod, for RoM.
     
  5. rockinroger

    rockinroger WoC Team Member

    Joined:
    Feb 6, 2006
    Messages:
    1,312
    Location:
    Overland Park, Kansas
    Is it possible to rar or zip the files and let me take a look at them?
     
  6. rockinroger

    rockinroger WoC Team Member

    Joined:
    Feb 6, 2006
    Messages:
    1,312
    Location:
    Overland Park, Kansas
    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.
     
  7. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    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.
     
  8. rockinroger

    rockinroger WoC Team Member

    Joined:
    Feb 6, 2006
    Messages:
    1,312
    Location:
    Overland Park, Kansas
    I think you might of uploaded the wrong files. I have meterology, and dancing hoskuld in that zip? Is that correct or am I that blind?
     
  9. rockinroger

    rockinroger WoC Team Member

    Joined:
    Feb 6, 2006
    Messages:
    1,312
    Location:
    Overland Park, Kansas
    Very nice bushido promotion buttons by the way.
     
  10. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    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...
     
  11. rockinroger

    rockinroger WoC Team Member

    Joined:
    Feb 6, 2006
    Messages:
    1,312
    Location:
    Overland Park, Kansas
    IS all this in your beta 1.48? i just downloaded it and maybe see whats up that way.
     
  12. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    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.
     

Share This Page