.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Utility: SemiRandom project beta release / announcement... (http://forum.shrapnelgames.com/showthread.php?t=32914)

Ballbarian January 23rd, 2007 03:50 AM

SemiRandom project beta release / announcement...
 
1 Attachment(s)
SemiRandom ver 0.89
Author: Ballbarian
Home Page: http://www.dom3minions.com/~semirand/
Submit Files: semirand -AT- dom3minions.com
------------------------------------------------------------------------------

Should run on Windows & Unix systems. -- I have not tested it on Unix!
Written in YABASIC, but it is not required to run this program.
It will be needed if you want to fiddle with the source code.
------------------------------------------------------------------------------


What it is:
===========
SemiRandomizer is a project inspired by Gandalf Parker's "Semi-Random maps"
article at: http://www.dom2minions.com/~minion/SemiRandom.shtml

This is my take on his fine idea. http://forum.shrapnelgames.com/images/smilies/happy.gif
------------------------------------------------------------------------------


What it does:
=============
SemiRandomizer (SR) takes an existing map file that you specify and appends
pieces of map code to it. These pieces are stored in what I have named "GAN"
files in honor of Gandalf's inspiration. You specify what percentage of the
provinces to modify and SR will select that many random locations on the map
and try to match them up with existing gan files. Several factors influence
what constitutes a match: terrain, terrain patterns, climate, province size,
and uniqueness.
------------------------------------------------------------------------------


What it still needs:
====================
I have a base of around 90 province files built up, 50 of which are converts from Edi's Faerun map (with his permission), and a handful are exaggerated scripts just to show some of what is possible. So it needs more province files with original ideas and more name lists (there are over 30 now) to support a few terrains that I have not gotten to yet. Gandalf has already contributed some great name lists which are now included in the download. He has also been kind enough to donate server space for maintaining a library of province, data and set files.

To submit files to be added to the server, simply email individual text files to the address above, or zipped sets of the files and I will add them to the library.

If you have any problems figuring it out, or getting it to run on your system, feel free to post here, or drop me a line and I will try to help.

------------------------------------------------------------------------------


For more information see the ReadMe included in the zip, or view it online at:
http://www.dom3minions.com/~semirand...ges/ReadMe.txt

Edit:
The attached zip file now also has the missing NameList.txt.

Ighalli January 23rd, 2007 01:59 PM

Re: SemiRandom project beta release / announcement...
 
The NameList file seems to be missing from the archive.

Ballbarian January 23rd, 2007 03:26 PM

Re: SemiRandom project beta release / announcement
 
Thank you Ighalli.
When will I learn to never upload anything after midnight. http://forum.shrapnelgames.com/image...s/rolleyes.gif http://forum.shrapnelgames.com/images/smilies/happy.gif

I have corrected the attachment so that it now contains the missing text file. So that you don't have to downoad the zip again, here are the contents of NameList.txt:
Quote:


CAVE_DATA1
CAVE_DATA2
COMMANDER_DATA1
COAST_DATA1
COAST_DATA2
FARM_DATA1
FARM_DATA2
FOREST_DATA1
FOREST_DATA2
LAKE_DATA1
LAKE_DATA2
MOUNTAIN_DATA1
MOUNTAIN_DATA2
OCEAN_DATA1
OCEAN_DATA2
PLAINS_DATA1
PLAINS_DATA2
SWAMP_DATA1
SWAMP_DATA2
HDNAME_DATA1
HDBLEND_DATA1
1HANDWEAPON_DATA1
2HANDWEAPON_DATA1
ARMORHVY_DATA1
ARMORLT_DATA1
BOOTS_DATA1
HELMET_DATA1
MISCITEM_DATA1
SHIELD_DATA1
JUNGLE_DATA1
JUNGLE_DATA2



Ballbarian January 23rd, 2007 10:20 PM

Re: SemiRandom project beta release / announcement
 
1 Attachment(s)
I had a simple distribution map that I used to get a better picture of how the province distribution was working, so tonight I played around in Gimp and thought I would share it here to hopefully give folks an rough idea of what this utility does.

http://www.shrapnelcommunity.com/thr...753-R2dist.jpg

This distribution is on a 103 province medium random map using border mountains. The fiddle count in the config was set at 100 and SR placed 31 provinces out of it's current minimal library. As you can see, some of the random name generation leaves a lot to be desired, but it has a pretty fair average of getting something that sounds right. In future versions I will likely spend a little more time adding more rules to avoid names like Ngap & Dsch. http://forum.shrapnelgames.com/image...ies/tongue.gif

Take note of "Neverben Caverns" in the northwest. It is a border mountain province with only 1 neighbor and has had it's terrain crudely modified to CAVE and placed a Bakemono tribe there. Even if it would not have added a special there, it would still have changed the terrain. (I want caves in my random maps!). Also note that I used the default option of a cold north & a hot south, so Calimport (Hot) was placed in the south, and Citadel Adbar (Cold) was placed in the north. The configuration also allows defining province ranges as "climate bands" with a real world style of arctic poles at north & south edges of the map, and a hot central equator with temperate climates in between:

Default:
Cold
Temperate
Hot
5 Band option:
Cold
Temperate
Hot
Temperate
Cold

Right now the configuration file is crude, but it works. In the future I hope that I or someone knowledgeable in a friendly cross platform language can write a simple front end for SR.

Gandalf Parker January 24th, 2007 12:59 AM

Re: SemiRandom project beta release / announcement
 
Cool. The temp zones thing will work well with an idea I had. Just for variation I can run random generation in "module" sizes like 100 or 200 or 500 provinces. If I choose one of the white-ground ones, and a light green one, and a dark green one; then paste them together. That will give me a map that would fit your default scheme of cold tundra, then temperate forest, then hot-tropical jungle.

Agrajag January 24th, 2007 09:02 AM

Re: SemiRandom project beta release / announcement
 
If you are really lazy I can send over some C code I wrote that randomly generates words that sound right, are pronounceable, and best of all, it uses adjusted probabilities of the letter appearing in the alphabet (for example, the chance of getting an "f" is much greater than the chance of getting an "x").
Its downside is that it uses only 3 word templates to generate words in order to be sure you are getting a word that sounds right. Though adding more templates should be easy.

If you want it send a PM.

Ballbarian January 24th, 2007 10:02 AM

Re: SemiRandom project beta release / announcement
 
Thanks Agrajab, I have sent you a pm. http://forum.shrapnelgames.com/images/smilies/happy.gif

@Gandalf,
When you get a set put together let me know. That sounds like it would be a neat map to play on.

Gandalf Parker January 24th, 2007 11:02 AM

Re: SemiRandom project beta release / announcement
 
Quote:

Agrajag said:
If you are really lazy I can send over some C code I wrote that randomly generates words that sound right

I might be interested in that. I might use it as it is, or convert it to the languages we are using.

Agrajag January 24th, 2007 12:14 PM

Re: SemiRandom project beta release / announcement
 
Don't get your hopes up too high, its a very simple program I wrote a long long time ago (the original version I can find is 27/03/2005).
The really cool part is that it generates letters according to adjusted probability of appearing in the english language, and that it is seperated into a/e/i/o/u and the rest of the letters, so it is easy to ensure you get a pronounceable word.
To generate words from those letters it just selects randomly from 3 word templates (aba,bab,abb), though more templates should be simple to add (baabaa and baabbaab are possible, but dangerous, but you could also go bababbabbabababbbaa etc.)

Everyone can view it over Here.
Also, I'd like to hear what people think about this ancient piece of code, even if its just saying it sucks or just isn't useful. If people like it I might make some cool improvements for fun (more templates, perhaps the ability to add templates, maybe generating into .txt files, maybe some sort of filtering etc.)

Ballbarian January 25th, 2007 10:17 AM

Re: SemiRandom project beta release / announcement
 
Working on a simple VB front end. It is now able to run the dom3 random map generator with user defined options supported by dom3's command line switches. After that is complete, SR can be executed on the generated map file and will then exit.

Gandalf Parker January 25th, 2007 12:40 PM

Re: SemiRandom project beta release / announcement
 
Cool. Are you going to include the map options that are in the switches but not in the in-game tool?

Ballbarian January 25th, 2007 03:21 PM

Re: SemiRandom project beta release / announcement
 
Yes. http://forum.shrapnelgames.com/image...ies/tongue.gif
Here's the screen shot that I posted with my bug report in the bug thread:
http://www.shrapnelcommunity.com/thr...-weirdness.JPG

Gandalf Parker January 25th, 2007 05:05 PM

Re: SemiRandom project beta release / announcement
 
Looks good.
And its not a switch but you might look at adding the commands for the color that displays the text names, and the default zoom, and wraparound.

Ballbarian January 25th, 2007 08:43 PM

Re: SemiRandom project beta release / announcement
 
I had not considered that, but I will. Excellent idea. http://forum.shrapnelgames.com/images/smilies/happy.gif

Ballbarian January 25th, 2007 11:16 PM

Re: SemiRandom project beta release / announcement
 
Ok, does anyone care to share a simple algorithm for converting to normal rgb from the decimal system used by Dom3 for the maptextcol command:
RGB(0-255,0-255,0-255)
#maptextcol <red> <green> <blue> with values between 0.0 to 1.0

I can get guestimations that are in general ranges, but not precise values without some rounding. It shouldn't be that hard, but I am tired and I don't want to spend all night trying to bend my mind. http://forum.shrapnelgames.com/image...ies/tongue.gif

Agrajag January 26th, 2007 05:04 AM

Re: SemiRandom project beta release / announcement
 
So multiplying by 255 doesn't work? O_o
Did you try rounding to the nearest integer? Did you try truncating? How about rounding up?

Ballbarian January 26th, 2007 09:49 AM

Re: SemiRandom project beta release / announcement
 
I think it is going to work fine by simple rounding. I was just trying to get the color displayed in the preview as close as possible to the result in game. Trying a little harder than was necessary last night. http://forum.shrapnelgames.com/image...ies/tongue.gif

Agrajag January 26th, 2007 09:59 AM

Re: SemiRandom project beta release / announcement
 
Well, the game probably uses some sort of rounding itself, so if both of you round the same way, it should produce exactly the same colors.

Ballbarian January 29th, 2007 04:19 AM

Re: SemiRandom project beta release / announcement
 
Playing around with name generation tonight and thought I would share the latest test run results for waste:

Quote:

#landname 1 "Wei Wound"
#landname 2 "Clou Hills"
#landname 3 "Uwil Wastes"
#landname 4 "Chiseled Worm"
#landname 5 "Cluttered Tears"
#landname 6 "Oda Limbs"
#landname 7 "Impaled Land"
#landname 8 "Estin Obituary"
#landname 9 "Ich Gravestone"
#landname 10 "Impaled Pain"
#landname 11 "Nei Skins"
#landname 12 "Ttedon Entrails"
#landname 13 "Slain Death"
#landname 14 "Ripping Dooms"
#landname 15 "The Horrid Wastes"
#landname 16 "Lamenting Scalps"
#landname 17 "Stolen Waste"
#landname 18 "Mourning Illness"
#landname 19 "Devastated Skins"
#landname 20 "Doomed Illness"
#landname 21 "Pumars Times"
#landname 22 "Rov Black"
#landname 23 "Loathed Headstone"
#landname 24 "Slain Flesh"
#landname 25 "Unusable Heads"
#landname 26 "Ever Buzzards"
#landname 27 "Blist Deaths"
#landname 28 "Heogl Veins"
#landname 29 "Ugly Fears"
REJECTED: #landname 30 "Lsuc Fumes"

#landname 31 "Slashed Corpses"
#landname 32 "Rufru Ills"
#landname 33 "Detested Limbs"
#landname 34 "Murdering Flesh"
#landname 35 "Erse Death"
#landname 36 "Ligh Pain"
#landname 37 "Fair Deads"
#landname 38 "Dig Dead"
#landname 39 "Akedok Dead"
#landname 40 "Disile Scalp"
#landname 41 "Excreted Ashes"
#landname 42 "Ugly Hills"
#landname 43 "Dead Bride's Sores"
#landname 44 "Mud Sores"
#landname 45 "Ove Horror"
#landname 46 "The Gouged Flesh"
#landname 47 "Brittle Fleshes"
#landname 48 "Gouged Sorrows"
#landname 49 "Injured Torsos"
#landname 50 "Doomed Organs"
#landname 51 "Keipo Times"
#landname 52 "Blood Soaked Hills"
#landname 53 "Fea Fears"
#landname 54 "Shrieking Scalp"
REJECTED: #landname 55 "Nks Graveyard"

#landname 56 "Obaye Blemish"
#landname 57 "Excreted Hills"
#landname 58 "Horizon of Barrens"
#landname 59 "Reaper's Death"
#landname 60 "Ihelme Flesh"
#landname 61 "'siblo Barren"
#landname 62 "Leo Scalps"
#landname 63 "Impaled Hands"
#landname 64 "Rest Passing"
#landname 65 "Chow Headstone"
#landname 66 "Accura Dust"
#landname 67 "Gere Torsos"
#landname 68 "Hardened Obituary"
#landname 69 "Gilah Horrors"
#landname 70 "Rot Ills"
#landname 71 "Terfr Moans"
#landname 72 "Owude Worms"
#landname 73 "Utia Blemish"
#landname 74 "Ssi Moans"
#landname 75 "Eapor Pimple"
#landname 76 "Regurgitated Veins"
#landname 77 "Howling Headstone"
#landname 78 "Mourning Grave"
#landname 79 "Dying Barren"
#landname 80 "Opiqui Torsos"
#landname 81 "Hiel Time"
#landname 82 "Ket Buzzards"
#landname 83 "Digr Scalp"
#landname 84 "Side Wounds"
#landname 85 "Lamented Sand"
#landname 86 "Utter Greys"
#landname 87 "Searching Waste"
#landname 88 "Barren Maggot"
#landname 89 "Bloodied Horrors"
#landname 90 "Ish Organs"
#landname 91 "The Litter Sulphurs"
#landname 92 "Orahar Pimple"
#landname 93 "Horedi Corpses"
#landname 94 "Blood Soaked Deads"
#landname 95 "Han Gravestones"
#landname 96 "Dying Death"
#landname 97 "Bidden Headstones"
#landname 98 "Dark Death"
#landname 99 "Alden Maggot"
#landname 100 "Geitid Corpses"


The "REJECTED:" lines are the result of a string screen sub that I am testing. I also have a working yabasic version of Arajag's word generator (with modifications) that I am playing with.

Ballbarian February 3rd, 2007 02:08 PM

Re: SemiRandom project beta release / announcement
 
The random name generation has been improved considerably since the last post. I have also found and corrected several errors in the initial GAN sets. Mostly a few Faerun provinces where I had missed removing a few #setland commands.

I am considering some additional options:

One would be the ability to label certain province designs as being era specific and allowing the user to specify early, middle, late or no preference. This would allow GAN authors to design a province using LA Atlantis units without the province appearing in an EA game.

The other would be an option to obscure or obfuscate the appended special provinces by stripping them of all comment lines and replacing strings with the numeric ID where possible. The idea is that it would make it less tempting to browse the map file prior to attacking a given province and limit spoilers.

So the following map code:

Quote:


-- Mithril Hall
#landname 95 "Mithril Hall"
#poptype 33 -- Lt. & Hvy Inf, X-bow
#killfeatures
#knownfeature "Great Gold Mine"
#knownfeature "Great Silver Mine"
#feature "The Vaults Beneath"
#feature "Gorge"

#commander 323 -- Dwarven Smith
#comname "Bruenor Battlehammer"

Would become:

Quote:


#landname 95 "Mithril Hall"
#poptype 33
#killfeatures
#knownfeature 253
#knownfeature 254
#feature 524
#feature 257
#commander 323
#comname "Bruenor Battlehammer"

It would still be possible to sort it out for a determined person with a numbered list at hand, and as far as I know, it is not possible to do the same with items.

Now, before I spend time implementing these changes, does anyone have an opinion? Is it something anybody would want? I have no problem staying out of the map file while playing my turns, so I can live without the 2nd option. I also don't personally care about filtering eras in my own games, but maybe someone else does?

Your $0.02 (converted to your preferred currency) requested... http://forum.shrapnelgames.com/images/smilies/happy.gif

DrPraetorious February 3rd, 2007 03:52 PM

Re: SemiRandom project beta release / announcement
 
You can strip out comments if you wish, but I'd prefer to keep them.

Gandalf Parker February 3rd, 2007 05:31 PM

Re: SemiRandom project beta release / announcement
 
comments in the .map file arent such a problem anymore since players dont have to have the map file to play.

DrPraetorious February 3rd, 2007 07:59 PM

Re: SemiRandom project beta release / announcement
 
As far as peeking goes - since it's impossible to prevent peeking (for anyone who has the map file, anyway), I prefer to simply publish the map file, make sure it is easy to read and peek.

OTOH, I can see how people might prefer to be surprised. I know this might be (a lot) of work, but would an execution flag that strips comments be possible?

Ballbarian February 3rd, 2007 08:19 PM

Re: SemiRandom project beta release / announcement
 
Either option would be a flag set in the config file prior to execution. I will leave the comments alone unless somebody changes my mind.

Any opinions on the whole Era filter question?

Gandalf Parker February 3rd, 2007 08:30 PM

Re: SemiRandom project beta release / announcement
 
era filter might be a good idea but be sure to allow for "I dont care" as probably a default.

Ballbarian February 10th, 2007 02:36 AM

Re: SemiRandom project beta release / announcement
 
Just a quick update. I am just coming out of a week long bout with the flu, so I have not made much progress. Currently playing a game on a modified random map and enjoying it very much. http://forum.shrapnelgames.com/image...ies/tongue.gif

One thing that I see that needs some attention is how to handle starts. I would like to add an option for the program to add start positions. It already marks any predefined start positions as off limits for modification, but when the game assigns starting positions, it could be right next door to a particularly tough special province. So if anybody could point me to a simple, efficient algorithm for placing start positions appropriately on an existing map using only information available within the .map file (not the image x,y coords), it would save this mathematically challenged hack from trying to reinvent the wheel. Currently looking at different path finding algorithms for inspiration.

Regardless, I will try to upload the latest version some time this weekend for anyone interested.


All times are GMT -4. The time now is 10:37 AM.

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