Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 13

Author Topic: Procedural content creation: Random plant creation script  (Read 26301 times)

Alternatecash

  • Bay Watcher
  • PREFSTRING: [flammable head]
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #30 on: February 04, 2011, 09:05:12 pm »

This looks amazing. Now I wish I wasn't totally ignorant regarding Python.
Logged
Explore a half-ruined facility and play with dangerous
mutagens in my forum game.
It's back! A bit. Seriously, jump in.

freeformschooler

  • Bay Watcher
  • no longer relevant
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #31 on: February 04, 2011, 11:05:56 pm »

I've just uploaded a slightly tweaked version.  It won't generate [BIOME:MOUNTAIN] plants anymore, since plants don't grow in mountainous biomes.  I've also tweaked a few bits in how the names of plant products and generation of prefstrings are done.

Making a random animal generator is on my to do list, but that's going to be a lot more of a complex project.

Don't give up! Achieving this is more than most people do in the modding world. An animal generator would be awesome. I'm currently reading through the raws of some plants... I deleted the regular plants from my RAWs and replaced it with random ones. Certainly adds a new flair to the game.

EDIT: Whoops I didn't realize there were 3 pages and this one was from page one. This still applies, though.
« Last Edit: February 04, 2011, 11:08:38 pm by freeformschooler »
Logged
i don't do anything around here anymore

TolyK

  • Bay Watcher
  • Nowan Ilfideme
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #32 on: February 05, 2011, 12:30:04 am »

Note: use "replace" function to replace ":" with a shrub tile. Really, an easy fix.
uh... that... wouldn't work? since there's ":" no only in the tiles but also in the raws that determine stuff such as reactions and whatnot?

Uploaded a new version.  It should play nicely with tilesets now.

will check.
Logged
My Mafia Stats
just do whatevery tolyK and blame it as a bastard mod
Shakerag: Who are you personally suspicious of?
At this point?  TolyK.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #34 on: February 06, 2011, 04:33:37 pm »

Quote
uh... that... wouldn't work? since there's ":" no only in the tiles but also in the raws that determine stuff such as reactions and whatnot?
Using head is sometimes nice ;D. You can replace not ":", but [SHRUB_TILE:":"]...
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #35 on: February 06, 2011, 07:12:23 pm »

Also it is worth mentioning that some plants will generate [BIOME:MOUNTAIN] when plants cannot grow on mountains.
I'm pretty sure BIOME:TUNDRA also doesn't support plants, but FOREST_TAIGA does. I seem to recall such a problem with one of my modded plants.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #36 on: February 06, 2011, 07:26:33 pm »

Tundras can grow plants, if they are set to grow there. Glaciers however, are another case.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Thundercraft

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #37 on: February 06, 2011, 09:14:37 pm »

I've just uploaded a slightly tweaked version.  It won't generate [BIOME:MOUNTAIN] plants anymore, since plants don't grow in mountainous biomes.  I've also tweaked a few bits in how the names of plant products and generation of prefstrings are done.

Nice!
But a question:
Why don't you mention this Forum Thread on the download page? When you upload or edit the page, there is a place for this at the bottom: "Homepage URL"
Many DF fans, including myself, discover new mods by paying attention to the dffd.wimbli.com main page and looking for the latest uploads. I did not learn that your "Random plant creation script" had a forum thread until today.

Also, did the first release start at version 1.0? Did you increment the version number in the last update?
I can't tell...
Logged

Bohandas

  • Bay Watcher
  • Discordia Vobis Com Et Cum Spiritum
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #38 on: February 07, 2011, 01:23:45 am »

This is really cool.

BTW, when you say that:
It uses the already existing language and symbol files to generate random plant names, and then derive their properties from their name.

Does that mean that there is a copy of the language files built in? Or does it read them from my raw folder?
Logged
NEW Petition to stop the anti-consumer, anti-worker, Trans-Pacific Partnership agreement
What is TPP
----------------------
Remember, no one can tell you who you are except an emotionally unattached outside observer making quantifiable measurements.
----------------------
Έπαινος Ερις

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Procedural content creation: Random plant creation script
« Reply #39 on: February 07, 2011, 08:32:44 am »

Does that mean that there is a copy of the language files built in? Or does it read them from my raw folder?
When you run the program, you get a file prompt through which you have to locate your raw folder.  The script then reads the language, symbol, and color variations raw files for various information that's used to make the new plants.  It also reads any existing plant raw files to make sure it doesn't accidentally duplicate any existing raws.  This does mean that if you run this on a heavily modded version of DF with different symbols or language raws, you may get different results than if you ran it on vanilla.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Bohandas

  • Bay Watcher
  • Discordia Vobis Com Et Cum Spiritum
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #40 on: February 07, 2011, 09:14:16 am »

Does that mean that there is a copy of the language files built in? Or does it read them from my raw folder?
When you run the program, you get a file prompt through which you have to locate your raw folder.  The script then reads the language, symbol, and color variations raw files for various information that's used to make the new plants.  It also reads any existing plant raw files to make sure it doesn't accidentally duplicate any existing raws.  This does mean that if you run this on a heavily modded version of DF with different symbols or language raws, you may get different results than if you ran it on vanilla.

Ok. I hadn't been sure before as to whether it actually read anything from the raw folder or if it only needed to be selected to tell the program where to put the output file...

Will custom language and color items be used if in they are in new or files, or will the program only see them if they are appended to the default language and color descriptor files? (ie. does the program read files with specific filenames, or does it actually search the contents of all the raw files to determine which ones contain relevant information?)
Logged
NEW Petition to stop the anti-consumer, anti-worker, Trans-Pacific Partnership agreement
What is TPP
----------------------
Remember, no one can tell you who you are except an emotionally unattached outside observer making quantifiable measurements.
----------------------
Έπαινος Ερις

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Procedural content creation: Random plant creation script
« Reply #41 on: February 07, 2011, 09:19:59 am »

Will custom language and color items be used if in they are in new or files, or will the program only see them if they are appended to the default language and color descriptor files? (ie. does the program read files with specific filenames, or does it actually search the contents of all the raw files to determine which ones contain relevant information?)
It's done by filename, but the script looks at every file and decides what type of file each is based on the start of the file name.  At the moment it loads language data from any file that starts with 'language_words', so if you added a file named 'language_words_2.txt' it would load word data from that.  It loads symbol data from any file whose name starts with 'language_SYM', and color data from any file whose name starts with 'descriptor_color'.  The script also automatically deletes any file whose name starts with 'plant_random', so it will delete the file it created last time it was run.  Finally it reads all files whose name starts with 'plant_' for the names of existing plants, to make sure not to accidentally create a duplicate raw entry.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #42 on: February 07, 2011, 12:03:51 pm »

Tundras can grow plants, if they are set to grow there.
Huh. This time my testing worked just fine. Ah, well, more room for my plants to grow.
Glaciers however, are another case.
Well, I don't think that the script tries to create glacier plants, so that shouldn't be a problem.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Procedural content creation: Random plant creation script
« Reply #43 on: February 07, 2011, 12:11:06 pm »

Glaciers however, are another case.
Well, I don't think that the script tries to create glacier plants, so that shouldn't be a problem.
It does not, cold-weather plants get BIOME:TUNDRA.  I had BIOME:GLACIER in a pre-release version of the script but removed it when I realized plants don't grown on glaciers.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Procedural content creation: Random plant creation script
« Reply #44 on: February 07, 2011, 12:19:24 pm »

The only reason normal plants don't grow in tundras is because most of the stock plants have the NOT_FREEZING biome, which is basically "every land biome except for mountain, glacier, and tundra" (and doesn't actually have anything at all to do with climate).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.
Pages: 1 2 [3] 4 5 ... 13