Assistance Required on Creating Modifications.

Discuss your new mods and themes here

Moderator: Defcon moderators

Vaud
level0
Posts: 3
Joined: Sun Jun 24, 2012 7:43 pm

Assistance Required on Creating Modifications.

Postby Vaud » Sun Jun 24, 2012 7:52 pm

Well, basically, I'm going to create a lot of modifications, starting off with a Europe modification.

However, I'm unsure what the files "ai_markers.bmp", "coastlines.dat", "international.dat" and "travel_nodes.bmp" in the "earth" folder do, and how I alter them for the modifications. In addition, I'm unsure on where I get the figures to put in the "cities.dat" file (the figures in the last four sections).

Thanks!
User avatar
SpitJock
level1
level1
Posts: 74
Joined: Wed May 16, 2012 10:15 am
Location: Cheyenne Mountain

Postby SpitJock » Thu Jun 28, 2012 3:06 pm

Are you still stuck with all of this? You may not get many replies, as there are good descriptions of *most* of this already in other threads or elsewhere on the web. It must be admitted that they do take a bit of finding though...

To take things in order:

1. ai_markers.bmp specifies where AI players will place their fleets, and where their fleets will attempt to attack from. I must confess, I cannot recall if it's red for place, green for attack, or the other way round.

2. coastlines.dat specifies a series of points between which Defcon will draw - you guessed it - coastlines. It will start at the first point, draw a straight line to the next point, and continue to draw lines to each next point in the sequence. Separate blocks of coastlines are denoted by starting each block with a single 'b' character on a line,repeated twice. IIRC, Defcon uses a cartesian grid, with the origin (0,0) in the centre, (-180,-100) in bottom left, and (180,100) at top right. So for example, the following would draw a small square in the centre of the screen, centred on the origin :
b
b
-20.0000 20.0000 (start at left of origin, and above)
20.0000 20.0000 (draw a line to right of origin, still above)
20.0000 -20.0000 (draw from there to right of origin, but below)
-20.0000 -20.0000 (draw from there, to left of origin, below)
-20.0000 20.0000 (draw from there back to original start position)
b
b

HINT: If you don't get what any of that means, you will find it very hard to mod these files. Read up on plotting points on a graph, perhaps...

3. international.dat works as coastlines.dat, but draws the thinner "political borders" lines on the map.

4. Travel_nodes.bmp can get tricky. They all have to be placed in sailable territory (as defined by sailable.bmp) and must be placed such that, for each node, there exists at least one straight line connecting it to another node *without that line crossing non-sailable territory*.

5. Cities.dat : The first two numbers are (X,Y) co-ordinates for city placement (as per international.dat and coastlines.dat). The next number is the city's population (handled proportionally with all the other cities when rendered in Defcon), and the last number is 1 if the city is capital of its country, and 0 otherwise.


Hope this helps.

post-edited for spelling... SpitJock
Vaud
level0
Posts: 3
Joined: Sun Jun 24, 2012 7:43 pm

Postby Vaud » Thu Jun 28, 2012 4:13 pm

Thanks so much for your help!!!!! Really appreciated it.
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Thu Jun 28, 2012 8:17 pm

SpitJock wrote:IIRC, Defcon uses a cartesian grid, with the origin (0,0) in the centre, (-180,-100) in bottom left, and (180,100) at top right.

My recollection my be off, but I think that the map is "upside down." That is, the lower left coordinate is (-180,100), and the upper right is (180,100), or something like that. This can be easily confirmed or disproven by copying a portion of the file into a spreadsheet and plotting the points. It should be clear how it works. Incidentally, something like Excel is not bad for editing coastlines.dat, international.dat, and cities.dat, as it can be used to quickly plot the points and see how they work out.

xander
Vaud
level0
Posts: 3
Joined: Sun Jun 24, 2012 7:43 pm

Postby Vaud » Sat Jun 30, 2012 12:17 am

Thanks! :D!

Return to “Mod Projects”

Who is online

Users browsing this forum: No registered users and 15 guests