View Full Version : Technology cost editor released


Vilu
Nov 12, 2005, 03:13 PM
EDIT 2007/07/27
Reworked the tool (v1.1) to work with all official Civilization 4 expansions (Warlords, Beyond the Sword) and mods. You should still note that the tool defaults to the original Civilization IV Civ4TechInfos.xml file when launched from the main program folder. Navigate manually to the xml file you wish to edit.
-------------


I just finished a small editor to quickly alter technology costs for each era. I made it mainly for my own modding needs, but thought to release it for other people to use as well. I know it's a real chore to alter all 80+ technologies and their costs to mod research speeds. With this tool it's a real breeze.

Unzip the executable file into the main Civilization 4 folder (for the editor to find the correct path itself) and run it.

I think these screenshots speak for themselves:

File open dialog:
http://img.photobucket.com/albums/v72/JP1979/forums/C4TCEdialog.jpg

Editor main screen:
http://img.photobucket.com/albums/v72/JP1979/forums/C4TCEmain-1.jpg

It edits the Assets\XML\Technologies\CIV4TechInfos.xml file and re-writes a new one based on the given tech multipliers for each era.
Example: The original technology cost for Mysticism (Ancient Era) is 50. If the given multiplier for Ancient Era is 2.0, the editor would double the technology cost to 100, making Mysticism (and all other Ancient technologies) take twice as long to research.

Although the editor makes backup copies of its own, it's always advisable to backup the original CIV4TechInfos.xml before editing. In any case, I'm not responsible if the editor screws up your Civ4 installation ;)

I hope it has use for some of you. Have fun.

Drakken
Nov 12, 2005, 04:08 PM
Thanks Vilu. I have been at this for hours doing it manually.

One question. If I want to have a game that is correspondingly slow to match the research in this type of game what would you set other values to in the gamespeed info file?

I know I will have to set the research back to 100% but I imagine that all other values for my purposess should remain around 300% to 400%?

Gufnork
Nov 12, 2005, 04:16 PM
Will you marry me?

Vilu
Nov 12, 2005, 04:32 PM
Will you marry me?

Sorry, I'm already "taken" ;)

Vilu
Nov 13, 2005, 02:34 AM
One question. If I want to have a game that is correspondingly slow to match the research in this type of game what would you set other values to in the gamespeed info file?

I know I will have to set the research back to 100% but I imagine that all other values for my purposess should remain around 300% to 400%?

It's really a matter of trial and error to find the best combination to suit your needs. All I wanted is to dramatically slow down research to fully experience every era in the game, and to have enough time to wage war and build between tech advances. So I haven't really touched other game speed values in my games.

And yeah, I'm not worried by the fact that I'm still using cavalry in the year 2200. ;)

Iplay4FUN87
Nov 13, 2005, 07:46 AM
Ive been trying to figure out how to edit this for ages. I think im in love :mischief:

Iplay4FUN87
Nov 13, 2005, 07:49 AM
Just a quick question, if i edit this while im already in the middle of a game will it still be able to be changed?

Vilu
Nov 13, 2005, 03:02 PM
Just a quick question, if i edit this while im already in the middle of a game will it still be able to be changed?

I believe the game reads the XML-files every time it's run so the changes you make are valid for saved games as well, provided you restart Civ 4 after each modification.

woodelf
Nov 14, 2005, 05:19 AM
Vilu - This should work with Mods as well, correct? If you copy the Technology folder from the main Civ4 directory and place it into your Mod folder before running your program? I hope to try this on my bastardized Mod and not the main files. Great job.

Gufnork
Nov 14, 2005, 06:58 AM
You think you could modify it to work with building and unit costs as well?

Vilu
Nov 14, 2005, 09:11 AM
You think you could modify it to work with building and unit costs as well?

I think I can arrange that with minor modifications, but as I said I made it for my own modding purposes so I'd rather implement features only when I need them myself. :blush:

Besides, I have a full-time day job so it could be hard to find time for coding tools for gaming. :sad:

But I'll see what can be done, but not any earlier than next weekend.


@Woodelf:

Yes it works with mods just as you described. It saves the modified CIV4TechInfos.xml to the same folder you opened it to the editor.

woodelf
Nov 14, 2005, 09:22 AM
Terrific. I'm having a hard time balancing the tech beyond 1200AD. This utility looks to be simply ideal for a solution. Great job.

I_batman
Nov 14, 2005, 12:34 PM
Nice Job, Vilu.
What language did you write this in?

Vilu
Nov 14, 2005, 12:46 PM
Nice Job, Vilu.
What language did you write this in?

I hoped no-one would ask ;)

It's written in a "lazy man's programming language", a lightweight scripting language called AutoIt.

http://www.autoitscript.com/autoit3

