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

Technology cost editor released

Discussion in 'Civ4 - Utility Programs' started by Vilu, Nov 12, 2005.

  1. Vilu

    Vilu Chieftain

    Joined:
    Nov 12, 2005
    Messages:
    18
    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:


    Editor main screen:


    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.
     

    Attached Files:

  2. Drakken

    Drakken Warlord

    Joined:
    Feb 6, 2002
    Messages:
    130
    Location:
    Chicago
    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%?
     
  3. Gufnork

    Gufnork Prince

    Joined:
    Nov 1, 2005
    Messages:
    440
    Will you marry me?
     
  4. Vilu

    Vilu Chieftain

    Joined:
    Nov 12, 2005
    Messages:
    18
    Sorry, I'm already "taken" ;)
     
  5. Vilu

    Vilu Chieftain

    Joined:
    Nov 12, 2005
    Messages:
    18
    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. ;)
     
  6. Iplay4FUN87

    Iplay4FUN87 Chieftain

    Joined:
    Oct 27, 2005
    Messages:
    87
    Ive been trying to figure out how to edit this for ages. I think im in love :mischief:
     
  7. Iplay4FUN87

    Iplay4FUN87 Chieftain

    Joined:
    Oct 27, 2005
    Messages:
    87
    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?
     
  8. Vilu

    Vilu Chieftain

    Joined:
    Nov 12, 2005
    Messages:
    18
    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.
     
  9. woodelf

    woodelf Bard

    Joined:
    Jun 12, 2003
    Messages:
    15,036
    Location:
    Gallery
    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.
     
  10. Gufnork

    Gufnork Prince

    Joined:
    Nov 1, 2005
    Messages:
    440
    You think you could modify it to work with building and unit costs as well?
     
  11. Vilu

    Vilu Chieftain

    Joined:
    Nov 12, 2005
    Messages:
    18
    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.
     
  12. woodelf

    woodelf Bard

    Joined:
    Jun 12, 2003
    Messages:
    15,036
    Location:
    Gallery
    Terrific. I'm having a hard time balancing the tech beyond 1200AD. This utility looks to be simply ideal for a solution. Great job.
     
  13. I_batman

    I_batman Emperor

    Joined:
    Jun 22, 2004
    Messages:
    1,261
    Location:
    markham, ontario
    Nice Job, Vilu.
    What language did you write this in?
     
  14. Vilu

    Vilu Chieftain

    Joined:
    Nov 12, 2005
    Messages:
    18
    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.
     
  15. woodelf

    woodelf Bard

    Joined:
    Jun 12, 2003
    Messages:
    15,036
    Location:
    Gallery
    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.
     
  16. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness Supporter

    Joined:
    Jul 28, 2003
    Messages:
    1,123
    Gender:
    Male
    Location:
    Kansas City
    Beautiful, nice work. Now if you could do the same for units, you'd be the $hit!!!

    :worship:
     
  17. Smidlee

    Smidlee Deity

    Joined:
    Jul 10, 2003
    Messages:
    3,348
    Thanks Vilu, this would come in handly.
     
  18. Vilu

    Vilu Chieftain

    Joined:
    Nov 12, 2005
    Messages:
    18
    Maybe I can make it happen if someone else doesn't beat me to it before I have the time to work on it.
     
  19. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    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
     
  20. twelvetime

    twelvetime Chieftain

    Joined:
    Nov 14, 2005
    Messages:
    15
    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.
     

Share This Page