2024-06-25 21:26:04 +00:00
|
|
|
import random
|
|
|
|
from app.functions.get_character_age import get_age
|
|
|
|
|
|
|
|
|
2024-07-03 22:01:01 +00:00
|
|
|
def get_sex():
|
|
|
|
return random.choice(['male', 'female'])
|
|
|
|
|
|
|
|
|
|
|
|
def get_hair():
|
|
|
|
return random.choice(['black', 'brown', 'auburn', 'blonde', 'copper', 'brass', 'blue', 'bald'])
|
|
|
|
|
|
|
|
|
|
|
|
def get_eyes():
|
|
|
|
return random.choice(['blue', 'brown', 'green', 'hazel', 'gray'])
|
|
|
|
|
|
|
|
|
|
|
|
def get_skin_tone():
|
|
|
|
return random.choice(['dark', 'olive', 'medium', 'light', 'pale'])
|
|
|
|
|
|
|
|
|
2024-06-25 21:26:04 +00:00
|
|
|
def generate_profile(chartype):
|
|
|
|
profile = {
|
|
|
|
'name': "Anon",
|
2024-07-03 22:01:01 +00:00
|
|
|
'sex': get_sex(),
|
2024-06-25 21:26:04 +00:00
|
|
|
'age': get_age(chartype)
|
|
|
|
}
|
|
|
|
if chartype == 'human':
|
2024-07-03 22:01:01 +00:00
|
|
|
profile['hair'] = get_hair()
|
|
|
|
profile['eyes'] = get_eyes()
|
|
|
|
profile['skintone'] = get_skin_tone()
|
2024-06-25 21:26:04 +00:00
|
|
|
|
|
|
|
return profile
|