If you have anything to add please post your contributions and I'll add them to this post. I'm also not the best speller in the world so don't be afraid to get me to make corrections.
- Defcon v1.2 or later (demo) (patch) - Steam or nonSteam, doesn't matter
- Rar unpacker i.e. WinRAR (trial) - Required for unpacking main.dat and sounds.dat. Also needed for packing your mod to make distribution easier.
- Paint program i.e. GIMP (free) - Required if you want to make graphical changes such as different maps or units.
- Text editor i.e. Notepad (free) - Required if you want to change city names, individual city placements, unit descriptions or translations.
- Sound editor i.e. Audacity (free) - Required if you want to add or edit game sounds.
- zanzer7's Defcon Modsuite (free) - Required if you want to easily create/place coastlines, borders, cities for a map you created.
- Crook's Automatic City Placer (free) - Currently in development but when released it will make life easy for you if you don't exactly care where cities go.
- main.dat from your Defcon installation - extract it as a rar file into your Defcon directory. (not required if all you want to do is edit current game sounds.)
- sounds.dat from your Defcon installation - extract it as a rar file into your Defcon directory (only needed if you want to make sound changes.)
FIRST STEPS - Mod preparation:
Since Defcon v1.2, mods can be activated and deactivated via the Mods menu within the game. The following describes how to create a mod that will work through this mechanism.
- Create a folder called "mods" in your Defcon directory. If you've already installed a mod for Defcon then you will most likely not need to do this step.
- Within the mods folder create another folder, this time give it a name relating to your mod. The name doesn't need to match your mod's actual name but if it makes life easier for everyone if it is revelant and unique.
- The folder you just created will essentially contain your mod. Within it you should place the following three things: mod.txt, screenshot.bmp, and a folder called "data".
- The data folder is where you should place all the files you changed in order to create your mod. They should be in the same hierarchical order as the files contained in data folder of your Defcon folder.
- mod.txt should be a text file containing a desciption of your mod. Its format should be as such:
Code: Select all
Name Sample Mod
Author Chris Delay
Comment A simple mod designed to show how to make mods properly.
- screenshot.bmp should be a bitmap image of 210x118 pixels. If you've never used mods in Defcon before you may wonder how this is used along with the mod.txt so here is an example.
GETTING FILES YOU WANT TO CHANGE:
The first thing to realise when modding Defcon is that you can't add something, only replace i.e. you may change what a unit looks like but you can't add new units or add/change characteristics/behaviour (such as how fast something fires).
In order to replace something you need to decide what you want to "remove" from the game, locate its file in the data folder, copy it across to your mod's folder (while maintaning the same name and hierarchy i.e. copy "/Defcon/data/graphics/blip.bmp" to "/Defcon/mods/yourmod/data/graphics/blip.bmp"), then change the copied file.
Now on to listing things you may want to change and what you would need in order to do so.
- To change a unit's description: Get "/Defcon/data/language/english.txt" and change revelant line of "Unit Info" section
- To change the language (create a translation): Get "/Defcon/data/language/english.txt" and translate. (reframe from renaming the file)
- To add/remove/change the text overlays that appear in the background at the main menu: Get "/Defcon/data/language/english.txt" and change the "Lobby Overlays" section
- To add sounds: Get and change "/Defcon/data/sounds.txt" and add the new sounds to "/Defcon/mods/yourmod/data/sounds"
- To remove a sound: Get and change "/Defcon/data/sounds.txt"
- To change/replace existing sounds/music: Get revelant sound file(s) contained in "/Defcon/data/sounds"
- To change the appearance of a unit: Get revelant image contained in "/Defcon/data/graphics"
- To change map: Get
- To change the user interface (GUI): Possible files you may want to change may be
- To change the theme/style: First create a theme/style in-game, save it, then get what you saved from "/Defcon/data/styles"
- To change the font used: A lot of the font stuff can be changed through the style editor in-game, however, somethings like text used for writing cities names in-game can only be changed by getting and changing the revelant file from "/Defcon/data/fonts"
What do these files do? What can I do with them?:
- "/Defcon/data/world.dat" - Easter Egg
- "africa.bmp", "europe.bmp", "northamerica.bmp", "russia.bmp", "southamerica.bmp", "southasia.bmp" - Territory files, one per player. Anything nonblack denotes where a player may place units (including fleets).
- "ai_markers.bmp" - Used by the CPU players. Green dots tell the AI where to place fleets and red dots tell it where to launch nukes from subs. You must make sure that each territory has enough green dots.
- "sailable.bmp" - The white region defines where ships can sail, (can be just a copy of water.bmp, but can be edited so that ship can not get to close to the coastlines)
- "travel_nodes.bmp" - Used by fleets for pathfinding. Each node needs to be in connected by a straight line (not blocked by land) to at least one other node and all nodes have to be in the water area defined by sailable.bmp. The original defcon map uses 22 nodes, and although it can work with less, it may crash the game so it's recommended to stick with 22 nodes.
- "airbase.bmp", "battleship.bmp", "bomber.bmp", "carrier.bmp", "fighter.bmp", "nuke.bmp", "radarstation.bmp" - Used for the named in-game units.
- "sam.bmp" - Used to represent a silo in Air Defense Mode
- "silo.bmp" - Used to represent a silo in Launch Mode
- "sub.bmp" - Used to represent a sub
- "sub_surfaced.bmp" - Used to represent a sub firing a nuke
- "airbase_blur.bmp", "battleship_blur.bmp", "bomber_blur.bmp", "carrier_blur.bmp", "fighter_blur.bmp", "nuke_blur.bmp", "radarstation_blur.bmp", "sam_blur.bmp", "silo_blur.bmp", "sub_blur.bmp", "sub_surfaced_blur.bmp" - Used to create the ghost effect of a unit no longer within radar range.
- "actionline.bmp" - Used to create the trails for moving nukes and fleets.
- "arrow.bmp" -
- "blip.bmp" -
- "city.bmp" - Used to represent cities
- "cursor_selection.bmp" - Used for creating a ring when a unit is selected.
- "cursor_target.bmp" - Used for creating a ring around a possible target.
- "depthcharge.bmp" - Used by carriers against subs when in Anti Sub mode
- "error.bmp" - Used when there is a problem loading/using an image. It's adviced not to change this.
- "explosion.bmp" - Used to represent a nuke exploding.
- "fleet.bmp" - Used to represent the GUI button that brings up the fleet placement menu. If you change battleship.bmp, carrier.bmp or sub.bmp you may want to change this.
- "laser.bmp" - Used to represent shots fired from fighters, bombers, battleships, subs, and silos in AA mode.
- "map.bmp" - The image that is displayed in the territory selection screen at the start of the game
- "nukesymbol.bmp" - Used to represent a point which has been targetted by a nuke.
- "population.bmp" - Used to represent population when Population view is on.
- "radar.bmp" - Used to represent the radar coverage of a unit.
- "smallbomber.bmp" - Used to represent the number of bombers left in a carrier or airbase.
- "smallfighter.bmp" - Used to represent the number of fighters left in a carrier or airbase.
- "smallnuke.bmp" - Used to represent the number of nukes left in a sub, carrier or airbase.
- "targetcursor.bmp" -
- "territory.bmp" -
- "units.bmp" - Used to represent the GUI button that brings up the unit placement menu. If you change radarstation.bmp, silo.bmp or airbase.bmp you may want to change this.
- "water.bmp" -
- "water_shaded.bmp" - Used to create the shaded effect of the water in-game.
- "tornado.bmp" - Easter Egg
- "saucer.bmp" - Easter Egg
- "arrow.bmp" -
- "demo.bmp" - Image displayed to non-Steam demo users on closing Defcon. Highly recommended you don't change this.
- "demo_steam.bmp" - Image displayed to Steam demo users on closing Defcon. Highly recommended you don't change this.
- "lmb.bmp" - Icon used during the Tutorial to emphasis when the left mouse button must be used. Not much point changing this.
- "locked.bmp" - Used in the Server Listing window to show when a server is password protected.
- "mouse.bmp", "move.bmp", "resize_h.bmp", "resize_hv.bmp", "resize_v.bmp" - Cursors
- "pen.bmp" - Cursor used for drawing on the Whiteboard.
- "rmb.bmp" - Icon used during the Tutorial to emphasis when the right mouse button must be used. Not much point changing this.
- "tb_alliances.bmp" - Used to represent the GUI button that brings up the Alliances window.
- "tb_board.bmp" - Used to represent the GUI button that toggles Whiteboard mode.
- "tb_comms.bmp" - Used to represent the GUI button that toggles the Chat window on and off.
- "tb_eraseall.bmp" - Used to represent the GUI button in Whiteboard mode that clears the screen.
- "tb_info.bmp" - Used to represent the GUI button that toggles Info mode
- "tb_nukes.bmp" - Used to represent the GUI button that toggles Show Nukes mode.
- "tb_orders.bmp" - Used to represent the GUI button that toggles Show Orders mode.
- "tb_planning.bmp" - Used to represent the GUI button that enables drawing in Whiteboard mode.
- "tb_population.bmp" - Used to represent the GUI button that toggles Population view on and off.
- "tb_radar.bmp" - Used to represent the GUI button that toggles radar coverage on and off. If you change radarstation.bmp you may want to change this.
- "tb_scores.bmp" - Used to represent the GUI button that shows the Scores window.
- "tb_showall.bmp" -
- "tb_territory.bmp" - Used to represent the GUI button that toggles Show Territory mode.
- "tb_units.bmp" - Used to represent the GUI button that brings up the Unit Placement menu.
- "tick.bmp" -
- "Interfaces and dialogs"
- "Unit names"
- "Unit States"
- "Game messages"
- "Combat Attack Odds"
- "Unit Info"
- "Lobby Overlays"
- Node Mismatch - You need to check your travel_nodes file. Chances are you accidently placed a node in an area defined as land in sailable.bmp.
FINAL STAGES - Preparing the mod for distribution:
If you followed the mod preparation stages then this should be fairly easy. Assuming the only thing in your "Defcon/mods" folder is your mod then all you need to do is use your rar archiver (i.e. WinRAR) to rar "Defcon/mods" (you may want to rename the archive to match your mods name). The reason for rar'ing the mods folder is that it will make installation easier for other users as all they would need to do is extract it into their Defcon folder without first having to create a mods folder.
That's all well and nice if you didn't already have mods installed. Well, for those of you who have more than just your mod in your mods folder you will need to create another folder somewhere, call it "mods", copy your mod's folder into that folder, then rar that newly created mods folder.
Now to those of you silly people who didn't follow the preparation stages. You will need to now follow those stages, copy across all the files you changed and follow the above rar instructions.
FINAL STAGES - Distribution:
You may be wondering what to now do with your mod. If you're egar to get others playing it you may be wondering how to get it out into the public domain. Well, the first thing you should probably do is make a thread about your mod on the Introversion forum, namely in the Mod Projects section.
The next step is getting the file on the internet. There are a number of options you could persue in this area. You could upload the file to a fileshare server (i.e. rapidshare.com) although they tend to only keep the file for a limited time. Alternatively, you could host the file on your own website. Finally you could make a request the thread you created about your mod.
When you do manage to upload your mod somewhere, don't forget to include the link in your thread.
Finally, don't forget to post a link to your thread in the Defcon Modlist thread. This will hopefully grab zanzer7's attention so he can put it on his Defcon fansite.
- When I refer to "your Defcon directory" I mean the location of where you installed Defcon.
- Defcon's default installation location for Steam users is "C:\Program Files\Steam\steamapps\common\defcon".
- Defcon's default installation location for non-Steam users is "C:\Program Files\Defcon".
(To be continued...)