Bay 12 Games Forum

Please login or register.

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

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

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Procedural content creation: Random plant creation script
« on: February 02, 2011, 03:30:07 pm »

Just a little something I threw together:

http://dffd.wimbli.com/file.php?id=3752

This script creates 70-80 new plant species, randomly generated.  It uses the already existing language and symbol files to generate random plant names, and then derive their properties from their name.  A goal-seeking filter is used to ensure that you get a good mixture of uses and biomes represented in the resulting new plants.

This file requires Python 2.7 to be installed on your machine.

Instructions:

Install Python 2.7 if you haven't already.

Download the file

Unzip this file and remove the script

Double-click on the script file

A file open window will open. Select the raw/objects folder in your dwarf fortress install.

The script will then run, creating a new raw file plant_random.txt containing the procedurally generated plants. This may take a few minutes. When it is done you will get a notification window telling you how many plants were created.

Create a new world, embark, and enjoy your procedurally generated content.
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.

arzzult

  • Bay Watcher
  • This statement is false.
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #1 on: February 02, 2011, 05:52:43 pm »

It wouldn't be a random generator for DF if it didn't spit out something like this

Spoiler (click to show/hide)
Logged
I just realized two things. 1. For the Win and F___ the World have the same initials. 2. They have the same meaning in Dwarf Fortress.

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #2 on: February 02, 2011, 07:44:46 pm »

It wouldn't be a random generator for DF if it didn't spit out something like this

Spoiler (click to show/hide)
Haha brilliant. Looks like you cant do anything with it either.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Procedural content creation: Random plant creation script
« Reply #3 on: February 02, 2011, 08:07:09 pm »

Yeah, that one's useless.  The script creates a few useless plants, but most of them are actually worthwhile:

Spoiler (click to show/hide)

Spoiler (click to show/hide)

Spoiler (click to show/hide)

Spoiler (click to show/hide)
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.

arzzult

  • Bay Watcher
  • This statement is false.
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #4 on: February 02, 2011, 08:34:45 pm »

I'm trying to figure out how to weaponize
Spoiler (click to show/hide)

So I'm considering lining my entrance with lava pools and dumping it down through hatches into those pools to vaporize it as the invaders pass by. Not sure if it'll work. Also I've noticed that every thing that has a syndrome uses only the 100% necrosis one, as far as I've seen. Is that just chance on my part or is that the only syndrome it can make right now?

Also,
Spoiler (click to show/hide)
I think I now have to tweak that to actually have the properties of diamonds.

And various other keepers that I've found. I just like the names of a lot of these.

Spoiler (click to show/hide)

Spoiler (click to show/hide)

Spoiler (click to show/hide)

Spoiler (click to show/hide)

Spoiler (click to show/hide)
Logged
I just realized two things. 1. For the Win and F___ the World have the same initials. 2. They have the same meaning in Dwarf Fortress.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Procedural content creation: Random plant creation script
« Reply #5 on: February 02, 2011, 08:40:27 pm »

So I'm considering lining my entrance with lava pools and dumping it down through hatches into those pools to vaporize it as the invaders pass by. Not sure if it'll work. Also I've noticed that every thing that has a syndrome uses only the 100% necrosis one, as far as I've seen. Is that just chance on my part or is that the only syndrome it can make right now?

At the moment, that's the only syndrome it uses.  It's copied from the definition from Gnomeblight, except for not being limited to gnomes.  When I learn more about how syndromes work I might put more variety into them, but honestly at the moment the poisonous plants are only supposed to be a rare and incidental thing.  I'm not actually even sure if making the poisonous extracts and dumping them on someone works.
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.

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #6 on: February 03, 2011, 06:01:57 pm »

Well, it's a contact syndrome, so if it boils and touches the exposed skin of the invaders, BAM, instant rot. If you can find a way to get it onto the invaders in liquid form, that should work too. I have to download this program when I get home. That shadow braid plant looks awesome.
Logged
くコ:彡

IT 000

  • Bay Watcher
  • Strange Mood
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #7 on: February 03, 2011, 07:19:16 pm »

I am enjoying this generator! Not only for playing purposes but modding purposes as well. Every plant I've modded in so far by hand is usually super expensive and useful stuff or easy to grow useless molds. This generator allows me to fill in the large middle gap in a few seconds, which normally would take me a few hours to scratch the surface. Keep up the good work! And I hope to see some more generators coming along! Perhaps with vermin or trees, maybe creatures if your feeling up to it.
Logged

***CORROSION v2.14***
<<<More Than Just Zombies>>>
Back from the Dead!

