Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization

Notices

Reply
 
Thread Tools
Old Jun 26, 2006, 05:16 AM   #1
jenks
Prince
 
jenks's Avatar
 
Join Date: Jan 2006
Location: Yorkshire, UK
Posts: 493
Images: 2
Q: Making a new tech tree: problems with prerequisites

- Ive made new technologies for Era I Roanoke in
CIV4TechInfos.xml , basically by copying and pasting code from vanilla techs and changing the name.

- I spaced them where i want them on the F6 science screen using <iGridX> and <iGridY> (they look nice )
- changed the icons for the techs
- changed their cost to scale upwards
- put them all in the ancient era
- changed all references to match them in other files (buildings, units, improvements etc.)
- assigned text keys in CIV4GameTextInfos_Tech.xml to read the tech names and pedia data

But I cant seem to get the prerequisites to work right or at all, ive tried using both the And and the OR but neither work. Does the AI need weighting for this to work? Is this what <iAsset> and <iPower> are for?

None of my techs are currently linked, and this lump of code ive been playing with (for my Science 1 tech, should require Energy 1) seems to get a completely different result to what is intended. Using the Or function it makes a line appear on the science screen and shows (the later and not related) Military 2 tech to require Energy 1, though there are no prerequisites declared in that tech. Using the And appears to do the same, only doesnt draw a line.

Code:
		<TechInfo>
			<Type>TECH_SCIENCE_1</Type>
			<Description>TXT_KEY_TECH_SCIENCE_1</Description>
			<Civilopedia>TXT_KEY_TECH_SCIENCE_1_PEDIA</Civilopedia>
			<Help/>
			<Strategy>TXT_KEY_TECH_SCIENCE_1_STRATEGY</Strategy>
			<Advisor>ADVISOR_SCIENCE</Advisor>
			<iAIWeight>0</iAIWeight>
			<iAITradeModifier>0</iAITradeModifier>
			<iCost>100</iCost>
			<Era>ERA_ANCIENT</Era>
			<FirstFreeUnitClass>NONE</FirstFreeUnitClass>
			<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
			<iTradeRoutes>0</iTradeRoutes>
			<iHealth>0</iHealth>
			<iHappiness>0</iHappiness>
			<iFirstFreeTechs>1</iFirstFreeTechs>
			<iAsset>6</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>
			<bBridgeBuilding>0</bBridgeBuilding>
			<bIrrigation>0</bIrrigation>
			<bIgnoreIrrigation>0</bIgnoreIrrigation>
			<bWaterWork>0</bWaterWork>
			<iGridX>2</iGridX>
			<iGridY>2</iGridY>
			<DomainExtraMoves/>
			<CommerceFlexible/>
			<TerrainTrades/>
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_SCIENCE</FlavorType>
					<iFlavor>10</iFlavor>
				</Flavor>
			</Flavors>
			<OrPreReqs>
				<PrereqTech>TECH_ENERGY_1</PrereqTech>
			</OrPreReqs>
			<AndPreReqs/>
			<Quote>TXT_KEY_TECH_SCIENCE_1_QUOTE</Quote>
			<Sound/>
			<SoundMP/>
			<Button>,Art/Interface/Buttons/TechTree/Networks.dds</Button>
		</TechInfo>
Anyone have any idea what is going on ?
__________________
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Age of Discovery II Now including Land of our Fathers LooF: An historical mod of the Founding Fathers of Civilization IV: Colonization

Last edited by jenks; Jun 26, 2006 at 05:26 AM.
jenks is offline   Reply With Quote
Old Jun 26, 2006, 05:18 AM   #2
jenks
Prince
 
jenks's Avatar
 
Join Date: Jan 2006
Location: Yorkshire, UK
Posts: 493
Images: 2
here is the code for the Energy 1 tech if its any use

Could it also be to do with flavours? Do they have to link somehow?

I get a clean no errors when loading the mod ...

here is the code for the Energy 1 tech i made, from the same CIV4TechInfos.xml file:

