Sunday, September 2, 2007

[log] Map files

Now that the multiplayer maps have been extracted from the code, the same thing must be done for solo maps. Translating the maps will be easy, except for the triggers.

Here is an example of map file: multiplayer map 3. Some keywords may change in the future. I hope you will find the map language simple and concise but powerful enough.
; multiplayer map 3
;
; ***************
; 7* * * *
; * *** *** * * *
; 6* * * *
; *** * * *******
; 5* * *
; * * * * * * * *
; 4* * x * *
; * * * * * * * *
; 3* * *
; ******* * * ***
; 2*x* * *
; * * * *** *** *
; 1* *x x* *
; ***************
; A B C D E F G

title 4018 3003
objective 145 88


; map size

square_width 12

nb_rows 7
nb_lines 7


; paths (give only the starting square)

west_east_paths a1 c1 d1 f1
west_east_paths b2 c2 d2 f2
west_east_paths b3 c3 d3
west_east_paths c4 b4 d4 e4
west_east_paths c5 d5 e5
west_east_paths a6 c6 d6 e6
west_east_paths a7 c7 d7 f7

west_east_bridges a3 f3
west_east_bridges a5 f5

south_north_paths a1 a3 a4 a6
south_north_paths b1 b3 b4 b5
south_north_paths c3 c4 c5
south_north_paths d2 d3 d4 d5
south_north_paths e2 e3 e4
south_north_paths f2 f3 f4 f6
south_north_paths g1 g3 g4 g6

south_north_bridges c1 c6
south_north_bridges e1 e6


; resources
goldmines 150 a2 b7 g6 f1
goldmines 150 c1 a5 e7 g3
goldmines 150 e1 a3 c7 g5
goldmines 750 d4

;woods 75 a2 b7 g6 f1
woods 75 a1 a7 g7 g1
woods 75 e1 c7 a3 g5
woods 75 e2 c6 b3 f5
woods 75 e2 c6 b3 f5
woods 75 c1 a5 e7 g3
woods 150 d4 d4

minimal_space 2
additional_meadows a2 b7 g6 f1


; players

nb_players_min 2
nb_players_max 4

starting_squares a2 b7 g6 f1
starting_units townhall farm peasant
starting_resources 10 10

1 comment:

Anonymous said...

Custom is indeed the right word and the map language looks highly interesting.