The first step in creating my near future mod has been to try and de-mystify for myself the elements of the techs and the tech tree. To that end Ive been trying to break down what each element of a tech does exactly. Below I have the example tech of Mysticism. Im going to try and break it down and generalize it, my comments are in blue.
Comments questions and corrections are welcome.
<Type>TECH_MYSTICISM</Type> Should be self explanatory
<Description>TXT_KEY_TECH_MYSTICISM</Description>
<Civilopedia>TXT_KEY_TECH_MYSTICISM_PEDIA</Civilopedia>
<Help/> I believe this points at the Civpedea Entry for this tech
<Strategy>TXT_KEY_TECH_MYSTICISM_STRATEGY</Strategy> No Idea
<Advisor>ADVISOR_RELIGION</Advisor> Obviously something to do with the advisor but unclear at this time.
<iAIWeight>0</iAIWeight> Not sure what it does, however it can be set to any integer and for every single tech in the basic game, its set to 0.
<iAITradeModifier>0</iAITradeModifier> For every tech in the basic game this is set to either 0 or 10 (although it could be set to any integer). A couple of examples of where its set to 10 are Feudalism, Guilds, Military Tradition, and Ecology. My first guess is that the AI wants more for these techs to trade them to you and/or will pay more to get them (10% perhaps?) just speculation at this point.
<iCost>50</iCost> This is the strait cost to research the tech this is the base cost and will be modified by epic games short games ect.
<Era>ERA_ANCIENT</Era> This says what Era the tech is in, the effect is the looks of your cities, workers ect. For example if you put Era_Modern on the 3rd tech in the tree and then researched it you would get the You have entered the Modern Era popup screen and the looks of your workers and cities would change to the Modern.
<FirstFreeUnitClass>NONE</FirstFreeUnitClass> This will definity give the first person to research this tech a great person. If you wanted a Great artist for example you would put UNITCLASS_Artist or UNITCLASS_Merchant for a great merchant. Although I dont see it in any existing techs I dont see why you wouldnt be able to add a normal unit here and not just a great person.
<iWorkerSpeedModifier>0</iWorkerSpeedModifier> The only tech that currently uses this is steam power which makes workers build improvements 50% faster and the modifier is set to 50, so it follows that a 100 would make workers 100% faster ect. It is unclear if and how these modifiers would stack at this time. It will also take any integer.
<iTradeRoutes>0</iTradeRoutes> This will also take any integer its currently used in Currency and it Corporation. Set at 1 it increases that number of trade routes in all cities by one. Conceivably it could be set to anything, not sure if the game caps the number of trade routes somewhere else however and they would probably not appear in the city screen
<iHealth>0</iHealth> This integer will increase the health in all of your cites by that number once this tech is researched. Currently only used in Genetics (3), and Future tech (1)
<iHappiness>0</iHappiness> This will increase happiness in all of your cities by whatever number is in there. Currently only used by Future Tech (1).
<iFirstFreeTechs>0</iFirstFreeTechs> Currently only used in Liberalism (1), give the first person to research it a new tech. Presumably if you put a 2 in here you would get 2 free tech ect ect.
<iAsset>8</iAsset> This number seems to range from 8 to 48 in intervals of 8 (although you could put any number in there). I have no idea what it does but I would guess it has something to do with scoring, late era tech seem to be closer to the 48 range and earlier era techs closer to the 8 area.
<iPower>0</iPower> Again Im not really sure what this number does, it ranges from 0 to 12 in intervals of 2. Examples Sailing (2), Wheel (4), Guilds (8), Horseback Riding (10), Gunpowder (12).
<bRepeat>0</bRepeat> This is either 0 or 1. 0 means you can only research it once, 1 means you can research this tech multiple times and gain the benefits multiple times, ala future tech.
<bTrade>1</bTrade> This is either 0 or 1. 0 means that you cannot trade this tech, 1 means that you can. Only Future Tech is set to 0.
<bDisable>0</bDisable> This can be set to 0 or 1, currently every tech is set to 0. At 1 no one can research the tech but it can still be on the tech tree and triggered somehow like in the North Africa mod (which does have some techs set to 1).
<bGoodyTech>1</bGoodyTech> Can be set to 0 or 1. I have no idea what this does, most techs have it set to 0 but there are more than a few that have it set to 1 for example Mysticism, Priesthood, Monarchy and Drama. I would wager a GUESS that if this is set to 1 its possible to get this tech from a goody hut and its impossible to get the tech from a goody hut if set to 0.
<bExtraWaterSeeFrom>0</bExtraWaterSeeFrom> This can be set to 0 or 1, the only tech with it currently set at 1 is optics (which grants +1 sight across water) so setting this at 1 will of course give you +1 sight across water, its unclear at this point if you had multiple techs that granted +1 sight if they would stack.
<bMapCentering>0</bMapCentering> Can be set to 0 or 1. 0 does nothing, if it is set to 1 it centers your world map when you research it ala calendar.
<bMapVisible>0</bMapVisible> Set at 0 or 1. A 0 does nothing, a 1 reveals the world map ala satellites.
<bMapTrading>0</bMapTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to start trading maps ala Paper.
<bTechTrading>0</bTechTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to start trading technology ala Alphabet.
<bGoldTrading>0</bGoldTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to start trading gold ala Currency.
<bOpenBordersTrading>0</bOpenBordersTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to negotiate open borders ala Writing.
<bDefensivePactTrading>0</bDefensivePactTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to negotiate Defensive Pacts ala Military Tradition.
<bPermanentAllianceTrading>0</bPermanentAllianceTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to negotiate Permanent Alliances ala Fascism
.
<bBridgeBuilding>0</bBridgeBuilding> Set at 0 or 1. A 0 does nothing, a 1 allows you to build bridges ala Construction.
<bIrrigation>0</bIrrigation> Set at 0 or 1. A 0 does nothing, a 1 allows spread irrigation ala civil service.
<bIgnoreIrrigation>0</bIgnoreIrrigation> Set at 0 or 1. A 0 does nothing, a 1 allows spread create farms without irrigation ala Biology.
<bWaterWork>0</bWaterWork> Set at 0 or 1. A 0 does nothing, a 1 allows you to work water tiles ala Fishing.
<iGridX>1</iGridX> Grid coordinates where the tech shows up
<iGridY>11</iGridY> Grid coordinates where the tech shows up
<DomainExtraMoves/> Dont know what this does, couldnt find a tech that used it.
<CommerceFlexible/> This in and of itself just seems to be a placeholder, in order to make it do anything you would have to add code that looks like this example used in Drama which enables the culture slider.
<CommerceFlexible>
<bFlexible>0</bFlexible>
<bFlexible>0</bFlexible>
<bFlexible>1</bFlexible>
</CommerceFlexible>
I presume the first to Flexible represent Commerce and Science but since you can always slide these Im not sure what adding a 1 in either of those places for a technology would do.
<TerrainTrades/> This also needs some additional code to make it work, what it does is allow trading over terrain types that you normally wouldnt be able to trade over. Here is the example from Sailing which allows trading on the coast.
<TerrainTrades>
<TerrainTrade>
<TerrainType>TERRAIN_COAST</TerrainType>
<bTerrainTrade>1</bTerrainTrade>
</TerrainTrade>
</TerrainTrades>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_RELIGION</FlavorType>
<iFlavor>9</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_GOLD</FlavorType>
<iFlavor>1</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_CULTURE</FlavorType>
<iFlavor>8</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_GROWTH</FlavorType>
<iFlavor>2</iFlavor>
</Flavor>
</Flavors>
Im pretty sure all of the above is to help the AI decide what it wants to research next depending on if it wants growth or religion ect.
<OrPreReqs/>
<AndPreReqs/>
Above is where you add your pre-requisites to research a particular tech. Techs under the OrPreReqs heading means you need at least one of those techs. Techs under the and means you must have all of those techs to research this new one. For example.
<OrPreReqs>
<PrereqTech>TECH_RIFLING</PrereqTech>
<PrereqTech>TECH_ARCHERY</PrereqTech>
</OrPreReqs>
<AndPreReqs>
<PrereqTech>TECH_PHYSICS</PrereqTech>
<PrereqTech>TECH_STEEL</PrereqTech>
</AndPreReqs>
In the above example you would have to have both Physics and Steel in addition to either Rifling or Archery.
<Quote>TXT_KEY_TECH_MYSTICISM_QUOTE</Quote> This controls the quote you see in the civpedia
<Sound>AS2D_TECH_MYSTICISM</Sound> This controls the sound that plays when you research the tech.
<SoundMP>AS2D_TECH_MP_MYSTICISM</SoundMP> Again with the sound, not sure how it works exactly yet.
<Button>,Art/Interface/Buttons/TechTree/Mysticism.dds,Art/Interface/Buttons/TechTree_Atlas.dds,4,11</Button> Not really sure, obviously points to some sort of art file.
</TechInfo>
Thats all for now, look back later when I start tweaking the tech tree and will be able
Comments questions and corrections are welcome.
<Type>TECH_MYSTICISM</Type> Should be self explanatory
<Description>TXT_KEY_TECH_MYSTICISM</Description>
<Civilopedia>TXT_KEY_TECH_MYSTICISM_PEDIA</Civilopedia>
<Help/> I believe this points at the Civpedea Entry for this tech
<Strategy>TXT_KEY_TECH_MYSTICISM_STRATEGY</Strategy> No Idea
<Advisor>ADVISOR_RELIGION</Advisor> Obviously something to do with the advisor but unclear at this time.
<iAIWeight>0</iAIWeight> Not sure what it does, however it can be set to any integer and for every single tech in the basic game, its set to 0.
<iAITradeModifier>0</iAITradeModifier> For every tech in the basic game this is set to either 0 or 10 (although it could be set to any integer). A couple of examples of where its set to 10 are Feudalism, Guilds, Military Tradition, and Ecology. My first guess is that the AI wants more for these techs to trade them to you and/or will pay more to get them (10% perhaps?) just speculation at this point.
<iCost>50</iCost> This is the strait cost to research the tech this is the base cost and will be modified by epic games short games ect.
<Era>ERA_ANCIENT</Era> This says what Era the tech is in, the effect is the looks of your cities, workers ect. For example if you put Era_Modern on the 3rd tech in the tree and then researched it you would get the You have entered the Modern Era popup screen and the looks of your workers and cities would change to the Modern.
<FirstFreeUnitClass>NONE</FirstFreeUnitClass> This will definity give the first person to research this tech a great person. If you wanted a Great artist for example you would put UNITCLASS_Artist or UNITCLASS_Merchant for a great merchant. Although I dont see it in any existing techs I dont see why you wouldnt be able to add a normal unit here and not just a great person.
<iWorkerSpeedModifier>0</iWorkerSpeedModifier> The only tech that currently uses this is steam power which makes workers build improvements 50% faster and the modifier is set to 50, so it follows that a 100 would make workers 100% faster ect. It is unclear if and how these modifiers would stack at this time. It will also take any integer.
<iTradeRoutes>0</iTradeRoutes> This will also take any integer its currently used in Currency and it Corporation. Set at 1 it increases that number of trade routes in all cities by one. Conceivably it could be set to anything, not sure if the game caps the number of trade routes somewhere else however and they would probably not appear in the city screen
<iHealth>0</iHealth> This integer will increase the health in all of your cites by that number once this tech is researched. Currently only used in Genetics (3), and Future tech (1)
<iHappiness>0</iHappiness> This will increase happiness in all of your cities by whatever number is in there. Currently only used by Future Tech (1).
<iFirstFreeTechs>0</iFirstFreeTechs> Currently only used in Liberalism (1), give the first person to research it a new tech. Presumably if you put a 2 in here you would get 2 free tech ect ect.
<iAsset>8</iAsset> This number seems to range from 8 to 48 in intervals of 8 (although you could put any number in there). I have no idea what it does but I would guess it has something to do with scoring, late era tech seem to be closer to the 48 range and earlier era techs closer to the 8 area.
<iPower>0</iPower> Again Im not really sure what this number does, it ranges from 0 to 12 in intervals of 2. Examples Sailing (2), Wheel (4), Guilds (8), Horseback Riding (10), Gunpowder (12).
<bRepeat>0</bRepeat> This is either 0 or 1. 0 means you can only research it once, 1 means you can research this tech multiple times and gain the benefits multiple times, ala future tech.
<bTrade>1</bTrade> This is either 0 or 1. 0 means that you cannot trade this tech, 1 means that you can. Only Future Tech is set to 0.
<bDisable>0</bDisable> This can be set to 0 or 1, currently every tech is set to 0. At 1 no one can research the tech but it can still be on the tech tree and triggered somehow like in the North Africa mod (which does have some techs set to 1).
<bGoodyTech>1</bGoodyTech> Can be set to 0 or 1. I have no idea what this does, most techs have it set to 0 but there are more than a few that have it set to 1 for example Mysticism, Priesthood, Monarchy and Drama. I would wager a GUESS that if this is set to 1 its possible to get this tech from a goody hut and its impossible to get the tech from a goody hut if set to 0.
<bExtraWaterSeeFrom>0</bExtraWaterSeeFrom> This can be set to 0 or 1, the only tech with it currently set at 1 is optics (which grants +1 sight across water) so setting this at 1 will of course give you +1 sight across water, its unclear at this point if you had multiple techs that granted +1 sight if they would stack.
<bMapCentering>0</bMapCentering> Can be set to 0 or 1. 0 does nothing, if it is set to 1 it centers your world map when you research it ala calendar.
<bMapVisible>0</bMapVisible> Set at 0 or 1. A 0 does nothing, a 1 reveals the world map ala satellites.
<bMapTrading>0</bMapTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to start trading maps ala Paper.
<bTechTrading>0</bTechTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to start trading technology ala Alphabet.
<bGoldTrading>0</bGoldTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to start trading gold ala Currency.
<bOpenBordersTrading>0</bOpenBordersTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to negotiate open borders ala Writing.
<bDefensivePactTrading>0</bDefensivePactTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to negotiate Defensive Pacts ala Military Tradition.
<bPermanentAllianceTrading>0</bPermanentAllianceTrading> Set at 0 or 1. A 0 does nothing, a 1 allows you to negotiate Permanent Alliances ala Fascism
.
<bBridgeBuilding>0</bBridgeBuilding> Set at 0 or 1. A 0 does nothing, a 1 allows you to build bridges ala Construction.
<bIrrigation>0</bIrrigation> Set at 0 or 1. A 0 does nothing, a 1 allows spread irrigation ala civil service.
<bIgnoreIrrigation>0</bIgnoreIrrigation> Set at 0 or 1. A 0 does nothing, a 1 allows spread create farms without irrigation ala Biology.
<bWaterWork>0</bWaterWork> Set at 0 or 1. A 0 does nothing, a 1 allows you to work water tiles ala Fishing.
<iGridX>1</iGridX> Grid coordinates where the tech shows up
<iGridY>11</iGridY> Grid coordinates where the tech shows up
<DomainExtraMoves/> Dont know what this does, couldnt find a tech that used it.
<CommerceFlexible/> This in and of itself just seems to be a placeholder, in order to make it do anything you would have to add code that looks like this example used in Drama which enables the culture slider.
<CommerceFlexible>
<bFlexible>0</bFlexible>
<bFlexible>0</bFlexible>
<bFlexible>1</bFlexible>
</CommerceFlexible>
I presume the first to Flexible represent Commerce and Science but since you can always slide these Im not sure what adding a 1 in either of those places for a technology would do.
<TerrainTrades/> This also needs some additional code to make it work, what it does is allow trading over terrain types that you normally wouldnt be able to trade over. Here is the example from Sailing which allows trading on the coast.
<TerrainTrades>
<TerrainTrade>
<TerrainType>TERRAIN_COAST</TerrainType>
<bTerrainTrade>1</bTerrainTrade>
</TerrainTrade>
</TerrainTrades>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_RELIGION</FlavorType>
<iFlavor>9</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_GOLD</FlavorType>
<iFlavor>1</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_CULTURE</FlavorType>
<iFlavor>8</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_GROWTH</FlavorType>
<iFlavor>2</iFlavor>
</Flavor>
</Flavors>
Im pretty sure all of the above is to help the AI decide what it wants to research next depending on if it wants growth or religion ect.
<OrPreReqs/>
<AndPreReqs/>
Above is where you add your pre-requisites to research a particular tech. Techs under the OrPreReqs heading means you need at least one of those techs. Techs under the and means you must have all of those techs to research this new one. For example.
<OrPreReqs>
<PrereqTech>TECH_RIFLING</PrereqTech>
<PrereqTech>TECH_ARCHERY</PrereqTech>
</OrPreReqs>
<AndPreReqs>
<PrereqTech>TECH_PHYSICS</PrereqTech>
<PrereqTech>TECH_STEEL</PrereqTech>
</AndPreReqs>
In the above example you would have to have both Physics and Steel in addition to either Rifling or Archery.
<Quote>TXT_KEY_TECH_MYSTICISM_QUOTE</Quote> This controls the quote you see in the civpedia
<Sound>AS2D_TECH_MYSTICISM</Sound> This controls the sound that plays when you research the tech.
<SoundMP>AS2D_TECH_MP_MYSTICISM</SoundMP> Again with the sound, not sure how it works exactly yet.
<Button>,Art/Interface/Buttons/TechTree/Mysticism.dds,Art/Interface/Buttons/TechTree_Atlas.dds,4,11</Button> Not really sure, obviously points to some sort of art file.
</TechInfo>
Thats all for now, look back later when I start tweaking the tech tree and will be able