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

This Month's Specials

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

   







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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old June 15th, 2004, 03:23 AM

nakomus nakomus is offline
Private
 
Join Date: Feb 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
nakomus is on a distinguished road
Default Random map files and annotations: Python

A while back I posted in a thread about Gandalf�s random map generator; I commented that I had tried writing a similar program in Python but failed. Soon after I reattempted the problem, and was successful in generating simple random opponents.

I was also thinking about the semi-random map idea and what one would need to be able to do to make semi-believable random maps. In order for a program to modify the map file in a believable way I concluded it really ought to have an model of the world internally, based on the information in the mapfile.

Anyway, the point is I have a I have Python code that reads in a mapfile and extracts province numbers, terrain types, and neighbors. Each province is an object with terrain and connection data associated with. Human and AI player information is in another object.

I can form provinces into lists or unordered sets pretty easily and work with them; for example, I could look at the set of provinces with the water terrain flag to see if the map has enough water provinces to allow water nations as AIs.

Currently I have two problems:
1) It doesn�t really do anything. I can pull all this information out of the map file, but I don�t have any real great idea for what to DO with it after that.

2) Its not packaged for distribution, I call use it from an interactive python session. It wouldn�t be too hard to make it into a script that could be called from the command line with arguments once I can do more than just make random opponents; although the odds of seeing a standalone executable in the near future is poor.

So what I�m wondering is, what should I do with all this map information? (I could parse more map commands if it was interesting, also). I can do things like #nostart provinces that don�t have enough (or too many) neighbors. With a bit of work I could assign the AI and/or human starting provinces (this would be nation-specific) and guarantee that no one starts right next to someone else.

Going back to the semi-random-maps discussion, is anyone making armies or army/site combinations that could be dropped into a map file?

I know Gandalf and Lief(spelling?) have there own map-randomizers. I�m not sure how what I�m doing overlaps with what you are doing;

My impression from Poke in The Eye and family at least, is that those generators are not very context-aware, putting randomly generated troops in provinces where they will drown, for example.

SO: What sort of things would you like to be able to do based on terrain and neighbors? What level of interest is there?

If Anyone is interested, I can email you a copy of code although its not terribly user friendly at this point.
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 03:38 AM.


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