1
0
Fork 0

add weather system for outdoor rooms, fix logic paths
Run Docker Build / build (push) Failing after 11s Details
Run Python Build / build (push) Failing after 16s Details

This commit is contained in:
Sean Sube 2024-05-19 17:13:16 -05:00
parent adeb17551c
commit 0859bca2fd
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
4 changed files with 88 additions and 6 deletions

View File

@ -160,7 +160,8 @@ def generate_prompt_from_scene(scene: str, example_prompts: List[str]) -> str:
"Here are some example prompts:\n" "Here are some example prompts:\n"
"{examples}\n" "{examples}\n"
"Reply with a comma-separated list of keywords that summarize the visual details of the scene." "Reply with a comma-separated list of keywords that summarize the visual details of the scene."
"Make sure you describe the location, characters, and any items present. Be creative with the details." "Make sure you describe the location, all of the characters, and any items present using keywords and phrases. "
"Be creative with the details. Avoid using proper nouns or character names. Describe any actions being taken. "
"Do not include the question or any JSON. Only include the list of keywords on a single line.", "Do not include the question or any JSON. Only include the list of keywords on a single line.",
examples=example_prompts, examples=example_prompts,
scene=scene, scene=scene,

View File

@ -0,0 +1,27 @@
from .crafting_actions import action_craft
from .language_actions import action_read
from .magic_actions import action_cast
from .movement_actions import action_climb
from adventure.logic import load_logic
LOGIC_FILES = [
"./adventure/systems/rpg/weather_logic.yaml",
]
def init_actions():
return [
# crafting
action_craft,
# language
action_read,
# magic
action_cast,
# movement
action_climb,
]
def init_logic():
return [load_logic(filename) for filename in LOGIC_FILES]

View File

@ -0,0 +1,54 @@
rules:
# weather logic
- group: weather
match:
type: room
outdoor: true
weather: sunny
chance: 0.1
set:
weather: cloudy
- group: weather
match:
type: room
outdoor: true
weather: cloudy
chance: 0.1
set:
weather: rainy
- group: weather
match:
type: room
outdoor: true
weather: rainy
chance: 0.1
set:
weather: sunny
- group: weather
match:
type: room
outdoor: true
weather: cloudy
chance: 0.1
set:
weather: sunny
labels:
- match:
type: room
weather: sunny
backstory: The sun is shining brightly.
description: The sun is shining brightly.
- match:
type: room
weather: cloudy
backstory: The sky is overcast.
description: The sky is overcast.
- match:
type: room
weather: rainy
backstory: Rain is falling from the sky.
description: Rain is falling from the sky.

View File

@ -5,11 +5,11 @@ from .sleeping_actions import action_sleep
from adventure.logic import load_logic from adventure.logic import load_logic
LOGIC_FILES = [ LOGIC_FILES = [
"./adventure/sim_systems/environment_logic.yaml", "./adventure/systems/sim/environment_logic.yaml",
"./adventure/sim_systems/hunger_logic.yaml", "./adventure/systems/sim/hunger_logic.yaml",
"./adventure/sim_systems/hygiene_logic.yaml", "./adventure/systems/sim/hygiene_logic.yaml",
"./adventure/sim_systems/mood_logic.yaml", "./adventure/systems/sim/mood_logic.yaml",
"./adventure/sim_systems/sleeping_logic.yaml", "./adventure/systems/sim/sleeping_logic.yaml",
] ]