Page 1 of 2

Random Fairykind Generator

Posted: Thu Apr 23, 2015 5:59 am
by Bluelantern
I had the idea, and kuuskytkolme is being awesome enough to code it

third edit:

https://docs.google.com/document/d/1iTq ... sp=sharing here is the code, you paste this on the link bellow (left-side) and run it to output fairies.

http://repl.it/languages/Python

I am posting here to get feedback/ideas for the current version.

Re: Random Fairykind Generator

Posted: Thu Apr 23, 2015 6:01 am
by Shoal
that first link is just a blank page?

Re: Random Fairykind Generator

Posted: Thu Apr 23, 2015 6:19 am
by Bluelantern
Shoal wrote:that first link is just a blank page?
I opened right now and it is working for me, anyone else has that problem?

Re: Random Fairykind Generator

Posted: Thu Apr 23, 2015 6:28 am
by Shoal
iT's working for me now too!

Re: Random Fairykind Generator

Posted: Thu Apr 23, 2015 6:32 am
by Shoal
Downloaded it and ran it in python. It's written in python 2.x not 3.x for those who are wondering.
Welcome to Fairy maker 0.7.1

This Fairykind is called Starlightflower and they stand 4 feet and 6 inches tall with [adjective] wings that are [color]. It is a Starter fairy with Light powers.

press enter to re-run

This Fairykind is called Day Speaker and they stand 4 feet and 7 inches tall with [adjective] wings that are [color]. It is a Breeder fairy with Light powers.

press enter to re-run

I think adjective should pick a random element from an array of adjectives and same for color.

Re: Random Fairykind Generator

Posted: Thu Apr 23, 2015 6:54 am
by kuuskytkolme

Code: Select all

import random

print "Welcome to Random Fairykind Generator 1.0\nPlease press enter to re-roll your fairy.\n"

while True:
    
    #Name group   
    
    #biased lists for name groups

    
        
    class NameGroup():
        def __init__(self, name_list, descriptor_list):
            self.name_list = name_list
            self.descriptor_list = descriptor_list
            
            if random.random() > 0.8:
                self.descriptor_list = ["Flight", "Sensory"] #mundane powers
            
    
    group1 = NameGroup(["Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet", "Pink", "White", "Black", "Gray", "Brown", "Purple", "Gold", "Silver", "Rainbow", "Opal", "Opalescent", "Iridescent", "Dark", "Stripped"], ["Color", "Illusion", "Light"])
    group2 = NameGroup(["Stone", "Earth", "Rock", "Crystal", "Gem", "Underground", "Cave", "Diamond", "Quartz"], ["Stone", "Earth", "Crystal", "Digging"])
    group3 = NameGroup(["Pearl", "Shell", "Sea", "Creek", "River", "Stream", "Wave", "Tide", "Lake", "Spring", "Shore", "Dew", "Brook"], ["Water", "Swimming"])
    group4 = NameGroup(["Meadow", "Forest", "Woods", "Berry", "Nut", "Thorn", "Leaf"], ["Plant", "Fertility", "Harvest"])
    group5 = NameGroup(["Sand", "Desert", "Dune", "Oasis", "Waste"], ["Earth", "Sand", "Wind", "Heat"])
    group6 = NameGroup(["Snow", "Ice", "Cold", "Chill", "Frost", "Snowflake", "Glacier", "Iceberg", "Icecap", "Icetop", "Floe"], ["Snow", "Ice", "Cold"])
    group7 = NameGroup(["Wind", "Storm", "Cloud", "Rain", "Dew"], ["Wind", "Weather", "Lighting", "Rain", "Cold"])
    group8 = NameGroup(["Pretty", "Little", "Big", "Swift"], ["Luck"])
    group9 = NameGroup(["Day", "Dawn", "Light", "Sunshine"], ["Light"])
    group10 = NameGroup(["Moon", "Moonlight", "Star", "Stardust", "Starlight", "Starry", "Sky"], ["Light"])
    group11 = NameGroup(["Twilight", "Dusk", "Midnight", "Darkness", "Shade", "Night"], ["Dark", "Evil"])
    group12 = NameGroup(["Silk", "Sweet", "Bitter", "Rough"], ["Sensory", "Flight"])
    
    
    
    #unbiased lists for name groups
    '''
    
        
    class NameGroup():
        def __init__(self, name_list, descriptor_list):
            self.name_list = name_list
            self.descriptor_list = descriptor_list

    
    group1 = NameGroup(["Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet", "Pink", "White", "Black", "Gray", "Brown", "Purple", "Gold", "Silver", "Rainbow", "Opal", "Opalescent", "Iridescent", "Dark", "Stripped"], ["Color", "Illusion", "Light", "Flight"])
    group2 = NameGroup(["Stone", "Earth", "Rock", "Crystal", "Gem", "Underground", "Cave", "Diamond", "Quartz"], ["Stone", "Earth", "Crystal", "Digging", "Sensory", "Flight"])
    group3 = NameGroup(["Pearl", "Shell", "Sea", "Creek", "River", "Stream", "Wave", "Tide", "Lake", "Spring", "Shore", "Dew", "Brook"], ["Water", "Swimming", "Sensory", "Flight"])
    group4 = NameGroup(["Meadow", "Forest", "Woods", "Berry", "Nut", "Thorn", "Leaf"], ["Plant", "Fertility", "Harvest", "Sensory", "Flight"])
    group5 = NameGroup(["Sand", "Desert", "Dune", "Oasis", "Waste"], ["Earth", "Sand", "Wind", "Heat", "Sensory", "Flight"])
    group6 = NameGroup(["Snow", "Ice", "Cold", "Chill", "Frost", "Snowflake", "Glacier", "Iceberg", "Icecap", "Icetop", "Floe"], ["Snow", "Ice", "Cold", "Sensory", "Flight"])
    group7 = NameGroup(["Wind", "Storm", "Cloud", "Rain", "Dew"], ["Wind", "Weather", "Lighting", "Rain", "Cold", "Sensory", "Flight"])
    group8 = NameGroup(["Pretty", "Little", "Big", "Swift"], ["Luck", "Sensory", "Flight"])
    group9 = NameGroup(["Day", "Dawn", "Light", "Sunshine"], ["Light", "Sensory", "Flight"])
    group10 = NameGroup(["Moon", "Moonlight", "Star", "Stardust", "Starlight", "Starry", "Sky"], ["Light", "Sensory", "Flight"])
    group11 = NameGroup(["Twilight", "Dusk", "Midnight", "Darkness", "Shade", "Night"], ["Dark", "Evil", "Sensory", "Flight"])
    group12 = NameGroup(["Silk", "Sweet", "Bitter", "Rough"], ["Sensory", "Flight"])
    
    '''
    
    
    group_list = [group1, group2, group3, group4, group5, group6, group7, group8, group9, group10, group11, group12]
    
    name1_group = random.choice(group_list)
    
    name2 = [" Crusher", " Gardner", " Stalker", " Dancer", " Traveler", " Singer", " Speaker", " Seer", " Listener", "flower", " Orchid", " Rose", " Lily", " Daisy", " Flower", " Petal", " Clover", " Daisy", " Jasmine", " Veil", "let", "wing", " Wing", " Broadwing", " Littlewing", " Tailwing", " Beetlewing"]
    

    #Kind
    
    class Kind():
        def __init__(self, name, magic_list):
            self.name = name
            self.magic_list = magic_list
    
    
    Breeder = Kind("a Breeder", ["",  " Minor", " Specific", " Lesser", " Medium", " Precise", " Sensory"])
    Starter = Kind("a Starter", ["", " Minor", " Medium", " Major", " Greater", " Idiosyncratic", " Sensory"])
    Unique = Kind("a Unique", [" Major", " Greater", " Wide-ranged"])
    kind_list = [Breeder, Starter, Unique]
    kind = random.choice(kind_list)
    
    magic1 = random.choice(kind.magic_list)
    magic2 = random.choice(name1_group.descriptor_list)
    
    while magic1.strip() == magic2:
        magic1 = random.choice(kind.magic_list)
        magic2 = random.choice(name1_group.descriptor_list)
    
    
    #height, linear distribution
    
    height = random.randint(1, 66)
    
    if height/12 == 1:
        feet = "1 foot and "
    else:
        feet = str(height/12) + " feet and "
    
    if height%12 == 1:
        inches = "1 inch"
    else:
        inches = str(height%12) + " inches"
        
        
    #wings
    
    wing_adjective = ["pretty", " sparkly", "delicate", "sturdy", "ethereal", "folded", "transparent", "patterned", "quick", "broad", "little", "big", "small", "butterfly-like", "beetle-like", "bee-like"]

    wing_color = ["colorless", "red", "orange", "yellow", "green", "blue", "indigo", "violet", "pink", "white", "black", "gray", "brown", "purple", "gold", "silver", "rainbow", "opalescent", "iridescent", "dark"]

    
    
    print "This Fairykind is called " + random.choice(name1_group.name_list) + random.choice(name2) + " and they stand " + feet + inches + " tall with " + random.choice(wing_adjective) + " wings that are " + random.choice(wing_color) + ". It is " + kind.name +  " fairy with" + magic1 + " " + magic2 +  " powers."
    
    answer = raw_input('')
Here's version 1.0, explanation on how it works:

The output is "This Fairykind is called [name part 1][name part 2] and they stand [x] feet and [y] inches tall with [wing adjective] wings that are [wing color]. It is [kind] fairy with [magic part 1] [magic part 2] powers."

Groups determine name part 1 and magic part 2 thusly:


group 1:
name part 1 = Red, Orange, Yellow, Green, Blue, Indigo, Violet, Pink, White, Black, Gray, Brown, Purple, Gold, Silver, Rainbow, Opal, Opalescent, Iridescent, Dark, Stripped
magic part 2 = Color, Illusion, Light

group 2:
name part 1 = Stone, Earth, Rock, Crystal, Gem, Underground, Cave, Diamond, Quartz,
magic part 2 = Stone, Earth, Crystal, Digging

group 3:
name part 1 = Pearl, Shell, Sea, Creek, River, Stream, Wave, Tide, Lake, Spring, Shore, Dew, Brook,
magic part 2 = Water, Swimming

group 4:
name part 1 = Meadow, Forest, Woods, Berry, Nut, Thorn, Leaf,
magic part 2 = Plant, Fertility, Harvest

group 5:
name part 1 = Sand, Desert, Dune, Oasis, Waste,
magic part 2 = Earth, Sand, Wind, Heat

group 6:
name part 1 = Snow, Ice, Cold, Chill, Frost, Snowflake, Glacier, Iceberg, Icecap, Icetop, Floe,
magic part 2 = Snow, Ice, Cold

group 7:
name part 1 = Wind, Storm, Cloud, Rain, Dew,
magic part 2 = Wind, Weather, Lighting, Rain, Cold

group 8:
name part 1 = Pretty, Little, Big, Swift,
magic part 2 = Luck

group 9:
name part 1 = Day, Dawn, Light, Sunshine,
magic part 2 = Light

group 10:
name part 1 = Moon, Moonlight, Star, Stardust, Starlight, Starry, Sky,
magic part 2 = Light

group 11:
name part 1 = Twilight, Dusk, Midnight, Darkness, Shade, Night,
magic part 2 = Dark, Evil

group 12:
name part 1 = Silk, Sweet, Bitter, Rough,
magic part 2 = Sensory, Flight

There is also a 20% chance to get a "mundane" magic, that is Sensory or Flight except for group 12 which always gets the mundane magic.