The language is meant to automate Windows tasks (by emulating clicks and keystrokes), but it's a very good language to write simple utilities.

woodelf
Nov 14, 2005, 04:53 PM
Vilu - This works perfectly. Kudos.

Any chance you could write a similar program that would be able to alter the unit sizes in 1 key stroke? Also maybe it could be written so different categories of units could be resized so they don't look so monstrous? I mean my worker is the same size as a tank! Crikey.

BomberEscort
Nov 14, 2005, 06:09 PM
Beautiful, nice work. Now if you could do the same for units, you'd be the $hit!!!

:worship:

Smidlee
Nov 15, 2005, 03:11 PM
Thanks Vilu, this would come in handly.

Vilu
Nov 16, 2005, 11:53 AM
Beautiful, nice work. Now if you could do the same for units, you'd be the $hit!!!

:worship:

Maybe I can make it happen if someone else doesn't beat me to it before I have the time to work on it.

Bhruic
Nov 17, 2005, 05:46 AM
This is a nice program - but you shouldn't be modifying the Assets XML file directly. If you want to make it a global change, it should be placed in 'CustomAssets'. Directly modifying the Assets files may, in the words of Firaxis, cause problems installing future patches.

Bh

twelvetime
Nov 17, 2005, 07:35 PM
I tried taking Bh's advice and used the program in the 'customAssets' folder instead. It didn't work... at first :) I just had to trick the mod program a little... It tries to replace an existing file but there isn't one in the 'CustomAssets' string of files, so...
1st. Make two copies of the Sid original, one for back up--as always :) --and one to place in the CustomAssets\XML\Technologies\ file.
2nd. Run the program following the original instructions but just place it in the CustomAssets\XML\Technologies\ file instead of the Assets\XML\Technologies\ file.
Although I haven't tested it yet, that should be it.
Hope that helps.

Simon1995
Nov 20, 2005, 02:45 AM
Impressive program perhaps ill use it but first i need to learn to play the game its bt different then civ 3!! bye.

Chrispy_Cracker
Nov 21, 2005, 02:40 PM
This is what I have been looking for.

oldStatesman
Nov 22, 2005, 10:34 AM
Great Program! Thanks!

One small suggestion, if possible add a default button that would automatically return all values to the original game default's, it would save a bit more time when experimenting.

Thalassicus
Nov 22, 2005, 12:13 PM
This will speed editing of that up significantly :) How did you determine the era for techs in the program, a predefined table or reading off the <Era> line?

I found from editing earlier that this simple gradient seems to work well (on Monarch difficulty, at least):

100% Ancient
110% Classical
120% Renessance
130% Medieval
140% Industrial
150% Modern

This seems to balance out the eras so research takes about the same number of turns regardless of the era you're in (and just depending on the tech). Making it too slow had a tendency to give an overwhelming advantage to a civ just one or two techs ahead in the games I played. With these settings I can complete all research around 2000-2025 if I play at a normal pace... instead of 1950 like usual.

NickSD
Nov 22, 2005, 11:30 PM
How do I disable research entirely in my scenario so I can create a scenario strictly in Medievil Asia?

Volstag
Nov 23, 2005, 11:25 AM
Somewhat silly question, but has anyone tinkered enough with the reasearch rates to give Civ IV more of a Civ III feeling (w/ regards to tech progression, epic speed)? This seems like the ideal tool for slowing down the progressively rapid tech advances in the mid/late stages of the game.

Kaiserguard
Nov 23, 2005, 02:06 PM
How do I disable research entirely in my scenario so I can create a scenario strictly in Medievil Asia?


Best way is to design a completely new techtree that is strictly medieval, Its a messy job, and I am still waiting for a tool that fully can change tech props but its the same I do for my Modern Combat mod. The plans are already as good as ready; they now to need to be made.

4_HoTA
Nov 25, 2005, 02:40 AM
Well looks like you have done it now vilu 8) you started it so's now you's gots too finish it and get it so it dose buildings and units. ;)

woodelf
Dec 01, 2005, 04:49 AM
I was wondering if Vilu or anyone could make a similar tool to lower/raise upgrade costs of units depending on the era. Until Industrial I never have enough cash to upgrade anything, after that I have too much cash. I'd drop the cost to about 1/5 or 1/10 early on, and then raise it later.

Huxley Hobbes
Dec 03, 2005, 09:16 AM
I have to say, this is one nifty little device. =) Much thanks to you for making it!

Vilu
Dec 03, 2005, 11:13 PM
I was wondering if Vilu or anyone could make a similar tool to lower/raise upgrade costs of units depending on the era. Until Industrial I never have enough cash to upgrade anything, after that I have too much cash. I'd drop the cost to about 1/5 or 1/10 early on, and then raise it later.

