View Full Version : Civ 4 Guide - Creating A New Technology


BLueGreen
Nov 17, 2005, 03:39 PM
Well vie been looking through the guides and stuff; and noticed there wasn’t one for technology and since i'ie made some technologies for my own mod I thought I’d post a guide for adding technologies: P

1.> The first part of these instructions will involve setting up a mod directory for creating technologies. First of all before starting make sure you have mad a mode folder in your Civilization IV Directory.

2.> Next create the folders 'Assets' in your Mod Folder. Then in the 'assets' folder create the folder 'XML'. Next in the XML Folder create the folders 'Technologies' and 'Text'.

3.>Go to the main Civilization directory; click on Assets, then xml then Technologies. Copy the 'Civ4TechInfos.xml' file to <yourmoddirectory\assets\xml\technologies>.

4.>Go back to the main Civilization IV directory. Go into the 'Assets' Folder. Then The Xml Folder, then the text folder. Copy the files, 'CIV4GameText_Civilopedia_Techs.xml', 'CIV4GameText_Strategy.xml' and 'CIV4GameTextInfos_Objects.xml' to <yourmoddirectory\assets\xml\text>.

5.> Ok now you ready to mess with the files and add technologies without messing up your main game files. The most important file will be the 'Civ4TechInfos.xml' file as this is where all the main technology data is stored. Open this file using an xml editor such as FrontPage xml editor or notepad or whatever you use. It is important to edit your xml files as xml files and not as spreadsheets or something as they won’t save properly.

6.>Once you have opened the 'Civ4TechInfos.xml' file you will be presented with a massive list of all the technologies that are currently in the game. Each technology will start with <Techinfo> and end with </Techinfo>. This is important to remember as it differentiates where each technology starts and ends.

7.> The easiest way to add a new technology is to copy the text of an existing one. It will make things even easier if you use a technology that is similar to the one you are going to create. For example if you are going to create a military tech find an existing military tech and copy that. Simply now select a technology from its start to end and copy it; then paste it at the end of the file before the </Techinfos> line.

8.>Now simply edit the lines of actual text the technology you pasted to reflect the technology you want to create. Now we will look at what parts do what; so you can make the technology do what you want it to do.

9.> <Type>TECH_MYSTICISM</Type> Contained here is the technology name, simply edit the '_MYSTICISM' part to whatever tech name you want.

10.> For the lines <Description>TXT_KEY_TECH_MYSTICISM</Description>, <Civilopedia>TXT_KEY_TECH_MYSTICISM_PEDIA</Civilopedia> and <Strategy>TXT_KEY_TECH_MYSTICISM_STRATEGY</Strategy> you must change the actual name part of the technology to what you want as well.

11.> <iCost>50</iCost> - This is the amount of research needed to research the tech on a normal game. Change it to the new desired amount.

12.> <Era>ERA_ANCIENT</Era> - This refers to the era the technology is going to be in. Change this to either, 'ERA_ANCIENT', 'ERA_CLASSICAL', 'ERA_MEDIEVAL', 'ERA_RENAISSANCE', 'ERA_INDUSTRIAL', 'ERA_MODERN', or 'ERA_FUTURE',; depending on what era you want the technology.

13.> <iWorkerSpeedModifier>0</iWorkerSpeedModifier> The technology will improve the speed of your workers. Input a number to increase your worker speed by that amount; the amount you input will increase that amount by a percetange out of 100%.

14.> <iTradeRoutes>0</iTradeRoutes> Makes this research add additional trade routes; depending on what you change the value to.

15.> <iHealth>0</iHealth> If you want the technology to provide any health simply change the 0 to the desired amount or leave it as it is.

16.> <iHappiness>0</iHappiness> Does the technology give any bonus happiness? If so change this to the new desired amount.

17.> <iFirstFreeTechs>0</iFirstFreeTechs> Does the technology give the player any free technologies? If it does change this to the amount of free technologies they will receive.

18.> <bMapVisible>0</bMapVisible> Does this technology make the entire map visible? If it does then change the 0 to a 1.

19.> <bMapTrading>0</bMapTrading> Does this technology enable map trading between civilizations? If this is so then change the 0 to a 1.

20.> <bTechTrading>0</bTechTrading> Does this technology enable technology trading between civilizations when one civilization has the technology?

21.> <bGoldTrading>0</bGoldTrading> Does this technology enable trading of gold between civilizations? If this is so then change the 0 to a 1.

22.> <bOpenBordersTrading>0</bOpenBordersTrading> Does this technology enable civilizations to establish open borders with one another? If this is so then change the 0 to a 1.

23.> <bDefensivePactTrading>0</bDefensivePactTrading> Does this technology enable civilizations to establish a defensive pact with one another? If this is so then change the 0 to a 1.

24.> <bPermanentAllianceTrading>0</bPermanentAllianceTrading> Does this technology enable civilizations to establish a permanent alliance, which will stick for the rest of the game? If this is so then change the 0 to a 1.

25.> <bBridgeBuilding>0</bBridgeBuilding> Does this technology allow you to build bridges? If so change the 0 to a 1.

26.> <bIrrigation>0</bIrrigation> Does researching this technology provide all your irrigated land a food bonus. If it does change the 0 to the bonus each irrigated square will now provide the civilization that researched it.

