.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

Reply
 
Thread Tools Display Modes
  #1  
Old February 26th, 2004, 05:10 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 RanGame (random game generator project)

The DomMap project is going along well and able to create decent playable maps for Dom2. This thread is to discuss side programs such as I run which add randoms to the .map text file controlling the game which is played on a map. Examples of a randomized game can be found at my site such as the "Poke in the Eye"...
http://www.techno-mage.com/~dominion...2/Poke_Eye.map
which uses the eye.tga everyone gets with both the demo and the full game. It is re-randomized daily at my site scattering completely new surprises.


Psuedo-Code
-----------

copy the old .map to new keeping all of the #terrain and #neighbor
open new .map for append
add a line of "------------------" just for clarity between old and new

if the person adds AIs this randomly allies some
loop 13 times
Ally1 = random(0-17)
Ally2 = random(0-17)
if Ally1=Ally2 then redo
print "#allies " Ally1 Ally2
next loop

loop 1 to MaxProvinces how many provinces on the image
print "#setland " loop
X=random(0-50)
if X 0 then
print "#lab"
print "#temple"
print "# fort " random(0-24)
if X = 1 then fort and lab
if X = 2 then fort and temple
if X = 3 then lab and temple
if X = 4 then fort
if X = 5 then lab
if X = 6 then temple
if X = 7 then fort
if X = 8 then temple
if X greater than 8 then nothing
done with X now

Comndr = random(0 to MaxUnits) I think thats 1064 now?
BodyGrd = Comndr +or- random(1 to 5)
UnitType = Comndr +or- random (1 to 10)
print "#commander " Comndr
print "#randomequip 4"
print "#bodyguards " BodyGrd random(1 to 5)
print "#units " UnitType random(1 to 15)
next loop do the next province

[ February 26, 2004, 15:12: Message edited by: Gandalf Parker ]
__________________
-- 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
  #2  
Old February 26th, 2004, 11:07 PM

Leif_- Leif_- is offline
Sergeant
 
Join Date: Sep 2003
Location: Norway
Posts: 346
Thanks: 0
Thanked 0 Times in 0 Posts
Leif_- is on a distinguished road
Default Re: RanGame (random game generator project)

I've implemented your algorithm in a perl module, and also added support for it in the run_dom_map.pl script (by using the option "-Rm")

You can find all the scripts I've worked on as a zip-file at http://home.Online.no/~rmoldskr/Dominions/DomUtils.zip
__________________
"Freefall, my old nemesis! All I have to do is activate my compressed gas rocket boots and I will cheat you once again! Belt control ON!…On?" [i]Othar Trygvasson[i]
Reply With Quote
  #3  
Old February 27th, 2004, 03:45 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: RanGame (random game generator project)

Hmmm merged with the random generator would knock one one problem I thought of. If anyone does a standalone it would probably be a good "user friendly" thing to make it do a renaming of a map file. That way if the person runs it on eye.map the will still have eye.map and also eyex.map which will let them play in MP games later without messing things up.
Should probably also modify the #dom2title in the file accordingly. The targa doesnt need renamed by this program.
__________________
-- 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
  #4  
Old February 27th, 2004, 04:31 PM

Leif_- Leif_- is offline
Sergeant
 
Join Date: Sep 2003
Location: Norway
Posts: 346
Thanks: 0
Thanked 0 Times in 0 Posts
Leif_- is on a distinguished road
Default Re: RanGame (random game generator project)

Quote:
Originally posted by Gandalf Parker:
Hmmm merged with the random generator would knock one one problem I thought of. If anyone does a standalone it would probably be a good "user friendly" thing to make it do a renaming of a map file. That way if the person runs it on eye.map the will still have eye.map and also eyex.map which will let them play in MP games later without messing things up.
Should probably also modify the #dom2title in the file accordingly. The targa doesnt need renamed by this program.
I didn't think about that. Right now the generator just removes the old .map file and replaces it with a new. I'll change it so it creates two .map files when I get home from work.
__________________
"Freefall, my old nemesis! All I have to do is activate my compressed gas rocket boots and I will cheat you once again! Belt control ON!…On?" [i]Othar Trygvasson[i]
Reply With Quote
  #5  
Old February 27th, 2004, 05:48 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: RanGame (random game generator project)

OK a stepup that I added to mine. Sometimes I wanted to play a particular nation as being majorly boosted so I added a random to decide whether or not one of the special locations should cause a #own command to print. Such as selecting Ulm and having each fort/lab/temple site randomly decide whether to also make it an Ulm owned site.

Should I do the step-ups one at a time? they are easier to follow and we can discuss them that way. Or should I just to the "totally insane no one would possibly want to play this" list of all the step-ups including the ones I havent gotten to work right yet?

Is anyone lurking this thread who has a request?

[ February 27, 2004, 15:49: Message edited by: Gandalf Parker ]
__________________
-- 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
  #6  
Old February 27th, 2004, 05:50 PM

Leif_- Leif_- is offline
Sergeant
 
Join Date: Sep 2003
Location: Norway
Posts: 346
Thanks: 0
Thanked 0 Times in 0 Posts
Leif_- is on a distinguished road
Default Re: RanGame (random game generator project)

Quote:
Originally posted by Gandalf Parker:
OK a stepup that I added to mine. Sometimes I wanted to play a particular nation as being majorly boosted so I added a random to decide whether or not one of the special locations should cause a #own command to print. Such as selecting Ulm and having each fort/lab/temple site randomly decide whether to also make it an Ulm owned site.

Should I do the step-ups one at a time? they are easier to follow and we can discuss them that way. Or should I just to the "totally insane no one would possibly want to play this" list of all the step-ups including the ones I havent gotten to work right yet?

Is anyone lurking this thread who has a request?
Just do the full list - that way I can choose the ones I think are easiest to implement first.
__________________
"Freefall, my old nemesis! All I have to do is activate my compressed gas rocket boots and I will cheat you once again! Belt control ON!…On?" [i]Othar Trygvasson[i]
Reply With Quote
Reply

Bookmarks


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 07:48 PM.


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