Give me a couple of days. I'll whip up a more capable editor then.

woodelf
Dec 04, 2005, 06:04 AM
Thanks Vilu. That will be a big help.

Ukas
Dec 06, 2005, 05:17 AM
Great big serious thanks Vilu! This will save many hours of my (and probably everyones) time!

I usually have edited my game similarly to Thalassicus (up in post #24 this page) but manually! Also, in addition I've made some individual techs, ten or so, even more expensive 10-25%.

TEJ
Dec 09, 2005, 02:31 PM
Well, first of all. This mod is great! I have always needed this. But i still have one problem....
When i open the editor and open my CIV4TechInfos.xml in my tech folder, i get this image:

I see all eras and two buttons for each showing in opposite direction.
I can't see any numbers, and when i press the buttons nothing happens. I can't even put my cursor ( you know the " I " )inside the text field and write something. The space for writing is also very narrow.

Do anybody know what i have been doing wrong or what i shoul do?
Thanks for your help
Tobias - Denmark

Vilu
Dec 10, 2005, 03:05 AM
Well, first of all. This mod is great! I have always needed this. But i still have one problem....
When i open the editor and open my CIV4TechInfos.xml in my tech folder, i get this image:

I see all eras and two buttons for each showing in opposite direction.
I can't see any numbers, and when i press the buttons nothing happens. I can't even put my cursor ( you know the " I " )inside the text field and write something. The space for writing is also very narrow.

Do anybody know what i have been doing wrong or what i shoul do?
Thanks for your help
Tobias - Denmark


Tobias,

Could you post a screenshot? Also, what version of Windows are you running?

TEJ
Dec 10, 2005, 03:49 AM
sure, i use windows XP pro (well, a danish version, i suppose that doesn't matter)

Vilu
Dec 10, 2005, 06:55 AM
Have you increased the default Windows dots-per-inch size (DPI)?

TEJ
Dec 11, 2005, 12:29 PM
YEAH!!!

It works now, thanks alot Vilu.

Fachy
Dec 11, 2005, 11:51 PM
Thanks alot vilu! Does anyone know which technologies trigure each era? Or how exactly are era trigured? (this will make it easier to calculate)

phalzyr
Dec 12, 2005, 07:15 AM
I was wondering if Vilu or anyone could make a similar tool to lower/raise upgrade costs of units depending on the era. Until Industrial I never have enough cash to upgrade anything, after that I have too much cash. I'd drop the cost to about 1/5 or 1/10 early on, and then raise it later.

The formats for modding just screams for a tool maker, it'd be very simple read in seperate write out program. If I was planning on editing the XMLS alot I'd make one myself, but like him I have work and other things and since I'm not planning on HEAVY modding with this game...

Hopefully some programmer out their has the time to make such a simple program. It also be nice to add/delete tech/unit/buildings as well but it'll take someone dedicated to making a tool for others not just themselves to accomplish this... Unless they are planning on HEAVY modding also... I made a few for other games but why this didn't have something official (or is the SDK going to allow GUI interface editing of these files?)...

phalzyr
Dec 12, 2005, 07:20 AM
I tried taking Bh's advice and used the program in the 'customAssets' folder instead. It didn't work... at first :) I just had to trick the mod program a little... It tries to replace an existing file but there isn't one in the 'CustomAssets' string of files, so...
1st. Make two copies of the Sid original, one for back up--as always :) --and one to place in the CustomAssets\XML\Technologies\ file.
2nd. Run the program following the original instructions but just place it in the CustomAssets\XML\Technologies\ file instead of the Assets\XML\Technologies\ file.
Although I haven't tested it yet, that should be it.
Hope that helps.

Yep you'll have to copy files manually to you mod directory unless he looks into the registry for your civ4 dir and makes his program copy the files :)

OP: I'm not familiar with that programming tool/langauge does it allow you to make a radio button selection with the names like (technology/units/buildings) and then you could auto load the appropriate files rather than having them use an open dialog. (I guess just assume same dir if file doesn't exist open dialog, and of course via menu allow open from alternate locations etc...)

Just some thought ignore them if you want.

phalzyr
Dec 12, 2005, 07:27 AM
Have you increased the default Windows dots-per-inch size (DPI)?

Something I always keep in mind or try to ;). A good thing to do is have select box and such on left and text on right. Make selct boxes and such bigger than need twice the needed size is good. this way if people have their DPI or font size higher than normal... It also make it easier if you add an option for font sizes later. (some user just like huge fonts... one user comes into mind, that has eyesight trouble doesn't want to get glasses)

It does take up form space though...

Fachy
Dec 12, 2005, 03:49 PM
Sorry wrong post here
Why isn't there a button to delete ur posts?

Great_Scott
Jan 17, 2006, 05:30 AM
By the way, this thing is great.

funksterj
Feb 06, 2006, 10:58 AM
Firstly may I say thanks very much for this great little program. :)

