Random Map Seasons

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
Gilmegil
Posts: 3
Joined: August 9th, 2008, 2:36 pm

Random Map Seasons

Post by Gilmegil »

I like to play multiplayer on random maps but I hate it when the maps are always dotted with random patches of snow. If I want to play on a summer map I have to create a map with the Map Editor and remove all the snow manually. As I'd like to have a completely unknown map I could explore with the shroud on, this ruins the exitement. Therefore, I'd like to be able to generate a summer random map where would be no snow or ice at all. Likewise, it would be nice if there was an autumn random map generator option as well, where forests would have nice autumn colours.
User avatar
Ken_Oh
Moderator Emeritus
Posts: 2178
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Re: Random Map Seasons

Post by Ken_Oh »

You could make a random map scenario with those things. Open up ~/Wesnoth/data/multiplayer/scenarios/Random_Scenario.cfg and look for temperature.

All except for the autumn bit, which would require art on your part.
User avatar
Jetrel
Posts: 7242
Joined: February 23rd, 2004, 3:36 am
Location: Midwest US

Re: Random Map Seasons

Post by Jetrel »

Gilmegil wrote:I like to play multiplayer on random maps but I hate it when the maps are always dotted with random patches of snow. If I want to play on a summer map I have to create a map with the Map Editor and remove all the snow manually. As I'd like to have a completely unknown map I could explore with the shroud on, this ruins the exitement. Therefore, I'd like to be able to generate a summer random map where would be no snow or ice at all. Likewise, it would be nice if there was an autumn random map generator option as well, where forests would have nice autumn colours.
Visually, it does look like crap, and we could really use a good autumn permutation of the existing terrain graphics. Also - deciduous forest, besides just evergreen.
Play Frogatto & Friends - a finished, open-source adventure game!
User avatar
Longbow
Posts: 303
Joined: May 18th, 2008, 3:59 pm

Re: Random Map Seasons

Post by Longbow »

As I make most of my maps to look nice rather than balance I would be in favour of seasonal tree variations, perhaps lighter color spring ones like savanna grassland aswell. Visually, if some talented person could color the trees well then it'd make a pleasant contrast as we lack brown-gold terrain(?)
My campaign, Elvish Legacy
My inventively named Era
User avatar
Melon
Posts: 193
Joined: February 8th, 2008, 2:30 am
Location: Calgary

Re: Random Map Seasons

Post by Melon »

I've actually made a couple of random maps for my own purposes a while back. The "temperate" map is generated with no snow, less desert, impassible mountains at high altitude and more shallow water. The "caverns" map generates a cave (Standard day/night cycle applies).

What I was wondering is if the map generator could be rigged to randomly generate doodads and landmark (Windmills, sand craters, occasional giant trees, etc). Perhaps some sort of algorithm can be implemented to check for favorable terrain to have the random chance of a landmark appearing. For example if a tile is a forest tile and is surrounded by at least 4 other forest tiles it has a 5% chance of being converted into a "great tree" tile. Is this technically possible?
Attachments
Random_Scenario_Caverns.cfg
(4.29 KiB) Downloaded 195 times
Random_Scenario_Temperate.cfg
(5.84 KiB) Downloaded 202 times
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Re: Random Map Seasons

Post by Viliam »

Melon wrote:For example if a tile is a forest tile and is surrounded by at least 4 other forest tiles it has a 5% chance of being converted into a "great tree" tile. Is this technically possible?
I guess this could be done in WML as a "prestart" event.
User avatar
Melon
Posts: 193
Joined: February 8th, 2008, 2:30 am
Location: Calgary

Re: Random Map Seasons

Post by Melon »

Viliam wrote:
Melon wrote:For example if a tile is a forest tile and is surrounded by at least 4 other forest tiles it has a 5% chance of being converted into a "great tree" tile. Is this technically possible?
I guess this could be done in WML as a "prestart" event.
Thanks Viliam! I've tried doing as you said, but after fiddling around with the code for a while, I finally realized that I have absolutely no idea how WML works (Everything I've done with it up till now was a hack job based off of other peoples codes). If someone can give me a sample of what it should look like, I'm sure I'll be able to figure it out and expand on it. Thanks in advance.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Random Map Seasons

Post by zookeeper »

Melon wrote:
Viliam wrote: I guess this could be done in WML as a "prestart" event.
Thanks Viliam! I've tried doing as you said, but after fiddling around with the code for a while, I finally realized that I have absolutely no idea how WML works (Everything I've done with it up till now was a hack job based off of other peoples codes). If someone can give me a sample of what it should look like, I'm sure I'll be able to figure it out and expand on it. Thanks in advance.
Here you go:

Code: Select all

[event]
    name=prestart
    
    [store_locations]
        terrain=Gs^Fp
        
        [filter_adjacent_location]
            terrain=Gs^Fp
            count=4-6
        [/filter_adjacent_location]
        
        variable=potential_great_trees
    [/store_locations]
    
    {FOREACH potential_great_trees i}
        {RANDOM 0..100}
        
        [if]
            [variable]
                name=random
                less_than_equal_to=5
            [/variable]
            
            [then]
                [terrain]
                    x,y=$potential_great_trees[$i].x,$potential_great_trees[$i].y
                    terrain=Gg^Fet
                [/terrain]
            [/then]
        [/if]
    {NEXT i}
    
    {CLEAR_VARIABLE potential_great_trees}
[/event]
Goes inside the [scenario] or [settings] tag.
User avatar
Melon
Posts: 193
Joined: February 8th, 2008, 2:30 am
Location: Calgary

Re: Random Map Seasons

Post by Melon »

Thanks a lot zookeeper! That worked out great!

Here are 3 maps I made based off of zookeepers script:
Random Scenario Temperate: Similar to the one I posted before, but featuring more terrain variation and overall aesthetic appeal.
Random Scenario Temperate Castles: Same as above but with additional randomly generated keeps.
Random Scenario RPG: Featuring randomly generated groups of computer controlled enemies.

Other stuff that can be added in the future: More landmarks, maybe put some stuff from "data\core\images\scenery" to good use. Random treasure and more encounters for the Random RPG map.
Attachments
Random_Scenario_RPG.cfg
(43.09 KiB) Downloaded 176 times
Random_Scenario_Temperate_Castles.cfg
(17.63 KiB) Downloaded 188 times
Random_Scenario_Temperate.cfg
(11.98 KiB) Downloaded 171 times
ilor
Inactive Developer
Posts: 129
Joined: March 24th, 2008, 9:05 pm

Re: Random Map Seasons

Post by ilor »

I think this would still be better as a map generator feature -- at least from the map editor's point of view. Not sure how, though, given how much can be done with WML, maybe add a "postprocess" section in the generator definition?
Post Reply