Spaces:
Runtime error
Runtime error
kwabs22
commited on
Commit
·
cce05a1
1
Parent(s):
286206e
Import long variables for some readability
Browse files- app.py +50 -848
- relatively_constant_variables.py +1092 -0
app.py
CHANGED
|
@@ -13,6 +13,9 @@ import time
|
|
| 13 |
import psutil
|
| 14 |
from sentence_transformers import SentenceTransformer
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
# # Initialize the zero tensor on CUDA
|
| 17 |
# zero = torch.Tensor([0]).cuda()
|
| 18 |
# print(zero.device) # This will print 'cpu' outside the @spaces.GPU decorated function
|
|
@@ -202,14 +205,7 @@ llmguide_model = AutoModelForCausalLM.from_pretrained(
|
|
| 202 |
)
|
| 203 |
llmguide_tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-0.5B-Instruct")
|
| 204 |
|
| 205 |
-
#
|
| 206 |
-
knowledge_base = [
|
| 207 |
-
{"id": "doc1", "content": "The capital of France is Paris."},
|
| 208 |
-
{"id": "doc2", "content": "Python is a popular programming language."},
|
| 209 |
-
{"id": "doc3", "content": "Machine learning is a subset of artificial intelligence."},
|
| 210 |
-
{"id": "doc4", "content": "The Earth orbits around the Sun."},
|
| 211 |
-
{"id": "doc5", "content": "orbits is the name of a korean fangroup"},
|
| 212 |
-
]
|
| 213 |
|
| 214 |
# Create embeddings for the knowledge base
|
| 215 |
knowledge_base_embeddings = embedding_model.encode([doc["content"] for doc in knowledge_base])
|
|
@@ -302,35 +298,11 @@ def process_query(query, use_rag, stream=False):
|
|
| 302 |
|
| 303 |
#--------------------------------------------------------------------------------------------------------------------------------
|
| 304 |
|
| 305 |
-
FAQAllprompts
|
| 306 |
-
"Brainstorming for this space": [
|
| 307 |
-
("My problem to solve is", "- please make 10 sub problems have to solve from this:"),
|
| 308 |
-
],
|
| 309 |
-
"Expansive Problem solving": [
|
| 310 |
-
("My problem to solve is", "- please make 10 sub problems have to solve from this:"),
|
| 311 |
-
("My process to solve is", "- please make 10 sub processes have to solve from this:"),
|
| 312 |
-
("My goal to solve is", "- please make 10 sub goals have to solve from this:"),
|
| 313 |
-
("My task to solve is", "- please make 10 sub tasks have to solve from this:"),
|
| 314 |
-
("My phase to solve is", "- please make 10 sub phases have to solve from this:"),
|
| 315 |
-
("My component to solve is", "- please make 10 sub components have to solve from this:"),
|
| 316 |
-
("My element to solve is", "- please make 10 sub elements have to solve from this:"),
|
| 317 |
-
("A brief description of my current situation:", "- please list the most important task to pay attention to:"),
|
| 318 |
-
("A brief description of my current situation to analyse:", "- please conduct a situational analysis:"),
|
| 319 |
-
("A brief description of my current situation to decompose:", "- please conduct a problem decomposition:"),
|
| 320 |
-
],
|
| 321 |
-
}
|
| 322 |
|
| 323 |
#--------------------------------------------------------------------------------------------------------------------------------
|
| 324 |
-
|
| 325 |
-
default_config
|
| 326 |
-
'background': '/AutoGameBackgrounds/1stGameLoc123.png',
|
| 327 |
-
'inventory': [],
|
| 328 |
-
'skills': [],
|
| 329 |
-
'objectives': [],
|
| 330 |
-
'targets': [],
|
| 331 |
-
'story': [],
|
| 332 |
-
'actions': {}
|
| 333 |
-
}
|
| 334 |
|
| 335 |
# Helper functions to dynamically add items
|
| 336 |
def add_inventory_item(inventory_items, type, name, description):
|
|
@@ -355,34 +327,7 @@ def add_target(targets_items, name, x, y, collisionType, collisiontext):
|
|
| 355 |
|
| 356 |
#-----------------------------------------------------------------------------------------------------------------------------------
|
| 357 |
|
| 358 |
-
|
| 359 |
-
# List of player engagement UI elements
|
| 360 |
-
player_engagement_items = [
|
| 361 |
-
"Health Bar", "Mana/Energy Bar", "Experience Bar", "Mini-Map", "Quest Tracker",
|
| 362 |
-
"Inventory Quick Access Slots", "Skill Cooldown Indicators", "Currency Display",
|
| 363 |
-
"Compass", "Timer/Clock", "Action Prompts", "Reticle/Crosshair", "Enemy Health Bars",
|
| 364 |
-
"Score Display", "Inventory Grid", "Item Tooltip", "Item Categories/Tabs",
|
| 365 |
-
"Equip/Unequip Buttons", "Item Sorting Options", "Character Stats Panel",
|
| 366 |
-
"Character Model Viewer", "Quick Equip Slots", "Dialogue Box", "Dialogue Choices",
|
| 367 |
-
"Character Portraits", "Character Name Display", "Subtitle Text", "World Map",
|
| 368 |
-
"Local Map", "Fast Travel Points", "Map Markers", "Map Legend", "Crafting Recipe List",
|
| 369 |
-
"Ingredient Slots", "Craft Button", "Crafting Progress Bar", "Skill Nodes",
|
| 370 |
-
"Skill Descriptions", "Skill Point Counter", "Unlock Button", "Skill Path Highlight",
|
| 371 |
-
"Quest List", "Quest Details Panel", "Quest Objectives", "Quest Rewards",
|
| 372 |
-
"Quest Status Indicators", "Chat Box", "Player List", "Voice Chat Indicators",
|
| 373 |
-
"Ping/Latency Indicator", "Party/Team UI", "Scoreboard", "Matchmaking Screen",
|
| 374 |
-
"Pop-up Notifications", "Achievement Unlocks", "System Messages",
|
| 375 |
-
"On-screen Key Prompts", "Environmental Interaction Icons", "Save/Auto-Save Indicators",
|
| 376 |
-
"Credits Screen"
|
| 377 |
-
]
|
| 378 |
-
|
| 379 |
-
# List of character-based story events
|
| 380 |
-
story_events = [
|
| 381 |
-
'exploreLocation', 'discoverClue', 'meetCharacter', 'solveRiddle', 'findItem',
|
| 382 |
-
'faceChallenge', 'makeDecision', 'engageBattle', 'unlockAbility', 'learnSecret',
|
| 383 |
-
'completeMission', 'experienceSetback', 'earnReward', 'uncoverMystery', 'formAlliance',
|
| 384 |
-
'faceBetrayal', 'confrontNemesis', 'makeDiscovery', 'overcomeLoss', 'achieveVictory'
|
| 385 |
-
]
|
| 386 |
|
| 387 |
def pick_random_items(items, n):
|
| 388 |
return random.sample(items, n)
|
|
@@ -636,94 +581,7 @@ class Player:
|
|
| 636 |
def update_knowledge(self, topic):
|
| 637 |
self.knowledge[topic] = True
|
| 638 |
|
| 639 |
-
#
|
| 640 |
-
all_states = {
|
| 641 |
-
'village': {
|
| 642 |
-
'start': {
|
| 643 |
-
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
|
| 644 |
-
"choices": ['explore village', 'gather supplies', 'rest'],
|
| 645 |
-
"transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start'},
|
| 646 |
-
"consequences": {
|
| 647 |
-
'gather supplies': lambda player: player.add_item('basic supplies')
|
| 648 |
-
},
|
| 649 |
-
"media": []
|
| 650 |
-
},
|
| 651 |
-
'rumor': {
|
| 652 |
-
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
|
| 653 |
-
"choices": ['decide to go', 'ignore'],
|
| 654 |
-
"transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'},
|
| 655 |
-
"consequences": {
|
| 656 |
-
'decide to go': lambda player: player.update_knowledge('treasure location')
|
| 657 |
-
},
|
| 658 |
-
"media": []
|
| 659 |
-
},
|
| 660 |
-
'supplies': {
|
| 661 |
-
"description": "You gather supplies for your journey.",
|
| 662 |
-
"choices": ['head to forest', 'stay in village'],
|
| 663 |
-
"transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'},
|
| 664 |
-
"media": []
|
| 665 |
-
},
|
| 666 |
-
},
|
| 667 |
-
'forest': {
|
| 668 |
-
'forest': {
|
| 669 |
-
"description": "You enter the dense forest, heading towards the ruins.",
|
| 670 |
-
"choices": ['travel further', 'return to village'],
|
| 671 |
-
"transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'},
|
| 672 |
-
"media": []
|
| 673 |
-
},
|
| 674 |
-
},
|
| 675 |
-
'ruins': {
|
| 676 |
-
'ruins': {
|
| 677 |
-
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
|
| 678 |
-
"choices": ['enter ruins', 'return to forest'],
|
| 679 |
-
"transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'},
|
| 680 |
-
"media": []
|
| 681 |
-
},
|
| 682 |
-
'explore': {
|
| 683 |
-
"description": "You explore the ruins, encountering traps and puzzles.",
|
| 684 |
-
"choices": ['solve puzzle', 'avoid traps'],
|
| 685 |
-
"transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'},
|
| 686 |
-
"media": []
|
| 687 |
-
},
|
| 688 |
-
'hiddenPassage': {
|
| 689 |
-
"description": "You solve a challenging puzzle and unlock a hidden passage.",
|
| 690 |
-
"choices": ['enter passage', 'go back'],
|
| 691 |
-
"transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'},
|
| 692 |
-
"media": []
|
| 693 |
-
},
|
| 694 |
-
'treasureRoom': {
|
| 695 |
-
"description": "You enter the treasure room and find the treasure chest.",
|
| 696 |
-
"choices": ['take treasure', 'leave'],
|
| 697 |
-
"transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'},
|
| 698 |
-
"consequences": {
|
| 699 |
-
'take treasure': lambda player: player.add_item('treasure')
|
| 700 |
-
},
|
| 701 |
-
"media": []
|
| 702 |
-
},
|
| 703 |
-
'celebrate': {
|
| 704 |
-
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
|
| 705 |
-
"choices": ['return to village'],
|
| 706 |
-
"transitions": {'return to village': 'village_return'},
|
| 707 |
-
"media": []
|
| 708 |
-
},
|
| 709 |
-
},
|
| 710 |
-
'village_return': {
|
| 711 |
-
'village_return': {
|
| 712 |
-
"description": "You return to the village with the treasure and share it with the villagers.",
|
| 713 |
-
"choices": ['end adventure'],
|
| 714 |
-
"transitions": {'end adventure': 'end_end'},
|
| 715 |
-
"media": []
|
| 716 |
-
},
|
| 717 |
-
},
|
| 718 |
-
'end': {
|
| 719 |
-
'end': {
|
| 720 |
-
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
|
| 721 |
-
"choices": [],
|
| 722 |
-
"transitions": {},
|
| 723 |
-
"media": []
|
| 724 |
-
},
|
| 725 |
-
}
|
| 726 |
-
}
|
| 727 |
|
| 728 |
def validate_transitions(all_states):
|
| 729 |
errors = []
|
|
@@ -951,6 +809,24 @@ def refresh_file_explorer():
|
|
| 951 |
|
| 952 |
#-----------------------------------------------------------------------------------------------------------------------------------
|
| 953 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 954 |
with gr.Blocks() as demo:
|
| 955 |
gr.HTML("""<div style="width: 100%; text-align: center">Main ideas for this space is (June 2024) (Custom component planning?):</div>
|
| 956 |
<div style="display: flex; justify-content: center; margin-bottom: 20px; align-items: center;">
|
|
@@ -973,7 +849,7 @@ with gr.Blocks() as demo:
|
|
| 973 |
button.click(llmguide_generate_response, inputs=[FAQCustomButtonInput, gr.State(index), gr.State(category_name)], outputs=FAQMainOutput)
|
| 974 |
|
| 975 |
with gr.Tab("General RAG (Pathfinder?) Attempt"):
|
| 976 |
-
gr.HTML("Placeholder for weak RAG Type
|
| 977 |
# gr.Interface(
|
| 978 |
# fn=rag,
|
| 979 |
# inputs=[
|
|
@@ -1029,169 +905,31 @@ with gr.Blocks() as demo:
|
|
| 1029 |
outputs=[llmguide_output, llmguide_tokens_per_second],
|
| 1030 |
)
|
| 1031 |
|
| 1032 |
-
Frontendpromptengforguide = """Suggest descriptions for media to fill the empty media fields -
|
| 1033 |
-
|
| 1034 |
-
{
|
| 1035 |
-
"village": {
|
| 1036 |
-
"start": {
|
| 1037 |
-
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
|
| 1038 |
-
"choices": [
|
| 1039 |
-
"explore village",
|
| 1040 |
-
"gather supplies",
|
| 1041 |
-
"rest"
|
| 1042 |
-
],
|
| 1043 |
-
"transitions": {
|
| 1044 |
-
"explore village": "village_rumor",
|
| 1045 |
-
"gather supplies": "village_supplies",
|
| 1046 |
-
"rest": "village_start"
|
| 1047 |
-
},
|
| 1048 |
-
"consequences": {
|
| 1049 |
-
"gather supplies": {}
|
| 1050 |
-
},
|
| 1051 |
-
"media": []
|
| 1052 |
-
},
|
| 1053 |
-
"rumor": {
|
| 1054 |
-
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
|
| 1055 |
-
"choices": [
|
| 1056 |
-
"decide to go",
|
| 1057 |
-
"ignore"
|
| 1058 |
-
],
|
| 1059 |
-
"transitions": {
|
| 1060 |
-
"decide to go": "village_supplies",
|
| 1061 |
-
"ignore": "village_start"
|
| 1062 |
-
},
|
| 1063 |
-
"consequences": {
|
| 1064 |
-
"decide to go": {}
|
| 1065 |
-
},
|
| 1066 |
-
"media": []
|
| 1067 |
-
},
|
| 1068 |
-
"supplies": {
|
| 1069 |
-
"description": "You gather supplies for your journey.",
|
| 1070 |
-
"choices": [
|
| 1071 |
-
"head to forest",
|
| 1072 |
-
"stay in village"
|
| 1073 |
-
],
|
| 1074 |
-
"transitions": {
|
| 1075 |
-
"head to forest": "forest_forest",
|
| 1076 |
-
"stay in village": "village_start"
|
| 1077 |
-
},
|
| 1078 |
-
"media": []
|
| 1079 |
-
}
|
| 1080 |
-
},
|
| 1081 |
-
"forest": {
|
| 1082 |
-
"forest": {
|
| 1083 |
-
"description": "You enter the dense forest, heading towards the ruins.",
|
| 1084 |
-
"choices": [
|
| 1085 |
-
"travel further",
|
| 1086 |
-
"return to village"
|
| 1087 |
-
],
|
| 1088 |
-
"transitions": {
|
| 1089 |
-
"travel further": "ruins_ruins",
|
| 1090 |
-
"return to village": "village_start"
|
| 1091 |
-
},
|
| 1092 |
-
"media": []
|
| 1093 |
-
}
|
| 1094 |
-
},
|
| 1095 |
-
"ruins": {
|
| 1096 |
-
"ruins": {
|
| 1097 |
-
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
|
| 1098 |
-
"choices": [
|
| 1099 |
-
"enter ruins",
|
| 1100 |
-
"return to forest"
|
| 1101 |
-
],
|
| 1102 |
-
"transitions": {
|
| 1103 |
-
"enter ruins": "ruins_explore",
|
| 1104 |
-
"return to forest": "forest_forest"
|
| 1105 |
-
},
|
| 1106 |
-
"media": []
|
| 1107 |
-
},
|
| 1108 |
-
"explore": {
|
| 1109 |
-
"description": "You explore the ruins, encountering traps and puzzles.",
|
| 1110 |
-
"choices": [
|
| 1111 |
-
"solve puzzle",
|
| 1112 |
-
"avoid traps"
|
| 1113 |
-
],
|
| 1114 |
-
"transitions": {
|
| 1115 |
-
"solve puzzle": "ruins_hiddenPassage",
|
| 1116 |
-
"avoid traps": "ruins_ruins"
|
| 1117 |
-
},
|
| 1118 |
-
"media": []
|
| 1119 |
-
},
|
| 1120 |
-
"hiddenPassage": {
|
| 1121 |
-
"description": "You solve a challenging puzzle and unlock a hidden passage.",
|
| 1122 |
-
"choices": [
|
| 1123 |
-
"enter passage",
|
| 1124 |
-
"go back"
|
| 1125 |
-
],
|
| 1126 |
-
"transitions": {
|
| 1127 |
-
"enter passage": "ruins_treasureRoom",
|
| 1128 |
-
"go back": "ruins_explore"
|
| 1129 |
-
},
|
| 1130 |
-
"media": []
|
| 1131 |
-
},
|
| 1132 |
-
"treasureRoom": {
|
| 1133 |
-
"description": "You enter the treasure room and find the treasure chest.",
|
| 1134 |
-
"choices": [
|
| 1135 |
-
"take treasure",
|
| 1136 |
-
"leave"
|
| 1137 |
-
],
|
| 1138 |
-
"transitions": {
|
| 1139 |
-
"take treasure": "ruins_celebrate",
|
| 1140 |
-
"leave": "ruins_ruins"
|
| 1141 |
-
},
|
| 1142 |
-
"consequences": {
|
| 1143 |
-
"take treasure": {}
|
| 1144 |
-
},
|
| 1145 |
-
"media": []
|
| 1146 |
-
},
|
| 1147 |
-
"celebrate": {
|
| 1148 |
-
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
|
| 1149 |
-
"choices": [
|
| 1150 |
-
"return to village"
|
| 1151 |
-
],
|
| 1152 |
-
"transitions": {
|
| 1153 |
-
"return to village": "village_return"
|
| 1154 |
-
},
|
| 1155 |
-
"media": []
|
| 1156 |
-
}
|
| 1157 |
-
},
|
| 1158 |
-
"village_return": {
|
| 1159 |
-
"village_return": {
|
| 1160 |
-
"description": "You return to the village with the treasure and share it with the villagers.",
|
| 1161 |
-
"choices": [
|
| 1162 |
-
"end adventure"
|
| 1163 |
-
],
|
| 1164 |
-
"transitions": {
|
| 1165 |
-
"end adventure": "end_end"
|
| 1166 |
-
},
|
| 1167 |
-
"media": []
|
| 1168 |
-
}
|
| 1169 |
-
},
|
| 1170 |
-
"end": {
|
| 1171 |
-
"end": {
|
| 1172 |
-
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
|
| 1173 |
-
"choices": [],
|
| 1174 |
-
"transitions": {},
|
| 1175 |
-
"media": []
|
| 1176 |
-
}
|
| 1177 |
-
}
|
| 1178 |
-
}
|
| 1179 |
-
"""
|
| 1180 |
-
|
| 1181 |
with gr.Accordion("Decisions Creation to Story to Config Conversation", open=False):
|
| 1182 |
with gr.Tab("Timeline Guide for Config Generation or evelution"):
|
| 1183 |
with gr.Accordion("Empty Config shape for explaining to LLM", open=False):
|
| 1184 |
gr.HTML(f"placeholder for current empty JSON config shape")
|
| 1185 |
gr.HTML("Structural indicators of quality of config")
|
| 1186 |
-
with gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1187 |
gr.HTML("Timeline for making Timelines?")
|
| 1188 |
gr.HTML("Componets (outside Code Support for Config): Decisions (and context explanation), Nested Sections, Media (Especially to affect decisions), Replayability (GTA and Tekken type mechanics in text form), Theme integration (Modified Varibles that affect UI or config order)")
|
| 1189 |
gr.HTML("From Nothing <br>")
|
| 1190 |
gr.HTML("From Existing <br>")
|
| 1191 |
-
with gr.
|
| 1192 |
gr.HTML("Existing Games eg. GTA Heists - Same Map with overlapping branching narratives, Battlefront - Elites amongst Commoners, Tekken Casino (one mistake = 1/2 or 1/3 of your Resources) and Turn based: 'Tactics' type nintendo games, Chess (and any other tile based game) ")
|
| 1193 |
gr.HTML("Existing Game Rules for text - Cyberpunk RED, ")
|
| 1194 |
-
with gr.
|
| 1195 |
gr.HTML("Community playthrough = Tally of players choices, Random item placed in a random location - first person to get it wins, Survival by location or characters met")
|
| 1196 |
with gr.Tab("Some Workflow Helpers (Removed as built into Semi-Auto)"):
|
| 1197 |
gr.HTML("Song / Random Scenario to 'full game' manual or auto is end goal ")
|
|
@@ -1266,529 +1004,14 @@ Creating more diverse paths through the game""")
|
|
| 1266 |
with gr.Tab("Mermaid Graphs and Nesting"):
|
| 1267 |
gr.HTML("Claude Artifacts to illustrate nested structure brainstorms - <br> https://claude.site/artifacts/4a910d81-1541-49f4-8531-4f27fe56cd1e <br> https://claude.site/artifacts/265e9242-2093-46e1-9011-ed6ad938be90?fullscreen=false <br> ")
|
| 1268 |
gr.HTML("")
|
| 1269 |
-
with gr.Tab(""):
|
| 1270 |
-
gr.HTML("")
|
| 1271 |
with gr.Tab("Structural Inspirations"):
|
| 1272 |
gr.HTML("GTA Heists - Replayability and stakes, Tekken - 2/3 mistakes = lost round ")
|
| 1273 |
gr.HTML("Sports Scores, ")
|
| 1274 |
with gr.Tab("Themes"):
|
| 1275 |
gr.HTML("")
|
| 1276 |
|
| 1277 |
-
|
| 1278 |
-
"village": {
|
| 1279 |
-
"start": {
|
| 1280 |
-
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
|
| 1281 |
-
"choices": ['explore village', 'gather supplies', 'rest'],
|
| 1282 |
-
"transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start'},
|
| 1283 |
-
"consequences": {
|
| 1284 |
-
'gather supplies': lambda player: player.add_item('basic supplies')
|
| 1285 |
-
},
|
| 1286 |
-
"media": []
|
| 1287 |
-
},
|
| 1288 |
-
"rumor": {
|
| 1289 |
-
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
|
| 1290 |
-
"choices": ['decide to go', 'ignore'],
|
| 1291 |
-
"transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'},
|
| 1292 |
-
"consequences": {
|
| 1293 |
-
'decide to go': lambda player: player.update_knowledge('treasure location')
|
| 1294 |
-
},
|
| 1295 |
-
"media": []
|
| 1296 |
-
},
|
| 1297 |
-
"supplies": {
|
| 1298 |
-
"description": "You gather supplies for your journey.",
|
| 1299 |
-
"choices": ['head to forest', 'stay in village'],
|
| 1300 |
-
"transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'},
|
| 1301 |
-
"media": []
|
| 1302 |
-
},
|
| 1303 |
-
},
|
| 1304 |
-
"forest": {
|
| 1305 |
-
"forest": {
|
| 1306 |
-
"description": "You enter the dense forest, heading towards the ruins.",
|
| 1307 |
-
"choices": ['travel further', 'return to village'],
|
| 1308 |
-
"transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'},
|
| 1309 |
-
"media": []
|
| 1310 |
-
},
|
| 1311 |
-
},
|
| 1312 |
-
"ruins": {
|
| 1313 |
-
"ruins": {
|
| 1314 |
-
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
|
| 1315 |
-
"choices": ['enter ruins', 'return to forest'],
|
| 1316 |
-
"transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'},
|
| 1317 |
-
"media": []
|
| 1318 |
-
},
|
| 1319 |
-
"explore": {
|
| 1320 |
-
"description": "You explore the ruins, encountering traps and puzzles.",
|
| 1321 |
-
"choices": ['solve puzzle', 'avoid traps'],
|
| 1322 |
-
"transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'},
|
| 1323 |
-
"media": []
|
| 1324 |
-
},
|
| 1325 |
-
"hiddenPassage": {
|
| 1326 |
-
"description": "You solve a challenging puzzle and unlock a hidden passage.",
|
| 1327 |
-
"choices": ['enter passage', 'go back'],
|
| 1328 |
-
"transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'},
|
| 1329 |
-
"media": []
|
| 1330 |
-
},
|
| 1331 |
-
"treasureRoom": {
|
| 1332 |
-
"description": "You enter the treasure room and find the treasure chest.",
|
| 1333 |
-
"choices": ['take treasure', 'leave'],
|
| 1334 |
-
"transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'},
|
| 1335 |
-
"consequences": {
|
| 1336 |
-
'take treasure': lambda player: player.add_item('treasure')
|
| 1337 |
-
},
|
| 1338 |
-
"media": []
|
| 1339 |
-
},
|
| 1340 |
-
"celebrate": {
|
| 1341 |
-
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
|
| 1342 |
-
"choices": ['return to village'],
|
| 1343 |
-
"transitions": {'return to village': 'village_return'},
|
| 1344 |
-
"media": []
|
| 1345 |
-
},
|
| 1346 |
-
},
|
| 1347 |
-
"village_return": {
|
| 1348 |
-
"village_return": {
|
| 1349 |
-
"description": "You return to the village with the treasure and share it with the villagers.",
|
| 1350 |
-
"choices": ['end adventure'],
|
| 1351 |
-
"transitions": {'end adventure': 'end_end'},
|
| 1352 |
-
"media": []
|
| 1353 |
-
},
|
| 1354 |
-
},
|
| 1355 |
-
"end": {
|
| 1356 |
-
"end": {
|
| 1357 |
-
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
|
| 1358 |
-
"choices": [],
|
| 1359 |
-
"transitions": {},
|
| 1360 |
-
"media": []
|
| 1361 |
-
},
|
| 1362 |
-
}
|
| 1363 |
-
}"""
|
| 1364 |
-
#Analyzing Game Configuration Metrics - was the thread name of where the
|
| 1365 |
-
claude3_5_06072024configtips = """Example Config Development Tab - Claude 3.5 Sonnet as the LLM Assitant
|
| 1366 |
-
|
| 1367 |
-
This config is for a basic text based game engine I made with help many llms including you.
|
| 1368 |
-
Thanks to all the help it loads which presented another problem, I dont have any structural metrics to assess the quality of the config.
|
| 1369 |
-
What JSON things can we look at to see if it may be too bland for a person testing the game
|
| 1370 |
-
|
| 1371 |
-
|
| 1372 |
-
Text-Based Game Configuration Analysis
|
| 1373 |
-
1. State Variety
|
| 1374 |
-
|
| 1375 |
-
Total number of states: 13
|
| 1376 |
-
Number of unique locations: 5 (village, forest, ruins, village_return, end)
|
| 1377 |
-
|
| 1378 |
-
2. Choice Diversity
|
| 1379 |
-
|
| 1380 |
-
Average choices per state: 1.92
|
| 1381 |
-
States with no choices: 1 (end state)
|
| 1382 |
-
States with most choices: 3 (village_start with 3 choices)
|
| 1383 |
-
Unique choices across all states: 17
|
| 1384 |
-
|
| 1385 |
-
3. Transition Complexity
|
| 1386 |
-
|
| 1387 |
-
Total number of transitions: 25
|
| 1388 |
-
Average transitions per state: 1.92
|
| 1389 |
-
States with most transitions: 3 (village_start with 3 transitions)
|
| 1390 |
-
|
| 1391 |
-
4. Consequence Implementation
|
| 1392 |
-
|
| 1393 |
-
States with consequences: 3
|
| 1394 |
-
Total number of consequences: 3
|
| 1395 |
-
Types of consequences: Adding items, Updating knowledge
|
| 1396 |
-
|
| 1397 |
-
5. Description Length
|
| 1398 |
-
|
| 1399 |
-
Average description length: 13.15 words
|
| 1400 |
-
Longest description: 24 words (village_return)
|
| 1401 |
-
Shortest description: 4 words (village_supplies)
|
| 1402 |
|
| 1403 |
-
6. Cyclic Paths
|
| 1404 |
-
|
| 1405 |
-
Presence of loops: Yes (e.g., village_start -> village_supplies -> village_start)
|
| 1406 |
-
|
| 1407 |
-
7. Dead Ends
|
| 1408 |
-
|
| 1409 |
-
Number of dead ends: 1 (end state)
|
| 1410 |
-
|
| 1411 |
-
8. Media Integration
|
| 1412 |
-
|
| 1413 |
-
States with media: 0
|
| 1414 |
-
Total media elements: 0
|
| 1415 |
-
|
| 1416 |
-
9. Narrative Progression
|
| 1417 |
-
|
| 1418 |
-
Clear beginning (village_start) and end (end) states
|
| 1419 |
-
Multiple paths to reach the end
|
| 1420 |
-
|
| 1421 |
-
10. Player Agency
|
| 1422 |
-
|
| 1423 |
-
Choices affect game progression
|
| 1424 |
-
Some choices have consequences (3 instances)
|
| 1425 |
-
|
| 1426 |
-
11. Game Length
|
| 1427 |
-
|
| 1428 |
-
Minimum steps to complete: 6 (village_start -> village_supplies -> forest_forest -> ruins_ruins -> ruins_explore -> ruins_hiddenPassage -> ruins_treasureRoom -> ruins_celebrate -> village_return -> end)
|
| 1429 |
-
Maximum steps (including loops): Potentially infinite due to cycles
|
| 1430 |
-
|
| 1431 |
-
12. Replayability
|
| 1432 |
-
|
| 1433 |
-
Multiple paths through the game
|
| 1434 |
-
Some variability in outcomes based on choices
|
| 1435 |
-
|
| 1436 |
-
#=============================================
|
| 1437 |
-
|
| 1438 |
-
To assess the quality and potential blandness of your game configuration, we can analyze several structural metrics within the JSON. Here are some aspects we can examine:
|
| 1439 |
-
Text-Based Game Configuration AnalysisClick to open document
|
| 1440 |
-
Based on this analysis, here are some observations about the potential blandness of the game:
|
| 1441 |
-
|
| 1442 |
-
Limited state variety: With only 13 states across 5 locations, the game might feel short and lacking in diversity. Consider adding more locations or states within existing locations.
|
| 1443 |
-
Low average choices: An average of 1.92 choices per state might make the game feel linear. Increasing the number of choices in more states could improve player engagement.
|
| 1444 |
-
Limited consequences: Only 3 states have consequences, which might make player choices feel less impactful. Adding more consequences could increase the sense of agency.
|
| 1445 |
-
Short descriptions: The average description length of 13.15 words might not provide enough detail to immerse players. Consider expanding descriptions to create a richer narrative.
|
| 1446 |
-
Lack of media: No states currently use media elements, which could make the game feel less engaging. Adding images, sound effects, or other media could enhance the player experience.
|
| 1447 |
-
Limited narrative branching: While there are some loops and choices, the overall structure is relatively linear. Adding more branching paths could increase replayability and player interest.
|
| 1448 |
-
|
| 1449 |
-
To make the game less bland, consider:
|
| 1450 |
-
|
| 1451 |
-
Adding more states and locations
|
| 1452 |
-
Increasing the number of choices in each state
|
| 1453 |
-
Implementing more consequences for player actions
|
| 1454 |
-
Expanding descriptions to create a richer narrative
|
| 1455 |
-
Incorporating media elements
|
| 1456 |
-
Creating more diverse paths through the game
|
| 1457 |
-
|
| 1458 |
-
#===============================================
|
| 1459 |
-
|
| 1460 |
-
|
| 1461 |
-
# Text-Based Game Improvement Suggestions
|
| 1462 |
-
|
| 1463 |
-
## 1. Expand State Variety
|
| 1464 |
-
- Add a new location: "Mountain Pass"
|
| 1465 |
-
- Include states like "steep_climb", "avalanche_risk", "hidden_cave"
|
| 1466 |
-
- Expand the "forest" location:
|
| 1467 |
-
- Add states like "dense_thicket", "mysterious_clearing", "ancient_tree"
|
| 1468 |
-
|
| 1469 |
-
## 2. Increase Choice Diversity
|
| 1470 |
-
- Add more choices to existing states. For example, in "village_start":
|
| 1471 |
-
- "talk to elder"
|
| 1472 |
-
- "visit market"
|
| 1473 |
-
- "investigate strange noises"
|
| 1474 |
-
- Ensure most states have at least 3 choices
|
| 1475 |
-
|
| 1476 |
-
## 3. Enhance Transition Complexity
|
| 1477 |
-
- Create more interconnected states. For example:
|
| 1478 |
-
- Allow travel between "forest" and "mountain_pass"
|
| 1479 |
-
- Add shortcuts or secret passages between non-adjacent locations
|
| 1480 |
-
|
| 1481 |
-
## 4. Implement More Consequences
|
| 1482 |
-
- Add consequences to more choices. For example:
|
| 1483 |
-
- In "forest_forest":
|
| 1484 |
-
- "forage for food" -> `lambda player: player.add_item('wild berries')`
|
| 1485 |
-
- "take shortcut" -> `lambda player: player.update_status('lost')`
|
| 1486 |
-
|
| 1487 |
-
## 5. Enrich Descriptions
|
| 1488 |
-
- Expand existing descriptions with more vivid details
|
| 1489 |
-
- Example for "village_start":
|
| 1490 |
-
```python
|
| 1491 |
-
"description": "You wake up in a small village nestled between rolling hills. The air is filled with the scent of freshly baked bread and the sound of a distant waterfall. Villagers bustle about, whispering excitedly about a rumor of lost treasure."
|
| 1492 |
-
```
|
| 1493 |
-
|
| 1494 |
-
## 6. Introduce Cyclic Content with Variations
|
| 1495 |
-
- Add time-based changes to revisited locations
|
| 1496 |
-
- Example:
|
| 1497 |
-
```python
|
| 1498 |
-
'village_start': {
|
| 1499 |
-
"description": lambda player: f"You return to the village square. It's now {player.time_of_day()}. " +
|
| 1500 |
-
("The market is bustling with activity." if player.time_of_day() == "day" else
|
| 1501 |
-
"The streets are quiet, lit by flickering torches.")
|
| 1502 |
-
}
|
| 1503 |
-
```
|
| 1504 |
-
|
| 1505 |
-
## 7. Create Meaningful Dead Ends
|
| 1506 |
-
- Add optional quests or side adventures
|
| 1507 |
-
- Example: "help_lost_child" state in the village that doesn't progress main story but provides rewards
|
| 1508 |
-
|
| 1509 |
-
## 8. Integrate Media Elements
|
| 1510 |
-
- Add placeholder media to enhance immersion:
|
| 1511 |
-
```python
|
| 1512 |
-
"media": [
|
| 1513 |
-
{"type": "image", "url": "/api/placeholder/400/300", "alt": "A picturesque village at dawn"},
|
| 1514 |
-
{"type": "sound", "url": "village_ambience.mp3"}
|
| 1515 |
-
]
|
| 1516 |
-
```
|
| 1517 |
-
|
| 1518 |
-
## 9. Enhance Narrative Progression
|
| 1519 |
-
- Add a main quest storyline with multiple stages
|
| 1520 |
-
- Introduce side quests for additional depth
|
| 1521 |
-
|
| 1522 |
-
## 10. Increase Player Agency
|
| 1523 |
-
- Add more impactful choices that significantly alter the game's direction
|
| 1524 |
-
- Implement a simple inventory or skill system that affects available choices
|
| 1525 |
-
|
| 1526 |
-
## 11. Extend Game Length
|
| 1527 |
-
- Add more locations and states to create a longer, more involved adventure
|
| 1528 |
-
- Implement quest chains that span multiple locations
|
| 1529 |
-
|
| 1530 |
-
## 12. Improve Replayability
|
| 1531 |
-
- Add random events that can occur in each location
|
| 1532 |
-
- Implement multiple endings based on player choices and achievements
|
| 1533 |
-
|
| 1534 |
-
|
| 1535 |
-
#===============================================
|
| 1536 |
-
|
| 1537 |
-
# Updated Text-Based Game Configuration with Side Quest
|
| 1538 |
-
|
| 1539 |
-
## New State: help_lost_child
|
| 1540 |
-
|
| 1541 |
-
Add this new state to the 'village' section of your `all_states` dictionary:
|
| 1542 |
-
|
| 1543 |
-
```python
|
| 1544 |
-
'village': {
|
| 1545 |
-
# ... existing states ...
|
| 1546 |
-
|
| 1547 |
-
'help_lost_child': {
|
| 1548 |
-
"description": "You encounter a crying child in the village square. They seem to have lost their way home.",
|
| 1549 |
-
"choices": ['help child', 'ignore and continue'],
|
| 1550 |
-
"transitions": {
|
| 1551 |
-
'help child': 'village_child_quest',
|
| 1552 |
-
'ignore and continue': 'village_start'
|
| 1553 |
-
},
|
| 1554 |
-
"consequences": {
|
| 1555 |
-
'help child': lambda player: player.update_status('helping_child')
|
| 1556 |
-
},
|
| 1557 |
-
"media": []
|
| 1558 |
-
},
|
| 1559 |
-
'child_quest': {
|
| 1560 |
-
"description": "You decide to help the lost child. After asking around and searching the village, you finally locate their home.",
|
| 1561 |
-
"choices": ['return child', 'ask for reward'],
|
| 1562 |
-
"transitions": {
|
| 1563 |
-
'return child': 'village_child_reunion',
|
| 1564 |
-
'ask for reward': 'village_child_reward'
|
| 1565 |
-
},
|
| 1566 |
-
"media": []
|
| 1567 |
-
},
|
| 1568 |
-
'child_reunion': {
|
| 1569 |
-
"description": "You return the child to their grateful parents. They thank you profusely for your kindness.",
|
| 1570 |
-
"choices": ['accept thanks', 'request reward'],
|
| 1571 |
-
"transitions": {
|
| 1572 |
-
'accept thanks': 'village_start',
|
| 1573 |
-
'request reward': 'village_child_reward'
|
| 1574 |
-
},
|
| 1575 |
-
"consequences": {
|
| 1576 |
-
'accept thanks': lambda player: player.update_status('local_hero')
|
| 1577 |
-
},
|
| 1578 |
-
"media": []
|
| 1579 |
-
},
|
| 1580 |
-
'child_reward': {
|
| 1581 |
-
"description": "The child's parents offer you a small pouch of coins as a reward for your help.",
|
| 1582 |
-
"choices": ['accept reward', 'decline reward'],
|
| 1583 |
-
"transitions": {
|
| 1584 |
-
'accept reward': 'village_start',
|
| 1585 |
-
'decline reward': 'village_start'
|
| 1586 |
-
},
|
| 1587 |
-
"consequences": {
|
| 1588 |
-
'accept reward': lambda player: player.add_item('coin pouch'),
|
| 1589 |
-
'decline reward': lambda player: player.update_status('selfless_hero')
|
| 1590 |
-
},
|
| 1591 |
-
"media": []
|
| 1592 |
-
},
|
| 1593 |
-
}
|
| 1594 |
-
```
|
| 1595 |
-
|
| 1596 |
-
## Updated Transitions
|
| 1597 |
-
|
| 1598 |
-
To incorporate this side quest into the existing game flow, we need to update some transitions in the 'village_start' state:
|
| 1599 |
-
|
| 1600 |
-
```python
|
| 1601 |
-
'village': {
|
| 1602 |
-
'start': {
|
| 1603 |
-
"description": "You're in the village square. The usual bustle of village life surrounds you.",
|
| 1604 |
-
"choices": ['explore village', 'gather supplies', 'rest', 'look around'], # Added 'look around'
|
| 1605 |
-
"transitions": {
|
| 1606 |
-
'explore village': 'village_rumor',
|
| 1607 |
-
'gather supplies': 'village_supplies',
|
| 1608 |
-
'rest': 'village_start',
|
| 1609 |
-
'look around': 'village_help_lost_child' # New transition
|
| 1610 |
-
},
|
| 1611 |
-
"consequences": {
|
| 1612 |
-
'gather supplies': lambda player: player.add_item('basic supplies')
|
| 1613 |
-
},
|
| 1614 |
-
"media": []
|
| 1615 |
-
},
|
| 1616 |
-
# ... other states ...
|
| 1617 |
-
}
|
| 1618 |
-
```
|
| 1619 |
-
|
| 1620 |
-
## Explanation of Changes
|
| 1621 |
-
|
| 1622 |
-
1. New States:
|
| 1623 |
-
- `help_lost_child`: Introduces the side quest
|
| 1624 |
-
- `child_quest`: Represents the process of helping the child
|
| 1625 |
-
- `child_reunion`: Concludes the quest if you don't ask for a reward
|
| 1626 |
-
- `child_reward`: Offers a choice to accept or decline a reward
|
| 1627 |
-
|
| 1628 |
-
2. Updated `village_start`:
|
| 1629 |
-
- Added a new choice: 'look around'
|
| 1630 |
-
- Added a new transition to `village_help_lost_child`
|
| 1631 |
-
|
| 1632 |
-
3. Consequences:
|
| 1633 |
-
- Added status updates: 'helping_child', 'local_hero', 'selfless_hero'
|
| 1634 |
-
- Added item reward: 'coin pouch'
|
| 1635 |
-
|
| 1636 |
-
These changes create a meaningful dead end by:
|
| 1637 |
-
1. Providing an optional quest that doesn't directly progress the main treasure hunt story
|
| 1638 |
-
2. Offering multiple choices within the side quest, allowing for different outcomes
|
| 1639 |
-
3. Implementing consequences that affect the player's status or inventory, providing rewards for engagement
|
| 1640 |
-
4. Allowing the player to return to the main story flow after completing (or ignoring) the side quest
|
| 1641 |
-
|
| 1642 |
-
This side quest adds depth to the village location, gives the player more to do, and provides character-building opportunities without derailing the main narrative. It also demonstrates how you can implement similar side quests or meaningful dead ends in other locations of your game.
|
| 1643 |
-
|
| 1644 |
-
#================================================================================
|
| 1645 |
-
|
| 1646 |
-
Certainly! Let's implement the "help_lost_child" side quest as a meaningful dead end in the village. This will add depth to the game without necessarily progressing the main story. Here's how we can incorporate this into your current configuration:
|
| 1647 |
-
Updated Text-Based Game Configuration with Side QuestClick to open document
|
| 1648 |
-
To further improve this side quest and make it even more engaging, you could consider:
|
| 1649 |
-
|
| 1650 |
-
Time sensitivity: Make the quest available only at certain times or for a limited number of turns.
|
| 1651 |
-
Skill checks: If your game has a skill system, you could add checks for persuasion or perception that affect the outcome.
|
| 1652 |
-
Long-term consequences: The status changes (like 'local_hero') could affect how NPCs interact with the player later in the game.
|
| 1653 |
-
Branching outcomes: You could add more complex branches, such as the child being in actual danger, leading to a mini-adventure.
|
| 1654 |
-
|
| 1655 |
-
Would you like me to elaborate on any of these ideas or show how to implement them in your configuration?
|
| 1656 |
-
|
| 1657 |
-
"""
|
| 1658 |
-
|
| 1659 |
-
tipsupdatedconfigatbeinningofthisspace = """{
|
| 1660 |
-
"village": {
|
| 1661 |
-
"start": {
|
| 1662 |
-
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
|
| 1663 |
-
"choices": ['explore village', 'gather supplies', 'rest', 'look around'],
|
| 1664 |
-
"transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start', 'look around': 'village_help_lost_child'},
|
| 1665 |
-
"consequences": {
|
| 1666 |
-
'gather supplies': lambda player: player.add_item('basic supplies')
|
| 1667 |
-
},
|
| 1668 |
-
"media": []
|
| 1669 |
-
},
|
| 1670 |
-
"rumor": {
|
| 1671 |
-
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
|
| 1672 |
-
"choices": ['decide to go', 'ignore'],
|
| 1673 |
-
"transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'},
|
| 1674 |
-
"consequences": {
|
| 1675 |
-
'decide to go': lambda player: player.update_knowledge('treasure location')
|
| 1676 |
-
},
|
| 1677 |
-
"media": []
|
| 1678 |
-
},
|
| 1679 |
-
"supplies": {
|
| 1680 |
-
"description": "You gather supplies for your journey.",
|
| 1681 |
-
"choices": ['head to forest', 'stay in village'],
|
| 1682 |
-
"transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'},
|
| 1683 |
-
"media": []
|
| 1684 |
-
},
|
| 1685 |
-
"help_lost_child": {
|
| 1686 |
-
"description": "You encounter a crying child in the village square. They seem to have lost their way home.",
|
| 1687 |
-
"choices": ['help child', 'ignore and continue'],
|
| 1688 |
-
"transitions": {
|
| 1689 |
-
'help child': 'village_child_quest',
|
| 1690 |
-
'ignore and continue': 'village_start'
|
| 1691 |
-
},
|
| 1692 |
-
"consequences": {
|
| 1693 |
-
'help child': lambda player: player.update_status('helping_child')
|
| 1694 |
-
},
|
| 1695 |
-
"media": []
|
| 1696 |
-
},
|
| 1697 |
-
"child_quest": {
|
| 1698 |
-
"description": "You decide to help the lost child. After asking around and searching the village, you finally locate their home.",
|
| 1699 |
-
"choices": ['return child', 'ask for reward'],
|
| 1700 |
-
"transitions": {
|
| 1701 |
-
'return child': 'village_child_reunion',
|
| 1702 |
-
'ask for reward': 'village_child_reward'
|
| 1703 |
-
},
|
| 1704 |
-
"media": []
|
| 1705 |
-
},
|
| 1706 |
-
"child_reunion": {
|
| 1707 |
-
"description": "You return the child to their grateful parents. They thank you profusely for your kindness.",
|
| 1708 |
-
"choices": ['accept thanks', 'request reward'],
|
| 1709 |
-
"transitions": {
|
| 1710 |
-
'accept thanks': 'village_start',
|
| 1711 |
-
'request reward': 'village_child_reward'
|
| 1712 |
-
},
|
| 1713 |
-
"consequences": {
|
| 1714 |
-
'accept thanks': lambda player: player.update_status('local_hero')
|
| 1715 |
-
},
|
| 1716 |
-
"media": []
|
| 1717 |
-
},
|
| 1718 |
-
"child_reward": {
|
| 1719 |
-
"description": "The child's parents offer you a small pouch of coins as a reward for your help.",
|
| 1720 |
-
"choices": ['accept reward', 'decline reward'],
|
| 1721 |
-
"transitions": {
|
| 1722 |
-
'accept reward': 'village_start',
|
| 1723 |
-
'decline reward': 'village_start'
|
| 1724 |
-
},
|
| 1725 |
-
"consequences": {
|
| 1726 |
-
'accept reward': lambda player: player.add_item('coin pouch'),
|
| 1727 |
-
'decline reward': lambda player: player.update_status('selfless_hero')
|
| 1728 |
-
},
|
| 1729 |
-
"media": []
|
| 1730 |
-
},
|
| 1731 |
-
},
|
| 1732 |
-
"forest": {
|
| 1733 |
-
"forest": {
|
| 1734 |
-
"description": "You enter the dense forest, heading towards the ruins.",
|
| 1735 |
-
"choices": ['travel further', 'return to village'],
|
| 1736 |
-
"transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'},
|
| 1737 |
-
"media": []
|
| 1738 |
-
},
|
| 1739 |
-
},
|
| 1740 |
-
"ruins": {
|
| 1741 |
-
"ruins": {
|
| 1742 |
-
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
|
| 1743 |
-
"choices": ['enter ruins', 'return to forest'],
|
| 1744 |
-
"transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'},
|
| 1745 |
-
"media": []
|
| 1746 |
-
},
|
| 1747 |
-
"explore": {
|
| 1748 |
-
"description": "You explore the ruins, encountering traps and puzzles.",
|
| 1749 |
-
"choices": ['solve puzzle', 'avoid traps'],
|
| 1750 |
-
"transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'},
|
| 1751 |
-
"media": []
|
| 1752 |
-
},
|
| 1753 |
-
"hiddenPassage": {
|
| 1754 |
-
"description": "You solve a challenging puzzle and unlock a hidden passage.",
|
| 1755 |
-
"choices": ['enter passage', 'go back'],
|
| 1756 |
-
"transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'},
|
| 1757 |
-
"media": []
|
| 1758 |
-
},
|
| 1759 |
-
"treasureRoom": {
|
| 1760 |
-
"description": "You enter the treasure room and find the treasure chest.",
|
| 1761 |
-
"choices": ['take treasure', 'leave'],
|
| 1762 |
-
"transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'},
|
| 1763 |
-
"consequences": {
|
| 1764 |
-
'take treasure': lambda player: player.add_item('treasure')
|
| 1765 |
-
},
|
| 1766 |
-
"media": []
|
| 1767 |
-
},
|
| 1768 |
-
'celebrate': {
|
| 1769 |
-
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
|
| 1770 |
-
"choices": ['return to village'],
|
| 1771 |
-
"transitions": {'return to village': 'village_return'},
|
| 1772 |
-
"media": []
|
| 1773 |
-
},
|
| 1774 |
-
},
|
| 1775 |
-
"village_return": {
|
| 1776 |
-
"village_return": {
|
| 1777 |
-
"description": "You return to the village with the treasure and share it with the villagers.",
|
| 1778 |
-
"choices": ['end adventure'],
|
| 1779 |
-
"transitions": {'end adventure': 'end_end'},
|
| 1780 |
-
"media": []
|
| 1781 |
-
},
|
| 1782 |
-
},
|
| 1783 |
-
"end": {
|
| 1784 |
-
"end": {
|
| 1785 |
-
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
|
| 1786 |
-
"choices": [],
|
| 1787 |
-
"transitions": {},
|
| 1788 |
-
"media": []
|
| 1789 |
-
},
|
| 1790 |
-
}
|
| 1791 |
-
}"""
|
| 1792 |
with gr.Tab("Improvement of the default config"):
|
| 1793 |
gr.HTML("Example of how to advance a game config with LLM - end goal is to have automatic worflow that takes these considerations into account <br> Things missing from the game engine - Economics and Basic Politics (NPC affiliation)")
|
| 1794 |
gr.HTML("Suggestions from claude 3.5 on how to change config")
|
|
@@ -2001,7 +1224,7 @@ Would you like me to elaborate on any of these ideas or show how to implement th
|
|
| 2001 |
ewpgenerate_button.click(generate_story_and_timeline, inputs=[ewpgenerate_no_ui_timeline_points, ewpgenerate_no_media_timeline_points, ewpgenerate_with_media_check], outputs=[ewptimeline_output_with_assets, ewptimeline_output, ewpstory_output, ewpwacustom_config, ewpgame_structure_output_text]) #ewpgame_structure_output_text_with_media, ewpgame_structure_output_text])
|
| 2002 |
|
| 2003 |
with gr.Tab("Asset Generation Considerations"):
|
| 2004 |
-
gr.HTML("
|
| 2005 |
|
| 2006 |
with gr.Accordion("LLM HF Spaces/Sites (Click Here to Open) - Ask for a story and suggestions based on the autoconfig", open=False):
|
| 2007 |
with gr.Row():
|
|
@@ -2022,13 +1245,13 @@ Would you like me to elaborate on any of these ideas or show how to implement th
|
|
| 2022 |
|
| 2023 |
with gr.Tab("Media Understanding"):
|
| 2024 |
gr.HTML("NPC Response Engines? Camera, Shopkeeper, Companion, Enemies, etc.")
|
| 2025 |
-
with gr.Accordion("Media understanding model Spaces/Sites (Click Here to Open)
|
| 2026 |
with gr.Row():
|
| 2027 |
linktomediaunderstandingspace = gr.Dropdown(choices=[ "--Weak Audio Understanding = Audio to text, Weak Video Understanding = Video to Image to Image Understanding", "https://skalskip-florence-2-video.hf.space", "https://kingnish-opengpt-4o.hf.space",
|
| 2028 |
"--Image Understanding--", "https://qnguyen3-nanollava.hf.space", "https://skalskip-better-florence-2.hf.space", ],
|
| 2029 |
label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 2030 |
mediaunderstandingspacebtn = gr.Button("Use the chosen URL to load interface with a media understanding space")
|
| 2031 |
-
mediaunderstandingspace = gr.HTML("
|
| 2032 |
mediaunderstandingspacebtn.click(display_website, inputs=linktomediaunderstandingspace, outputs=mediaunderstandingspace)
|
| 2033 |
|
| 2034 |
|
|
@@ -2064,7 +1287,7 @@ Would you like me to elaborate on any of these ideas or show how to implement th
|
|
| 2064 |
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 2065 |
|
| 2066 |
with gr.Tab("Video"):
|
| 2067 |
-
with gr.Accordion("Video Spaces/Sites (Click Here to Open)
|
| 2068 |
with gr.Row():
|
| 2069 |
linktovideogenspace = gr.Dropdown(choices=["--Genral--", "https://kadirnar-open-sora.hf.space",
|
| 2070 |
"--Talking Portrait--", "https://fffiloni-tts-hallo-talking-portrait.hf.space",
|
|
@@ -2085,7 +1308,7 @@ Would you like me to elaborate on any of these ideas or show how to implement th
|
|
| 2085 |
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 2086 |
|
| 2087 |
with gr.Tab("Audio"):
|
| 2088 |
-
with gr.Accordion("Audio Spaces/Sites (Click Here to Open)
|
| 2089 |
with gr.Row():
|
| 2090 |
linktoaudiiogenspace = gr.Dropdown(choices=["General", "https://artificialguybr-stable-audio-open-zero.hf.space", "",
|
| 2091 |
"--Talking Portrait--","https://fffiloni-tts-hallo-talking-portrait.hf.space"],
|
|
@@ -2101,7 +1324,7 @@ Would you like me to elaborate on any of these ideas or show how to implement th
|
|
| 2101 |
gr.HTML("3rd Party / Closed Source - https://suno.com/ <br>https://www.udio.com/")
|
| 2102 |
|
| 2103 |
with gr.Tab("3D"):
|
| 2104 |
-
with gr.Accordion("3D Model Spaces/Sites (Click Here to Open)
|
| 2105 |
with gr.Row():
|
| 2106 |
linktoThreedModel = gr.Dropdown(choices=["https://wuvin-unique3d.hf.space", "https://stabilityai-triposr.hf.space", "https://hysts-shap-e.hf.space", "https://tencentarc-instantmesh.hf.space", "https://ashawkey-lgm.hf.space", "https://dylanebert-lgm-mini.hf.space", "https://dylanebert-splat-to-mesh.hf.space", "https://dylanebert-multi-view-diffusion.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 2107 |
ThreedModelspacebtn = gr.Button("Use the chosen URL to load interface with a 3D model")
|
|
@@ -2239,27 +1462,6 @@ Would you like me to elaborate on any of these ideas or show how to implement th
|
|
| 2239 |
gr.Image(value="testmedia/Flash scribble SDXL - random squiggles as roads.webp")
|
| 2240 |
gr.Video(value="testmedia/SVD - random squiggles as roads video 004484.mp4")
|
| 2241 |
gr.Audio(value="testmedia/Stable Audio - Raindrops, output.wav")
|
| 2242 |
-
gr.HTML(
|
| 2243 |
-
<div>
|
| 2244 |
-
<p>This is a placeholder to test use as an all-media loader for ease of prototyping. Seems gradio HTML doesnt support loading local assets or my file path is wrong</p>
|
| 2245 |
-
</div>
|
| 2246 |
-
<div style="display: flex; justify-content: space-between; margin-bottom: 20px;">
|
| 2247 |
-
<div style="width: 30%;">
|
| 2248 |
-
<img src="testmedia/Flash scribble SDXL - random squiggles as roads.webp" alt="Random squiggles as roads" style="width: 100%; height: auto;">
|
| 2249 |
-
</div>
|
| 2250 |
-
<div style="width: 30%;">
|
| 2251 |
-
<video width="100%" height="auto" controls>
|
| 2252 |
-
<source src="testmedia/SVD - random squiggles as roads video 004484.mp4" type="video/mp4">
|
| 2253 |
-
Your browser does not support the video tag.
|
| 2254 |
-
</video>
|
| 2255 |
-
</div>
|
| 2256 |
-
<div style="width: 30%;">
|
| 2257 |
-
<audio controls style="width: 100%;">
|
| 2258 |
-
<source src="testmedia/Stable Audio - Raindrops, output.wav" type="audio/wav">
|
| 2259 |
-
Your browser does not support the audio element.
|
| 2260 |
-
</audio>
|
| 2261 |
-
</div>
|
| 2262 |
-
</div>
|
| 2263 |
-
""")
|
| 2264 |
|
| 2265 |
demo.queue().launch()
|
|
|
|
| 13 |
import psutil
|
| 14 |
from sentence_transformers import SentenceTransformer
|
| 15 |
|
| 16 |
+
#Imported Long Variables - comment for each move to search
|
| 17 |
+
from relatively_constant_variables import *
|
| 18 |
+
|
| 19 |
# # Initialize the zero tensor on CUDA
|
| 20 |
# zero = torch.Tensor([0]).cuda()
|
| 21 |
# print(zero.device) # This will print 'cpu' outside the @spaces.GPU decorated function
|
|
|
|
| 205 |
)
|
| 206 |
llmguide_tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-0.5B-Instruct")
|
| 207 |
|
| 208 |
+
#import knowledge_base from relatively_constant_variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
|
| 210 |
# Create embeddings for the knowledge base
|
| 211 |
knowledge_base_embeddings = embedding_model.encode([doc["content"] for doc in knowledge_base])
|
|
|
|
| 298 |
|
| 299 |
#--------------------------------------------------------------------------------------------------------------------------------
|
| 300 |
|
| 301 |
+
#importing FAQAllprompts from relatively_constant_variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
|
| 303 |
#--------------------------------------------------------------------------------------------------------------------------------
|
| 304 |
+
|
| 305 |
+
#importing default_config from relatively_constant_variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
|
| 307 |
# Helper functions to dynamically add items
|
| 308 |
def add_inventory_item(inventory_items, type, name, description):
|
|
|
|
| 327 |
|
| 328 |
#-----------------------------------------------------------------------------------------------------------------------------------
|
| 329 |
|
| 330 |
+
#importing player_engagement_items and story_events from relatively_constant_variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
|
| 332 |
def pick_random_items(items, n):
|
| 333 |
return random.sample(items, n)
|
|
|
|
| 581 |
def update_knowledge(self, topic):
|
| 582 |
self.knowledge[topic] = True
|
| 583 |
|
| 584 |
+
#importing all_states from relatively_constant_variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 585 |
|
| 586 |
def validate_transitions(all_states):
|
| 587 |
errors = []
|
|
|
|
| 809 |
|
| 810 |
#-----------------------------------------------------------------------------------------------------------------------------------
|
| 811 |
|
| 812 |
+
def timeline_get_random_suggestions(num_lists, items_per_list):
|
| 813 |
+
"""
|
| 814 |
+
Generate random suggestions from a specified number of lists.
|
| 815 |
+
|
| 816 |
+
:param num_lists: Number of lists to consider
|
| 817 |
+
:param items_per_list: Number of items to select from each list
|
| 818 |
+
:return: A list of randomly selected suggestions
|
| 819 |
+
"""
|
| 820 |
+
selected_lists = random.sample(all_idea_lists, min(num_lists, len(all_idea_lists)))
|
| 821 |
+
suggestions = []
|
| 822 |
+
|
| 823 |
+
for lst in selected_lists:
|
| 824 |
+
suggestions.extend(random.sample(lst, min(items_per_list, len(lst))))
|
| 825 |
+
|
| 826 |
+
return suggestions
|
| 827 |
+
|
| 828 |
+
#-----------------------------------------------------------------------------------------------------------------------------------
|
| 829 |
+
|
| 830 |
with gr.Blocks() as demo:
|
| 831 |
gr.HTML("""<div style="width: 100%; text-align: center">Main ideas for this space is (June 2024) (Custom component planning?):</div>
|
| 832 |
<div style="display: flex; justify-content: center; margin-bottom: 20px; align-items: center;">
|
|
|
|
| 849 |
button.click(llmguide_generate_response, inputs=[FAQCustomButtonInput, gr.State(index), gr.State(category_name)], outputs=FAQMainOutput)
|
| 850 |
|
| 851 |
with gr.Tab("General RAG (Pathfinder?) Attempt"):
|
| 852 |
+
gr.HTML("Placeholder for weak RAG Type Charcter interaction test aka input for JSON 'Knowledge Base' Input")
|
| 853 |
# gr.Interface(
|
| 854 |
# fn=rag,
|
| 855 |
# inputs=[
|
|
|
|
| 905 |
outputs=[llmguide_output, llmguide_tokens_per_second],
|
| 906 |
)
|
| 907 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 908 |
with gr.Accordion("Decisions Creation to Story to Config Conversation", open=False):
|
| 909 |
with gr.Tab("Timeline Guide for Config Generation or evelution"):
|
| 910 |
with gr.Accordion("Empty Config shape for explaining to LLM", open=False):
|
| 911 |
gr.HTML(f"placeholder for current empty JSON config shape")
|
| 912 |
gr.HTML("Structural indicators of quality of config")
|
| 913 |
+
with gr.Tab("Random Suggestions"):
|
| 914 |
+
timeline_num_lists_slider = gr.Slider(minimum=1, maximum=len(all_idea_lists), step=1, label="Number of Lists to Consider", value=3)
|
| 915 |
+
timeline_items_per_list_slider = gr.Slider(minimum=1, maximum=10, step=1, label="Items per List", value=3)
|
| 916 |
+
timeline_generate_button = gr.Button("Generate Random Suggestions")
|
| 917 |
+
timeline_output_text = gr.Textbox(label="Random Suggestions", lines=10)
|
| 918 |
+
|
| 919 |
+
timeline_generate_button.click(
|
| 920 |
+
timeline_get_random_suggestions,
|
| 921 |
+
inputs=[timeline_num_lists_slider, timeline_items_per_list_slider],
|
| 922 |
+
outputs=[timeline_output_text]
|
| 923 |
+
)
|
| 924 |
+
with gr.Tab("Config Specific"):
|
| 925 |
gr.HTML("Timeline for making Timelines?")
|
| 926 |
gr.HTML("Componets (outside Code Support for Config): Decisions (and context explanation), Nested Sections, Media (Especially to affect decisions), Replayability (GTA and Tekken type mechanics in text form), Theme integration (Modified Varibles that affect UI or config order)")
|
| 927 |
gr.HTML("From Nothing <br>")
|
| 928 |
gr.HTML("From Existing <br>")
|
| 929 |
+
with gr.Tab("Existing Game Analysis"):
|
| 930 |
gr.HTML("Existing Games eg. GTA Heists - Same Map with overlapping branching narratives, Battlefront - Elites amongst Commoners, Tekken Casino (one mistake = 1/2 or 1/3 of your Resources) and Turn based: 'Tactics' type nintendo games, Chess (and any other tile based game) ")
|
| 931 |
gr.HTML("Existing Game Rules for text - Cyberpunk RED, ")
|
| 932 |
+
with gr.Tab("Multiplayer options"):
|
| 933 |
gr.HTML("Community playthrough = Tally of players choices, Random item placed in a random location - first person to get it wins, Survival by location or characters met")
|
| 934 |
with gr.Tab("Some Workflow Helpers (Removed as built into Semi-Auto)"):
|
| 935 |
gr.HTML("Song / Random Scenario to 'full game' manual or auto is end goal ")
|
|
|
|
| 1004 |
with gr.Tab("Mermaid Graphs and Nesting"):
|
| 1005 |
gr.HTML("Claude Artifacts to illustrate nested structure brainstorms - <br> https://claude.site/artifacts/4a910d81-1541-49f4-8531-4f27fe56cd1e <br> https://claude.site/artifacts/265e9242-2093-46e1-9011-ed6ad938be90?fullscreen=false <br> ")
|
| 1006 |
gr.HTML("")
|
|
|
|
|
|
|
| 1007 |
with gr.Tab("Structural Inspirations"):
|
| 1008 |
gr.HTML("GTA Heists - Replayability and stakes, Tekken - 2/3 mistakes = lost round ")
|
| 1009 |
gr.HTML("Sports Scores, ")
|
| 1010 |
with gr.Tab("Themes"):
|
| 1011 |
gr.HTML("")
|
| 1012 |
|
| 1013 |
+
# import originalconfigatbeinningofthisspace, claude3_5_06072024configtips, tipsupdatedconfigatbeinningofthisspace from relatively_constant_variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1015 |
with gr.Tab("Improvement of the default config"):
|
| 1016 |
gr.HTML("Example of how to advance a game config with LLM - end goal is to have automatic worflow that takes these considerations into account <br> Things missing from the game engine - Economics and Basic Politics (NPC affiliation)")
|
| 1017 |
gr.HTML("Suggestions from claude 3.5 on how to change config")
|
|
|
|
| 1224 |
ewpgenerate_button.click(generate_story_and_timeline, inputs=[ewpgenerate_no_ui_timeline_points, ewpgenerate_no_media_timeline_points, ewpgenerate_with_media_check], outputs=[ewptimeline_output_with_assets, ewptimeline_output, ewpstory_output, ewpwacustom_config, ewpgame_structure_output_text]) #ewpgame_structure_output_text_with_media, ewpgame_structure_output_text])
|
| 1225 |
|
| 1226 |
with gr.Tab("Asset Generation Considerations"):
|
| 1227 |
+
gr.HTML("Licenses for the spaces still to be evaluated - June 2024 <br> Users to follow with cool spaces - https://huggingface.co/fffiloni, https://huggingface.co/artificialguybr, https://huggingface.co/radames, https://huggingface.co/multimodalart, ")
|
| 1228 |
|
| 1229 |
with gr.Accordion("LLM HF Spaces/Sites (Click Here to Open) - Ask for a story and suggestions based on the autoconfig", open=False):
|
| 1230 |
with gr.Row():
|
|
|
|
| 1245 |
|
| 1246 |
with gr.Tab("Media Understanding"):
|
| 1247 |
gr.HTML("NPC Response Engines? Camera, Shopkeeper, Companion, Enemies, etc.")
|
| 1248 |
+
with gr.Accordion("Media understanding model Spaces/Sites (Click Here to Open)", open=False):
|
| 1249 |
with gr.Row():
|
| 1250 |
linktomediaunderstandingspace = gr.Dropdown(choices=[ "--Weak Audio Understanding = Audio to text, Weak Video Understanding = Video to Image to Image Understanding", "https://skalskip-florence-2-video.hf.space", "https://kingnish-opengpt-4o.hf.space",
|
| 1251 |
"--Image Understanding--", "https://qnguyen3-nanollava.hf.space", "https://skalskip-better-florence-2.hf.space", ],
|
| 1252 |
label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1253 |
mediaunderstandingspacebtn = gr.Button("Use the chosen URL to load interface with a media understanding space")
|
| 1254 |
+
mediaunderstandingspace = gr.HTML("Mdeia Understanding Space Chosen will load here")
|
| 1255 |
mediaunderstandingspacebtn.click(display_website, inputs=linktomediaunderstandingspace, outputs=mediaunderstandingspace)
|
| 1256 |
|
| 1257 |
|
|
|
|
| 1287 |
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1288 |
|
| 1289 |
with gr.Tab("Video"):
|
| 1290 |
+
with gr.Accordion("Video Spaces/Sites (Click Here to Open)", open=False):
|
| 1291 |
with gr.Row():
|
| 1292 |
linktovideogenspace = gr.Dropdown(choices=["--Genral--", "https://kadirnar-open-sora.hf.space",
|
| 1293 |
"--Talking Portrait--", "https://fffiloni-tts-hallo-talking-portrait.hf.space",
|
|
|
|
| 1308 |
gr.HTML("Placeholder for models small enough to run on cpu here in this space that can assist")
|
| 1309 |
|
| 1310 |
with gr.Tab("Audio"):
|
| 1311 |
+
with gr.Accordion("Audio Spaces/Sites (Click Here to Open)", open=False):
|
| 1312 |
with gr.Row():
|
| 1313 |
linktoaudiiogenspace = gr.Dropdown(choices=["General", "https://artificialguybr-stable-audio-open-zero.hf.space", "",
|
| 1314 |
"--Talking Portrait--","https://fffiloni-tts-hallo-talking-portrait.hf.space"],
|
|
|
|
| 1324 |
gr.HTML("3rd Party / Closed Source - https://suno.com/ <br>https://www.udio.com/")
|
| 1325 |
|
| 1326 |
with gr.Tab("3D"):
|
| 1327 |
+
with gr.Accordion("3D Model Spaces/Sites (Click Here to Open)", open=False):
|
| 1328 |
with gr.Row():
|
| 1329 |
linktoThreedModel = gr.Dropdown(choices=["https://wuvin-unique3d.hf.space", "https://stabilityai-triposr.hf.space", "https://hysts-shap-e.hf.space", "https://tencentarc-instantmesh.hf.space", "https://ashawkey-lgm.hf.space", "https://dylanebert-lgm-mini.hf.space", "https://dylanebert-splat-to-mesh.hf.space", "https://dylanebert-multi-view-diffusion.hf.space"], label="Choose/Cancel type any .hf.space link here (can also type a link)'", allow_custom_value=True)
|
| 1330 |
ThreedModelspacebtn = gr.Button("Use the chosen URL to load interface with a 3D model")
|
|
|
|
| 1462 |
gr.Image(value="testmedia/Flash scribble SDXL - random squiggles as roads.webp")
|
| 1463 |
gr.Video(value="testmedia/SVD - random squiggles as roads video 004484.mp4")
|
| 1464 |
gr.Audio(value="testmedia/Stable Audio - Raindrops, output.wav")
|
| 1465 |
+
gr.HTML(TestmedialoadinHTML) # imported from relatively_constant_variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1466 |
|
| 1467 |
demo.queue().launch()
|
relatively_constant_variables.py
ADDED
|
@@ -0,0 +1,1092 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" Variables moved to make reading a bit easier
|
| 2 |
+
ctrl+f - #-------------------------#-------------------------#-------------------------#-------------------------
|
| 3 |
+
FAQ and RAG data
|
| 4 |
+
Default Config - JS config
|
| 5 |
+
Autostructure suggestor?
|
| 6 |
+
Initial Game Config
|
| 7 |
+
Comporation between inital and edited - with suggestions in between
|
| 8 |
+
Test if HTML can load in HTML gradio component
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
#Supposed to be part of FAQ buttons
|
| 12 |
+
Frontendpromptengforguide = """Suggest descriptions for media to fill the empty media fields -
|
| 13 |
+
|
| 14 |
+
{
|
| 15 |
+
"village": {
|
| 16 |
+
"start": {
|
| 17 |
+
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
|
| 18 |
+
"choices": [
|
| 19 |
+
"explore village",
|
| 20 |
+
"gather supplies",
|
| 21 |
+
"rest"
|
| 22 |
+
],
|
| 23 |
+
"transitions": {
|
| 24 |
+
"explore village": "village_rumor",
|
| 25 |
+
"gather supplies": "village_supplies",
|
| 26 |
+
"rest": "village_start"
|
| 27 |
+
},
|
| 28 |
+
"consequences": {
|
| 29 |
+
"gather supplies": {}
|
| 30 |
+
},
|
| 31 |
+
"media": []
|
| 32 |
+
},
|
| 33 |
+
"rumor": {
|
| 34 |
+
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
|
| 35 |
+
"choices": [
|
| 36 |
+
"decide to go",
|
| 37 |
+
"ignore"
|
| 38 |
+
],
|
| 39 |
+
"transitions": {
|
| 40 |
+
"decide to go": "village_supplies",
|
| 41 |
+
"ignore": "village_start"
|
| 42 |
+
},
|
| 43 |
+
"consequences": {
|
| 44 |
+
"decide to go": {}
|
| 45 |
+
},
|
| 46 |
+
"media": []
|
| 47 |
+
},
|
| 48 |
+
"supplies": {
|
| 49 |
+
"description": "You gather supplies for your journey.",
|
| 50 |
+
"choices": [
|
| 51 |
+
"head to forest",
|
| 52 |
+
"stay in village"
|
| 53 |
+
],
|
| 54 |
+
"transitions": {
|
| 55 |
+
"head to forest": "forest_forest",
|
| 56 |
+
"stay in village": "village_start"
|
| 57 |
+
},
|
| 58 |
+
"media": []
|
| 59 |
+
}
|
| 60 |
+
},
|
| 61 |
+
"forest": {
|
| 62 |
+
"forest": {
|
| 63 |
+
"description": "You enter the dense forest, heading towards the ruins.",
|
| 64 |
+
"choices": [
|
| 65 |
+
"travel further",
|
| 66 |
+
"return to village"
|
| 67 |
+
],
|
| 68 |
+
"transitions": {
|
| 69 |
+
"travel further": "ruins_ruins",
|
| 70 |
+
"return to village": "village_start"
|
| 71 |
+
},
|
| 72 |
+
"media": []
|
| 73 |
+
}
|
| 74 |
+
},
|
| 75 |
+
"ruins": {
|
| 76 |
+
"ruins": {
|
| 77 |
+
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
|
| 78 |
+
"choices": [
|
| 79 |
+
"enter ruins",
|
| 80 |
+
"return to forest"
|
| 81 |
+
],
|
| 82 |
+
"transitions": {
|
| 83 |
+
"enter ruins": "ruins_explore",
|
| 84 |
+
"return to forest": "forest_forest"
|
| 85 |
+
},
|
| 86 |
+
"media": []
|
| 87 |
+
},
|
| 88 |
+
"explore": {
|
| 89 |
+
"description": "You explore the ruins, encountering traps and puzzles.",
|
| 90 |
+
"choices": [
|
| 91 |
+
"solve puzzle",
|
| 92 |
+
"avoid traps"
|
| 93 |
+
],
|
| 94 |
+
"transitions": {
|
| 95 |
+
"solve puzzle": "ruins_hiddenPassage",
|
| 96 |
+
"avoid traps": "ruins_ruins"
|
| 97 |
+
},
|
| 98 |
+
"media": []
|
| 99 |
+
},
|
| 100 |
+
"hiddenPassage": {
|
| 101 |
+
"description": "You solve a challenging puzzle and unlock a hidden passage.",
|
| 102 |
+
"choices": [
|
| 103 |
+
"enter passage",
|
| 104 |
+
"go back"
|
| 105 |
+
],
|
| 106 |
+
"transitions": {
|
| 107 |
+
"enter passage": "ruins_treasureRoom",
|
| 108 |
+
"go back": "ruins_explore"
|
| 109 |
+
},
|
| 110 |
+
"media": []
|
| 111 |
+
},
|
| 112 |
+
"treasureRoom": {
|
| 113 |
+
"description": "You enter the treasure room and find the treasure chest.",
|
| 114 |
+
"choices": [
|
| 115 |
+
"take treasure",
|
| 116 |
+
"leave"
|
| 117 |
+
],
|
| 118 |
+
"transitions": {
|
| 119 |
+
"take treasure": "ruins_celebrate",
|
| 120 |
+
"leave": "ruins_ruins"
|
| 121 |
+
},
|
| 122 |
+
"consequences": {
|
| 123 |
+
"take treasure": {}
|
| 124 |
+
},
|
| 125 |
+
"media": []
|
| 126 |
+
},
|
| 127 |
+
"celebrate": {
|
| 128 |
+
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
|
| 129 |
+
"choices": [
|
| 130 |
+
"return to village"
|
| 131 |
+
],
|
| 132 |
+
"transitions": {
|
| 133 |
+
"return to village": "village_return"
|
| 134 |
+
},
|
| 135 |
+
"media": []
|
| 136 |
+
}
|
| 137 |
+
},
|
| 138 |
+
"village_return": {
|
| 139 |
+
"village_return": {
|
| 140 |
+
"description": "You return to the village with the treasure and share it with the villagers.",
|
| 141 |
+
"choices": [
|
| 142 |
+
"end adventure"
|
| 143 |
+
],
|
| 144 |
+
"transitions": {
|
| 145 |
+
"end adventure": "end_end"
|
| 146 |
+
},
|
| 147 |
+
"media": []
|
| 148 |
+
}
|
| 149 |
+
},
|
| 150 |
+
"end": {
|
| 151 |
+
"end": {
|
| 152 |
+
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
|
| 153 |
+
"choices": [],
|
| 154 |
+
"transitions": {},
|
| 155 |
+
"media": []
|
| 156 |
+
}
|
| 157 |
+
}
|
| 158 |
+
}
|
| 159 |
+
"""
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
FAQAllprompts = {
|
| 164 |
+
"Brainstorming for this space": [
|
| 165 |
+
("Help me make a story", "- Explain to the user that they need to come up with a list of decisions, and then choose themes and then do the setting in characters and add some examples for each step:"),
|
| 166 |
+
],
|
| 167 |
+
"Expansive Problem solving": [
|
| 168 |
+
("My problem to solve is", "- please make 10 sub problems have to solve from this:"),
|
| 169 |
+
("My process to solve is", "- please make 10 sub processes have to solve from this:"),
|
| 170 |
+
("My goal to solve is", "- please make 10 sub goals have to solve from this:"),
|
| 171 |
+
("My task to solve is", "- please make 10 sub tasks have to solve from this:"),
|
| 172 |
+
("My phase to solve is", "- please make 10 sub phases have to solve from this:"),
|
| 173 |
+
("My component to solve is", "- please make 10 sub components have to solve from this:"),
|
| 174 |
+
("My element to solve is", "- please make 10 sub elements have to solve from this:"),
|
| 175 |
+
("A brief description of my current situation:", "- please list the most important task to pay attention to:"),
|
| 176 |
+
("A brief description of my current situation to analyse:", "- please conduct a situational analysis:"),
|
| 177 |
+
("A brief description of my current situation to decompose:", "- please conduct a problem decomposition:"),
|
| 178 |
+
],
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
# Sample knowledge base (replace with your own data)
|
| 182 |
+
knowledge_base = [
|
| 183 |
+
{"id": "doc1", "content": "The capital of France is Paris."},
|
| 184 |
+
{"id": "doc2", "content": "Python is a popular programming language."},
|
| 185 |
+
{"id": "doc3", "content": "Machine learning is a subset of artificial intelligence."},
|
| 186 |
+
{"id": "doc4", "content": "The Earth orbits around the Sun."},
|
| 187 |
+
{"id": "doc5", "content": "orbits is the name of a korean fangroup"},
|
| 188 |
+
]
|
| 189 |
+
|
| 190 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 191 |
+
|
| 192 |
+
# Default configuration template
|
| 193 |
+
default_config = {
|
| 194 |
+
'background': '/AutoGameBackgrounds/1stGameLoc123.png',
|
| 195 |
+
'inventory': [],
|
| 196 |
+
'skills': [],
|
| 197 |
+
'objectives': [],
|
| 198 |
+
'targets': [],
|
| 199 |
+
'story': [],
|
| 200 |
+
'actions': {}
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 204 |
+
|
| 205 |
+
# List of player engagement UI elements
|
| 206 |
+
player_engagement_items = [
|
| 207 |
+
"Health Bar", "Mana/Energy Bar", "Experience Bar", "Mini-Map", "Quest Tracker",
|
| 208 |
+
"Inventory Quick Access Slots", "Skill Cooldown Indicators", "Currency Display",
|
| 209 |
+
"Compass", "Timer/Clock", "Action Prompts", "Reticle/Crosshair", "Enemy Health Bars",
|
| 210 |
+
"Score Display", "Inventory Grid", "Item Tooltip", "Item Categories/Tabs",
|
| 211 |
+
"Equip/Unequip Buttons", "Item Sorting Options", "Character Stats Panel",
|
| 212 |
+
"Character Model Viewer", "Quick Equip Slots", "Dialogue Box", "Dialogue Choices",
|
| 213 |
+
"Character Portraits", "Character Name Display", "Subtitle Text", "World Map",
|
| 214 |
+
"Local Map", "Fast Travel Points", "Map Markers", "Map Legend", "Crafting Recipe List",
|
| 215 |
+
"Ingredient Slots", "Craft Button", "Crafting Progress Bar", "Skill Nodes",
|
| 216 |
+
"Skill Descriptions", "Skill Point Counter", "Unlock Button", "Skill Path Highlight",
|
| 217 |
+
"Quest List", "Quest Details Panel", "Quest Objectives", "Quest Rewards",
|
| 218 |
+
"Quest Status Indicators", "Chat Box", "Player List", "Voice Chat Indicators",
|
| 219 |
+
"Ping/Latency Indicator", "Party/Team UI", "Scoreboard", "Matchmaking Screen",
|
| 220 |
+
"Pop-up Notifications", "Achievement Unlocks", "System Messages",
|
| 221 |
+
"On-screen Key Prompts", "Environmental Interaction Icons", "Save/Auto-Save Indicators",
|
| 222 |
+
"Credits Screen"
|
| 223 |
+
]
|
| 224 |
+
|
| 225 |
+
# List of character-based story events
|
| 226 |
+
story_events = [
|
| 227 |
+
'exploreLocation', 'discoverClue', 'meetCharacter', 'solveRiddle', 'findItem',
|
| 228 |
+
'faceChallenge', 'makeDecision', 'engageBattle', 'unlockAbility', 'learnSecret',
|
| 229 |
+
'completeMission', 'experienceSetback', 'earnReward', 'uncoverMystery', 'formAlliance',
|
| 230 |
+
'faceBetrayal', 'confrontNemesis', 'makeDiscovery', 'overcomeLoss', 'achieveVictory'
|
| 231 |
+
]
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
# Define the states
|
| 238 |
+
all_states = {
|
| 239 |
+
'village': {
|
| 240 |
+
'start': {
|
| 241 |
+
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
|
| 242 |
+
"choices": ['explore village', 'gather supplies', 'rest'],
|
| 243 |
+
"transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start'},
|
| 244 |
+
"consequences": {
|
| 245 |
+
'gather supplies': lambda player: player.add_item('basic supplies')
|
| 246 |
+
},
|
| 247 |
+
"media": []
|
| 248 |
+
},
|
| 249 |
+
'rumor': {
|
| 250 |
+
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
|
| 251 |
+
"choices": ['decide to go', 'ignore'],
|
| 252 |
+
"transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'},
|
| 253 |
+
"consequences": {
|
| 254 |
+
'decide to go': lambda player: player.update_knowledge('treasure location')
|
| 255 |
+
},
|
| 256 |
+
"media": []
|
| 257 |
+
},
|
| 258 |
+
'supplies': {
|
| 259 |
+
"description": "You gather supplies for your journey.",
|
| 260 |
+
"choices": ['head to forest', 'stay in village'],
|
| 261 |
+
"transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'},
|
| 262 |
+
"media": []
|
| 263 |
+
},
|
| 264 |
+
},
|
| 265 |
+
'forest': {
|
| 266 |
+
'forest': {
|
| 267 |
+
"description": "You enter the dense forest, heading towards the ruins.",
|
| 268 |
+
"choices": ['travel further', 'return to village'],
|
| 269 |
+
"transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'},
|
| 270 |
+
"media": []
|
| 271 |
+
},
|
| 272 |
+
},
|
| 273 |
+
'ruins': {
|
| 274 |
+
'ruins': {
|
| 275 |
+
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
|
| 276 |
+
"choices": ['enter ruins', 'return to forest'],
|
| 277 |
+
"transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'},
|
| 278 |
+
"media": []
|
| 279 |
+
},
|
| 280 |
+
'explore': {
|
| 281 |
+
"description": "You explore the ruins, encountering traps and puzzles.",
|
| 282 |
+
"choices": ['solve puzzle', 'avoid traps'],
|
| 283 |
+
"transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'},
|
| 284 |
+
"media": []
|
| 285 |
+
},
|
| 286 |
+
'hiddenPassage': {
|
| 287 |
+
"description": "You solve a challenging puzzle and unlock a hidden passage.",
|
| 288 |
+
"choices": ['enter passage', 'go back'],
|
| 289 |
+
"transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'},
|
| 290 |
+
"media": []
|
| 291 |
+
},
|
| 292 |
+
'treasureRoom': {
|
| 293 |
+
"description": "You enter the treasure room and find the treasure chest.",
|
| 294 |
+
"choices": ['take treasure', 'leave'],
|
| 295 |
+
"transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'},
|
| 296 |
+
"consequences": {
|
| 297 |
+
'take treasure': lambda player: player.add_item('treasure')
|
| 298 |
+
},
|
| 299 |
+
"media": []
|
| 300 |
+
},
|
| 301 |
+
'celebrate': {
|
| 302 |
+
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
|
| 303 |
+
"choices": ['return to village'],
|
| 304 |
+
"transitions": {'return to village': 'village_return'},
|
| 305 |
+
"media": []
|
| 306 |
+
},
|
| 307 |
+
},
|
| 308 |
+
'village_return': {
|
| 309 |
+
'village_return': {
|
| 310 |
+
"description": "You return to the village with the treasure and share it with the villagers.",
|
| 311 |
+
"choices": ['end adventure'],
|
| 312 |
+
"transitions": {'end adventure': 'end_end'},
|
| 313 |
+
"media": []
|
| 314 |
+
},
|
| 315 |
+
},
|
| 316 |
+
'end': {
|
| 317 |
+
'end': {
|
| 318 |
+
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
|
| 319 |
+
"choices": [],
|
| 320 |
+
"transitions": {},
|
| 321 |
+
"media": []
|
| 322 |
+
},
|
| 323 |
+
}
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 327 |
+
|
| 328 |
+
#actual is not screen ready
|
| 329 |
+
originalconfigatbeinningofthisspace = """{
|
| 330 |
+
"village": {
|
| 331 |
+
"start": {
|
| 332 |
+
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
|
| 333 |
+
"choices": ['explore village', 'gather supplies', 'rest'],
|
| 334 |
+
"transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start'},
|
| 335 |
+
"consequences": {
|
| 336 |
+
'gather supplies': lambda player: player.add_item('basic supplies')
|
| 337 |
+
},
|
| 338 |
+
"media": []
|
| 339 |
+
},
|
| 340 |
+
"rumor": {
|
| 341 |
+
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
|
| 342 |
+
"choices": ['decide to go', 'ignore'],
|
| 343 |
+
"transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'},
|
| 344 |
+
"consequences": {
|
| 345 |
+
'decide to go': lambda player: player.update_knowledge('treasure location')
|
| 346 |
+
},
|
| 347 |
+
"media": []
|
| 348 |
+
},
|
| 349 |
+
"supplies": {
|
| 350 |
+
"description": "You gather supplies for your journey.",
|
| 351 |
+
"choices": ['head to forest', 'stay in village'],
|
| 352 |
+
"transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'},
|
| 353 |
+
"media": []
|
| 354 |
+
},
|
| 355 |
+
},
|
| 356 |
+
"forest": {
|
| 357 |
+
"forest": {
|
| 358 |
+
"description": "You enter the dense forest, heading towards the ruins.",
|
| 359 |
+
"choices": ['travel further', 'return to village'],
|
| 360 |
+
"transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'},
|
| 361 |
+
"media": []
|
| 362 |
+
},
|
| 363 |
+
},
|
| 364 |
+
"ruins": {
|
| 365 |
+
"ruins": {
|
| 366 |
+
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
|
| 367 |
+
"choices": ['enter ruins', 'return to forest'],
|
| 368 |
+
"transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'},
|
| 369 |
+
"media": []
|
| 370 |
+
},
|
| 371 |
+
"explore": {
|
| 372 |
+
"description": "You explore the ruins, encountering traps and puzzles.",
|
| 373 |
+
"choices": ['solve puzzle', 'avoid traps'],
|
| 374 |
+
"transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'},
|
| 375 |
+
"media": []
|
| 376 |
+
},
|
| 377 |
+
"hiddenPassage": {
|
| 378 |
+
"description": "You solve a challenging puzzle and unlock a hidden passage.",
|
| 379 |
+
"choices": ['enter passage', 'go back'],
|
| 380 |
+
"transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'},
|
| 381 |
+
"media": []
|
| 382 |
+
},
|
| 383 |
+
"treasureRoom": {
|
| 384 |
+
"description": "You enter the treasure room and find the treasure chest.",
|
| 385 |
+
"choices": ['take treasure', 'leave'],
|
| 386 |
+
"transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'},
|
| 387 |
+
"consequences": {
|
| 388 |
+
'take treasure': lambda player: player.add_item('treasure')
|
| 389 |
+
},
|
| 390 |
+
"media": []
|
| 391 |
+
},
|
| 392 |
+
"celebrate": {
|
| 393 |
+
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
|
| 394 |
+
"choices": ['return to village'],
|
| 395 |
+
"transitions": {'return to village': 'village_return'},
|
| 396 |
+
"media": []
|
| 397 |
+
},
|
| 398 |
+
},
|
| 399 |
+
"village_return": {
|
| 400 |
+
"village_return": {
|
| 401 |
+
"description": "You return to the village with the treasure and share it with the villagers.",
|
| 402 |
+
"choices": ['end adventure'],
|
| 403 |
+
"transitions": {'end adventure': 'end_end'},
|
| 404 |
+
"media": []
|
| 405 |
+
},
|
| 406 |
+
},
|
| 407 |
+
"end": {
|
| 408 |
+
"end": {
|
| 409 |
+
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
|
| 410 |
+
"choices": [],
|
| 411 |
+
"transitions": {},
|
| 412 |
+
"media": []
|
| 413 |
+
},
|
| 414 |
+
}
|
| 415 |
+
}"""
|
| 416 |
+
#Analyzing Game Configuration Metrics - was the thread name of where the
|
| 417 |
+
claude3_5_06072024configtips = """Example Config Development Tab - Claude 3.5 Sonnet as the LLM Assitant
|
| 418 |
+
|
| 419 |
+
This config is for a basic text based game engine I made with help many llms including you.
|
| 420 |
+
Thanks to all the help it loads which presented another problem, I dont have any structural metrics to assess the quality of the config.
|
| 421 |
+
What JSON things can we look at to see if it may be too bland for a person testing the game
|
| 422 |
+
|
| 423 |
+
|
| 424 |
+
Text-Based Game Configuration Analysis
|
| 425 |
+
1. State Variety
|
| 426 |
+
|
| 427 |
+
Total number of states: 13
|
| 428 |
+
Number of unique locations: 5 (village, forest, ruins, village_return, end)
|
| 429 |
+
|
| 430 |
+
2. Choice Diversity
|
| 431 |
+
|
| 432 |
+
Average choices per state: 1.92
|
| 433 |
+
States with no choices: 1 (end state)
|
| 434 |
+
States with most choices: 3 (village_start with 3 choices)
|
| 435 |
+
Unique choices across all states: 17
|
| 436 |
+
|
| 437 |
+
3. Transition Complexity
|
| 438 |
+
|
| 439 |
+
Total number of transitions: 25
|
| 440 |
+
Average transitions per state: 1.92
|
| 441 |
+
States with most transitions: 3 (village_start with 3 transitions)
|
| 442 |
+
|
| 443 |
+
4. Consequence Implementation
|
| 444 |
+
|
| 445 |
+
States with consequences: 3
|
| 446 |
+
Total number of consequences: 3
|
| 447 |
+
Types of consequences: Adding items, Updating knowledge
|
| 448 |
+
|
| 449 |
+
5. Description Length
|
| 450 |
+
|
| 451 |
+
Average description length: 13.15 words
|
| 452 |
+
Longest description: 24 words (village_return)
|
| 453 |
+
Shortest description: 4 words (village_supplies)
|
| 454 |
+
|
| 455 |
+
6. Cyclic Paths
|
| 456 |
+
|
| 457 |
+
Presence of loops: Yes (e.g., village_start -> village_supplies -> village_start)
|
| 458 |
+
|
| 459 |
+
7. Dead Ends
|
| 460 |
+
|
| 461 |
+
Number of dead ends: 1 (end state)
|
| 462 |
+
|
| 463 |
+
8. Media Integration
|
| 464 |
+
|
| 465 |
+
States with media: 0
|
| 466 |
+
Total media elements: 0
|
| 467 |
+
|
| 468 |
+
9. Narrative Progression
|
| 469 |
+
|
| 470 |
+
Clear beginning (village_start) and end (end) states
|
| 471 |
+
Multiple paths to reach the end
|
| 472 |
+
|
| 473 |
+
10. Player Agency
|
| 474 |
+
|
| 475 |
+
Choices affect game progression
|
| 476 |
+
Some choices have consequences (3 instances)
|
| 477 |
+
|
| 478 |
+
11. Game Length
|
| 479 |
+
|
| 480 |
+
Minimum steps to complete: 6 (village_start -> village_supplies -> forest_forest -> ruins_ruins -> ruins_explore -> ruins_hiddenPassage -> ruins_treasureRoom -> ruins_celebrate -> village_return -> end)
|
| 481 |
+
Maximum steps (including loops): Potentially infinite due to cycles
|
| 482 |
+
|
| 483 |
+
12. Replayability
|
| 484 |
+
|
| 485 |
+
Multiple paths through the game
|
| 486 |
+
Some variability in outcomes based on choices
|
| 487 |
+
|
| 488 |
+
#=============================================
|
| 489 |
+
|
| 490 |
+
To assess the quality and potential blandness of your game configuration, we can analyze several structural metrics within the JSON. Here are some aspects we can examine:
|
| 491 |
+
Text-Based Game Configuration AnalysisClick to open document
|
| 492 |
+
Based on this analysis, here are some observations about the potential blandness of the game:
|
| 493 |
+
|
| 494 |
+
Limited state variety: With only 13 states across 5 locations, the game might feel short and lacking in diversity. Consider adding more locations or states within existing locations.
|
| 495 |
+
Low average choices: An average of 1.92 choices per state might make the game feel linear. Increasing the number of choices in more states could improve player engagement.
|
| 496 |
+
Limited consequences: Only 3 states have consequences, which might make player choices feel less impactful. Adding more consequences could increase the sense of agency.
|
| 497 |
+
Short descriptions: The average description length of 13.15 words might not provide enough detail to immerse players. Consider expanding descriptions to create a richer narrative.
|
| 498 |
+
Lack of media: No states currently use media elements, which could make the game feel less engaging. Adding images, sound effects, or other media could enhance the player experience.
|
| 499 |
+
Limited narrative branching: While there are some loops and choices, the overall structure is relatively linear. Adding more branching paths could increase replayability and player interest.
|
| 500 |
+
|
| 501 |
+
To make the game less bland, consider:
|
| 502 |
+
|
| 503 |
+
Adding more states and locations
|
| 504 |
+
Increasing the number of choices in each state
|
| 505 |
+
Implementing more consequences for player actions
|
| 506 |
+
Expanding descriptions to create a richer narrative
|
| 507 |
+
Incorporating media elements
|
| 508 |
+
Creating more diverse paths through the game
|
| 509 |
+
|
| 510 |
+
#===============================================
|
| 511 |
+
|
| 512 |
+
|
| 513 |
+
# Text-Based Game Improvement Suggestions
|
| 514 |
+
|
| 515 |
+
## 1. Expand State Variety
|
| 516 |
+
- Add a new location: "Mountain Pass"
|
| 517 |
+
- Include states like "steep_climb", "avalanche_risk", "hidden_cave"
|
| 518 |
+
- Expand the "forest" location:
|
| 519 |
+
- Add states like "dense_thicket", "mysterious_clearing", "ancient_tree"
|
| 520 |
+
|
| 521 |
+
## 2. Increase Choice Diversity
|
| 522 |
+
- Add more choices to existing states. For example, in "village_start":
|
| 523 |
+
- "talk to elder"
|
| 524 |
+
- "visit market"
|
| 525 |
+
- "investigate strange noises"
|
| 526 |
+
- Ensure most states have at least 3 choices
|
| 527 |
+
|
| 528 |
+
## 3. Enhance Transition Complexity
|
| 529 |
+
- Create more interconnected states. For example:
|
| 530 |
+
- Allow travel between "forest" and "mountain_pass"
|
| 531 |
+
- Add shortcuts or secret passages between non-adjacent locations
|
| 532 |
+
|
| 533 |
+
## 4. Implement More Consequences
|
| 534 |
+
- Add consequences to more choices. For example:
|
| 535 |
+
- In "forest_forest":
|
| 536 |
+
- "forage for food" -> `lambda player: player.add_item('wild berries')`
|
| 537 |
+
- "take shortcut" -> `lambda player: player.update_status('lost')`
|
| 538 |
+
|
| 539 |
+
## 5. Enrich Descriptions
|
| 540 |
+
- Expand existing descriptions with more vivid details
|
| 541 |
+
- Example for "village_start":
|
| 542 |
+
```python
|
| 543 |
+
"description": "You wake up in a small village nestled between rolling hills. The air is filled with the scent of freshly baked bread and the sound of a distant waterfall. Villagers bustle about, whispering excitedly about a rumor of lost treasure."
|
| 544 |
+
```
|
| 545 |
+
|
| 546 |
+
## 6. Introduce Cyclic Content with Variations
|
| 547 |
+
- Add time-based changes to revisited locations
|
| 548 |
+
- Example:
|
| 549 |
+
```python
|
| 550 |
+
'village_start': {
|
| 551 |
+
"description": lambda player: f"You return to the village square. It's now {player.time_of_day()}. " +
|
| 552 |
+
("The market is bustling with activity." if player.time_of_day() == "day" else
|
| 553 |
+
"The streets are quiet, lit by flickering torches.")
|
| 554 |
+
}
|
| 555 |
+
```
|
| 556 |
+
|
| 557 |
+
## 7. Create Meaningful Dead Ends
|
| 558 |
+
- Add optional quests or side adventures
|
| 559 |
+
- Example: "help_lost_child" state in the village that doesn't progress main story but provides rewards
|
| 560 |
+
|
| 561 |
+
## 8. Integrate Media Elements
|
| 562 |
+
- Add placeholder media to enhance immersion:
|
| 563 |
+
```python
|
| 564 |
+
"media": [
|
| 565 |
+
{"type": "image", "url": "/api/placeholder/400/300", "alt": "A picturesque village at dawn"},
|
| 566 |
+
{"type": "sound", "url": "village_ambience.mp3"}
|
| 567 |
+
]
|
| 568 |
+
```
|
| 569 |
+
|
| 570 |
+
## 9. Enhance Narrative Progression
|
| 571 |
+
- Add a main quest storyline with multiple stages
|
| 572 |
+
- Introduce side quests for additional depth
|
| 573 |
+
|
| 574 |
+
## 10. Increase Player Agency
|
| 575 |
+
- Add more impactful choices that significantly alter the game's direction
|
| 576 |
+
- Implement a simple inventory or skill system that affects available choices
|
| 577 |
+
|
| 578 |
+
## 11. Extend Game Length
|
| 579 |
+
- Add more locations and states to create a longer, more involved adventure
|
| 580 |
+
- Implement quest chains that span multiple locations
|
| 581 |
+
|
| 582 |
+
## 12. Improve Replayability
|
| 583 |
+
- Add random events that can occur in each location
|
| 584 |
+
- Implement multiple endings based on player choices and achievements
|
| 585 |
+
|
| 586 |
+
|
| 587 |
+
#===============================================
|
| 588 |
+
|
| 589 |
+
# Updated Text-Based Game Configuration with Side Quest
|
| 590 |
+
|
| 591 |
+
## New State: help_lost_child
|
| 592 |
+
|
| 593 |
+
Add this new state to the 'village' section of your `all_states` dictionary:
|
| 594 |
+
|
| 595 |
+
```python
|
| 596 |
+
'village': {
|
| 597 |
+
# ... existing states ...
|
| 598 |
+
|
| 599 |
+
'help_lost_child': {
|
| 600 |
+
"description": "You encounter a crying child in the village square. They seem to have lost their way home.",
|
| 601 |
+
"choices": ['help child', 'ignore and continue'],
|
| 602 |
+
"transitions": {
|
| 603 |
+
'help child': 'village_child_quest',
|
| 604 |
+
'ignore and continue': 'village_start'
|
| 605 |
+
},
|
| 606 |
+
"consequences": {
|
| 607 |
+
'help child': lambda player: player.update_status('helping_child')
|
| 608 |
+
},
|
| 609 |
+
"media": []
|
| 610 |
+
},
|
| 611 |
+
'child_quest': {
|
| 612 |
+
"description": "You decide to help the lost child. After asking around and searching the village, you finally locate their home.",
|
| 613 |
+
"choices": ['return child', 'ask for reward'],
|
| 614 |
+
"transitions": {
|
| 615 |
+
'return child': 'village_child_reunion',
|
| 616 |
+
'ask for reward': 'village_child_reward'
|
| 617 |
+
},
|
| 618 |
+
"media": []
|
| 619 |
+
},
|
| 620 |
+
'child_reunion': {
|
| 621 |
+
"description": "You return the child to their grateful parents. They thank you profusely for your kindness.",
|
| 622 |
+
"choices": ['accept thanks', 'request reward'],
|
| 623 |
+
"transitions": {
|
| 624 |
+
'accept thanks': 'village_start',
|
| 625 |
+
'request reward': 'village_child_reward'
|
| 626 |
+
},
|
| 627 |
+
"consequences": {
|
| 628 |
+
'accept thanks': lambda player: player.update_status('local_hero')
|
| 629 |
+
},
|
| 630 |
+
"media": []
|
| 631 |
+
},
|
| 632 |
+
'child_reward': {
|
| 633 |
+
"description": "The child's parents offer you a small pouch of coins as a reward for your help.",
|
| 634 |
+
"choices": ['accept reward', 'decline reward'],
|
| 635 |
+
"transitions": {
|
| 636 |
+
'accept reward': 'village_start',
|
| 637 |
+
'decline reward': 'village_start'
|
| 638 |
+
},
|
| 639 |
+
"consequences": {
|
| 640 |
+
'accept reward': lambda player: player.add_item('coin pouch'),
|
| 641 |
+
'decline reward': lambda player: player.update_status('selfless_hero')
|
| 642 |
+
},
|
| 643 |
+
"media": []
|
| 644 |
+
},
|
| 645 |
+
}
|
| 646 |
+
```
|
| 647 |
+
|
| 648 |
+
## Updated Transitions
|
| 649 |
+
|
| 650 |
+
To incorporate this side quest into the existing game flow, we need to update some transitions in the 'village_start' state:
|
| 651 |
+
|
| 652 |
+
```python
|
| 653 |
+
'village': {
|
| 654 |
+
'start': {
|
| 655 |
+
"description": "You're in the village square. The usual bustle of village life surrounds you.",
|
| 656 |
+
"choices": ['explore village', 'gather supplies', 'rest', 'look around'], # Added 'look around'
|
| 657 |
+
"transitions": {
|
| 658 |
+
'explore village': 'village_rumor',
|
| 659 |
+
'gather supplies': 'village_supplies',
|
| 660 |
+
'rest': 'village_start',
|
| 661 |
+
'look around': 'village_help_lost_child' # New transition
|
| 662 |
+
},
|
| 663 |
+
"consequences": {
|
| 664 |
+
'gather supplies': lambda player: player.add_item('basic supplies')
|
| 665 |
+
},
|
| 666 |
+
"media": []
|
| 667 |
+
},
|
| 668 |
+
# ... other states ...
|
| 669 |
+
}
|
| 670 |
+
```
|
| 671 |
+
|
| 672 |
+
## Explanation of Changes
|
| 673 |
+
|
| 674 |
+
1. New States:
|
| 675 |
+
- `help_lost_child`: Introduces the side quest
|
| 676 |
+
- `child_quest`: Represents the process of helping the child
|
| 677 |
+
- `child_reunion`: Concludes the quest if you don't ask for a reward
|
| 678 |
+
- `child_reward`: Offers a choice to accept or decline a reward
|
| 679 |
+
|
| 680 |
+
2. Updated `village_start`:
|
| 681 |
+
- Added a new choice: 'look around'
|
| 682 |
+
- Added a new transition to `village_help_lost_child`
|
| 683 |
+
|
| 684 |
+
3. Consequences:
|
| 685 |
+
- Added status updates: 'helping_child', 'local_hero', 'selfless_hero'
|
| 686 |
+
- Added item reward: 'coin pouch'
|
| 687 |
+
|
| 688 |
+
These changes create a meaningful dead end by:
|
| 689 |
+
1. Providing an optional quest that doesn't directly progress the main treasure hunt story
|
| 690 |
+
2. Offering multiple choices within the side quest, allowing for different outcomes
|
| 691 |
+
3. Implementing consequences that affect the player's status or inventory, providing rewards for engagement
|
| 692 |
+
4. Allowing the player to return to the main story flow after completing (or ignoring) the side quest
|
| 693 |
+
|
| 694 |
+
This side quest adds depth to the village location, gives the player more to do, and provides character-building opportunities without derailing the main narrative. It also demonstrates how you can implement similar side quests or meaningful dead ends in other locations of your game.
|
| 695 |
+
|
| 696 |
+
#================================================================================
|
| 697 |
+
|
| 698 |
+
Certainly! Let's implement the "help_lost_child" side quest as a meaningful dead end in the village. This will add depth to the game without necessarily progressing the main story. Here's how we can incorporate this into your current configuration:
|
| 699 |
+
Updated Text-Based Game Configuration with Side QuestClick to open document
|
| 700 |
+
To further improve this side quest and make it even more engaging, you could consider:
|
| 701 |
+
|
| 702 |
+
Time sensitivity: Make the quest available only at certain times or for a limited number of turns.
|
| 703 |
+
Skill checks: If your game has a skill system, you could add checks for persuasion or perception that affect the outcome.
|
| 704 |
+
Long-term consequences: The status changes (like 'local_hero') could affect how NPCs interact with the player later in the game.
|
| 705 |
+
Branching outcomes: You could add more complex branches, such as the child being in actual danger, leading to a mini-adventure.
|
| 706 |
+
|
| 707 |
+
Would you like me to elaborate on any of these ideas or show how to implement them in your configuration?
|
| 708 |
+
|
| 709 |
+
"""
|
| 710 |
+
|
| 711 |
+
tipsupdatedconfigatbeinningofthisspace = """{
|
| 712 |
+
"village": {
|
| 713 |
+
"start": {
|
| 714 |
+
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
|
| 715 |
+
"choices": ['explore village', 'gather supplies', 'rest', 'look around'],
|
| 716 |
+
"transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start', 'look around': 'village_help_lost_child'},
|
| 717 |
+
"consequences": {
|
| 718 |
+
'gather supplies': lambda player: player.add_item('basic supplies')
|
| 719 |
+
},
|
| 720 |
+
"media": []
|
| 721 |
+
},
|
| 722 |
+
"rumor": {
|
| 723 |
+
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
|
| 724 |
+
"choices": ['decide to go', 'ignore'],
|
| 725 |
+
"transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'},
|
| 726 |
+
"consequences": {
|
| 727 |
+
'decide to go': lambda player: player.update_knowledge('treasure location')
|
| 728 |
+
},
|
| 729 |
+
"media": []
|
| 730 |
+
},
|
| 731 |
+
"supplies": {
|
| 732 |
+
"description": "You gather supplies for your journey.",
|
| 733 |
+
"choices": ['head to forest', 'stay in village'],
|
| 734 |
+
"transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'},
|
| 735 |
+
"media": []
|
| 736 |
+
},
|
| 737 |
+
"help_lost_child": {
|
| 738 |
+
"description": "You encounter a crying child in the village square. They seem to have lost their way home.",
|
| 739 |
+
"choices": ['help child', 'ignore and continue'],
|
| 740 |
+
"transitions": {
|
| 741 |
+
'help child': 'village_child_quest',
|
| 742 |
+
'ignore and continue': 'village_start'
|
| 743 |
+
},
|
| 744 |
+
"consequences": {
|
| 745 |
+
'help child': lambda player: player.update_status('helping_child')
|
| 746 |
+
},
|
| 747 |
+
"media": []
|
| 748 |
+
},
|
| 749 |
+
"child_quest": {
|
| 750 |
+
"description": "You decide to help the lost child. After asking around and searching the village, you finally locate their home.",
|
| 751 |
+
"choices": ['return child', 'ask for reward'],
|
| 752 |
+
"transitions": {
|
| 753 |
+
'return child': 'village_child_reunion',
|
| 754 |
+
'ask for reward': 'village_child_reward'
|
| 755 |
+
},
|
| 756 |
+
"media": []
|
| 757 |
+
},
|
| 758 |
+
"child_reunion": {
|
| 759 |
+
"description": "You return the child to their grateful parents. They thank you profusely for your kindness.",
|
| 760 |
+
"choices": ['accept thanks', 'request reward'],
|
| 761 |
+
"transitions": {
|
| 762 |
+
'accept thanks': 'village_start',
|
| 763 |
+
'request reward': 'village_child_reward'
|
| 764 |
+
},
|
| 765 |
+
"consequences": {
|
| 766 |
+
'accept thanks': lambda player: player.update_status('local_hero')
|
| 767 |
+
},
|
| 768 |
+
"media": []
|
| 769 |
+
},
|
| 770 |
+
"child_reward": {
|
| 771 |
+
"description": "The child's parents offer you a small pouch of coins as a reward for your help.",
|
| 772 |
+
"choices": ['accept reward', 'decline reward'],
|
| 773 |
+
"transitions": {
|
| 774 |
+
'accept reward': 'village_start',
|
| 775 |
+
'decline reward': 'village_start'
|
| 776 |
+
},
|
| 777 |
+
"consequences": {
|
| 778 |
+
'accept reward': lambda player: player.add_item('coin pouch'),
|
| 779 |
+
'decline reward': lambda player: player.update_status('selfless_hero')
|
| 780 |
+
},
|
| 781 |
+
"media": []
|
| 782 |
+
},
|
| 783 |
+
},
|
| 784 |
+
"forest": {
|
| 785 |
+
"forest": {
|
| 786 |
+
"description": "You enter the dense forest, heading towards the ruins.",
|
| 787 |
+
"choices": ['travel further', 'return to village'],
|
| 788 |
+
"transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'},
|
| 789 |
+
"media": []
|
| 790 |
+
},
|
| 791 |
+
},
|
| 792 |
+
"ruins": {
|
| 793 |
+
"ruins": {
|
| 794 |
+
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
|
| 795 |
+
"choices": ['enter ruins', 'return to forest'],
|
| 796 |
+
"transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'},
|
| 797 |
+
"media": []
|
| 798 |
+
},
|
| 799 |
+
"explore": {
|
| 800 |
+
"description": "You explore the ruins, encountering traps and puzzles.",
|
| 801 |
+
"choices": ['solve puzzle', 'avoid traps'],
|
| 802 |
+
"transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'},
|
| 803 |
+
"media": []
|
| 804 |
+
},
|
| 805 |
+
"hiddenPassage": {
|
| 806 |
+
"description": "You solve a challenging puzzle and unlock a hidden passage.",
|
| 807 |
+
"choices": ['enter passage', 'go back'],
|
| 808 |
+
"transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'},
|
| 809 |
+
"media": []
|
| 810 |
+
},
|
| 811 |
+
"treasureRoom": {
|
| 812 |
+
"description": "You enter the treasure room and find the treasure chest.",
|
| 813 |
+
"choices": ['take treasure', 'leave'],
|
| 814 |
+
"transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'},
|
| 815 |
+
"consequences": {
|
| 816 |
+
'take treasure': lambda player: player.add_item('treasure')
|
| 817 |
+
},
|
| 818 |
+
"media": []
|
| 819 |
+
},
|
| 820 |
+
'celebrate': {
|
| 821 |
+
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
|
| 822 |
+
"choices": ['return to village'],
|
| 823 |
+
"transitions": {'return to village': 'village_return'},
|
| 824 |
+
"media": []
|
| 825 |
+
},
|
| 826 |
+
},
|
| 827 |
+
"village_return": {
|
| 828 |
+
"village_return": {
|
| 829 |
+
"description": "You return to the village with the treasure and share it with the villagers.",
|
| 830 |
+
"choices": ['end adventure'],
|
| 831 |
+
"transitions": {'end adventure': 'end_end'},
|
| 832 |
+
"media": []
|
| 833 |
+
},
|
| 834 |
+
},
|
| 835 |
+
"end": {
|
| 836 |
+
"end": {
|
| 837 |
+
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
|
| 838 |
+
"choices": [],
|
| 839 |
+
"transitions": {},
|
| 840 |
+
"media": []
|
| 841 |
+
},
|
| 842 |
+
}
|
| 843 |
+
}"""
|
| 844 |
+
|
| 845 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 846 |
+
|
| 847 |
+
TestmedialoadinHTML = """
|
| 848 |
+
<div>
|
| 849 |
+
<p>This is a placeholder to test use as an all-media loader for ease of prototyping. Seems gradio HTML doesnt support loading local assets or my file path is wrong</p>
|
| 850 |
+
</div>
|
| 851 |
+
<div style="display: flex; justify-content: space-between; margin-bottom: 20px;">
|
| 852 |
+
<div style="width: 30%;">
|
| 853 |
+
<img src="testmedia/Flash scribble SDXL - random squiggles as roads.webp" alt="Random squiggles as roads" style="width: 100%; height: auto;">
|
| 854 |
+
</div>
|
| 855 |
+
<div style="width: 30%;">
|
| 856 |
+
<video width="100%" height="auto" controls>
|
| 857 |
+
<source src="testmedia/SVD - random squiggles as roads video 004484.mp4" type="video/mp4">
|
| 858 |
+
Your browser does not support the video tag.
|
| 859 |
+
</video>
|
| 860 |
+
</div>
|
| 861 |
+
<div style="width: 30%;">
|
| 862 |
+
<audio controls style="width: 100%;">
|
| 863 |
+
<source src="testmedia/Stable Audio - Raindrops, output.wav" type="audio/wav">
|
| 864 |
+
Your browser does not support the audio element.
|
| 865 |
+
</audio>
|
| 866 |
+
</div>
|
| 867 |
+
</div>
|
| 868 |
+
"""
|
| 869 |
+
|
| 870 |
+
|
| 871 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 872 |
+
|
| 873 |
+
# GTA Heists - Same Map with overlapping branching narratives
|
| 874 |
+
gta_heist_inspired = [
|
| 875 |
+
"Multiple missions/quests available in the same location",
|
| 876 |
+
"Choices in one quest affect options in others",
|
| 877 |
+
"Time-sensitive missions that change the environment",
|
| 878 |
+
"Characters that appear in multiple storylines with different roles",
|
| 879 |
+
"Hidden connections between seemingly unrelated quests",
|
| 880 |
+
"Replay value through different approaches to the same heist",
|
| 881 |
+
"Dynamic difficulty based on previous mission outcomes",
|
| 882 |
+
"Unlockable areas within the same map as story progresses",
|
| 883 |
+
"Consequences of actions affecting the game world and future missions",
|
| 884 |
+
"Team assembly mechanics for different skill combinations",
|
| 885 |
+
"Planning phase before execution of major quests",
|
| 886 |
+
"Risk/reward choices for mission approach (stealth vs. aggressive)",
|
| 887 |
+
"Easter eggs and secrets hidden within the familiar environment",
|
| 888 |
+
"Alternate endings based on cumulative choices across multiple quests",
|
| 889 |
+
"NPC relationships affected by actions in different storylines"
|
| 890 |
+
]
|
| 891 |
+
|
| 892 |
+
# Battlefront - Elites amongst Commoners
|
| 893 |
+
battlefront_inspired = [
|
| 894 |
+
"Player can switch between 'grunt' and 'hero' modes",
|
| 895 |
+
"Special abilities or items only available to 'elite' characters",
|
| 896 |
+
"Earning 'elite' status through exemplary performance",
|
| 897 |
+
"Time-limited elite transformations",
|
| 898 |
+
"Missions where player commands both elites and regular units",
|
| 899 |
+
"Elites with unique storylines and dialogue options",
|
| 900 |
+
"Risk of losing elite status through poor performance",
|
| 901 |
+
"Elite characters influencing morale of common units",
|
| 902 |
+
"Unlockable elite characters with diverse abilities",
|
| 903 |
+
"Missions requiring coordination between elites and common units",
|
| 904 |
+
"Elite vs Elite showdowns as climactic events",
|
| 905 |
+
"Common units gaining experience to become elites over time",
|
| 906 |
+
"Elites having a larger impact on the story and world events",
|
| 907 |
+
"Special elite-only areas or quests",
|
| 908 |
+
"Dynamic difficulty adjustment when playing as elite characters"
|
| 909 |
+
]
|
| 910 |
+
|
| 911 |
+
# Tekken Casino (one mistake = 1/2 or 1/3 of your Resources)
|
| 912 |
+
tekken_casino_inspired = [
|
| 913 |
+
"High-stakes dialogue options with major resource loss for wrong choices",
|
| 914 |
+
"Timed decision-making with harsh penalties for indecision",
|
| 915 |
+
"Mini-games where a single mistake can cost significant resources",
|
| 916 |
+
"Opportunities to 'double or nothing' on quest rewards",
|
| 917 |
+
"Character skills affecting the odds of success in risky situations",
|
| 918 |
+
"Resource management system with high-risk, high-reward options",
|
| 919 |
+
"Combo system for dialogue or actions, breaking combo loses resources",
|
| 920 |
+
"Unlockable 'retry' options at the cost of resources",
|
| 921 |
+
"Progressive difficulty increase, with higher stakes for each level",
|
| 922 |
+
"Special 'all-in' options for desperate situations",
|
| 923 |
+
"Random events that can dramatically increase or decrease resources",
|
| 924 |
+
"Skill-based challenges with variable resource rewards/penalties",
|
| 925 |
+
"NPC interactions where trust is a resource that can be rapidly lost",
|
| 926 |
+
"Timed exploration with resource drain for inefficiency",
|
| 927 |
+
"Boss encounters with escalating stakes for each phase"
|
| 928 |
+
]
|
| 929 |
+
|
| 930 |
+
# Turn-based: 'Tactics' type nintendo games
|
| 931 |
+
tactics_inspired = [
|
| 932 |
+
"Grid-based movement and action system",
|
| 933 |
+
"Unit positioning affecting attack effectiveness and vulnerability",
|
| 934 |
+
"Diverse character classes with unique abilities and weaknesses",
|
| 935 |
+
"Terrain effects on movement and combat",
|
| 936 |
+
"Action points system for balancing multiple actions per turn",
|
| 937 |
+
"Status effects persisting across multiple turns",
|
| 938 |
+
"Synergy bonuses for complementary unit combinations",
|
| 939 |
+
"Permadeath or severe consequences for unit loss",
|
| 940 |
+
"Weapon triangle or elemental weakness system",
|
| 941 |
+
"Experience and leveling system for units",
|
| 942 |
+
"Limited resource management (e.g., mana, ammo) across battles",
|
| 943 |
+
"Multi-stage battles with changing objectives",
|
| 944 |
+
"Recruitment system for expanding team roster",
|
| 945 |
+
"Weather or time-of-day effects on battlefield conditions",
|
| 946 |
+
"Morale system affecting unit performance"
|
| 947 |
+
]
|
| 948 |
+
|
| 949 |
+
# Chess (and any other tile-based game)
|
| 950 |
+
chess_inspired = [
|
| 951 |
+
"Different 'pieces' with unique movement and action patterns",
|
| 952 |
+
"Objective-based victory conditions (e.g., capturing the 'king')",
|
| 953 |
+
"Limited 'board' space creating positioning challenges",
|
| 954 |
+
"Sacrificial strategies for long-term advantage",
|
| 955 |
+
"Opening, mid-game, and end-game phases with different strategies",
|
| 956 |
+
"Promotion system for 'pieces' reaching certain positions",
|
| 957 |
+
"Check and checkmate concepts for imminent defeat conditions",
|
| 958 |
+
"En passant-like special moves under specific circumstances",
|
| 959 |
+
"Castling-inspired defensive or positioning special actions",
|
| 960 |
+
"Pawn-like expendable units with potential for growth",
|
| 961 |
+
"Stalemate possibilities leading to draw outcomes",
|
| 962 |
+
"Time control mechanics for decision-making",
|
| 963 |
+
"Algebraic notation for recording and replaying game states",
|
| 964 |
+
"Handicap system for balancing player skill differences",
|
| 965 |
+
"Puzzle-like scenarios with optimal solution paths"
|
| 966 |
+
]
|
| 967 |
+
|
| 968 |
+
# Cyberpunk RED (adapting tabletop RPG rules for text-based gameplay)
|
| 969 |
+
cyberpunk_red_inspired = [
|
| 970 |
+
"Skill-based character creation with points allocation",
|
| 971 |
+
"Netrunning mechanics for hacking and virtual world exploration",
|
| 972 |
+
"Cybernetic enhancements with both benefits and drawbacks",
|
| 973 |
+
"Social status and reputation systems affecting interactions",
|
| 974 |
+
"Complex crafting system for weapons and gadgets",
|
| 975 |
+
"Trauma Team-like emergency services as game mechanic",
|
| 976 |
+
"Corporation-controlled zones with varying rule sets",
|
| 977 |
+
"Lifepath system affecting character background and abilities",
|
| 978 |
+
"Street slang glossary influencing dialogue options",
|
| 979 |
+
"Critical injury system with lasting effects",
|
| 980 |
+
"Improvised weapon creation from environment",
|
| 981 |
+
"Data mining and information brokering as key gameplay elements",
|
| 982 |
+
"Cyberpsychosis risk for excessive augmentation",
|
| 983 |
+
"Night City-inspired district exploration with distinct subcultures",
|
| 984 |
+
"Fixer-based job acquisition and reputation building"
|
| 985 |
+
]
|
| 986 |
+
|
| 987 |
+
# Community playthrough - Tally of players' choices
|
| 988 |
+
community_playthrough = [
|
| 989 |
+
"Global choice statistics visible to all players",
|
| 990 |
+
"Weekly community challenges based on least-chosen options",
|
| 991 |
+
"Adaptive storytelling influenced by majority choices",
|
| 992 |
+
"Community-unlocked content when certain choice thresholds are met",
|
| 993 |
+
"Leaderboards for most unique choice combinations",
|
| 994 |
+
"Time-limited voting on major story decisions",
|
| 995 |
+
"Character popularity contests affecting NPC prominence",
|
| 996 |
+
"Community-driven side quest creation",
|
| 997 |
+
"Collaborative puzzle solving with choice aggregation",
|
| 998 |
+
"Dynamic difficulty adjustment based on community performance",
|
| 999 |
+
"Seasonal events with community-wide consequences",
|
| 1000 |
+
"Faction wars where player choices determine outcomes",
|
| 1001 |
+
"Community achievements unlocking special game modes",
|
| 1002 |
+
"Player choice heat maps for game areas",
|
| 1003 |
+
"Periodic resets allowing community to reshape the game world"
|
| 1004 |
+
]
|
| 1005 |
+
|
| 1006 |
+
# Random item placed in a random location - first person to get it wins
|
| 1007 |
+
random_item_hunt = [
|
| 1008 |
+
"Daily randomized legendary item hunts",
|
| 1009 |
+
"Clue system hinting at item location based on player actions",
|
| 1010 |
+
"Item location narrowing over time to increase tension",
|
| 1011 |
+
"Multiple item tiers with varying rarity and win conditions",
|
| 1012 |
+
"Limited-time windows for item discovery",
|
| 1013 |
+
"Collaborative and competitive modes for item hunting",
|
| 1014 |
+
"Randomized item powers affecting gameplay upon discovery",
|
| 1015 |
+
"Cursed items with negative effects to add risk",
|
| 1016 |
+
"Community-created hiding spots for items",
|
| 1017 |
+
"Item hunt leaderboards with speed and efficiency metrics",
|
| 1018 |
+
"Seasonal themed items with unique properties",
|
| 1019 |
+
"Hint sharing system among players",
|
| 1020 |
+
"Progressive clue unlocks for players lagging behind",
|
| 1021 |
+
"Randomized environmental hazards during item hunts",
|
| 1022 |
+
"Special game modes unlocked by finding rare items"
|
| 1023 |
+
]
|
| 1024 |
+
|
| 1025 |
+
# Survival by location or characters met
|
| 1026 |
+
survival_mechanics = [
|
| 1027 |
+
"Location-based resource scarcity affecting survival strategies",
|
| 1028 |
+
"Character relationships influencing survival odds",
|
| 1029 |
+
"Dynamic weather system impacting survival difficulty",
|
| 1030 |
+
"Randomized disease outbreaks requiring specific remedies",
|
| 1031 |
+
"Crafting system adapted to location-specific materials",
|
| 1032 |
+
"NPC trust system affecting trade and assistance availability",
|
| 1033 |
+
"Time-based challenges for reaching safe locations",
|
| 1034 |
+
"Unique survival skills unlocked by meeting specific characters",
|
| 1035 |
+
"Randomized events testing different survival aspects",
|
| 1036 |
+
"Permadeath mode with character legacy system",
|
| 1037 |
+
"Base building mechanics adapted to different environments",
|
| 1038 |
+
"Seasonal changes affecting survival strategies",
|
| 1039 |
+
"Character-specific weaknesses requiring team-based survival",
|
| 1040 |
+
"Morale system influenced by character interactions and environment",
|
| 1041 |
+
"Scavenging missions with risk/reward balancing"
|
| 1042 |
+
]
|
| 1043 |
+
|
| 1044 |
+
# Additional community and randomization features
|
| 1045 |
+
bonus_features = [
|
| 1046 |
+
"Player-created content voting and integration system",
|
| 1047 |
+
"Randomized daily quests with community-wide rewards",
|
| 1048 |
+
"Collaborative world-building events",
|
| 1049 |
+
"Dynamic economy based on player actions and random events",
|
| 1050 |
+
"Community-driven storyline branching",
|
| 1051 |
+
"Randomized character backstories affecting gameplay",
|
| 1052 |
+
"Player-run factions with territory control mechanics",
|
| 1053 |
+
"Periodic world resets with randomized layouts",
|
| 1054 |
+
"Community challenges requiring diverse skill combinations",
|
| 1055 |
+
"Randomized NPC behavior and dialogue options",
|
| 1056 |
+
"Player-created lore integration system",
|
| 1057 |
+
"Dynamic difficulty scaling based on community skill level",
|
| 1058 |
+
"Randomized ethical dilemmas with community-wide consequences",
|
| 1059 |
+
"Collaborative raid events against procedurally generated dungeons",
|
| 1060 |
+
"Community-driven development roadmap voting system"
|
| 1061 |
+
]
|
| 1062 |
+
|
| 1063 |
+
# Create a list of all the idea lists for easy import and use
|
| 1064 |
+
all_idea_lists = [
|
| 1065 |
+
gta_heist_inspired,
|
| 1066 |
+
battlefront_inspired,
|
| 1067 |
+
tekken_casino_inspired,
|
| 1068 |
+
tactics_inspired,
|
| 1069 |
+
chess_inspired,
|
| 1070 |
+
cyberpunk_red_inspired,
|
| 1071 |
+
community_playthrough,
|
| 1072 |
+
random_item_hunt,
|
| 1073 |
+
survival_mechanics,
|
| 1074 |
+
bonus_features
|
| 1075 |
+
]
|
| 1076 |
+
|
| 1077 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 1078 |
+
|
| 1079 |
+
|
| 1080 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 1081 |
+
|
| 1082 |
+
|
| 1083 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 1084 |
+
|
| 1085 |
+
|
| 1086 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 1087 |
+
|
| 1088 |
+
|
| 1089 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|
| 1090 |
+
|
| 1091 |
+
|
| 1092 |
+
#-------------------------#-------------------------#-------------------------#-------------------------
|