Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 10 11 [12] 13

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

medikohl

  • Bay Watcher
  • Goblins are a good building material
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #165 on: May 19, 2012, 11:58:27 am »

I'm liking this a lot, been using it to make several plants
Logged
I can imagine a bunch of  monks making a pilgrimage to a holy mountain, only to discover that it isn't there anymore.

Captain Crazy

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #166 on: May 20, 2012, 10:09:14 am »

Thanks for making the code easy to read and modify! I added more words for each category and made 'Untoward' plants possible yet again, because Language Unlocked adds those words back. Might as well have Witch Fingers and Piss Frills and Brainlimes!
Logged
Quote
I usually think of Armok as the pure essence of FUCK YOU!

Khalvin

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #167 on: May 20, 2012, 12:35:03 pm »

as a suggestion for Frequency.

FREQ=100/[VALUE]

1-100
2-50
3-33.3
4-25
5-20

Does the Game parse decimals?
Logged

Captain Crazy

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #168 on: May 20, 2012, 10:14:41 pm »

as a suggestion for Frequency.

FREQ=100/[VALUE]

1-100
2-50
3-33.3
4-25
5-20

Does the Game parse decimals?

DF doesn't do decimals AFAIK
Logged
Quote
I usually think of Armok as the pure essence of FUCK YOU!

Melzer

  • Bay Watcher
  • [CAN_POST][CURIOUSBEAST_POSTER][FANCIFUL]
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #169 on: July 12, 2012, 10:57:58 pm »

Note: use "replace" function to replace ":" with a shrub tile. Really, an easy fix.
"Replace" function? Never noticed it, or I forgot noticing it. sry but i haven't played DF for a while
Logged

Zaratustra

  • Bay Watcher
    • View Profile
    • http://zarat.us/
Re: Procedural content creation: Random plant creation script
« Reply #170 on: January 03, 2013, 11:04:44 am »

Sphalerite gave me permission to post my upgraded version. I'll probably add more to it once DF updates, but here's what exists on the meantime:

* Few more types of plant (pumpkin, olive, lemon, lime)
* Some wood holds better edge or is sturdier
* Metal-themed plants are made of the actual metal
* Positive syndromes exist, syndromes have varying levels of effect

Example:
Spoiler (click to show/hide)

http://dl.dropbox.com/u/3923260/randomplants.py

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Procedural content creation: Random plant creation script
« Reply #171 on: January 03, 2013, 12:23:43 pm »

[PLANT:BLADE_SILVER]
...
   [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
      [MATERIAL_VALUE:4]
   [BASIC_MAT:INORGANIC:SILVER]
There's no need to define the STRUCTURAL material if you're not going to use it.
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.

Wastedlabor

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #172 on: January 20, 2013, 11:26:05 am »

Hai.

I modified Zaratustra's version:

* No GUI (it was making it crash for me). Either place the script in the df folder or manually modify the 'directory =' line.
* Attribute syndromes are counted as poisonous flag, so it's easier to control their frequency with the poisonous goal. The goals are tweaked to produce more syndrome plants.
* Added attribute malus effects.
* Randomized attribute severity values. 0-750 (malus) or 2000-5000 (bonus). This means processing the plant can change the severity.
* Randomized attribute syndrome END time. 500-10000. Changes too when processing the plant.

Patience malus example:
Spoiler (click to show/hide)

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

Warning: Still untested in game.
« Last Edit: January 20, 2013, 01:53:20 pm by Wastedlabor »
Logged
He stole an onion. Off with his head.
I wonder, what would they do if someone killed their king.
Inevitable, who cares. Now an onion...

Wastedlabor

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #173 on: January 20, 2013, 02:04:04 pm »

A few other examples:

Silencing fruit:
Spoiler (click to show/hide)

Wanderer mushroom:
Spoiler (click to show/hide)

Limp date:
Spoiler (click to show/hide)

Crazy cactus:
Spoiler (click to show/hide)
Logged
He stole an onion. Off with his head.
I wonder, what would they do if someone killed their king.
Inevitable, who cares. Now an onion...

Veylon

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #174 on: April 02, 2013, 11:36:46 am »

I'd love to use this script and though it's obviously working for other people, all I get is:
Code: [Select]
F:\Programs\Games\Dwarf Fortress\RandomPlants>python randomplants.py
  File "randomplants.py", line 74
    print current_indent * '\t' + '[' + join(tag_tuple[0],':') + ']'
                       ^
SyntaxError: invalid syntax
All I did was download the script (Zaratustra's version) and try to run it with python. I've got version 3.3 if that matters. What can I do?
Logged
At what point did the suggestion of child sacrifice become the more ethical option?

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Procedural content creation: Random plant creation script
« Reply #175 on: April 02, 2013, 11:53:22 am »

I'd love to use this script and though it's obviously working for other people, all I get is:
Code: [Select]
F:\Programs\Games\Dwarf Fortress\RandomPlants>python randomplants.py
  File "randomplants.py", line 74
    print current_indent * '\t' + '[' + join(tag_tuple[0],':') + ']'
                       ^
SyntaxError: invalid syntax
All I did was download the script (Zaratustra's version) and try to run it with python. I've got version 3.3 if that matters. What can I do?

Install python 2.7.  This script is not compatible with Python 3.
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.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #176 on: April 02, 2013, 12:02:27 pm »

Are you sure a plant made of silver will be stockpiled?
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Veylon

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #177 on: April 02, 2013, 12:05:55 pm »

Install python 2.7.  This script is not compatible with Python 3.
Ah. I just got the latest version and assumed it would be compatible. Thank you.
Logged
At what point did the suggestion of child sacrifice become the more ethical option?

JT

  • Bay Watcher
  • Explosively Canadian
    • View Profile
    • http://www.jtgibson.ca/df/
Re: Procedural content creation: Random plant creation script
« Reply #178 on: September 17, 2014, 07:43:26 pm »

I went ahead and ported this to Python 3 (some of the deprecated functions were a bit infuriating, especially with such gems in the Python documentation as "return a string which is the concatenation of the strings in the iterable iterable" -- they could have simply said "tuple" or "array"...).

The only subjective change I've made is renaming "mead" from 'honey' type plants to "wine", since we now have genuine mead in the game.  [edit]Fair warning: this means that trees in particular have not been upgraded to .40 compatibility -- the files it spits out are still .34 based.  They're mostly feature complete, but lack some material definitions for .40, and the trees are of course way off because trees are so radically different now.

https://www.dropbox.com/s/ovi1hoxbloo0o8l/randomplants.py?dl=0

Also, wow, it's been nearly 7 years since I've posted.  Awesome.  [edit]Fact checked against the wrong page!  It has only been 5 years.  Sigh.
« Last Edit: September 18, 2014, 12:15:02 am by JT »
Logged
"The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, 'You know, I want to set those people over there on fire, but I'm just not close enough to get the job done.'" --George Carlin

Bralbaard

  • Bay Watcher
    • View Profile
Re: Procedural content creation: Random plant creation script
« Reply #179 on: September 18, 2014, 01:28:10 pm »

You should post more often, this sounds awesome.

Any plans for updating it so that it is fully compatible with DF .40 plants and trees? Is it incompatible and will it crash in .40 or will it just generate weird results?
I'm going to wait until Talvieno finishes his random creature generator, then I'll generate a world with both random flora and fauna, and have fun exploring and experimenting. Great stuff.
Logged
Pages: 1 ... 10 11 [12] 13