# Random forest map generator?



## (Psi)SeveredHead

Does anyone know where I could find a good random forest map generator?

I'm looking for something along these lines - a computer program where you plunk in what percentage of squares should have trees in them, what percentage should have undergrowth, etc. (Basically, it would show a grid map, with each square having a color and/or symbol code telling you what's in it.)

I'm not looking for anything that makes pretty maps - I'd have to erase ink (!) to add rivers and stuff anyway. Besides, I could use it for making mountain maps, desert maps, scattering boxes in a warehouse, etc.


----------



## Nail

I'd like something like this too.  I have an Excell spreadsheet set-up, and I typically use clip-art and so on to build my forests....but a bit of visual basic or some such that would automatically and randomly do that would be great!


----------



## TogaMario

Hmm, I'm on it  - BlitzBasic to the rescue, i'll have something hopefully by tomorrow.


----------



## Angel Tarragon

(Psi)SeveredHead said:
			
		

> Does anyone know where I could find a good random forest map generator?
> 
> <snip>



What a great idea. This would come in handy for sure!


----------



## Nail

TogaMario said:
			
		

> Hmm, I'm on it  - BlitzBasic to the rescue, i'll have something hopefully by tomorrow.



   That would be tres cool.  Thanks.


----------



## TogaMario

I have an idea what I need to do for it, and although it might take longer than I thought at first, I just need to know what exactly you need it to do. Are colored squares good enough, or do you need more detail than that? Is it a larger world-type map, or smaller "dungeon"-like map?


----------



## TogaMario

Ok, here's a quick shot of what I've got so far (about an hours worth of work)

I haven't gotten to making it actually draw the image out, but the setup is done (as far as simple goes) Think of anything else you want to add? First I'll have it do just solid colors, then I'll have it add symbols. Which symbols it puts down and how will be determined by the questions asked above this post.


----------



## Angel Tarragon

I'd like it to be able to add in small rivers and likes at the users option.


----------



## (Psi)SeveredHead

TogaMario said:
			
		

> I have an idea what I need to do for it, and although it might take longer than I thought at first, I just need to know what exactly you need it to do. Are colored squares good enough, or do you need more detail than that? Is it a larger world-type map, or smaller "dungeon"-like map?




Wow, thanks!

I'm looking for a smaller dungeon-style map, not a world map 

I think you could use color for undergrowth (especially if there's two types) and symbols for trees. (This would let undergrowth and trees "stack", if you will.)

The tables in the DMG talked about light vs heavy undergrowth and small vs big trees, although I'm sure that makes the program more complicated (each type of undergrowth and tree can't stack).


----------



## Nail

(Psi)SeveredHead said:
			
		

> The tables in the DMG talked about light vs heavy undergrowth and small vs big trees, although I'm sure that makes the program more complicated (each type of undergrowth and tree can't stack).



Right --> Trees and undergrowth "stack" on a square.

BTW, when I've done these sorts of combat grids "by hand" (using Xcl), they made melee combat very unlikely.  The creatures with missile-fire reined supreme, while the charging orcish barbarians got no where fast.


----------



## TogaMario

Ok, I think I have a better idea of what you're aiming for. I have a great idea! Why don't I make it spit out two maps, one of the floor, dirt, undergrowth, treetrunks  and all, then a canopy cover for it, so you can remove it when the players enter, but they will at least know that it's trees, and not just stumps? Then, a post-production stage where you draw a "freestyle" line on the "floor" and it adds a river at a size you set in program?


----------



## (Psi)SeveredHead

TogaMario said:
			
		

> Ok, I think I have a better idea of what you're aiming for. I have a great idea! Why don't I make it spit out two maps, one of the floor, dirt, undergrowth, treetrunks  and all, then a canopy cover for it, so you can remove it when the players enter, but they will at least know that it's trees, and not just stumps? Then, a post-production stage where you draw a "freestyle" line on the "floor" and it adds a river at a size you set in program?




Oh, that sounds very, very sweet. 




> BTW, when I've done these sorts of combat grids "by hand" (using Xcl), they made melee combat very unlikely.




Mind you, I didn't get to use a random map last night, but I ran a game where maybe 70% of the combat was melee. People were maneuvering around machinery, shoving people into chairs and even onto a meathook. The ranged characters, naturally, kept maneuvering for cover and so forth but could still be caught by melee characters. (Any time I used only characters who were a lot better at ranged than melee, they got smacked.)

Perhaps more importantly, melee villains went after melee good guys and ranged villains went after ranged bad guys (and vice versa) due to firing into melee and characters giving cover issues.

In _The Princess Bride_, there's a fight scene where location (eg the edge of a cliff, a tree, and a patch of gravel that could make you trip) played a part, and that's the sort of map I'm looking for - where you can chase people into interesting terrain features.


----------



## TogaMario

Ok, this will be the first draft. This may be the only draft for a while, lol, so tell me how I did, and please enjoy.

http://www.togamario.com/zip/forestgen.zip


----------



## (Psi)SeveredHead

Well, I downloaded it. It calculates the "dirt" percentage properly, but it doesn't give a graphical output. (It says "generating..." and then "done!")


