View Single Post
  #10  
Old December 21st, 2004, 01:15 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Dominions II mapfile parser

Only my own comment. If others dont jump in then its not worth doing anything about it. It depends on what you program in..
Code:

<random>(46):
NOSTART
forest small
neighbours: ['37', '55', '68']
<random>(62):
NOSTART

neighbours: ['58', '76']
<random>(82):

neighbours: ['73', '78', '81', '84', '89']
<random>(100):
forest mountain
neighbours: ['85', '87', '91', '97']



Its a very readable format for user info which may be all it needs to do. But not good for programming. If there is no terrain you leave a blank line. Actually 0 terrain is plains (default) so you might want to make that change. But if there is no blankline for NOSTART. That means that in a program the code would be something like "find swamp, check next line for neighboring 32, back up one or two lines to get province number for including special site location".

Im not sure if everything can be placed on one line and still be good for user reading, but possibly the NOSTART and terrains could be on the same line as the province number. That would make parsing abit easier, and make the neighbor line always be in the same spot in relation to those.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote