Announcement

Collapse
No announcement yet.

Civilization 4: Modding

Collapse
X
Collapse
  •  

  • Civilization 4: Modding

    Screenshots




    Barry Caudill, Civilization IV Senior Producer on Modding

    The 1996 release of Sid Meier's Civilization II represented a huge step forward for the series (which was originally created in 1991), and the change that probably had the most significant long-term impact on the Civ community, was the addition of the concept of fan-created content. The fact that people are still creating and sharing scenarios for Civ II, is a testament to this theory. With Sid Meier's Civilization IV, our team at Firaxis is trying to recapture that level of interest and then completely surpass it. Our goal is to make this the most moddable version of Civ ever, so we created three levels of tools offering fun, accessible modding options for every type of player - from casual to hard-core.

    The first level is the World Builder, which is an easy-to-use, yet powerful map editor allowing gamers with little experience to create custom worlds. At any time during a game, players can call up the world builder and change numerous things on the map. They can add rivers, place tiles, resources, roads, improvements, cities, units, and nearly anything else that appears on a map. Players can determine which buildings are in the cities, how many people live in any city, what each city is producing, what each Civ has researched. They can also establish who is at war and each AI's attitude toward every other Civ. World Builder offers a fun accessible way for anyone to create quick, customized scenarios.

    The next level offers Python and XML support, letting modders with more experience manipulate the game world and everything in it. XML (eXtensible Markup Language) files can be edited in standard text editors or in special XML file editors that have ease-of-use features like a grid view. Editing these files will allow players to tweak simple game rules and change or add content. For instance, they can add new unit or building types, change the cost of wonders, or add new civilizations. Players can also change the sounds played at certain times or edit the play list for your soundtrack. NOTE: You can have custom soundtracks simply by adding music to the custom folder. You only need to edit the XML in order to assign certain pieces to specific eras or remove certain pieces.

    The Python scripting language is fully integrated throughout the game and offers experienced modders a chance to really strut their stuff! People with some programming skills will be able to do things to alter the game in interesting and extraordinary ways. For instance, all of the game interface screens are exposed to Python, so modders will be able to change the information that's displayed, as well as how it's positioned on the screen. We also use Python to create and generate all of the random map scripts that are included in the game. So, players will now have the ability to add scripted events to the game like automatically generating units when a tile is reached, having specific situations trigger automatic war, or get this, bringing back Civil Wars caused by unrest, Civ II style!

    So, we've got an integrated World Builder, XML tweaks and additions, and an extensive event system. And that's not all folks. Just for you, we'll throw in a set of Ginsu steak knives, a miracle hair restorer, and... the Civ 4 SDK...all for one low price!

    That's right! In early 2006, Firaxis will give Civ fans the ultimate moddability tool in the form of an SDK that will allow players to change the way the game functions at a very high level. Don't like the way the AI reacts? Change it. Want to change the way combat works by adding stack attacks with multiple units fighting at once? Do it. Essentially, modders can do anything short of changing the basic graphics engine, the core Civ engine, or the network code. The sky is truly the limit and we're really looking forward to seeing what the incredible Civ fans create.

    Firaxis has gone through extremely lengths to give the game unprecedented modding power: all in-game data is stored in XML -- almost nothing is hardcoded -- a scripting language is included and even an SDK with some of the game's source code has been released. Modding in Civilization IV is tiered, there are four different levels on which the game can be changed:

    • World Builder: This is the map editor, similar to what is availabe in pretty much all Civ-like games: you can create custom maps with preplaced cities, units, buildings, etc. Anyone can do this, it's as simple as point-and-click. The World Builder stores the maps created with it in a text-based format that can be opened in any text-editor. This makes it easy to edit such files even without starting up the game, but the two biggest advantages of this are: (1) it's easy to develop external tools that read in Civ4 maps and somehow manipulate these (e.g. convert them to other game formats, auto-generate Python code based on it); (2) it's easy to develop tools that generate Civ4 map files themselves, without having to use the World Builder (e.g. user-made map editors or conversion utilities such as BMP-to-Civ4, Civ3-to-Civ4, CtP2-to-Civ4, etc). Firaxis expects that the World Builder will be used extensively because it's so simple to use and open to anyone who wants to have a go.
    • XML Files: All in-game data is stored in XML files: things like Unit, Building, Civic, Civ, Terrain and Resource stats, difficulty levels, paths to the graphics files, map properties, text info, etc, but also camera controls, the scales of graphics objects (so you can resize things), keyboard and mouse mappings, hooks to Python, audio script parameters, etc. Even the layout of cities in the game is stored in XML (though it has hooks to Python as well), using a so-called L-System (Lindenmayer systems), which is typically used for simulating plants and trees. This makes cities look natural(ly random) while allowing all important buildings to be easy to see.
      Note that XML is not a programming language as some people seem to think, but rather an (eXtensible) Markup Language, which means that it's just a convenient format to store and order information, much like an Excel spreadsheet (but simpler), or a phonebook (but slightly more complex). In many ways it's similar to rules.txt from Civilization 2 (only presumably much, much more powerful), or the txt files from the Call to Power games. Sure, it might look slightly intimidating the first time you see it, but once you dive in and learn to understand how to read it, changing things is no more complicated than filling in a form (and if you live in a country as bureaucratic as mine, you've got plenty of experience in doing that ). The only skill required for modding XML is the ability to read and write. So that means that unless someone is reading this to you, you're already half-way there XML files can be read and changed by any text editor (such as Notepad), though there are many freeware, shareware and commerical XML editors available that offer specific XML tools for making the job easier.
    • Python: Python has been added to the game as a scripting language (and a powerful one at that), which allows modders to add events to the game, change game rules, change the User Interface, modify the map generation algorithm, etc. To an extent you can even overrride AI behaviour with it. The team at Firaxis themselves made extensive use of Python during the development of Civilization IV, it proved so useful they ended up using it for much more than what they had originally planned. Originally they only wanted to use it in map generation and for scripting events, but they also ended up using it to for the User Interface, AI overrides, the L-System city graphics, coloured map overlays and development tools such as the World Builder, a formation editor and various debug tools. The tutorial that the game comes with has also been coded in Python, as is the Civilopedia. To help with the development of both the Python tools and other parts of the game, they added a Python interpreter to the game, which can be opened in-game to check the state of certain variables or to generate some code 'on-the-fly'. This will be extremely helpful to modmakers as well.
      Unfortunately coding Python is not trivial. It's not like XML where you only need to be able to read and write to be able to modify it. To modify Python, you actually need to know a thing or two about programming. Not everyone can do this. Or rather, not everyone will be willing to invest the time to learn, as basic things like displaying a message at a given turn or creating a unit when a city is conquered or simple things like that aren't really all that hard, but the do take time to learn. Anyone who is willing to invest a little time should be able to accomplish at least simple things fairly easily, and more complicated ones given enough time. Prior programming experience is a premium but not a must when it comes to working with Python. If you want to learn Python, this (particularly chapters 1-10 and appendix A) would be an excellent place to start if you have little or no programming experience. If you do have a fair amount of programming experience, the documentation on the Python website will suit your needs. You can find a whole bunch of tutorials and guides for Python on all kinds of levels (from total newbies to l33t h4x0rs to professional ITers) here.
    • Game/AI SDK: Finally and most spectacularly, Firaxis has released a good portion of the game's source code as part of the game/AI SDK -- this is not very uncommon for some other types of games such as FPS games, but is almost unprecedented for strategy games. This SDK contains all the source code related to the rules of the game and all the AI code (but not other things like network code or the graphics engine). Using this package, modders will be able to do everything from writing their own game types to pretty much building their own game loosely based on Civilization; they can change literally anything they want. This is not for the faint-of-heart though, one will have to be a capable programmer to do really meaningful things with the SDK. Prior programming experience is pretty much a necessity.

    These are the basic levels of modding that are available to mod and scenariomakers, but of course there are also other areas of modding that are not covered here, such as modding the graphics or sound, which are not explained here. See the Creation forum for more info on all things modding.

    All of the tools described here are used in day-to-day development of the game, so they are all very robust. All tools will also be hot-swappable, which will greatly simplify the task of making changes to them, as you can immidiately load your changes into a running game and test to see if they work as expected. If not, fix the problems you found, reload the resources and test again. This saves a great amount of development time, time which users can spend on actually making new products, rather than troubleshoooting them. It also has the added advantage that a lot of the time regular players should be able to switch mod mid-game if they want, no need to finish all their old games before migrating to a new version. (Of course, this is all theory, in reality your mileage may vary.)

    MPers and tournament players need not have fear: the game will ship with protected copies of all the original files, which guarantees that eveyrone in an MP game or tournament is playing with the same ruleset. Even for (both fan-made or official) mods and scenarios some security mechanisms have been built in.

      Posting comments is disabled.

    Article Tags

    Collapse

    Latest Articles

    Collapse

    • Civilization 4: Release Date & System Requirements
      by Martin Gühmann
      Civilization IV was originally scheduled to be released in November 2005, but that was pushed forward to October 25, 2005. Civilization IV: Warlords will be released in the Summer of 2006. The System Requirements for Civilization IV are the following: Minimum System Requirements: Operating System: Windows® 2000/XP Processor: 1.2 GHz Intel Pentium 4 or AMD Athlon processor or equivalent Memory: 256 MB RAM (Windows 2000) / 512 MB RAM (Windows XP) Hard Disk Space: 1.7 GB Free CD-ROM Drive : 4X Speed Video: DirectX 9.0c-compatible 64 MB video card with Hardware T&L support ( GeForce 2/Radeon 7500 or better) Sound: DirectX 9.0c-compatible sound card DirectX®: DirectX® version 9.0c (included) or higher Recommended System Requirements: Operating System: Windows® 2000/XP Processor: 1.8 GHz Intel Pentium 4 or AMD Athlon processor or equivalent Memory: 512 MB RAM Hard Disk Space: 1.7 GB Free CD-ROM Drive: 4X Speed Video: 128 MB Video Card w/ DirectX 8 support (pixel & vertex shaders) Sound: DirectX 9.0c-compatible sound card DirectX®: DirectX® version 9.0c (included) or higher Supported Operating Systems: Windows 2000: Service Pack 1 or higher WITH Internet Explorer 6.0 or higher Windows XP: Home or Professional w/ Service Pack 1 or higher...
      August 9, 2012, 16:21
    • Civilization 4: Fan Input
      by Martin Gühmann
      In his 2004 GDC presentation, Soren Johnson mentions The List for Civ3, noting that with its 200,000 words it's about 25,000 words longer than the New Testament. He's familiar with this list and therefore the wishes of the fan community. Also, during its development, Soren repeatedly posted in our Apolyton forum to indicate that he was keeping track of The List for Civ IV, and after its completion in January 2005 he said:...
      August 9, 2012, 16:19
    • Civilization 4: Development
      by Martin Gühmann

      Development on Civilization IV began roughly in the Spring of 2003, it was released 25 October 2005. It is being published by 2K Games, a relatively new publishing label of Take-Two Interactive, which is a historic break from Microprose/Hasbro/Infogrames/Atari. 2K Games will also publish Civilization IV: Warlords (expected Summer 2006) and any other possible future expansion packs for Civilization IV. The following is an overview of the history of Civilization IV's development (and how it relates to other major developments at Firaxis, such as the Civ3 expansion packs and Pirates!):

      ...
      August 9, 2012, 16:15
    • Civilization 4: Multiplayer
      by Martin Gühmann
      Civilization IV has Multiplayer support from the outset. Firaxis already had a working version of MP in the Fall of 2003 and throughout development Firaxians played 4+ hour MP games in their own time on Wednesday nights. For Civ4, Firaxis went ahead and designed a multiplayer game first, which has paid off dividends for the single-player game. "We got all the rules set using the multiplayer engine, and then by using that, we learned what players would do. And that helped us write the AI," Firaxis president Jeff Briggs said. There are many different forms of MP available in Civ4. Players are able to play everything from quick games of a few hours -- online with the Fast game mode and simultaneous turns -- to protracted games that are stretched out over months -- turn-based PBEM with the Marathon game mode. The forms of MP that Civ4 supports are: LAN, Internet, PBEM (Play-By-Email), Hotseat and Pitboss. It will support both simultaneous turns and classic turn-based mode. GameSpy will be used for Internet match-making. An improved random map generator ensures equal starting positions for all players. The server browser in the game will include buddy list functionality to keep track of your friends easier. Meanwhile, Firaxis will cull all sorts of statistics from multiplayer matches, which will let it rank players, which is aimed to avoid some of the frustration when you find yourself in a multiplayer match with ruthless Civ pros....
      August 9, 2012, 16:13
    • Civilization 4: Modding
      by Martin Gühmann
      Screenshots Barry Caudill, Civilization IV Senior Producer on Modding The 1996 release of Sid Meier's Civilization II represented a huge step forward for the series (which was originally created in 1991), and the change that probably had the most significant long-term impact on the Civ community, was the addition of the concept of fan-created content. The fact that people are still creating and sha...
      August 9, 2012, 16:07
    • Civilization 4: User Interface & Multimedia
      by Martin Gühmann
      As mentioned elsewhere [see Game World], the world in which Civilization IV is set is fully 3D and very much alive and animated. There are also Wonder movies, and Leonard Nimoy (Spock from Star Trek) has been hired as voice actor to record the quotes that accompany new technologies. For a strategic overview, players can zoom out all the way to space and see the world as a globe. In this Globe View, numerous filters are available to facilitate strategizing: Culture, Resources, Units, etc. The User Interface has gotten an overhaul, it is now much more modern and should be very familiar to RTS players. Left-click selects a unit, right-click moves it. The path the unit will follow is indicated as well as the time it takes him to get to his destination. The key phrase for the game is "What You See Is What You Get", or WYSIWYG: the entire game is aimed to be playable on the main map. You can see what Buildings and Wonders a City has, which tiles it's working, what it's producing, when it will grow and what Religions and defenses it has -- all from the main map. When production in a City is complete, a transparant overlay will pop up and let you choose a new item to produce without blocking the main map [see above]. The Advance under research and its progress is also visible at all times, as well as the state of the treasury and the science and Culture sliders [see second image, below]. A list of known diplomatic contacts is also visible on screen, along with information about their State Religion and what deals you have with them [see third image]. Contacting them or declaring war is only one click away. Tool tips and pop-ups will inform the user of what's going on (e.g. the outcome of a battle) and what to do next. When the active unit is offscreen, a marker tells the player where it is [see last image]....
      August 9, 2012, 16:03
    Working...
    X