Aramco

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #8 on: February 03, 2011, 08:04:51 pm »


Incest barbs. Of course. Oh, and they cause severe necrosis.
Code: [Select]
[PLANT:BARB_INCEST]
[NAME:incest barb]
[NAME_PLURAL:incest barbs]
[ADJ:incest barb]
[PICKED_TILE:231]
[PICKED_COLOR:0:0:1]
[WET]
[DRY]
[EVIL]
[BIOME:NOT_FREEZING]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
[MATERIAL_VALUE:2]
[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
[GROWDUR:300]
[VALUE:2]
[USE_MATERIAL_TEMPLATE:EXTRACT:PLANT_EXTRACT_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:frozen incest barb liquid]
[STATE_NAME_ADJ:LIQUID:incest barb liquid]
[STATE_NAME_ADJ:GAS:boiling incest barb liquid]
[MATERIAL_VALUE:2]
[DISPLAY_COLOR:0:0:1]
[EXTRACT_STORAGE:FLASK]
[PREFIX:NONE]
[SYNDROME]
[SYN_NAME:incest barb poisoning]
[SYN_AFFECTED_CLASS:GENERAL_POISON]
[SYN_CONTACT]
[SYN_INHALED]
[SYN_INJECTED]
[CE_NECROSIS:SEV:100:PROB:100:BP:BY_CATEGORY:ALL:ALL:START:0:PEAK:30:END:1200]
[EXTRACT_STILL_VIAL:LOCAL_PLANT_MAT:EXTRACT]
[USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE]
[MATERIAL_VALUE:1]
[EDIBLE_VERMIN]
[EDIBLE_COOKED]
[SEED:incest barb seed:incest barb seeds:0:0:1:LOCAL_PLANT_MAT:SEED]
[SPRING]
[SUMMER]
[AUTUMN]
[WINTER]
[FREQUENCY:100]
[CLUSTERSIZE:5]
[PREFSTRING:incests]
[SHRUB_TILE:231]
[DEAD_SHRUB_TILE:231]
[SHRUB_COLOR:0:0:1]
[DEAD_SHRUB_COLOR:0:0:1]
Logged
Or maybe there's a god who's just completely insane and sends you to Detroit, Michigan in a new body if you ever utter the name "Pat Sajak".

NobodyPro

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #9 on: February 04, 2011, 05:22:07 am »

This is brilliant.
This opens up so many possibilities like the aforementioned vermin generator. Not sure how I'd feel about my dwarves being bitten by Monkeyshafts though.
Logged

zwei

  • Bay Watcher
  • [ECHO][MENDING]
    • View Profile
    • Fate of Heroes
Re: Procedural content creation: Random plant creation script
« Reply #10 on: February 04, 2011, 07:12:55 am »

This is really brilliant, and I especially like idea of using symbols to determine properties of plant.

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #11 on: February 04, 2011, 07:17:47 am »

Imagine this for civs. Procedurally generated enemy sieges!
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

IT 000

  • Bay Watcher
  • Strange Mood
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #12 on: February 04, 2011, 08:19:31 am »

Also it is worth mentioning that some plants will generate [BIOME:MOUNTAIN] when plants cannot grow on mountains.

Also someone correct me if I'm wrong but I believe the [EVIL] [GOOD] tags for underground plants are irrelevant.
Logged

***CORROSION v2.14***
<<<More Than Just Zombies>>>
Back from the Dead!

narhiril

  • Bay Watcher
  • [DUTY_BOUND]
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #13 on: February 04, 2011, 09:10:00 am »

Well, it's a contact syndrome, so if it boils and touches the exposed skin of the invaders, BAM, instant rot. If you can find a way to get it onto the invaders in liquid form, that should work too. I have to download this program when I get home. That shadow braid plant looks awesome.

Try storing it in a barrel, dumping the barrel on the tile you want to poison, then un-forbidding the barrel but not the liquid inside of it.  I've heard this works with gnomeblight.

Note that because this isn't gnomeblight, the consequences for the dwarf reclaiming the barrel might be dire.

Also, @ sphelarite, epic generator.  Adds so much potential.

Do you mind if I tweak this to generate, say, random minerals?  Assuming I ever get around to it (lots of work this weekend :( and my Python skills are quite rusty).
« Last Edit: February 04, 2011, 09:22:41 am by narhiril »
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Procedural content creation: Random plant creation script
« Reply #14 on: February 04, 2011, 09:13:36 am »

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.
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.
Pages: [1] 2 3 ... 13