----------



## TogaMario

Oh, forgot, there's a forest.jpg image in the folder that the exe is in. That should be it


----------



## (Psi)SeveredHead

Oh, I see - yeah, it works. This is a great program.

I'll make copies of the forest.jpg and print them


----------



## TogaMario

You can make your own tiles by replacing mine with 72x72 pixel .BMP images. If you don't want the grass to have two tones, you can replace ground2.bmp with ground1.bmp, or your own. If you want to make your own dropping tiles in place of trees, you can put anything in it you want, but don't put straight 0, 0, 0 RBG in there, because it'll make that color transparent. So, if you have a round rock or something, and you don't want the black to show up in the tile, make the "background" color of your bitmap 0, 0, 0 and replace tree1.bmp through tree4.bmp.


----------



## (Psi)SeveredHead

For anyone who is trying this, and having problems with crashing (eg if you make a second map, the program crashes), simply move or delete the old copy of forest.jpg, and the program will generate a new map properly.


----------



## TogaMario

See, I didn't know it crashed on second maps, lol ... i'll fix that in a day or so.


----------



## Nail

I'm trying to use this....what does the message "User lib not found" mean?


Arrrrrrrrrgggg!!!!


----------



## (Psi)SeveredHead

Nail said:
			
		

> I'm trying to use this....what does the message "User lib not found" mean?
> 
> 
> Arrrrrrrrrgggg!!!!




I don't know. What kind of computer do you have?

Did you unzip it first? I think I got a similar error when I tried running without unzipping.


----------



## Nail

(Psi)SeveredHead said:
			
		

> I don't know. What kind of computer do you have?
> 
> Did you unzip it first? I think I got a similar error when I tried running without unzipping.



It's unzipped, and in a folder on my desktop.

...and still giving me the same error.  Do I have to put the unzipped files someplace special?  As I said, they're just in a folder on my desktop.  I double click on ForestGen1 and....nada but an error message about "user lib...".    :\ 

I'm running Windows XP Pro on a HP 7500, if that's helpful.


----------



## (Psi)SeveredHead

Nail said:
			
		

> It's unzipped, and in a folder on my desktop.
> 
> ...and still giving me the same error.  Do I have to put the unzipped files someplace special?  As I said, they're just in a folder on my desktop.  I double click on ForestGen1 and....nada but an error message about "user lib...".    :\
> 
> I'm running Windows XP Pro on a HP 7500, if that's helpful.




That computer is way better than what I've got. I put it in My Documents, in a folder called fgz (but the folder name is certainly not important).


----------



## Nail

Well......I'm puzzled.

It works now.  I downloaded a new copy, but I'm pretty sure that wasn't the problem.  This time I had WinZip "extract" the files, rather than me manually highlighting the files and dragging them out of the WinZip archive and onto my desktop.  For some reason or another that created a "Data" folder, which wasn't there before.  

Huh.

Anyway: Works now!  Thanks!  

In case *TogaMario* is interested: It'd be great if we could select the percentages of heavy and light undergrowth.  Currently there's a mandatory 50/50 split, IINM.  It would also be nice to select the percentages of tree/tree-filled squares.

Still: Nice job!


----------



## Terraism

Nail said:
			
		

> It works now. I downloaded a new copy, but I'm pretty sure that wasn't the problem. This time I had WinZip "extract" the files, rather than me manually highlighting the files and dragging them out of the WinZip archive and onto my desktop. For some reason or another that created a "Data" folder, which wasn't there before.



His original structure - that he zipped on his end - had a "Data" folder.  When he zipped up the lot, the ZIP file retains the file heirarchy, and, thus, keeps the folder.  In WinZip, when you use the "extract" command, it restores the file hierarchy (which is often necessary to make whatever you're extracting work.)  When you drag and drop, it doesn't.  

Anyway, on-topic.  Just tried this out, and Toga?  It's grand.  Very handy little tool.  Just sayin'.  And your idea of having layered output - ground, basic cover, and finally treetops - is neat.  Here's to hoping you've got time to play around with that at some point.


----------



## (Psi)SeveredHead

I noticed it won't print on my new printer. (Stupid Hewlett Packard.)


----------



## Nail

Terraism said:
			
		

> His original structure - that he zipped on his end - had a "Data" folder.  When he zipped up the lot, the ZIP file retains the file heirarchy, and, thus, keeps the folder.  In WinZip, when you use the "extract" command, it restores the file hierarchy (which is often necessary to make whatever you're extracting work.)  When you drag and drop, it doesn't.



A thousand thanks, Terraism.  I am enlightened, and in your debt.  Should I ever argue with you in a thread on these boards, you may pull this out, and I'll immediately agree with you and say your angle was always the correct one.


----------



## TogaMario

Holy cow, I hadn't noticed this threads many posts (just became a community supporter and went back through my old posts) Thank you fellas for helping everyone out in my absence!


----------



## CptPhoenix

It's more for generating forests on the fly at the table, but check out the Secret Forest Random Map Generator. 
I know it's not exactly what you're looking for, but figured I'd share in case this meets someone else's needs.


----------

