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

This Month's Specials

Air Command 3.0- Save $12.00
War Plan Pacific- Save $7.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening > Scenarios, Maps and Mods

Reply
 
Thread Tools Display Modes
  #1  
Old March 6th, 2007, 04:17 PM
Ballbarian's Avatar

Ballbarian Ballbarian is offline
Colonel
 
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
Ballbarian will become famous soon enough
Default Re: SemiRandom version 095

Thanks Jack. I will try to put something together tonight and send it to you. The specs are basically just normal map commands, but the wild card is the random stuff that can be added (and the file naming for terrain matching).
__________________
RanDom v2 - Map gen & Semirandomizer.
Province Editor - Custom province creation made easier.
God Editor - Custom pretender creation made easier.
Map Forge - Map editor
Reply With Quote
  #2  
Old March 6th, 2007, 05:00 PM
Jack_Trowell's Avatar

Jack_Trowell Jack_Trowell is offline
Second Lieutenant
 
Join Date: Oct 2006
Location: Toulouse, FRANCE
Posts: 436
Thanks: 150
Thanked 21 Times in 13 Posts
Jack_Trowell is on a distinguished road
Default Re: SemiRandom version 095

Yes, I have been thinking of a way to add you semi-random commands feature to my editor, and I think I found a way to use a similar system in XML.

It will take some work to code it, but it should be useful.