Code:
		<TechInfo>
			<Type>TECH_ENERGY_1</Type>
			<Description>TXT_KEY_TECH_ENERGY_1</Description>
			<Civilopedia>TXT_KEY_TECH_ENERGY_1_PEDIA</Civilopedia>
			<Help/>
			<Strategy>TXT_KEY_TECH_ENERGY_1_STRATEGY</Strategy>
			<Advisor>ADVISOR_ECONOMY</Advisor>
			<iAIWeight>0</iAIWeight>
			<iAITradeModifier>0</iAITradeModifier>
			<iCost>50</iCost>
			<Era>ERA_ANCIENT</Era>
			<FirstFreeUnitClass>NONE</FirstFreeUnitClass>
			<iWorkerSpeedModifier>0</iWorkerSpeedModifier>
			<iTradeRoutes>0</iTradeRoutes>
			<iHealth>0</iHealth>
			<iHappiness>0</iHappiness>
			<iFirstFreeTechs>0</iFirstFreeTechs>
			<iAsset>8</iAsset>
			<iPower>4</iPower>
			<bRepeat>0</bRepeat>
			<bTrade>1</bTrade>
			<bDisable>0</bDisable>
			<bGoodyTech>1</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>
			<bBridgeBuilding>0</bBridgeBuilding>
			<bIrrigation>0</bIrrigation>
			<bIgnoreIrrigation>0</bIgnoreIrrigation>
			<bWaterWork>0</bWaterWork>
			<iGridX>1</iGridX>
			<iGridY>1</iGridY>
			<DomainExtraMoves/>
			<CommerceFlexible/>
			<TerrainTrades/>
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_MILITARY</FlavorType>
					<iFlavor>4</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_GOLD</FlavorType>
					<iFlavor>6</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_SCIENCE</FlavorType>
					<iFlavor>8</iFlavor>
				</Flavor>
			</Flavors>
			<OrPreReqs/>
			<AndPreReqs/>
			<Quote>TXT_KEY_TECH_ENERGY_1_QUOTE</Quote>
			<Sound/>
			<SoundMP/>
			<Button>,Art/Interface/Buttons/TechTree/AppliedPhysics.dds</Button>
		</TechInfo>
I have also tried making prerequisites work with other techs

e.g. I tried to make TECH_IMPROVE_2 require TECH_PRODUCTION_1, and this made my TECH_PRODUCTION_1 lead to TECH_EXPLORE_3.

Its all a bit back to front ! Cheers for any help you can give!
__________________
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Age of Discovery II Now including Land of our Fathers LooF: An historical mod of the Founding Fathers of Civilization IV: Colonization

Last edited by jenks; Jun 26, 2006 at 05:40 AM.
jenks is offline   Reply With Quote
Old Jun 26, 2006, 09:08 AM   #3
jenks
Prince
 
jenks's Avatar
 
Join Date: Jan 2006
Location: Yorkshire, UK
Posts: 493
Images: 2
there seems to be an issue with place in the file

There seems to be an issue with where the technology appears in the CIV4TechInfos.xml file ...

Im currently having a fiddle with this to see what moving the techs about does.

[edit: not a lot, more and different results but still not what im expecting ]
__________________
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Age of Discovery II Now including Land of our Fathers LooF: An historical mod of the Founding Fathers of Civilization IV: Colonization

Last edited by jenks; Jun 26, 2006 at 09:16 AM.
jenks is offline   Reply With Quote
Old Jun 26, 2006, 10:28 AM   #4
Padmewan
King
 
Padmewan's Avatar
 
Join Date: Nov 2003
Location: Planet
Posts: 748
Can't tell if you'd resolved this problem or not, but here are some pointers:

1. The OR techs give you the arrow links; the AND techs give you the little upper-right-hand icon. Using all ANDs will give you no links. But it looks like you took care of that.

