|
|
|
 |

December 18th, 2004, 11:45 AM
|
 |
Corporal
|
|
Join Date: May 2004
Location: Münster, Germany
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Dominions II mapfile parser
I wanted to test it and I receive the following error:
IndexError: list index out of range
File "mapinfo.py", line 156, in ?
fname = sys.argv[1]
What should I do?
__________________
Algebraic geometry seems to have acquired the reputation of being esoteric, exclusive, and very abstract, with adherents who are secretly plotting to take over all the rest of mathematics. In one respect this Last point is accurate. --David Mumford
|

December 18th, 2004, 12:14 PM
|
Private
|
|
Join Date: Dec 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Dominions II mapfile parser
Quote:
Skolem said:
I wanted to test it and I receive the following error:
IndexError: list index out of range
File "mapinfo.py", line 156, in ?
fname = sys.argv[1]
What should I do?
|
Sounds like you didn't add the mapfile name when you ran it.
(sys.argv[1] = first command line argument)
Did you use IDLE to run in windows? Is it possible to add command line arguments when you use IDLE?
EDIT:
A new Version is now available, which has some improvements.
For details & download, see the first post.
|

December 18th, 2004, 01:40 PM
|
 |
Corporal
|
|
Join Date: May 2004
Location: Münster, Germany
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Dominions II mapfile parser
I tested it again with orania nasty ed. and it works great!
Last thing, he warned about one unknown command: #independents 9.
I'm pretty sure this maps use almost all possible map commands so it is indeed a good result. This will be surely very usefull for making maps
Thanks!
__________________
Algebraic geometry seems to have acquired the reputation of being esoteric, exclusive, and very abstract, with adherents who are secretly plotting to take over all the rest of mathematics. In one respect this Last point is accurate. --David Mumford
|

December 19th, 2004, 11:27 AM
|
Private
|
|
Join Date: Dec 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Dominions II mapfile parser
Quote:
Skolem said:
I tested it again with orania nasty ed. and it works great!
Last thing, he warned about one unknown command: #independents 9.
I'm pretty sure this maps use almost all possible map commands so it is indeed a good result. This will be surely very usefull for making maps
Thanks!
|
Well, that command is not in mapedit.pdf. I will add it next time I update. I guess that it sets the strength of independent forces, right? Does anyone know of any other undocumented map commands?
|

December 19th, 2004, 03:31 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Dominions II mapfile parser
Nicely done. The format isnt as friendly toward further programming as I might want, but I can see where it would be useful for many.
__________________
-- 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!)
|

December 20th, 2004, 06:57 PM
|
Private
|
|
Join Date: Dec 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Dominions II mapfile parser
Quote:
Gandalf Parker said:
Nicely done. The format isnt as friendly toward further programming as I might want, but I can see where it would be useful for many.
|
I might be able to do something about the format if you post some details about the problem.
|

December 21st, 2004, 01:15 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
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!)
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|