This is an exemple of a province in XML form :
(it's the central province from the map "fourmaggedon")

Quote:
<PROVINCE killpop="1" poptype="61" population="45000">
<commanders name="Chalidor" mag_earth="5" mag_nature="4" unit_id="Troll King" xp="300">
<units number="35" unit_id="Troll" />
</commanders>
<commanders name="Morghal" mag_earth="5" mag_water="4" unit_id="Troll King" xp="300">
<units number="25" unit_id="Troll Moose Knight" />
</commanders>
<commanders name="Urgya" mag_fire="5" unit_id="Vaetti Hag" xp="300">
<units number="50" unit_id="Vaetti" />
</commanders>
<commanders name="Urgyuur" mag_fire="5" unit_id="Vaetti Hag" xp="300">
<units number="25" unit_id="Wolf Rider" />
</commanders>
<terrain_types>manysites</terrain_types>
<terrain_types>nostart</terrain_types>
<terrain_types>farm</terrain_types>
<terrain_types>somewater</terrain_types>
<terrain_types>large</terrain_types>
</PROVINCE>
The same province, but instead of having all the commanders, you would have one of them chosend randomly, *and* a lone normal troll king with 5 vaettis bodyguards :

Quote:
<PROVINCE killpop="1" poptype="61" population="45000">
<RANDOM>
<commanders name="Chalidor" mag_earth="5" mag_nature="4" unit_id="Troll King" xp="300">
<units number="35" unit_id="Troll" />
</commanders>
<commanders name="Morghal" mag_earth="5" mag_water="4" unit_id="Troll King" xp="300">
<units number="25" unit_id="Troll Moose Knight" />
</commanders>
<commanders name="Urgya" mag_fire="5" unit_id="Vaetti Hag" xp="300">
<units number="50" unit_id="Vaetti" />
</commanders>
<commanders name="Urgyuur" mag_fire="5" unit_id="Vaetti Hag" xp="300">
<units number="25" unit_id="Wolf Rider" />
</commanders>
</RANDOM>
<commanders unit_id="Troll King">
<bodyguards number="5" unit_id="Vaetti" />
</commanders>
<terrain_types>manysites</terrain_types>
<terrain_types>nostart</terrain_types>
<terrain_types>farm</terrain_types>
<terrain_types>somewater</terrain_types>
<terrain_types>large</terrain_types>
</PROVINCE>
The "<RANDOM>" tag should be usable, when I've finished coding, with any other tag to make the function generating the map code chose randomly one of the child nodes to use in plance of the random tag.
__________________
Q: "How many Vorlons does it takes to change a lightbulb ?"
A: "Yes !" &lt;stranges noises&gt;
--
Dominions Map validator and randomizer : http://dominions.realites.org
Dominions Map editor v0.75b : http://dominions.realites.org/map_editor
Reply With Quote
  #3  
Old March 6th, 2007, 10:58 PM
Ballbarian's Avatar

Ballbarian Ballbarian is offline
Colonel
 
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
Ballbarian will become famous soon enough
Default Re: SemiRandom version 095

Looks good!

If you have already downloaded SR, then you already have this, but I will paste the relevant details copied from the included readme below:

Code:

How to author GAN scripts (province files):
===========================================
It is assumed that you are familiar with map commands and map editing. The
format is pretty simple for editing GAN scripts and there are just a few rules
& suggested steps:
1. Look at existing GANs as a guide.
2. You do not need to add #nostart. This is added automatically.
3. You do not need to add #setland or #land. This is handled in the filename. (see below)

GAN FILENAME FLAGS:
-------------------
<Climates>
_HOT_ Hot Zone (southern map)
_CLD_ Cold Zone (northern map)
_TMP_ Temperate Zone (mid map)

<Patterns>
_IS_ ISLAND
_LK_ LAKE
_VC_ VOLCANO
_PN_ PENN
_VL_ VALLEY
_CO_ COAST
_LO_ LOST

<Treatment>
_R_ REPLACE - (#land) Set active prov & kill everyone in it. Used to REPLACE randomly placed units.
_A_ ADD - (#setland) Set active prov. Units added to existing.
_M_ MULTIPLE - More than one of a single province gan may be added to the map file.
_U_ UNIQUE - Once a single instance of the province gan is "picked", it can not be picked again.

<Terrain>
_S/L/N_ Small/Large/Normal
_PLN_ Plains
_SEA_ Sea
_WTR_ Some water
_MNT_ Mountain
_SWP_ Swamp
_WST_ Waste
_FST_ Forest
_FRM_ Farm
_MST_ Many Sites
_DEP_ Deep
_CAV_ Cave
_FS_ Fire Site
_AS_ Air Site
_WS_ Water Site
_ES_ Earth Site
_SS_ Astral Site
_DS_ Death Site
_NS_ Nature Site
_BS_ Blood Site
_PS_ Priest Site
_EMT_ Edge Mountain

SPECIAL GAN COMMANDS:
---------------------
@<value> <command>
->select a random line from the following <value> lines to follow this <command>.

Example #1:
@3 commander
"Minotaur Lord"
240 -- Priest
-- no commander
Result= "#commander 240 -- Priest" <- 1 in 3 chance to be printed in map file.

Example #2:
@1 landname
"Icky Swamp"
Result= "#landname <province#> "Icky Swamp" <- 100% chance to be printed in map file.

Example #3:
@2
#mag_astral 1
#mag_fire 1
Result= "#mag_fire 1" <- 1 in 2 chance to be printed. Note the space following "2 ".

Example #4:
@2 units
10 17 -- Archer
-- no Archer
Result= "-- no Archer" <- 1 in 2 chance to be printed. ie 50% chance of these units.

@RANDOM <command> <name or item list>
->select a random name or item to follow <command>.

Example #1:
@RANDOM landname FOREST
Result= "#landname <prov#> "Simple Woods"" <- Rnd name from DATA1 + rnd name from DATA2.
OR
Result= "#landname <prov#> "Ohmyg Forest"" <- Generated name + rnd name from DATA2.

Example #2:
@RANDOM comname COMMANDER
Result= "#comname "Kullray"" <- Generated name.

Example #3:
@RANDOM comname COMMANDER
@RANDOM additem HELMET
@RANDOM additem 1HANDWEAPON
@RANDOM additem SHIELD
@RANDOM additem ARMORHVY
@RANDOM additem BOOTS
@RANDOM additem MISCITEM
Result= <- Random item from the named item list.
#additem "Starshine Skullcap"
#additem "Jade Knife"
#additem "Weightless Tower Shield"
#additem "Silver Hauberk"
#additem "Boots of Stone"
#additem "Bracers of Protection"
(NOTE: I recommend only 1 or 2 MISC items as duplicates are possible!)



In a nutshell there are the flags used in the filename for pattern/terrain matching and flags for add/replace and multi/unique. Plus the following two structures:
@<value> <command>
@RANDOM <command> <name or item list>

A list of the current name & item lists can be pulled from "\LIST_CRATE\NameList.txt". The user should probably be given the option to select from the list or to enter a custom selection to allow for future additions or their own creations.

Oops, I was going to email this to you, but eh. I am a walking zombie tonight.
__________________
RanDom v2 - Map gen & Semirandomizer.
Province Editor - Custom province creation made easier.
God Editor - Custom pretender creation made easier.
Map Forge - Map editor
Reply With Quote
  #4  
Old March 7th, 2007, 10:45 AM
Jack_Trowell's Avatar

Jack_Trowell Jack_Trowell is offline
Second Lieutenant
 
Join Date: Oct 2006
Location: Toulouse, FRANCE
Posts: 436
Thanks: 150
Thanked 21 Times in 13 Posts
Jack_Trowell is on a distinguished road
Default Re: SemiRandom version 095

Thanks, I should have all needed informations there.
__________________
Q: "How many Vorlons does it takes to change a lightbulb ?"
A: "Yes !" &lt;stranges noises&gt;
--
Dominions Map validator and randomizer : http://dominions.realites.org
Dominions Map editor v0.75b : http://dominions.realites.org/map_editor
Reply With Quote
Reply

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 10:15 AM.


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