.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #13  
Old December 23rd, 2004, 11:32 AM
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

Quote:
CJN said:
How about:
Line 1: Name, id
Line 2: Terrain
Line 3: Neighbours
Line 4: NOSTART, START, VP, etc.
Line 5->: commanders, features, population, buildings

Oohhh name of the province? Much variable there. That is difficult to parse. How about if as much as possible, which can easily be parsed, be on one line. Then the difficult to parse can be seperated by "newline" as long as they always can be found on that line each time. Such as...
Line 1: Name
Line 2: id, Terrain, NOSTART, VP, etc
Line 3: Neighbors

That way even if there are no Neighbors it should still have a line which says Neighbors with no other output.

Quote:
There is also the problem that there are two ways to add nostart. As a terrain flag and as a separate command. Should the output differ for them?
Well the purpose I see is either for Users/map-makers who want readable info.. or for people who want to include it into a scripting pipe as an easy way to get info they didnt want to figure out how to extract. So Id say just put NOSTART when applicable no matter how its generated.

Quote:
Line 5->: commanders, features, population, buildings
OUCH that puts a wrench into the whole thing. It means that I cant just count lines and say "if line 2 has NOSTART skip next 2 lines and check again".

OK now Im thinking there are two ways to go. One is to have a unique character or Groups of characters flagging the begining of each province output. Such as -=- which can be used to count from or jump to the next province. The problem is finding something which in a script environment such as linux doesnt mean something special already. OR add a switch such as -v for more verbose output and have two outputs. One for all info, and the other for easy-parse info. Hmmm wait, the more casual user should always be considered for defaults. So maybe have the fully englished curious-user output be default with a -s short-Version for script programmers.
__________________
-- 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
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 06:17 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.