-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
executable file
·70 lines (57 loc) · 2.08 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import os
import random
import time
import colorama
from colorama import Fore
def cls():
os.system('cls' if os.name=='nt' else 'clear')
with open("Traits/Colors.txt", "r") as file:
allText = file.read()
Colors = list(map(str, allText.split()))
#gets list of colors from text file.
with open("Traits/Skin-color.txt", "r") as file:
allText = file.read()
Skin = list(map(str, allText.split()))
#gets list of skin colors
with open("Traits/Hair.txt", "r") as file:
allText = file.read()
Hair = list(map(str, allText.split()))
#gets list of hair styles
with open("Traits/Aesthetics.txt", "r") as file:
allText = file.read()
Aesthetics = list(map(str, allText.split()))
#gets list of aesthic types
with open("Traits/Themes.txt", "r") as file:
allText = file.read()
Themes = list(map(str, allText.split()))
#gets list of themes
gen = ["Female", "Male"]
attire = ["Casual","Formal"]
Height = ["Short", "Average", "Tall"]
Hheight = ["Short", "Average", "Long"]
#defines certain traits for the character
def Generate():
print("Character theme:", random.choice(Themes))
print("Character Aesthetics:", random.choice(Aesthetics))
print("Character Sex:", random.choice(gen))
print("Character age:", random.randrange(15,35))
print("Character skin color:", random.choice(Skin))
print("Character hair color:", random.choice(Colors))
print("Character hair style:", random.choice(Hair))
print("Character Hair Length", random.choice(Hheight))
print("Character eye color:", random.choice(Colors))
print("Height:", random.choice(Height))
print("Attire:", random.choice(attire))
print(Fore.RED + "Note: Skin color uses the names of the colors relative to skin color. they may not be the same when context is changed.")
print(Fore.WHITE + "Would you like to generate a new character? (type sure when your ready)")
Generate()
create = input()
#tells python what to refer to when create is mentioned
while create == "sure" or "Sure":
print("Okay!")
time.sleep(1)
cls()
time.sleep(1)
Generate()
input()
#checks for when create has a response and generates a response.