2. I read somewhere (and followed, so therefore can't know if it is crucial or not) that to get the techs to link properly, you need to put them in the right order in the XML. The right order is:

(a) Beginning tech
(b) First tech to require (a) as a prereq
(c) First tech to require (b) as a prereq
(d) First tech to require (c) as a prereq
...
(e) ... until the end of the tree
(f) Go back to the last "fork" in the tree. Let's pretend that's at (c), which would mean Second tech to require (c) as a prereq
(g) ... until the end of the tree
(h) Do all the OTHER siblings of (d) and (f)
(i) Repeat (f)-(h), moving up the tree until you're back at (a)
(j) Do the next major "trunk" of the tree.

I don't recall how AND techs are handled in this case.

Deconstructing the default Civ4 tech tree would answer this question...
__________________
Planet Roanoke : a SMAC tribute and remix (Sci-Fi Mod)
In the early years of human interstellar colonization, accidents are bound to happen. But is the crash-landing of Mayflower II really an accident?
Padmewan is offline   Reply With Quote
Old Jun 26, 2006, 11:02 AM   #5
Rabbit, White
aka 2late2die
 
Rabbit, White's Avatar
 
Join Date: Dec 2005
Location: Toronto
Posts: 1,836
Quote:
Originally Posted by Padmewan
Can't tell if you'd resolved this problem or not, but here are some pointers:

1. The OR techs give you the arrow links; the AND techs give you the little upper-right-hand icon. Using all ANDs will give you no links. But it looks like you took care of that.

2. I read somewhere (and followed, so therefore can't know if it is crucial or not) that to get the techs to link properly, you need to put them in the right order in the XML. The right order is:

(a) Beginning tech
(b) First tech to require (a) as a prereq
(c) First tech to require (b) as a prereq
(d) First tech to require (c) as a prereq
...
(e) ... until the end of the tree
(f) Go back to the last "fork" in the tree. Let's pretend that's at (c), which would mean Second tech to require (c) as a prereq
(g) ... until the end of the tree
(h) Do all the OTHER siblings of (d) and (f)
(i) Repeat (f)-(h), moving up the tree until you're back at (a)
(j) Do the next major "trunk" of the tree.

I don't recall how AND techs are handled in this case.

Deconstructing the default Civ4 tech tree would answer this question...
Is this order 100%? 'Cause when I was messing with techs I eventually figured out how to properly put the ones I had but I never understood the actual pattern.
__________________
The presence of those seeking the truth is infinitely to be preferred to those who think they've found it.
-- From Monstrous Regiment by Terry Pratchett


My Units Library thread - Last updated on July 15, 2006 - How to add units, a guide.

TUTORIALS > Exporting models from 3DS MAX into Civ IV > NIF Viewer Tutorial - Part 1 > Part 2 > Part 3
MISC. GRAPHICS > Spells Promotions > Tech Icons > WH40K Tech Icons > Great Generals' Portraits > GuildWars based buttons > New Wonders
Rabbit, White is offline   Reply With Quote
Old Jun 26, 2006, 12:09 PM   #6
Padmewan
King
 
Padmewan's Avatar
 
Join Date: Nov 2003
Location: Planet
Posts: 748
I dunno how accurate what I posted is, but I figured Firaxis had done its ordering for whatever reason.

I also found that you can put two techs in the same X,Y location and the later one (I think) will be on top. Maybe have that backwards. But you can do this (and if the BG was opaque maybe that would be how you "hide" techs).
__________________
Planet Roanoke : a SMAC tribute and remix (Sci-Fi Mod)
In the early years of human interstellar colonization, accidents are bound to happen. But is the crash-landing of Mayflower II really an accident?
Padmewan is offline   Reply With Quote
Old Jun 26, 2006, 02:07 PM   #7
jenks
Prince
 
jenks's Avatar
 
Join Date: Jan 2006
Location: Yorkshire, UK
Posts: 493
Images: 2
Yeah thats pretty much it

I found a similar post from great apple saying the same thing

Post #19

http://forums.civfanatics.com/showthread.php?t=141621

got it working now !
Thanks for the help
__________________
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Age of Discovery II Now including Land of our Fathers LooF: An historical mod of the Founding Fathers of Civilization IV: Colonization
jenks is offline   Reply With Quote
Old Jun 27, 2006, 07:22 AM   #8
woodelf
Bard
 
woodelf's Avatar
 
Join Date: Jun 2003
Location: Gallery
Posts: 15,001
My poor original tech tree...gone.

Good riddance I guess.
woodelf is offline   Reply With Quote
Old Jun 27, 2006, 09:20 AM   #9
jenks
Prince
 
jenks's Avatar
 
Join Date: Jan 2006
Location: Yorkshire, UK
Posts: 493
Images: 2
aww.... hehe

Quote:
Originally Posted by woodelf
My poor original tech tree...gone.
... yet it lives on in the hearts of us all ...
__________________
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Age of Discovery II Now including Land of our Fathers LooF: An historical mod of the Founding Fathers of Civilization IV: Colonization
jenks is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Q: Making a new tech tree: problems with prerequisites

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need tutorial for tech tree making Camulodunum Civ3 - Creation & Customization 3 Jan 02, 2009 01:20 AM
Making a tech tree King Flevance Civ4 - Creation & Customization 2 Jan 16, 2007 04:08 PM
What is the BEST tool/utility for making customized tech tree for C3C Sharon Civ3 - Creation & Customization 5 Feb 12, 2006 06:50 PM
Tech tree dies after making rules changes cody Civ3 - Creation & Customization 8 Dec 06, 2005 12:00 PM
Making a new tech tree the mormegil Civ3 - Creation & Customization 6 Feb 07, 2004 01:35 PM


Advertisement

All times are GMT -6. The time now is 05:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR