Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

What kind of material-based creatures should be a priority to add?

Wooden golems (just made of wood)
- 2 (2%)
Tree creatures (supernaturally living, replacing hair and such with leaves)
- 32 (31.7%)
Other plant creatures
- 6 (5.9%)
Metallic golems (allowing all metals)
- 16 (15.8%)
Stone golems
- 8 (7.9%)
Glass golems
- 2 (2%)
Flesh/organ golems
- 15 (14.9%)
Blood/alcohol golems
- 11 (10.9%)
Magma creatures
- 9 (8.9%)

Total Members Voted: 101


Pages: 1 ... 3 4 [5] 6 7 ... 12

Author Topic: [0.47.0X] [Python 2.7+] Random Raw Scripts - The stay frosty update  (Read 97358 times)

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Random creature scripts
« Reply #60 on: July 01, 2013, 10:14:24 am »

There'll be a couple bigger things roaming around in the next version. And a couple smaller ones as well. I think I've also tweaked the script enough that domestic creatures don't overshoot the goals too much, but I've been getting a few too many overshoots with megabeasts, so I'll probably reduce the numbers there.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Random creature scripts - Now with random hags, too
« Reply #61 on: July 10, 2013, 02:01:15 pm »

Update! Apart from new things in the two existing scripts, there is now a third script, as I previously said - it's about random hags, troll-witches, and cirikos (that's elven)!

Change logs:
Spoiler (click to show/hide)
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: Random creature scripts - Now with random hags, too
« Reply #62 on: July 16, 2013, 02:56:51 pm »

Here's a question to all of you - right now, the random hag script creates hags with "translated" hag names - cirikos and lanamis from the elven language, for example. I'm thinking of doing something similar with the other scripts as well. This could result, for example in -
A roz bear (blade bear)
A cluster obash (cluster swine)
A nopo donkey (despair donkey)
A tongus adder (malign adder)
An ux charger (grim charger)
An udir barghest (black barghest)
A gùmur courser (idle courser)
Irìci wolf men (brass wolf men)
Nail keth (nail deer)
Exma cheetahs (dung cheetahs)

and so on. What do you think of this? Should it happen? How often? I've added a poll if you don't want to post, but I'd prefer to hear what you think.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Tamugetsu

  • Escaped Lunatic
    • View Profile

Hi there! First of all, I love these scripts and they are actually what made me install python on my computer, which led me to learn the language, so thanks! Secondly, I'm not sure if I'm correct, but I seem to have noticed a minor quirk in the code for creature name generation. In sphal_data.py, the following code exists to pick the creature's symbol and word:

Code: [Select]
                #We pick a beast type, and a random word assocaited with a random symbol

                self.creature_type = random.choice(creature_words)

                self.creature_symbol = random.choice(self.symbols.keys())

#(COMMENTED OUT)self.creature_adjective = random.choice(self.symbols[random.choice(self.symbols.keys())])

                self.creature_adjective = random.choice(words.keys())

It seemed odd to me that the first comment implied the word would be related to the symbol, but when it picked the word, it simply chose a random word from 'words', which contains all words found in the language_words raws, as I believe from looking at the code. Even the commented out line makes no reference to the above self.creature_symbol, but rather makes the same random selection a second time, choosing ANOTHER random symbol and NOT assigning it to the creature, only using it to choose a word. When I added print functions to test if generated beasts' symbols and words had anything to do with each other, I saw that most of the words were not listed in the chosen symbol's [S_WORD] list.

Sorry if that was long-winded and/or horribly wrong and I'm being an idiot, but acting under the assumption that creatures were supposed to have adjectives related to their symbols (and the further assumption that this was not what was happening), I edited the above code to this:

Code: [Select]
                #We pick a beast type, and a random word assocaited with a random symbol

                self.creature_type = random.choice(creature_words)

                self.creature_symbol = random.choice(self.symbols.keys())
               
                self.creature_adjective = random.choice(self.symbols[self.creature_symbol])
               

With print statements in beast_myth.py, I checked each creature as it was generated and got things like this (creature printed, then symbol, then word):

ALLIGATOR_MAN_CRYPT (NAME_BUILDING_TOMB, CRYPT)
APE_DUSK (OLD, DUSK)
MANTICORE_HILL  (NAME_HILLS, HILL)
MARE_CRUEL (EVIL, CRUEL)
GIANT_MARE_CRUEL
HOG_WAY (NAME_ROAD, WAY)
ZEBRA_MAN_WORLD (NAME_REGION, WORLD)
COBRA_HILL (NAME_HILLS, HILL)
GIANT_COBRA_HILL
TIKBALANG_ROSE (ROMANTIC, ROSE)

So it looks like things are working properly!

Also, Knight Otu, I'd love to extend these scripts if I can get your permission to do so. I'm not sure whether it'll actually get done, or whether I'll post them, but if I do I'll credit you, Sphalerite and anyone else to whom credit is due. Thank you!
« Last Edit: September 05, 2013, 03:43:02 pm by Tamugetsu »
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile

Hey! Yeah, I know about that stray symbol line, and I guess I haven't been as good about updating the comments as I should be - in any case, using a random symbol is the way Sphalerite used in his original plant script (and a quick check tells me that his script seems to be the origin of the stray symbol line). I felt that using the symbol as a filter led to less variance in creature names - some words are in many symbols, others are in no symbols at all. I've kept the separate symbol around for the time being, because I had the thought that I might use it in some ways, such as an extra guide for civilizations if/when I do add things like that.

I have no problems with you extending the script. I'm still working on it, though, even if I'm not actively adding things right now.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Zavvnao

  • Bay Watcher
    • View Profile

does this generate sentient creatures also? its fine if not.
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile

The scripts can generate intelligent creatures. However, right now they don't create entities for any of them. It's a bit of a challenge to create them with mods in mind, which I want them to do.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

Posting to follow.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Ombragon

  • Bay Watcher
  • [FLEEQUICK][CRAZED]
    • View Profile

I don't understand why but the new versions of this file don't work, I have python 2.7 (only the version 0.91 of beast of myth with random vermin seem to work)
« Last Edit: September 07, 2013, 12:12:49 pm by Ombragon »
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile

Weird. Do the scripts create any files at all? It possibly might be an intermittent failure I haven't caught, and the next time you run the script, it works...
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Ombragon

  • Bay Watcher
  • [FLEEQUICK][CRAZED]
    • View Profile

no the generator does nothing if you select the file object in raw, but if you select raw it create one file, but without creature
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile

Hm. Is that a vanilla install or a mod? I don't think a mod should break the script, though, unless it's redefining the symbols... What should happen...
you start the script,
navigate to raw/objects,
the script deletes the script's language file if it survived the last run of the script for some reason,
creates the language file,
gets the words and symbols and colors from their respective files,
deletes the old body and random creature files,
creates the body file,
creates the random creature file and populates it,
creates the pedia, interaction, and pattern files,
removes the script's own language file again,
and then display some numbers on how much was created...

so it shouldn't be able to create absolutely no files - at least the language and body files should be there, as well as an empty creature file. If it does absolutely nothing, I don't know where it could be breaking.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Ombragon

  • Bay Watcher
  • [FLEEQUICK][CRAZED]
    • View Profile

its is a modded version, and I have finally found the language file (sorry, I haven't even noticed it) but no body or creature files I will try with a vanilla version

EDIT : Found it !! body_rcp I think
REEDIT : and it is the same problem with a vanilla version
« Last Edit: September 11, 2013, 07:33:58 am by Ombragon »
Logged

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile

The files the beast script should create are body_random_beast_myth, creature_random_beast_myth, interaction_random_beast_myth, descriptor_pattern_random_myth_beast, and pedia_random_beast_myth. The language file is language_words_beast_myth. The vermin and hag scripts don't currently create body files, the hag script doesn't create a language file, and the vermin script doesn't currently create an interaction file., but otherwise, they should create similarly-named files...

Another idea - did you extract the files from the zip file, and if so, did you keep the folder structure?
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Ombragon

  • Bay Watcher
  • [FLEEQUICK][CRAZED]
    • View Profile

I have kept the same structure as the zip file and extracted it
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 12