27.> It is important to realise that the technology you create will now appear in the main game in the technology panel (F4). The <iGridX>1</iGridX> and <iGridY>11</iGridY> entries refer to the co-ordinates which your technology will be placed on that research map in game. If you simply leave these numbers as they are it wont affect your game at all. But it will mean your technologies will overlap technologies with the same iGridX and iGrixY co-ordinates. You should therefore go in the game and look for an appropriate place to place your technology.
If a technology is listed as say 4 grid places right and 8 grid places down on the technology map in the actual game it will be listed as: <iGridX>4</iGridX>, <iGridY>8</iGridY> in the 'Civ4TechInfos.xml' file under that technology. So find an empty place preferably to the right of a perquisite technology and write down the grid spot. Then you can go back in to your 'Civ4TechInfos.xml' file and record the new co-ordinates. This will ensure you’re in game technology tree still looks presentable and not a jumbled mess.

28.> A tip for people adding loads of technologies to the game would be to space all the technologies out by pushing each row of technologies one space apart. You can do this by changing all the technology <iGridX> co-ordinates so they are one space further than they were. For the second row of tech's it would be +1, the third row +2, the fourth row +3 etc... This will make for a nicely spread in game technology sheet in which to add new technologies.

29.> Ok back to your 'Civ4Techinfos.xml' file now; to your tech you were adding. The <Flavours> </Flavours> section; with flavour types for; religion, growth, gold, culture and military. This simply is used by the ai when choosing technologies. You can completely remove a flavor type or add a flavor to this section. The higher and lower you set the flavour values will set how related to that area of the game the particular technology is. So it is important to change this to the appropriate values for your new technology.

30.> <OrPreReqs>
<PrereqTech>TECH_MYSTICISM</PrereqTech>
</OrPreReqs>
This refers to the technology that is required to research this particular technology. If you add a further <PrereqTech></PrereqTech> line to this area; it will make for an alternative technology that if researched will also allow the technology you are making to be researched.

31.> <AndPreReqs>
<PrereqTech>TECH_MASONRY</PrereqTech>
</AndPreReqs>
If you want another technology that MUST be researched along with the technology you input as your perquisite technology. Then put the technology name here. You can also add additional techs here by adding more <PrereqTech></PrereqTech> lines; and these technologies would also have to be researched to be able to research the technology you are making.
*Note* It is important to remember that if you added one technology to the <OrPreReqs> and one to the <AndPreReqs> they must both be researched.

32.> <Quote>TXT_KEY_TECH_MONOTHEISM_QUOTE</Quote> simply refers to the quote for your technology in the quotes text. When your technology comes up in single player where Leonard Nimoy speaks it will come up with what you put for it.

33.> <Sound>AS2D_TECH_MONOTHEISM</Sound> Refers to the sound file for the technology that you hear Leonard Nimoy speak when a technology is researched. Put something here if you want a custom sound.

34.> <SoundMP>AS2D_TECH_MP_MONOTHEISM</SoundMP> same as above; except for in multiplayer.

35.> <Button>,Art/Interface/Buttons/TechTree/Monotheism.dds,
Art/Interface/Buttons/TechTree_Atlas.dds,2,11</Button> It is important that you delete the second part of this and leave just the part up to the dds like this: ,Art/Interface/Buttons/TechTree/Monotheism.dds; if you plan on creating a custom button for your technology. Otherwise you can leave it as it is.

36.> Ok you have now created the technology in the game; and you will be able to use it when you load up your mod. However it simply be named TXT_KEY_TECHNOLOGYHERE.TXT while in the game and use a default graphic. Also the tech will use a default description; strategy and another TXT_KEY_TECHNOLOGYHERE.TXT for strategy tip.

37.> If you don’t really care then you are done :P. If you want to make the technology presentable then read on.

38.> Ok you want to open your <Yourmoddir\assets\xml\text\ CIV4GameTextInfos_Objects.xml> file.

39.> In this file you can customise the actual in game name of your technology so its no longer referred as 'TXT_KEY_YOUR_TECH.TXT' in game.
Easiest thing to do is to copy an existing reference from this file and edit it for your technology. Each tech reference starts with <TEXT> and ends with </TEXT> so that and the text contained within on these entries you want to copy and then paste at the bottom of the file above the </Civ4GameText> entry.

40.>Change the <Tag>TXT_KEY_TECH_YOUR_TECH</Tag> entry to reflect the technology that you created in the 'Civ4TechInfos.xml' file.

41.>Below is the actual name of technology how you want it to be displayed within the game. Depending on which language you have the game set it will display the text you have entered for that particular language. You can name your technology for every language if you wish. A language translator for all the languages can be found at http://www.worldlingo.com/en/products_services/worldlingo_translator.html .

42.>Ok you are done with this file now so save and close it.

43.> Access the <Yourmoddir\assets\xml\text\ CIV4GameText_Civilopedia _Techs.xml> file; this file will allow you to create an in game description for your technology.

44.> Once again take an existing entry and copy it for your own use. Each entry starts with <TEXT> and ends with </TEXT> so copy this and everything between that for you new entry and paste it at the bottom of the file above the </Civ4GameText> entry.

45.> For the <Tag>TXT_KEY_TECH_YOUR_TECH_PEDIA</Tag> section change the 'YOUR_TECH' part to reflect the technology your creating.

46.> Once again you have different languages with descriptions for the technology. You can enter your tech description in the appropriate language area or all of them.

47.> Ok we are done with this file now also; you may save and close it.

48.> Access the <Yourmoddir\assets\xml\text\CIV4GameText_Strategy.x ml> file; this file will allow you to create an in game strategy description for your technology.

49.> simply repeat steps <44.46) doing exactly what you did with the 'CIV4GameText_Civilopedia_Techs.xml' file. Instead of a description put a strategy description for your technology instead; which will appear in the Sid tip's area in game.

50.> Close and save the file.

51.> Now its time to make a graphic for your technology. You will need to have unpacked your art files using 'Packbuild 2.14'. Place the program in your main civ directory and load it up. Select Unpack and select the 'Art0.fpk' file from your assets\art folder. This will unpack the games art files so you can use them.
*Note you only need to perform this step if you haven’t already unpacked your 'art0.fpk' for another reason.*

52.> Go to your Main civ directory\assets\art\interface\buttons folder and select the 'techtree' folder and copy it. Now go to your mod directory and go in to your assets folder. Create the folder 'Art' go into it. Create the folder 'Interface' go into it. Create the folder 'Buttons' go in to it. Then simply paste the techtree folder here. Now that you have all the technologies you can safely view them without damaging your original techtree image files.

53.>In order to edit/create a custom techtree button you need to be able to edit dds files. You can use paintshop pro with a dds plug-in to do this; or any other program capable of opening and saving dds images.

54.> Once you have your graphics package loaded you can browse through the technologies if you are simply looking for a technology image to duplicate and make minor changes to. When you find something appropriate open it; edit the file and alter the graphics to how you want them. Try to keep the border intact around the edge of the image.

55.> If you want to make a completely new icon then simply edit a existing one so only the border remains that you can save that as a default icon. Call it 'default.dds' or 'blank.dds' for example. Then you can create whatever image you want for your technology.

56.> When you are done editing your technology image; save the technology as the exact name you named your technology in your 'Civ4Techinfos.xml' file. You can also remove the extra dds images that you aren’t using if you wish.

57.> And that it! You should now have a fully functional technology contained with the game when you load your mod. It should be displayed in all the appropriate areas of the game; such as the civiliopedia, main tech tree and technology popup along with the image. It should blend well with the existing technologies in the game.

*******

In case your wondering if the AI will research these technologies the answer is 'Yes' they will. I hope that some people will find this guide useful; and I do realise than you can make technologies more complex using even more modifiers in the 'Civ4Techinfos.xml' file. So please post any useful hints on making cool technologies if you could.

If I’ve at all made any mistakes in my guide please tell me :P.

Feet
Nov 17, 2005, 04:50 PM
This is great. Thanks for posting up what you have discovered.

Morten Blaabjerg
Nov 17, 2005, 05:15 PM
:eek: What a lot of work, in comparison to Civ2's nice and neat, simple "Rules.txt"... Hopefully the SDK will carry an interface to make all this work a lot easier!

Thanks for posting this - it gives a fair insight into the workings of the tech tree in civ4!

Weasel Op
Nov 17, 2005, 07:01 PM
Wow. That's a very detailed guide. And one heck of a first post! :D

BLueGreen
Nov 17, 2005, 11:45 PM
Maybe I just made it look a lot of work because i tried to simplify it a lot so anyone can understand. It doesnt take that long honestly; when you get the hang of adding technologies you can do it in like 10 minutes. Although thinking of a good idea can take forever :P

Mighty Grum
Nov 18, 2005, 09:06 AM
Thank you for that excellent post!

My only suggestion would be to add some screen shots or a zip file with an example of the changes you made.

Morten Blaabjerg
Nov 18, 2005, 12:59 PM
In case your wondering if the AI will research these technologies the answer is 'Yes' they will.
Is there a way to determine what kind of value the AI will put into your techs, like in civ2, where you could value the tech with a modifier towards militarily agressive civs or more civilized civs?

MadHaTr
Nov 20, 2005, 06:44 PM
I tried doing this and was unable to get it to work. Any ideas on what I am doing wrong. I cleared my cache. I copied the files said, to My Documents\My Games\Sid Meier's Civilization 4\MODS\TechTree\xml\....(technologies, texts)

TechTree is the folder i made. I tried adding the tech TECH_ADVARCHERY here is the code. I added it to the end of the file right before </TechInfos>
I also did the research up to it to ensure i was just not seeing it in the tech window due to overlapping.

EDIT:
Okay I found the problem, I had the directory messed up a bit. I didn't relize everthing had to be in a assets folder.
I had
mods\techtree\XML\(techs and text) instead i needed it to be like so
mods\techtree\assets\XML\(techs and text)...

Thanks for the Guide :D

EDIT: I edited the entire tech file to space out all the techs when displayed. Allows for easy adding to the tech screen. as there is now extra space between them. http://www.geocities.com/darkking_69/civ4techinfos.zip

Tulkas12
Nov 21, 2005, 12:25 AM
Any idea on how to disable a tech?

Portus
Nov 26, 2005, 09:22 AM
hi
do you know how replace the colours of the teach tree. Ill apreciate

GamerXR72
Nov 28, 2005, 03:48 PM
Any idea on how to disable a tech?

Like researching a tech that disables another tech, or just removing an existing tech entirely?

If you want to disable an existing tech, just have your new tech obsolete whatever buildings the old tech enabled or have it provide opposite benefits but require that the previous tech be researched first.

If you want to remove it entirely, It is not so difficult to reverse engineer BlueGreens article to remove techs instead of adding them.

On a side note, one technology I thought would be funny is this:

Smear Campaign
requires
-democracy
benefit
-decreases war unhappiness by 25%

scoop
Dec 04, 2005, 01:55 PM
Maybe you know since you've been digging in there, but how do I...

A) Create technologies that can ONLY be researched by certain civilizations? For example, the Egyptians can only research mummification, which in turn would unlock units or buildings that only they can build as well. Can this tech also be untradeable?

B) Is it possible to create separate tech trees a la the above? So the Americans have very different technology trees than the Egyptians, but every so often they cross similar paths (i.e. pottery)?

Trying an ambitious mod, but don't know a lick about coding so any help will be appreciated.

Portus
Dec 05, 2005, 08:57 AM
hi
sameone in that thread know how to change the coloures of the teach tree. Its hard for me distinguish them. Ill apreciate.

Mason11987
Dec 09, 2005, 07:17 PM
I didn't realize how easy it would be to add one like this...

I think...I'm going to create a program that will allow you to create a mod and edit the techs any way you want and create and delete them too. It really shouldn't be that hard. Just need to take a look at the XML file for the techs when I get back and see what needs to be done. Depending on when I get bored studying for my finals I should be able to make something like this fairly quickly. Thanks for the idea :D

Alright, I set something up that can parse out the file and get some of the basic info. Now I Have to set up a UI to change that info, and then save it. Then later I can add the more advanced info from that file. So sweet, I have to finish studying for finals though, so I'll finish it probably a little before christmas, hopefully sooner.

BLueGreen
Dec 11, 2005, 08:20 PM
Hey Portus that would be really nice if you could change the colours of different era's and stuff on the tech tree.

Unfortunately, despite looking through all the different xml files I havent seen way yet to do so. If somebody can figure it out that would be great :P

Portus
Dec 12, 2005, 01:38 PM
Hey BLueGreen, in fact i have seen the modmakers of civ4WW2, here in the forum, but i dont remember where. In that mod they use red coulor in the tech tree, for sure they could heip.

The Great Apple
Dec 15, 2005, 09:01 AM
Has anybody else had trouble with the tech pre-requisites not working as advertised? I've been having some problems with crazy arrows, and wrong prerequisites, despite it being correct in the .xml file. Has anybody else had this problem?

austin316hockey
Dec 16, 2005, 05:14 PM
Any idea on how to disable a tech?

You can disable technologies for individual civs... look at this.


.
.
.
<FreeTechs>
<FreeTech> <TechType>TECH_FISHING</TechType>
<bFreeTech>1</bFreeTech>
</FreeTech>
<FreeTech>
<TechType>TECH_AGRICULTURE</TechType>
<bFreeTech>1</bFreeTech>
</FreeTech>
</FreeTechs>
<DisableTechs/>
<InitialCivics>
.
.
.


