Hi all,
I'm a recent convert to DefCon, and as someone who watched WarGames wide-eyed as a kid, I can't believe it's taken me this long to find the game
After playing it a while, I'd like to try my hand at a mod. Disclaimer: I get the concept, I've extracted main.dat and had a peek at its various components, I've read the various FAQ's on the subject, etc.
What I'd like to mod is two things:
1. I'd like to open up many of the sailable areas that are not currently sailable in the game. For instance, the Mediterranean Sea; the Suez Canal; the Panama Canal; etc.
2. I'd like to mod the game so that naval units can't be placed in the middle of the ocean, where they inevitably wind up running into enemy fleets within two seconds. I'd like to restrict naval unit placement to areas quite close in to a region's home shores.
For mod item #1, I see that sailable.bmp is the key, but I'm not sure how to edit it so that the areas mentioned are opened up. Do I just go in with a small eraser tool in my graphics editor and turn black areas (land) into white (sailable sea)? Surely it's not that simple And while on the subject, is GIMP really necessary to edit the bmp? I have Photoshop, but when I tried to open the bmp it wasn't able to open it.
For mod item #2, I see that each region's bmp has a blurred area that corresponds to the placement area in the game. So do I just erase the edges of those areas in each region's bmp until there's just a little sliver next to the country's coastlines? Again I suspect there's more to it than that, but I'm just unsure exactly how that's done.
And finally, disclaimer #2: I know many of you may think these are retarded ideas to do as mods, and for all I know you're probably right But please bear with me...even if no one here would be interested in using these mods, I have a buddy who I play against fairly often, and he and I at least would be happy with these two mods.
Oh, and apologies if this has been covered ad nauseam; Search didn't reveal the answer to me.
Thanks very much!
Dave
new to Defcon and modding--question on editing
Moderator: Defcon moderators
Think you guessed everything right.
for #1 if you have trouble sailing your ships in the new waters, you may have to edit travle_nodes aswell, but try without before.
for #2 if you want CPU players playing your mod, you have to make sure the green dots in ai_markers are inside the fleet deployment areas.
And dont forget to post screenshots and a download link here when you have finished it.
for #1 if you have trouble sailing your ships in the new waters, you may have to edit travle_nodes aswell, but try without before.
for #2 if you want CPU players playing your mod, you have to make sure the green dots in ai_markers are inside the fleet deployment areas.
And dont forget to post screenshots and a download link here when you have finished it.
Hmmmm....ok, I think I need a slight push in the right direction.
Here's what I've done (I'm on a Mac, BTW). I went to Finder, did "Show Package Contents" for Defcon.app, and got a new Finder window showing the package contents. I located the main.dat file, changed the file name to main.zip, and was able to unzip its contents (the infamous "data" folder).
In it, I found the northamerica.bmp file, opened it in Photoshop (I'm not sure why I got a Photoshop error the first time I tried this...now it seems to be working fine), and edited the grey areas where navies can be placed. All I did was erase a bunch of the area so that very little was left--I didn't add anything. I then saved the file in Photoshop.
Then I right-clicked on the "data" folder and chose "Compress Files..." A .zip file was created. I renamed it to main.dat, thus (as far as I can see) restoring everything to its initial state, except containing the edited northamerica.bmp.
But then when I tried to start DefCon.app to see if my edited file worked, I get once of those "Ignore/Relaunch/Close" crash errors, and the game doesn't start.
What am I doing wrong? I assume it's something in the way I'm unpacking and repacking the main.dat files...is there a trick to that?
Thanks,
Dave
Here's what I've done (I'm on a Mac, BTW). I went to Finder, did "Show Package Contents" for Defcon.app, and got a new Finder window showing the package contents. I located the main.dat file, changed the file name to main.zip, and was able to unzip its contents (the infamous "data" folder).
In it, I found the northamerica.bmp file, opened it in Photoshop (I'm not sure why I got a Photoshop error the first time I tried this...now it seems to be working fine), and edited the grey areas where navies can be placed. All I did was erase a bunch of the area so that very little was left--I didn't add anything. I then saved the file in Photoshop.
Then I right-clicked on the "data" folder and chose "Compress Files..." A .zip file was created. I renamed it to main.dat, thus (as far as I can see) restoring everything to its initial state, except containing the edited northamerica.bmp.
But then when I tried to start DefCon.app to see if my edited file worked, I get once of those "Ignore/Relaunch/Close" crash errors, and the game doesn't start.
What am I doing wrong? I assume it's something in the way I'm unpacking and repacking the main.dat files...is there a trick to that?
Thanks,
Dave
First off, the data archive is a .rar archive, not a .zip. If you zipped it up, then it wouldn't have worked, and is almost certainly the reason that Defcon crashed. Second, you are correct -- this mod of yours belongs in a mod directory. Specifically, you need to create a directory with your mod's name, then a sub-directory called "data/". Look at some of the other mods to see what it should look like.
So, my advice is this: copy main.dat from the app bundle, and keep the original right where it is. Don't touch it, don't edit it, don't do anything to it. Observe the directory structure of your unarchived copy, and move any file that you change to the appropriate place in your mod's folder. Activate the mod in Defon, and you should be good to go.
However, note that any changes to the map (i.e. the sailable regions, or the placement regions) will cause your mod to be a "critical mod". This means that any player you wish to play against will require a copy of the mod, as well.
xander
So, my advice is this: copy main.dat from the app bundle, and keep the original right where it is. Don't touch it, don't edit it, don't do anything to it. Observe the directory structure of your unarchived copy, and move any file that you change to the appropriate place in your mod's folder. Activate the mod in Defon, and you should be good to go.
However, note that any changes to the map (i.e. the sailable regions, or the placement regions) will cause your mod to be a "critical mod". This means that any player you wish to play against will require a copy of the mod, as well.
xander
Right--thanks xander, that was helpful and answered many of my questions. I'll make sure to use a rar utility in future.
One quick question--what files does DefCon use to determine where naval fleets can be deployed? I thought it was just each region's BMP file (like northamerica.bmp for the North American deployer) plus sailable.bmp, and that's it. Are there other files involved? I've edited both of those files to allow fleets to be deployed much closer to shore, but for some reason when I try to do it in the game as the North American player, I can see that my edited northamerica.bmp is in the game, but I can't deploy my naval forces ANYWHERE. Not good!
Any ideas on what else I need to be looking at? Are one or more of the .DAT files involved somehow as well?
Thanks!
Dave
One quick question--what files does DefCon use to determine where naval fleets can be deployed? I thought it was just each region's BMP file (like northamerica.bmp for the North American deployer) plus sailable.bmp, and that's it. Are there other files involved? I've edited both of those files to allow fleets to be deployed much closer to shore, but for some reason when I try to do it in the game as the North American player, I can see that my edited northamerica.bmp is in the game, but I can't deploy my naval forces ANYWHERE. Not good!
Any ideas on what else I need to be looking at? Are one or more of the .DAT files involved somehow as well?
Thanks!
Dave
trickser wrote:The fleet deployment area is defined by the territory image only. You just have to use the right shade of grey, like in the original (from the middle of the area, not from the edges). In fact, you can even deploy the fleet on land, if you want to.
Ah, okay, thanks--I guess I must not have had my grey shaded correctly. I'll fix that when I get a chance.
So if sailable.bmp has no effect on fleet placement, what would happen if you placed a fleet on land? Would you simply not be able to make it move anywhere in the game?
Who is online
Users browsing this forum: No registered users and 6 guests