Mods:Overview

From Civilization V Wiki

Jump to: navigation, search

Contents

The Basics

A mod is packaged as a single archive in which all files directly related to the mod can be stored including a mod manifest. This manifest file will include all of the basic mod information (Name, Title, Guid, Author[s], etc), a table of contents, an associations table, an actions table, and a content publishing table.

The table of contents includes a detailed list of all files associated with the mod including metadata. This metadata includes the checksum of the file for verification, an optional comment, and an optional field specifying whether or not this file is intended to replace an existing file.

The associations table describes how a mod relates to other mods. A mod can depend on another mod, reference another mod, or block another mod from being activated at the same time as itself. In addition to associating with other mods, work is being done to allow for associations with DLC, and even keywords.

The actions list details how exactly the mod will interact with the game. This list effectively specifies actions to be performed at a given event location. Actions are grouped by sets which are either predefined or may be custom defined by the modder. An example of a predefined action set is the "OnModActivated" action set which is executed the moment a mod is activated. Some actions include updating the database using a supplied XML or SQL file while other actions include running a Lua script.

The content publishing table describes how certain files will be advertised as. A map script may be packaged with the mod, but will not show up in the end user's lists of map scripts unless there is an entry in this table publishing it as a map script. This allows modders the ability to fine tune precisely how their content is shown to the end user. In the case of a campaign mod, the modder may not want users to be able to select their WorldBuilder scenarios through the regular game setup screen but instead only through their own custom setup screen. In this case, these maps would not be listed in the content publishing table.

Developer Tools!

We've got many tools in the pipeline to assist modders. This includes necessary tools to generate art in the correct formats as well as a run-time script console that includes customizable real-time dashboards that can be used to analyze and debug gameplay information.

On top of this we will have a full fledge IDE that many of the tools will be integrated with. This IDE will include wizards for generating common mods, source control support, extension support (yes, the mod tool is itself moddable ), a Lua editor with syntax coloring and (with any luck) a Lua debugger. Other items include a game rules editor, XML editor, etc.

Using this IDE, a mod team can create a mod project and include any necessary files. The IDE will then handle generating the manifest file and packaging the mod in the necessary format.

Mod Smörgåsbord

In Civilization IV, mods were very intrusive to the existing data files and as such only a single mod could be loaded at a given time. This posed a difficult situation for modders who simply wanted to give the community a new civilization or a unique tech tree variation or perhaps a redesigned UI theme. Combining mods was tricky and would require a lot of time from a skilled user. In Civilization V, mods can be combined by simply clicking the "enable" button in the in-game browser. Validation checks are being added to ensure that user knows when two mods become incompatible with each other.

The modding framework focuses on extending the engine and gameplay rather than simply replacing. This means that a modder can package smaller mods that can be used in many combinations with other mods. An example being the end user enabling two separately developed mods that each contribute a unique civilization.

More things are moddable

Civilization V makes more use of scripting and XML than ever! *ALL* of our UI is implemented via XML and Lua. This allows modders a larger pool of material to reference from as well as tweak and tune to their delight.

The Localization system is also more flexible and capable of being modded. Aside from modders adding their own localized text in pre-existing languages. A mod can be written that adds support for an entirely new language.

All constant game data is now stored in a fully SQL compliant embedded database which has allowed us to perform such complex actions as loading multiple mods in a single game.

Multiplayer and Modding

Currently, it is not possible to use mods in a multiplayer game. Multiplayer and Modding is something we wanted to take extra time on in order to ensure a stable and fun experience. This feature will be unlocked in a future patch of both the SDK and the game.

Network access via Lua

Our Lua API includes a suite of networking methods which will allow modders to easily interact with HTTP, FTP, and other network protocols. This could allow modders to create mods which can interact with community sites, RSS feeds, and other social networking sites. An example mod could be one that will automatically twitter for you while in game or possibly an embedded IRC chat client.

Source code for Gameplay DLL

We are still planning to give the source code to the gameplay dll out and allow for modders to replace the gameplay dll for a totally customized experience. In Civilization V, DLL modding is being designed to better support versioning and handle the fact that Steam may auto-update the game at any time. This source code will be available in a future SDK update.

Future Support

Modding is very important in Civilization V and will be getting lots of support after its launch. We are aware that there are many aspects of modding which are not working as intended or simply not as extensible as we'd like and these will all be addressed in upcoming patches.

See Also

Personal tools