(doesn't seem to want to indent things properly)
Either/or, the notable line here is <DisableTechs/>. The only thing is, there is no sample of the syntax (exactly what tags belong in this block), although I have a feeling it's identical to the <FreeTechs> block.

On a side note, can anyone out there shed some light on that block, what the tags should actually be?

The Great Apple
Dec 19, 2005, 05:48 PM
Okies. There is an important thing to add for the first post about tech order in the list.

In CIV4TechInfos.xml the techs must be ordered in a certain manner for the techs to have correct prerequisites working. The techs must be placed in the manner of the seperate tech branches. If a tech is a prerequisite for another, the second tech must be placed directly after the first in the file. If there are several techs branching off one tech then you can do one branch at a time.

If a tech has more than one prerequisite ("and" or "or"), then it should be placed in the branch of the prerequisite that appears second in the file.

If you follow these rules, you should have no problems. I'm pretty sure they aren't cast in stone, and you can do other things... but I'm not sure what those other things are, and I see no point in finding out!

Looking at the python code I think it should be ok to have tech arrows crossing, though I'd avoid it as it can look really quite messy.

EDIT: It would also appear that it doesn't like empty lines... weeeeird!

kurt-roges
Dec 21, 2005, 07:45 AM
In case anyone is wondering, the quotes that go along with each tech are stored in CIV4GameTextInfos.xml (NOT the file that's mentioned above, which is "CIV4GameTextInfos_Objects.xml"). You can take this file from <civ4>\Assets\XML\Text and put it in <civ4>\Mods\<your mod>\Assets\XML\Text , then edit as necessary. If you add new techs to your mod but don't include this file, you'll see an ugly

"TXT_KEY_TECH_<your tech>_QUOTE"

in the Civilopedia, and probably in the little popup that gets shown when you research the tech as well.

FYI, HTH, HAND, OMGWTF, etc

- Dan

xaviel
Dec 21, 2005, 02:34 PM
After you are done editing everything in your mod folder, do you just copy your edited files from your mod folder to your original game folder?

kurt-roges
Dec 21, 2005, 05:05 PM
After you are done editing everything in your mod folder, do you just copy your edited files from your mod folder to your original game folder?

no... you don't ever (well, very rarely) need to overwrite any files in the game folder. Everything goes in the folder belonging to your mod. If Civ4 needs a file that's not in your mod's folder, it'll automatically use the standard version of that file.

CXDamian
Jan 02, 2006, 07:37 PM
The only thing is, there is no sample of the syntax (exactly what tags belong in this block), although I have a feeling it's identical to the <FreeTechs> block.

On a side note, can anyone out there shed some light on that block, what the tags should actually be?

You can look at the schema for guidelines on what to add. In this particular case it looks like it would be:



<DisableTechs>
<DisableTech>
<TechType>TECH_AGRICULTURE</TechType>
<bDisableTech>1</bDisableTech>
</DisableTech>
<DisableTech>
<TechType>TECH_MASONRY</TechType>
<bDisableTech>1</bDisableTech>
</DisableTech>
<DisableTechs>



Note: This is the CIV4CivilizationInfos.xml file, the <bDisable> line in the tech file is a boolean field (0 or 1)

kamandi
Jan 04, 2006, 07:41 AM
Excellent tutorial. My only question is can you add a new tech to a new branch and have it not show up on the tech tree. I want to create a tech, in this case TECH_TEXAS, that can be used as a prerequisite for all the civilization specific buildings I am adding for a civ. This way I can disable the default buildings I don't want to appear, and make this tech a dependency for this civilizations specific buildings. As the tech will be given to that civ for free and will not be tradable or researchable, in theory I think this would work. But I don't need it to show up on the tech tree hence my question.

Thanks

Epicurist
Jan 04, 2006, 10:19 AM
oooh..make the alamo a wonder!

kamandi
Jan 04, 2006, 01:28 PM
Epicurist oooh..make the alamo a wonder!

That's one of the Civ Specific wonders I wanted to add, going to use it to replace the Heroic Epic wonder. I even have several 3d models of it, if I can figure out how to add them.

Eugenius
Jan 11, 2006, 09:01 PM
Thanks to everyone who gave advice to me with the problem of nonsensical tech tree lines. In this case I think it was simply a matter of not enough room for the lines it needed to add and this somehow messed up the spacing. Of course it could have been something else but as soon as I spaced out the first few rows of techs at the start of the ancient era the same code worked just fine with the appropriate grid # adjustments.
I'd also like to say that I especially appreciate the time people took to write/copy/paste the code examples here. Im very happy to know that if I have more questions theres people out there willing to answer them.

Ancaria
Jan 13, 2006, 02:22 PM
27.> It is important to realise that the technology you create will now appear in the main game in the technology panel (F4). The <iGridX>1</iGridX> and <iGridY>11</iGridY> entries refer to the co-ordinates which your technology will be placed on that research map in game. If you simply leave these numbers as they are it wont affect your game at all. But it will mean your technologies will overlap technologies with the same iGridX and iGrixY co-ordinates. You should therefore go in the game and look for an appropriate place to place your technology.
If a technology is listed as say 4 grid places right and 8 grid places down on the technology map in the actual game it will be listed as: <iGridX>4</iGridX>, <iGridY>8</iGridY> in the 'Civ4TechInfos.xml' file under that technology. So find an empty place preferably to the right of a perquisite technology and write down the grid spot. Then you can go back in to your 'Civ4TechInfos.xml' file and record the new co-ordinates. This will ensure you’re in game technology tree still looks presentable and not a jumbled mess.


I've made a simple diagram for reference when adding iGridX and iGridY coordinates to your custom made tech. It contains all tech coordinates between Y1 - Y14 and X1 - X19.. Alot of empty spaces to fill with your own custom made tech.

I don't know if this will help any one but I'll attatch it anyway..

Ancaria
Jan 13, 2006, 02:48 PM
The Questions:Where do I put the techs if there is 2 that lead to one tech? Does the position of the new tech have to be the same in all of the xml files I added Lore into? The way it draws the lines, some of them actually begin BEFORE the first techs and pass behind them where you can see them because the tech boxes are slightly transparent. Is this just a syntax error? It would seem that some people have run into this problem while others were able to add techs without any difficulty. However, I dont see any mods with new techs only the same techs with altered effects.
If anyone has the same or a similar problem please, post here with your questions and perhaps we can find a solution together. If anyone has any suggestions or answers or can post a mod with a new tech added that people with this problem can have a look at it would be very much appreciated that you add to the discussion. If anyone looks at some of my ideas and likes them, please by alll means use them but I would ask that you notify me with a link here so i can check out your work.
Thank you in advance.

I'm not an expert so don't be to angry if i'm wrong.
eg.
Meditation (X2/Y10) and Polythism (X2/X12) Leads to Priesthood(X3/Y9)
So far so good.
You have a tech that you would like to come after Meditation and polythism but don't want to replace priesthood? Am i correct?
Simple. Just put <iGridX>3</iGridX> <iGridY>10<iGridY> (the numbers 1,2,3,4,5,7,8,10,12 and 13 are free to use In the X3 row(No one will ever understand what I meen cause I'm kind of lost my self) where they should be and then the put
<OrPreReqs>
<PrereqTech>TECH_MEDITATION</PrereqTech>
<PrereqTech>TECH_POLYTHEISM</PrereqTech>
</OrPreReqs>
where it should be...

If it helped in someway Im happy.. If it somehow screwed up your game I'm sorry in advance.

Eugenius
Jan 14, 2006, 09:16 AM
Problem solved please remove.~~

Exavier
Jan 14, 2006, 10:30 AM
I'm not an expert so don't be to angry if i'm wrong.
eg.
Meditation (X2/Y10) and Polythism (X2/X12) Leads to Priesthood(X3/Y9)
So far so good.
You have a tech that you would like to come after Meditation and polythism but don't want to replace priesthood? Am i correct?
Simple. Just put <iGridX>3</iGridX> <iGridY>10<iGridY> (the numbers 1,2,3,4,5,7,8,10,12 and 13 are free to use In the X3 row(No one will ever understand what I meen cause I'm kind of lost my self) where they should be and then the put
<OrPreReqs>
<PrereqTech>TECH_MEDITATION</PrereqTech>
<PrereqTech>TECH_POLYTHEISM</PrereqTech>
</OrPreReqs>
where it should be...

If it helped in someway Im happy.. If it somehow screwed up your game I'm sorry in advance.

actually that would screw it up :P

The techs take up 2 rows to display... so having a tech at (X3/Y9) and (X3/Y10) would cause the tech to display overlapping eachother in a tech tree...

I just rewrote every tech after steam power for the next update in my mod and it was rather horendus trying to get them to look right. The easiest way i found is use Excel. It makes it easy to tell whats overlapping (as long as you plan for the tech to take 2 rows).

CXDamian
Jan 14, 2006, 10:56 AM
...im getting lines all over the place on my tech tree and the game crashes when I click any tech aside from Lore. I read a few posts later about adding in the techs in the order they come in and about branches, which made sense since XML appears to me to be a linear language. ...

On a long shot, try changing the button back to a vanilla one:

<Button>,Art/Interface/Buttons/TechTree/Meditation.dds,Art/Interface/Buttons/TechTree_Atlas.dds,5,5</Button>

I'm assuming you edited meditation to:

<OrPreReqs>
<PrereqTech>TECH_LORE</PrereqTech>
</OrPreReqs>

and that all of your tags are closed properly, also might open it in notepad or wordpad(if your using an editor) and make sure there are no non-standard characters. it should look comething simular to


<TechInfo>
<Type>TECH_LORE</Type>
<Description>TXT_KEY_TECH_LORE</Description>
<Civilopedia>TXT_KEY_TECH_LORE_PEDIA</Civilopedia>
<Help/>
<Strategy>TXT_KEY_TECH_LORE_STRATEGY</Strategy>
<Advisor>ADVISOR_RELIGION</Advisor>
<iAIWeight>0</iAIWeight>
<iAITradeModifier>0</iAITradeModifier>
<iCost>80</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>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>1</iGridX>
<iGridY>9</iGridY>
<DomainExtraMoves/>
<CommerceFlexible/>
<TerrainTrades/>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_RELIGION</FlavorType>
<iFlavor>10</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_SCIENCE</FlavorType>
<iFlavor>2</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_CULTURE</FlavorType>
<iFlavor>7</iFlavor>
</Flavor>
</Flavors>
<OrPreReqs/>
<AndPreReqs/>
<Quote>TXT_KEY_TECH_LORE_QUOTE</Quote>
<Sound>AS2D_TECH_LORE</Sound>
<SoundMP>AS2D_TECH_MP_LORE</SoundMP>
<Button>,Art/Interface/Buttons/TechTree/Lore.dds</Button>
</TechInfo>



as to the lines all over the place, if everything here is right you may have to bump the other techs around the grid to make room for yours(I typically just create empty columns for new techs, bumping everything up a few).

I've haven't had a problem yet with where I place the new tech in the xml however, ymmv

Eugenius
Jan 14, 2006, 04:35 PM
~~Problem solved. Please remove.~~

thom8466
Jan 20, 2006, 10:05 AM
I've added a new Tech and got everything working but one. I like to play long games and have a problem with starvation after the cities get above level 26-30. Iwanted to add a Tech that would allow for some extra food production. So far alls I've been able to change is "spead irrigation" or "build farm without irrigation". I've looked at all that I know of about the "Biology Tech and it doesn't show anything that would help. I've also added my new tech under biology as a preregtech under bonus farms in CIV4ImprovementInfos XML. Somebody please help.

Raize
Jan 30, 2006, 08:50 PM
I'll post this here in hopes that someone else has experienced the same problem and knows how to fix it.

I've created a new tech called TECH_NOTRESEARCHABLE for my mod. I'm using it for a UNIT_NOTRESEARCHABLE in order to allow the player to build old units once new ones are available instead of having those old units obsoleted and replaced. The XML seems to check out properly, up until I get into the game and take my first turn.

I can even look at my tech tree and see it there, sandwiched between Mysticism and Polytheism. I can even highlight it. Right now it's just a copy of Mysticism with the name changed. However, as soon as I close the tech tree, the game crash-closes (no error message).

I can also not look at the tech tree, but as soon as I END-TURN, the game also crashes.

This also happened when I had the tech disabled. The tech upgrade does have the intended effect, if only it didn't crash the game on the first turn...

Anyone else run into this problem?

The Great Apple
Jan 31, 2006, 06:33 AM
Yes.

A few things to try:
1) Move the tech's position to outside the range of the normal techs - IIRC the Firaxis mods used the default tech-trees with some disabled... so it might work.

2) Edit CvTechChooser.py. Basically, you can make it so that it doesn't show disabled techs on the tech tree, no matter where they are. IMO it should be like this by default.

Raize
Jan 31, 2006, 09:24 AM
You wouldn't happen to have an already modified version of CvTechChooser.py, would you? I tried method #1 but that just introduced scrollbars into the techtree (and crashed anyway), and I have no idea where to start, Python-wise, with method #2.

The Great Apple
Jan 31, 2006, 10:17 AM
You wouldn't happen to have an already modified version of CvTechChooser.py, would you? I tried method #1 but that just introduced scrollbars into the techtree (and crashed anyway), and I have no idea where to start, Python-wise, with method #2.I'll see what I can bash together...

EDIT: Hmmm, very weird. It would seem that the code I'm using doesn't check to see if the techs are disabled or not as I thought it did. It also doesn't show disabled techs. I do have all my disabled techs at grid 0,0 - so that might be it.

EDIT2: Does the tech show if the Civ doesn't have it?

Raize
Jan 31, 2006, 02:54 PM
The tech did show, but I set the coordinates to 0,0 and it no longer appears. I still crash, though.

I'm perplexed. :confused:

Raize
Jan 31, 2006, 03:43 PM
Okay, I removed the tech entirely, but left the unit itself in with a different pre-requisite (existing) tech. The game still crashes. So I think it actually has nothing to do with the tech. Sorry.

The Great Apple
Jan 31, 2006, 03:55 PM
At least you got the tech not displaying :)

TrueAce
Jan 31, 2006, 08:25 PM
I'm new at, and I can't get the mod to work! the game starts up fine and works fine, but none of the techs are spread out, and my new tech i added (swordplay), isn't there! I have swordplay after bronze-working, and req. for iron working (so right before), and all my spacing is correct, and I don't know whats wrong. It doesn't even show up in the Civlopedia. HELP! thanks

- Ace

TrueAce
Jan 31, 2006, 08:28 PM
I'm new at this, and I can't get my new tech to work! The game starts up fine and works fine, but none of the techs are spread out(like i made it), and my new tech i added (swordplay), isn't there! I have swordplay after bronze-working, and it's req. for iron working (so right before), and all my spacing is correct, and I don't know whats wrong. It doesn't even show up in the Civlopedia. HELP! thanks
EDIT: should I have it, in the XML file, after horseback riding (since that is available to discover after bronze-working) or after, since mine is directly related to bronze-working and iron-working???
- Ace

EDIT: sorry for the double post. this post is the correct one

GrinningMonk
Feb 01, 2006, 12:44 AM
Yep, I'm having the same problem, thought I had followed this tute to the letter but perhaps I've missed something, probably justa mod newbie mistake.

Am at this moment redoing the whole thing from scratch to see if it works. If not I'm going to cry lol:lol:

TrueAce
Feb 01, 2006, 12:51 AM
let me know if you get it. it's driving me INSANE! :mad: :mad:

GrinningMonk
Feb 01, 2006, 01:02 AM
amen. bout 60% though it.

GrinningMonk
Feb 01, 2006, 01:40 AM
Well I follwed the tute exactly from start to finish again and double checked but absoloutely nothing shows up, either on the tech tree or in the civilopaedia. I played a quick game, well not really played, just clicked on the tech that should have lead to mine and clicked end turn until it was researched, but it never came up:mad: . Either I'm missing something or this tutorial is :blush: :crazyeye:

I want communism as a prereq tech, it currently does not lead to anything. Would that be a part of it?? or should that not matter.

Veru confused and starting to get discouraged.:( :( :(

TrueAce
Feb 01, 2006, 05:14 PM
Keep trying, as I will. Hopefully SOMEONE will help us.

Just curious, what is your tech you want to make?

EDIT: and no, it not leading to anything would not matter, or shouldn't.

GrinningMonk
Feb 02, 2006, 12:44 AM
see your pm mate :)

GrinningMonk
Feb 02, 2006, 01:56 AM
Well, next attempt was to change the prereq tech but still no go. And the posts here seemed to have dried up:sad: And I am no closer to this solution.

Have attached all relevant files apart form the art files, though can do that on request.

Hopefully someone is kind enough to help us:confused:

GrinningMonk
Feb 02, 2006, 01:57 AM
ph the tech is called Stalinism

snarko
Feb 02, 2006, 09:21 AM
Well, next attempt was to change the prereq tech but still no go. And the posts here seemed to have dried up:sad: And I am no closer to this solution.

Have attached all relevant files apart form the art files, though can do that on request.

Hopefully someone is kind enough to help us:confused:


I haven't edited techs but
<AndPreReqs>
<PrereqTech></PrereqTech>
</AndPreReqs>
is at the minimum unnecessary and at the most what's causing your problem. Replace it with <AndPreReqs/>

GrinningMonk
Feb 03, 2006, 07:16 AM
Well I dont really know what fixed it but it is working now lol thanks to those who helped...all 2 of you :blush: see attached pics.

Just need to fine tune it now. But just a couple more stupid questions.

How do I get rid of that TEXT_KEY_TECH_STALINISM bit in the science advisir screen(pic 2)so it just reads Stalinism like the other techs. I'm such a dumbass sometimes.:cry:

Secondly, how would I set the tech to disable something like open borders or trade routes? I would like the tech to reflect the iron curtain status of the soviet union of the time. Is there such a thing as negative modifiers in fields such as <iTradeRoutes>0</iTradeRoutes> ???

RED DIAMOND
Feb 03, 2006, 08:33 AM
Well I dont really know what fixed it but it is working now lol thanks to those who helped...all 2 of you :blush: see attached pics.

Just need to fine tune it now. But just a couple more stupid questions.

How do I get rid of that TEXT_KEY_TECH_STALINISM bit in the science advisir screen(pic 2)so it just reads Stalinism like the other techs. I'm such a dumbass sometimes.:cry:

Secondly, how would I set the tech to disable something like open borders or trade routes? I would like the tech to reflect the iron curtain status of the soviet union of the time. Is there such a thing as negative modifiers in fields such as <iTradeRoutes>0</iTradeRoutes> ???

<Type>TECH_STALINISM</Type>
<Description>Stalinism</Description>
<Civilopedia>Stalinism</Civilopedia>
<Help/>
<Strategy>Stalinism</Strategy>

Anytime you use TXT_KEY. You need an entry in the text objects file. The best thing to do is change them all in the tech as decribed and you are set.

GrinningMonk
Feb 03, 2006, 08:52 AM
Excellent, thank you. Looks much better now.

TrueAce
Feb 03, 2006, 08:30 PM
hey, GrinningMonk, how did u make that cool icon? any tips? what files did you put it in? Thanks, mate.

GrinningMonk
Feb 03, 2006, 11:22 PM
I raided a couple of sites for appropriate pics, that one coming from marxistarchive.org. I unpaked all the art files and copied the art/interface/buttons directory to my mod, including all buttons which isnt really nessessary but helped in figureing things out.

I use photoshop and for some previous game related reason had a dds plugin for it. I open an existing icon, got the relevant pixel sizes (not including the icon border) which is about 57x57. I then copied a square section of the pic i wanted, resized it to 57x57, copied again and pasted it over the original icon file and moved it into the correct position.

I then flattened the image and saved it as Stalinism.dds and put it in the <yourmod>\art\interface\buttons\technologies(??? ithink) folder and made sure the main tech xml file pointed at it and voila she worked, infact that was the easiest part of the process for me. Pm me if you need any further details.

CXDamian
Feb 05, 2006, 09:29 PM
...
Secondly, how would I set the tech to disable something like open borders or trade routes? I would like the tech to reflect the iron curtain status of the soviet union of the time. Is there such a thing as negative modifiers in fields such as <iTradeRoutes>0</iTradeRoutes> ???

IIRC iTradeRoutes is a modifier to trade routes per city, you may want to test this to see if reaching a value below 0 available routes will cause errors. 2 will add 2 routes per city, -1 should remove 1 route per city.

bOpenBordersTrading however is a boolean value(0 or 1), to disable open borders you will likely have to dig into python.

GrinningMonk
Feb 05, 2006, 10:42 PM
you may want to test this to see if reaching a value below 0 available routes will cause errors. 2 will add 2 routes per city, -1 should remove 1 route per city.


Hmmm yeah thats what i was thinking but hadnt gotten to experimenting with that yet as i wasnt really sure what a negative modifier would do to the game, so i threw the question out there.

I havent gotten to python yet, that will come later i believe once i am more comfortable with the xml bits first.

Cheers mate :)

mismatch
Feb 06, 2006, 02:42 PM
I've added five techs, X1 - X5, each Xn has Xn-1 as a prereq.
All well so far.
However, as I take a look at them in the pedia,

Xn is said to lead to Xn+2, and the opposite (Xn-2 is a prereq to Xn)
Ive checked and doublechecked for typos, but alas, none are to be found.
My first though was that it thad to do with how they were ordered in the file, but from what I understtod that only applies when dealing with multiple prereqs..
Anyways, theyre ordered:
Xn
Xn+1
....and so on.
Have I done any obvious error?

CXDamian
Feb 06, 2006, 04:23 PM
I've added five techs, X1 - X5, each Xn has Xn-1 as a prereq.
...
Xn is said to lead to Xn+2, and the opposite (Xn-2 is a prereq to Xn)
... theyre ordered:
Xn
Xn+1


Take a look at this thread (http://forums.civfanatics.com/showthread.php?t=147666&page=2&highlight=tech), scroll down to post #35. There's more to it, but basically the tech's need be listed in the file as they appear horizontally on the grid.

JavalTigar
Feb 07, 2006, 05:18 PM
So does anyone know the answers to scoops questions about untradeable techs and seperate tech trees cause this is where the search for that subject brought me.

In civ3 it was easy, you made a tech that had no pre-reg and gave it at the start of the game. then just made it a pre-reg for other ones. It never even came up on the trade list during diplomacy.

I can't seem to figure this out in cIV.

snarko
Feb 08, 2006, 03:55 AM
So does anyone know the answers to scoops questions about untradeable techs and seperate tech trees cause this is where the search for that subject brought me.

In civ3 it was easy, you made a tech that had no pre-reg and gave it at the start of the game. then just made it a pre-reg for other ones. It never even came up on the trade list during diplomacy.

I can't seem to figure this out in cIV.

<bDisable>0</bDisable>
If this is 1 the tech cannot be researched.

<bTrade>1</bTrade>
If this is 0 the tech cannot be traded.

Then just add the tech to the civ(s) that should have it. Just as easy as in civ 3! :)

JavalTigar
Feb 08, 2006, 08:57 AM
thank you, snarko. Us lords have to stick together

Nylarathotep
Feb 25, 2006, 01:25 PM
Does someone have any idea what "<bGoodyTech>0</bGoodyTech>" alters? I know on some technologies it is enabled and others it is not, but I can't seem to figure out what it does. Thanks.

GrinningMonk
Feb 25, 2006, 08:33 PM
I may be wrong but I thought I had read somewhere that it enables the tech to be found in a goody hut.

Nylarathotep
Feb 28, 2006, 06:57 PM
Ah...well, it makes sense.

Thanks, I'll test it out.

Zarg
Apr 02, 2006, 08:14 AM
i'va added 7 new technologies as starting technologies and they work fine. but now i got a strange problem.

i changed the starting technologies for all civs in the civ4civilizationsinfo file . i have the vanilla civs and the ones from sevomod. now all civs start with the 2 techs i gave them in the xml file. but the vanilla civs additionally start with the 2 techs from the original game. the ones from sevomod don't.

is there a second file where starting techs for vanilla civs can be changed or is there something in any of the python files ? or are the starting techs for vanilla civs hardcoded ?

thx for any help in advance,

zarg

jenks
Jun 26, 2006, 02:08 PM
This thread has been really helpful!

Just wanted to say thanks :)

themidgethotel
Jul 03, 2006, 11:15 AM
I can't seem to find the Art0.fpk or the techtree folder anywhere. Tried searching my hard drive, got nothing. Can anyone fill me in on where I can get it? Or another way to modify my tech pix? Mucho grande appreciated.

Officer Reene
Jul 05, 2006, 07:52 AM
I can't seem to find the Art0.fpk or the techtree folder anywhere. Tried searching my hard drive, got nothing. Can anyone fill me in on where I can get it? Or another way to modify my tech pix? Mucho grande appreciated.


one of the official patches broke down the Art0.fpk file into these files:

Assets0.fpk
Assets1.fpk
Assets2.fpk
Assets3.fpk

they can be found here:

[main civ4 folder]\assets FOLDER


hope that helps;)

Vespa Jester
May 24, 2008, 12:33 PM
Hmmm

I'm getting issues with this. Nothing appears at all. I must be missing someting.

magic_stick1376
Jul 23, 2008, 12:41 AM
how do you make it so that your created tech reveals a resource? im tryin to do "hippy tech" but i need it to reveal a "cannabis" resource