| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Maker of Worlds
|
DON'T PANIC! "Civ4 is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to XML, but that's just peanuts to Civ4." -Douglas Adams, and me So you pre-ordered the game, you've seen every screenshot, and you've been scouring the forums for months. You finally got your hands on that game, and you just can't get enough of it. And if you're like me, there's only one thing on your mind: how am I going to mod this amazingly deep and complex game? If you want to mod Civ4, this thread is for you. I'm digging into the modding capabilities of Civ4, and sharing all of it with you. I will post everything that I know in this very thread. And if I don't know it, I'll link to it. Whether you're a conscript newb who has never played Civ before, a regular modder like me who hasn't quite mastered all there is to Civ3 yet, or a veteran programmer who just can't wait for the SDK, this thread is for you. QUICK LINKS: Post 2: Modding Overview Post 3: Graphics Post 4: World Builder Post 5: XML Modding Post 6: Python Scripting --------------- Graphics DDS Converter jak08's DDS Skin Tutorial RAD Game Tools World Builder Dale's World Builder Manual BMP to WBS Converter Dale's In-Depth Look at the WBS XML Civ4Wiki W3Schools.com XML tutorial XML.org Beginner's Guide BrentRichie's XML Tutorial Part 1: Adding Civs Part 2: Civ Info Part 3: Leaders XML Quick Reference by Max_x_fire Adding New Units by sovarn Python Civ4Wiki www.Python.org GBM's Python Tutorial and Website Locutus' Python Documentation Civ4 Python API
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET Last edited by WildWeazel; Nov 17, 2005 at 07:22 PM. |
|
|
|
|
|
#2 |
|
Maker of Worlds
|
Modding Overview:
As you probably know, there will be 4 levels of modding in Civ4: World Builder: This is the equivalent of the map editor in Civ3, but much more powerful. Here you can create custom maps and basic scenarios. You can edit terrain, place cities and units, and much more. The world builder will ship with the game. XML: This is roughly equivalent to the rules editor in Civ3. This is where you can add units and improvements, edit the civilizations, and tweak just about every value in the game. XML can be written in notepad or an XML editor. XML is similar in appearance to HTML, and is fairly simple to learn once you understand the basic concepts. A great XML tutorial can be found at w3schools.com Python: Python is a programming language that is used in Civ4 for the game interface, map generation, scripting events, and more. Gingerbread Man is building an excellent Python tutorial focused on Civ4. Several lessons are already available. Python can also be written in notepad. The Python Integrated Development Environment (IDLE), which allows you to run Python files, can be downloaded for free at www.python.org. SDK: The Software Development Kit is where the hard-core modding will be done. Everything but the graphics engine and the core Civ engine will be available to modders. Programming will be done in C++. The SDK will not be available until early 2006. Graphics: In addition to these forms of modding, there will also be a demand for graphics. Units, icons, and the user interface will all require new graphics as new mods and scenarios appear. Depending on what graphics are involved, they may require XML, Python, or even the SDK in order to be incorporated into the game. Creating a mod Once you find something you want to change, you can make a mod for it. When you create a mod, no matter how small, create a new folder for it inside the Civilization 4\Mods folder with the name of your mod. DO NOT overwrite the original files with your own. If you are making a lot of small changes to the game to fit your own preferences, you will probably want to play this mod every time, instead of the standard game. Fortunately for you, you can tell Civ4 to run a certain mod every time it loads. There are a few ways to do this. The first is the Custom Assets folder. You can store files in here that you want to override (not onerwrite) the original files every time the game loads. When Civ4 loads, it first takes these files, then follows the designated file path. The Custom Assets folder is a good place for small changes such as textures and text that you want to use for all games. If are creating a specific mod that you want to load automatically when Civ4 runs, you can direct the game to it from the main configuration file. In _Civ4Config.ini, in the main Civ4 folder, there is a line "Mod = 0". By setting this to a specific folder, such as "Mods\MyMod", you can make Civ4 load a certain mod automatically. It is not necessary to copy all files into your mod folder- only those that you have changed from the originals. Like Civ3's scenario search folders function, Civ4 will look first in Custom Assets and take any files it finds. It then moves on the to the specified mod, if any, and takes whatever files that it doesn't already have, before getting all remaining files from the main folder setup. CLEAR YOUR CACHE!!!!!11!!!1!!!1!1!11one1!!! If your mod is not loading properly, (ie, the game says it loaded but nothing changes), you may need to clear your cache. Civ4 saves a lot of files in a cache folder and uses them instead of reloading the files, so sometimes changes don't appear as they should. Go to C:\Documents and Settings\USERNAME\Application Data\My Games\Civilization 4, show hidden files and folders, and delete the cache folder. You may need to do this periodically as you make changes. Mod Structure The Assets folder, which contains all files necessary for a complete mod, contains a massive 559 folders, and over 10,000 files. Fortunately for you, you don't have to duplicate it. Unlike Civ3, when you had to create the folder setup to mirror the original, Civ4 does this for you. When you run the game using a mod, it automatically creates a full folder setup in the mod folder. As you add more files to your mod, simply place them in the same sub-folder that the original was in. The basic unpacked* structure looks like this: ![]() *If your Civilzation 4\Assets folder DOES NOT contain these subfolders, you will need to decompress the file art0.fpk with the PakBuild utility from Firaxis. art0.fpk is a huge compressed file similar to a RAR archive that contains most of the files and folders from Assets. After you unpack the file, move art0.fpk to a different location or rename it. This is because Civ4 will look for this file before looking in the Assets folder. If you do not move or rename the file, Civ4 will continue to load the default files within the package. Basic guidelines As with all modding (or anything in life for that matter), there a few guidelines to follow: Back up your work. Before you start messing with anything, save a copy of the original (or the latest version of your own work, for that matter) in a place where it won't get deleted, overwritten, lost, or eaten. The only way to recover the original is to reinstall the game. And trust me, your hard drive doesn't want that. And whatever you do, don't come begging for somebody to send you an original file. It's called piracy. And Chieftess will eat you alive. You think I'm kidding, don't you? Use the Mod folder setup. In other words, DO NOT replace the original files with your own work. First of all, if you did something wrong you might have to reinstall to fix it. Secondly, you may want to play the game as it originally was, instead of your modded version. And thirdly, you won't get any sympathy when you complain about your game being messed up. The Mod folders work the same way as they did for Civ3- just put whatever files your mod or scenario needs into its own folder, copying the setup of the main folder structure. For example, if you create a new XML file, put it in Mods\MyModName\Assets\XML\Ask questions. If you don't know how to do something, or want to learn more, don't be afraid to ask. We're all learning this together (except for those beta-testers ) OTOH, some of us have been modding Civ3 for a while, and some of the same concepts will carry over. We're happy to help new modders, because that means (a) more people to help us make our mods and (b) more mods for us to play. No, seriously, we help because we enjoy modding and want other people to enjot it as well. So jump right in and start learning!Have fun. This is the most important thing to remember. It's a game. It's meant to be enjoyed. You can gain a lot of computer-related skills by modding, but that's just a bonus. The real benefit is doing something you enjoy, seeing the product of your hard work and dedication, and working with some really cool people along the way. That's what C&C is all about.
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET Last edited by WildWeazel; Apr 07, 2006 at 07:35 AM. |
|
|
|
|
|
#3 | |
|
Maker of Worlds
|
Graphics Modding
GRAPHICS
Graphics in Civ4 are more complicated than in previous games. Because of the 3D environment, most graphics consist of models and textures instead of single images or animations. Units We are not currently able to create new models and animations. Until Firaxis releases the SDK or a converter plugin for the Gamebryo engine, we have to use the models that shipped with the game. Gaias explained it to me in another thread: Quote:
Buildings Leaderheads Terrain Buildings, Leaderheads, and terrain all use the same graphics format as units- a combination of NIF, KF, and KFN files, with DDS textures. Terrain is especially complicated. It encompasses a massive 1,217 files distrubuted among 168 subfolders. Terrain modelling in Civ4 is not for the weak. Buildings and Leaderheads are somewhat limited at this point because buildings are not culture-specific, and LHs are not era-specific. Until the SDK is released, These graphics will be limited to simple skin replacements only. Interface The game interface is comprised mainly of DDS textures, making it the most moddable set of graphics at this point. The interface is run by Python. Movies Polyphemous discovered the program used to make bik movies for Civ3, and it turns out that Civ4 uses the same format. The Bink Tools program is a free download from RAD Game Tools.
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET Last edited by WildWeazel; Nov 04, 2005 at 07:13 PM. |
|
|
|
|
|
|
#4 |
|
Maker of Worlds
|
The World Builder
The World Builder (WB) is the part of Civ4 that is used to create new maps and scenarios. It can be loaded at any time during the game. Many people find the WB slow and clucnky, but fortunately there are other ways to edit the saves. An interesting thing about the World Builder Saves is that they are saved in ordinary text format. You can open, edit, and save them using the most powerful computer program known to man- NOTEPAD. The file is easy to understand, and for small changes it's probably easier to tweak the text rather than loading it in the World Builder. There is also a converter that creates maps from a series of bmp images. Manual: Dale (who turned out to be another one of those elusive beta testers) has made a great World Builder Manual in pdf format. Manual (7.1 mb) Making Maps: There are 3 ways to build new maps. You can use the WB to make it in-game, you can manually set it up in Notepad, or you can use the BMP to WBS converter to generate maps using bmp images. The World Builder Save (WBS): Dale is also working on a complete guide to editing the WBS in text format in this thread. Unlock the full capabilities: If you have tried to use the World Builder, you have probably noticed that a lot of the functions have been disabled. This is to keep the World Builder from being a cheat machine, but you can't make good scenarios. Fortunately, Soren Johnson released the "cheat code": In the main ini file, which can be accesed through "Shortcut to _Civ4Config" in the main Civilization 4 folder, replace the line "CheatCode = 0" with "CheatCode = chipotle". This will unlock all the features of the World Builder, allowing complete scenario control.
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET Last edited by WildWeazel; Nov 01, 2005 at 10:05 AM. |
|
|
|
|
|
#5 |
|
Maker of Worlds
|
XML Modding
XML Modding
XML is short for Extensible Markup Language. It appears similar to HTML, but serves a different purpose. While HTML displays information, XML is used to organize information. The unique thing about XML is that there is noset, predefined system. When you use XML, you make up your own tags based on what your program needs to do. XML itself is not a programming language. It's a "metalanguage"- it's used to define new languages. So what does this have to do with Civ4? Civ4 uses XML to organize information about the game. Instead of the complicated rules editor from Civ3, with obscure labels and buggy functions, Civ4 uses XML to arrange all of the necessary information so that it is easy to read and edit. I have found 2 good online XML tutorials that I would recommend. They are much more in-depth than my simple introduction, and are very easy to follow. w3schools.com: XML Tutorial XML.org: XML Beginner's Guide (If you want to jump right in and see some XML in action, keep reading. If you just want to know what this has to do with Civ4, skip this section.) -------------------------------------------------------------------------- -------------------------------------------------------------------------- Spoiler for XML crash course:
-------------------------------------------------------------------------- -------------------------------------------------------------------------- XML in Civ4 You can find detailed information about the XML used in Civ4 at Civ4Wiki. Civ4Wiki includes pages for each XML file, with an explanation of every tag. Wiki sites allow users to submit their own material, which means that if you find an empty or incomplete page, you can update it yourself. Max_x_fire wrote an XML Quick Reference, which covers all 129 files and includes a basic description of what each file is for, in a neat Excel spreadsheet. If you don't know which files you need to modify, check this out. BrentRitchie's XML Tutorials provide a more in-depth look at specific tasks dealing with XML: Adding new Civs Civ Information Leaders
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET Last edited by WildWeazel; Nov 17, 2005 at 07:04 PM. |
|
|
|
|
|
#6 |
|
Maker of Worlds
|
Python Scripting
Python is a relatively new object-oriented programming language that is used for various things in Civ4, including map generation, event scripting, diplomacy, and the user interface. Python is available as a free download from www.python.org Python is a portable language. It can be written once and run on any system that has a Python development environment installed. Python is also an interpreted language, meaning that it is compiled as it is run. This means that you can write the code and immediately execute it without the need to compile it into binary code like most other languages. The downside to this is that Python does not operate as quickly as other languages, making it unsuitable for the core game code. Like any new language, Python takes time and practice to master. If you would like to learn how to use the Python language, Gingerbread Man (another beta-tester) has compiled (no pun intended) an excellent tutorial. The tutorial is simple yet thorough. GBM will have you writing Python code in no time. Once you have a basic understanding of how the language works, you will probably want to start digging into Civ4. Locutus (also a beta-tester) explains the terms used in the Civ4 Python code. The Civ4 Python API, which provides additional information for programmers, is also available online. The Python files for Civ4 are located in the Assets\Python folder. The files can be opened, edited, and save using Notepad, although Python editors are available. Remember when you edit these files, DO NOT overwrite or change the originals. Create a folder in the Mods folder for your creations.
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET Last edited by WildWeazel; Oct 30, 2005 at 06:11 PM. |
|
|
|
|
|
#7 |
|
Maker of Worlds
|
*SDK Programming*
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET |
|
|
|
|
|
#8 |
|
Maker of Worlds
|
*Future home of modding FAQ*
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET Last edited by WildWeazel; Nov 19, 2005 at 09:47 PM. |
|
|
|
|
|
#9 |
|
Maker of Worlds
|
Okay, you can post now if you have any specific questions or comments about modding. I will address them if I can.
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET |
|
|
|
|
|
#10 |
|
Delusional idiot
Join Date: Feb 2002
Location: Liege
Posts: 131
|
Will it be possible to improve the World Builder using the SDK or Python?
|
|
|
|
|
|
#11 |
|
Maker of Worlds
|
Good question.
I never thought about that before. I assume that since the world builder will be an integral part of the game this time (you can even use it during a game to change things while you play), it would be part of the game itself, and would fall under the "everything but the graphics engine and the core civ engine" category. So I would say most likely yes, with the SDK.I do know that Python is used for things such as map algorithms and game scripting, which would involve the World Builder.
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET |
|
|
|
|
|
#12 |
|
Tradition
Join Date: Jun 2003
Location: Cape Cod
Posts: 8,185
|
I was thinking of a thread like this. As we still have no idea how moddable this game is yet.
__________________
Hmmm, Civ mod hosting. Free hosting for your mod. No waiting times for downloads. Instant forum set up Storm Over Civ |
|
|
|
|
|
#13 |
|
Deity
|
I'll see how this thread evolves and it'll probably be stickied later.
__________________
Civilization IV Articles: Civ4 Info Center (Last Updated on April 16th) | Final Preview: Filling in the Gaps (Posted on October 24th) | Hands-On Preview (Posted on October 13th). Pirates! Articles: Exclusive Insider Information Article | Pre-Release Information. CivFanatics Forum Info: General Forum FAQ | Forum Rules | Forum BB Tags. Last edited by Civrules; Oct 24, 2005 at 07:03 PM. |
|
|
|
|
|
#14 |
|
Raytracing
|
I will help when I can.
__________________
Think you're a good musician? This piece will be sure to kick your butt. Civ4Wiki is the (soon to be) best location for all Civ4 info! Civ3 stuff: Units (5), Tech Icons (24) |
|
|
|
|
|
#15 |
|
Deity
Join Date: Mar 2002
Location: Melbourne
Posts: 6,481
|
Civrules:
If I may suggest waiting till after release, there may be something more substantial to sticky for modding. Dale
__________________
http://www.brrgames.com |
|
|
|
|
|
#16 |
|
Maker of Worlds
|
This will be substantial after I get my hands on the game.
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET |
|
|
|
|
|
#17 |
|
Maker of Worlds
|
XML modding introduction added. XML in Civ4 will be added when I get the game.
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET |
|
|
|
|
|
#18 |
|
Deity
Join Date: Aug 2002
Location: San Diego, California
Posts: 5,226
|
What about the leaderheads are they going to use the same flcs are civ3 (if you know) or we can discuss later
__________________
My Leaderhead Gallery! |
|
|
|
|
|
#19 |
|
Maker of Worlds
|
I don't know for sure, but I assume they will use FLC files. They will probably be a different size though.
__________________
Civilization + Minecraft = CIVCRAFT 2.0 ![]() Don't have Conquests? Let me help you out. MOD | FOLD | BLOG | TWEET |
|
|
|
|
|
#20 |
|
Maia
Join Date: Aug 2004
Location: Flooded Missouri!!!
Posts: 1,347
|
There may be more FLC files as well, since CIV LH's seem to have emotions that Civ3 LH's did not have.
__________________
() |_ () )2 | |\| - Proud Member of LOTM Contribute to Odin`s Poser Animation Library! Please, not everyone is so talented ![]() Star Wars - V-19 "Torrent" Fighter V-Wing LOTR - Gondorian Unit Pack Elf Defender |
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [REFERENCE] Civ4 Multiplayer Compatability Guide | Gerikes | Civ4 - Modding Tutorials & Reference | 21 | Apr 19, 2009 03:12 PM |
| Yet another guide to Civ4 | hotmaxt | Civ4 - General Discussions | 9 | Oct 29, 2008 04:46 AM |
| netbjarnes guide to lower CPU usage in civ4 | netbjarne | Civ4 - Technical Support | 1 | Jul 31, 2006 08:58 AM |
| Civ4 - Is A Definitive Guide Even Possible? | d_jones72 | Civ4 - General Discussions | 1 | Jun 09, 2006 10:29 AM |
| GameSpot's Civ4 Game Guide | mikezang | Civ4 - General Discussions | 3 | Mar 23, 2006 08:35 AM |