Vilu, if you are still keeping an eye on this thread (or anybody else for that mater), could you tell me if this will work with the CIV4TechInfos.xml file if it has been customised with new techs, or does it only work on the vanilla techs? I would assume it would if it looks for <iCost> and <Era> tags, but I’m not sure how you did it and it would be easier to know before I unleash it on some mods I’m working at.

Thanks.

PS. I know I’m being lazy as I could test it myself and find out, but I’m at work and wont be able to do so for a while and I figured this could save me some time. :mischief:

EDIT: For those who might pass this way, I found out for myself, it does work on any tech additions (I assume as long as the code holds true to the original format).

Asjo
Feb 18, 2006, 10:36 AM
I was happy to see this tool - the first I downloaded from this site - however, as already mentioned in this topic, something even more needed is a tool that prevents technology advance alltogether. Using this tool, I can only multiple the tech rate by three or four turns for marathon. Anything above that has no effect, and the change will just be ignored. There's nothing worse than creating a scenario in the middle ages, only to have it play out in the modern ages after just a short time. I have made a scenario where most nations use their special unit as they do not have the technology to use other better units that replace them, however, as soon as they get that technology, the whole point is pretty much ruined.

With the Atlas tool for creating big maps, a tool for allowing cheat in hotseat (so that you can control all players and enter worldbuilder at the same time), the last, and most important, thing scenario-makers need to really get started is a tool to keep the technological status instact.

OwenShadd2006
Nov 01, 2006, 07:40 PM
Vilu! Please make an version for Warlord's, i'd love you long time!

Smidlee
Nov 01, 2006, 08:02 PM
Vilu! Please make an version for Warlord's, i'd love you long time!
It seems Vilu hasn't visit CFC since last year.

Vilu
Nov 02, 2006, 09:44 AM
A little bump... ;)

Seems I've got some inquiries about making a similar tool for Warlords. Actually I'm surprised my tool still seems to be the only one out there capable of making quick mass alterations to technology costs.

Well, the good news: the tool works with Warlords and any custom mods as is :)

When I designed the tool, I made sure it handled the modifications universally so that it supports future releases and any mods, provided the general xml format remains the same. The tool scans every single technology in the opened .xml file, checks which era it belongs to, and modifies the cost value. The beauty of XML format. :)

When run from the Civ4 root folder, the current version of the tool defaults to Assets\XML\Technologies\ folder (the original Civ4 assets) when it searches for the CIV4TechInfos.xml file. Just point the tool to the Warlords folder (Warlords\Assets\XML\Technologies) instead to edit the Warlords technologies. Or, if desired, make it point to any custom mod in their corresponding folders.

swervin007
Jul 25, 2007, 12:39 PM
hey vilu. now that BtS is out, any chance of making your great tool work with it as well?

Vilu
Jul 26, 2007, 12:17 AM
I don't have BtS yet, so I can't test it. But have you actually tried it with BtS yourself?

I assume BtS has altered the tech info XML file so that the former era categorization (ancient, industrial etc) is no longer valid. If this is the case, my editor does not work. Otherwise it will work.

If it doesn't, I'm sure I can quickly update my editor for BtS provided I can get hold of the BtS TechInfo XML file. If some BtS owner would like to help me out here you can send me a vanilla BtS TechInfo XML file to
ep1551
(at)
kolumbus dot fi

gilfan
Jul 26, 2007, 10:42 AM
I don't have BtS yet, so I can't test it. But have you actually tried it with BtS yourself?



I tried it, it fails with an error message when you try to save the new multiplier values. I'm not home right now, so I don't recall exactly what it says, but it was something like "corresponding iTech not found". When I get home tonight I'll give you the exact error.

Vilu
Jul 27, 2007, 06:54 AM
Updated first post of this thread (http://forums.civfanatics.com/showpost.php?p=3308853&postcount=1)

urtho
Aug 13, 2007, 10:37 AM
Vilu, just wanted to say thanks for your great utility and thanks for updating it to work with BtS. It has saved me from the time consuming task of hand editing all of the tech costs as I can't stand the ultra fast pace of the march of technology even at Marathon game speeds.

The Rusty Gamer
Aug 19, 2007, 03:58 AM
I don't suppose you could add in a random button could you, so that all the cost mulitpliers could be randomly generated, without us knowing what they were?

And then, of course, there's the idea of altering building costs in this way as well...

Ranbir
Sep 01, 2007, 09:21 PM
Thank youuu. Now all I need is a tech tree editor itself! :x