Name part 2 is from the following list: Crusher, Gardner, Stalker, Dancer, Traveler, Singer, Speaker, Seer, Listener, -flower, Orchid, Rose, Lily, Daisy, Flower, Petal, Clover, Daisy, Jasmine, Veil, -let, -wing, Wing, Broadwing, Littlewing, Tailwing, Beetlewing

(-name means there's no space between the two parts)

Magic part 1 is dependent on the kind like this:
Breeder: [empty], Minor, Specific, Lesser, Medium, Precise, Sensory
Starter: [empty], Minor, Medium, Major, Greater, Idiosyncratic, Sensory
Unique: Major, Greater, Wide-ranged

(Sensory Sensory has been manually blocked due to ridiculousness.)

Height is just a linearly distributed random height between 1 inch and 5 inches 5 feet.

Wing colors are from the following list: colorless, red, orange, yellow, green, blue, indigo, violet, pink, white, black, gray, brown, purple, gold, silver, rainbow, opalescent, iridescent, dark
And adjectives from this list: pretty, sparkly, delicate, sturdy, ethereal, folded, transparent, patterned, quick, broad, little, big, small, butterfly-like, beetle-like, bee-like

Re: Random Fairykind Generator

Posted: Thu Apr 23, 2015 7:54 am
by Adelene
Shoal wrote:
Welcome to Fairy maker 0.7.1

This Fairykind is called Starlightflower and they stand 4 feet and 6 inches tall with [adjective] wings that are [color]. It is a Starter fairy with Light powers.

press enter to re-run

This Fairykind is called Day Speaker and they stand 4 feet and 7 inches tall with [adjective] wings that are [color]. It is a Breeder fairy with Light powers.

press enter to re-run
It's doing this [adjective] [color] thing for me, too.

Re: Random Fairykind Generator

Posted: Thu Apr 23, 2015 8:20 am
by Bluelantern
Adelene wrote:
Shoal wrote:
Welcome to Fairy maker 0.7.1

This Fairykind is called Starlightflower and they stand 4 feet and 6 inches tall with [adjective] wings that are [color]. It is a Starter fairy with Light powers.

press enter to re-run

This Fairykind is called Day Speaker and they stand 4 feet and 7 inches tall with [adjective] wings that are [color]. It is a Breeder fairy with Light powers.

press enter to re-run
It's doing this [adjective] [color] thing for me, too.
Kuusky's newer version is updated with the window variant, she managed to run it, but I cant make it work. I think the problem is in my end, can anyone else try the new code? (it is the first post and Kuusky's post)


edit:


Managed to make it work, when I copied from here, the spaces before the words are causing some issue, but I copy-pasted-copy the thing to a new document and worked

This Fairykind is called Wave Flower and they stand 0 feet and 5 inches tall with delicate wings that are pink. It is a Breeder fairy with Water powers.

This Fairykind is called Icetop Gardner and they stand 4 feet and 10 inches tall with patterned wings that are brown. It is a Breeder fairy with Minor Snow powers.

This Fairykind is called Moon Broadwing and they stand 4 feet and 9 inches tall with transparent wings that are iridescent. It is a Breeder fairy with Lesser Light powers.

This Fairykind is called Twilight Petal and they stand 1 foot and 11 inches tall with bee-like wings that are less. It is a Unique fairy with Wide-ranged Dark powers.

This Fairykind is called Sunshine Jasmine and they stand 0 feet and 4 inches tall with small wings that are black. It is a Unique fairy with Wide-ranged Light powers.

Re: Random Fairykind Generator

Posted: Thu Apr 23, 2015 10:58 am
by kuuskytkolme
If someone has an issue, please paste the error you get. I can't troubleshoot if you don't tell me what line the issue is on.

Re: Random Fairykind Generator

Posted: Fri Apr 24, 2015 10:15 am
by BlueSkySprite
It just says "IndentationError: unexpected indent"