Spaces:
Running
on
Zero
Running
on
Zero
File size: 53,893 Bytes
cce05a1 bffbbe1 cce05a1 bffbbe1 f49bae8 bffbbe1 f49bae8 bffbbe1 cce05a1 c6418f1 cce05a1 c03c154 cce05a1 c03c154 f49bae8 c03c154 cce05a1 c03c154 cce05a1 bffbbe1 cce05a1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 |
""" Variables moved to make reading a bit easier
ctrl+f - #-------------------------#-------------------------#-------------------------#-------------------------
FAQ and RAG data
Default Config - JS config
Autostructure suggestor?
Initial Game Config
Comporation between inital and edited - with suggestions in between
Test if HTML can load in HTML gradio component
"""
#Supposed to be part of FAQ buttons
Frontendpromptengforguide = """Suggest descriptions for media to fill the empty media fields -
{
"village": {
"start": {
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
"choices": [
"explore village",
"gather supplies",
"rest"
],
"transitions": {
"explore village": "village_rumor",
"gather supplies": "village_supplies",
"rest": "village_start"
},
"consequences": {
"gather supplies": {}
},
"media": []
},
"rumor": {
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
"choices": [
"decide to go",
"ignore"
],
"transitions": {
"decide to go": "village_supplies",
"ignore": "village_start"
},
"consequences": {
"decide to go": {}
},
"media": []
},
"supplies": {
"description": "You gather supplies for your journey.",
"choices": [
"head to forest",
"stay in village"
],
"transitions": {
"head to forest": "forest_forest",
"stay in village": "village_start"
},
"media": []
}
},
"forest": {
"forest": {
"description": "You enter the dense forest, heading towards the ruins.",
"choices": [
"travel further",
"return to village"
],
"transitions": {
"travel further": "ruins_ruins",
"return to village": "village_start"
},
"media": []
}
},
"ruins": {
"ruins": {
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
"choices": [
"enter ruins",
"return to forest"
],
"transitions": {
"enter ruins": "ruins_explore",
"return to forest": "forest_forest"
},
"media": []
},
"explore": {
"description": "You explore the ruins, encountering traps and puzzles.",
"choices": [
"solve puzzle",
"avoid traps"
],
"transitions": {
"solve puzzle": "ruins_hiddenPassage",
"avoid traps": "ruins_ruins"
},
"media": []
},
"hiddenPassage": {
"description": "You solve a challenging puzzle and unlock a hidden passage.",
"choices": [
"enter passage",
"go back"
],
"transitions": {
"enter passage": "ruins_treasureRoom",
"go back": "ruins_explore"
},
"media": []
},
"treasureRoom": {
"description": "You enter the treasure room and find the treasure chest.",
"choices": [
"take treasure",
"leave"
],
"transitions": {
"take treasure": "ruins_celebrate",
"leave": "ruins_ruins"
},
"consequences": {
"take treasure": {}
},
"media": []
},
"celebrate": {
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
"choices": [
"return to village"
],
"transitions": {
"return to village": "village_return"
},
"media": []
}
},
"village_return": {
"village_return": {
"description": "You return to the village with the treasure and share it with the villagers.",
"choices": [
"end adventure"
],
"transitions": {
"end adventure": "end_end"
},
"media": []
}
},
"end": {
"end": {
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
"choices": [],
"transitions": {},
"media": []
}
}
}
"""
FAQAllprompts = {
"Example Workflow": [
("I am writing a story about a chef. Please write dishes to appear on the menu.", " - I am writing a story about a chef. Please write dishes to appear on the menu."),
("Lets brainstorm some decisions a chef would take", " - What are the most common decisions that a chef story would include?"),
("Lets brainstorm some problems a chef would face", " - What are the kinds problems that a chef story would include?"),
("Lets brainstorm some goals the chef would have", " - What are the kinds of out of reach goals that a chef story would include?"),
("Please help me add to config that I pasted", " - Continue the pasted config from any complete block."),
("Help me think of images for a chef story", ". Help me think of images for a chef story")
],
"FAQ": [
("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:"),
],
"Brainstorming for this space": [
("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:"),
],
"Expansive Problem solving": [
("My problem to solve is", "- please make 10 sub problems have to solve from this:"),
("My process to solve is", "- please make 10 sub processes have to solve from this:"),
("My goal to solve is", "- please make 10 sub goals have to solve from this:"),
("My task to solve is", "- please make 10 sub tasks have to solve from this:"),
("My phase to solve is", "- please make 10 sub phases have to solve from this:"),
("My component to solve is", "- please make 10 sub components have to solve from this:"),
("My element to solve is", "- please make 10 sub elements have to solve from this:"),
("A brief description of my current situation:", "- please list the most important task to pay attention to:"),
("A brief description of my current situation to analyse:", "- please conduct a situational analysis:"),
("A brief description of my current situation to decompose:", "- please conduct a problem decomposition:"),
],
}
# Sample knowledge base (replace with your own data)
knowledge_base = [
{"id": "doc1", "content": "The capital of France is Paris."},
{"id": "doc2", "content": "Python is a popular programming language."},
{"id": "doc3", "content": "Machine learning is a subset of artificial intelligence."},
{"id": "doc4", "content": "The Earth orbits around the Sun."},
{"id": "doc5", "content": "orbits is the name of a korean fangroup"},
]
#-------------------------#-------------------------#-------------------------#-------------------------
# Default configuration template
default_config = {
'background': '/AutoGameBackgrounds/1stGameLoc123.png',
'inventory': [],
'skills': [],
'objectives': [],
'targets': [],
'story': [],
'actions': {}
}
#-------------------------#-------------------------#-------------------------#-------------------------
# List of player engagement UI elements
player_engagement_items = [
"Health Bar", "Mana/Energy Bar", "Experience Bar", "Mini-Map", "Quest Tracker",
"Inventory Quick Access Slots", "Skill Cooldown Indicators", "Currency Display",
"Compass", "Timer/Clock", "Action Prompts", "Reticle/Crosshair", "Enemy Health Bars",
"Score Display", "Inventory Grid", "Item Tooltip", "Item Categories/Tabs",
"Equip/Unequip Buttons", "Item Sorting Options", "Character Stats Panel",
"Character Model Viewer", "Quick Equip Slots", "Dialogue Box", "Dialogue Choices",
"Character Portraits", "Character Name Display", "Subtitle Text", "World Map",
"Local Map", "Fast Travel Points", "Map Markers", "Map Legend", "Crafting Recipe List",
"Ingredient Slots", "Craft Button", "Crafting Progress Bar", "Skill Nodes",
"Skill Descriptions", "Skill Point Counter", "Unlock Button", "Skill Path Highlight",
"Quest List", "Quest Details Panel", "Quest Objectives", "Quest Rewards",
"Quest Status Indicators", "Chat Box", "Player List", "Voice Chat Indicators",
"Ping/Latency Indicator", "Party/Team UI", "Scoreboard", "Matchmaking Screen",
"Pop-up Notifications", "Achievement Unlocks", "System Messages",
"On-screen Key Prompts", "Environmental Interaction Icons", "Save/Auto-Save Indicators",
"Credits Screen"
]
# List of character-based story events
story_events = [
'exploreLocation', 'discoverClue', 'meetCharacter', 'solveRiddle', 'findItem',
'faceChallenge', 'makeDecision', 'engageBattle', 'unlockAbility', 'learnSecret',
'completeMission', 'experienceSetback', 'earnReward', 'uncoverMystery', 'formAlliance',
'faceBetrayal', 'confrontNemesis', 'makeDiscovery', 'overcomeLoss', 'achieveVictory'
]
#-------------------------#-------------------------#-------------------------#-------------------------
# Define the states
all_states = {
'village': {
'start': {
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
"choices": ['explore village', 'gather supplies', 'rest'],
"transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start'},
"consequences": {
'gather supplies': lambda player: player.add_item('basic supplies')
},
"media": []
},
'rumor': {
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
"choices": ['decide to go', 'ignore'],
"transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'},
"consequences": {
'decide to go': lambda player: player.update_knowledge('treasure location')
},
"media": []
},
'supplies': {
"description": "You gather supplies for your journey.",
"choices": ['head to forest', 'stay in village'],
"transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'},
"media": []
},
},
'forest': {
'forest': {
"description": "You enter the dense forest, heading towards the ruins.",
"choices": ['travel further', 'return to village'],
"transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'},
"media": []
},
},
'ruins': {
'ruins': {
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
"choices": ['enter ruins', 'return to forest'],
"transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'},
"media": []
},
'explore': {
"description": "You explore the ruins, encountering traps and puzzles.",
"choices": ['solve puzzle', 'avoid traps'],
"transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'},
"media": []
},
'hiddenPassage': {
"description": "You solve a challenging puzzle and unlock a hidden passage.",
"choices": ['enter passage', 'go back'],
"transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'},
"media": []
},
'treasureRoom': {
"description": "You enter the treasure room and find the treasure chest.",
"choices": ['take treasure', 'leave'],
"transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'},
"consequences": {
'take treasure': lambda player: player.add_item('treasure')
},
"media": []
},
'celebrate': {
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
"choices": ['return to village'],
"transitions": {'return to village': 'village_return'},
"media": []
},
},
'village_return': {
'village_return': {
"description": "You return to the village with the treasure and share it with the villagers.",
"choices": ['end adventure'],
"transitions": {'end adventure': 'end_end'},
"media": []
},
},
'end': {
'end': {
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
"choices": [],
"transitions": {},
"media": []
},
}
}
#-------------------------#-------------------------#-------------------------#-------------------------
#actual is not screen ready
originalconfigatbeinningofthisspace = """{
"village": {
"start": {
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
"choices": ['explore village', 'gather supplies', 'rest'],
"transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start'},
"consequences": {
'gather supplies': lambda player: player.add_item('basic supplies')
},
"media": []
},
"rumor": {
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
"choices": ['decide to go', 'ignore'],
"transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'},
"consequences": {
'decide to go': lambda player: player.update_knowledge('treasure location')
},
"media": []
},
"supplies": {
"description": "You gather supplies for your journey.",
"choices": ['head to forest', 'stay in village'],
"transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'},
"media": []
},
},
"forest": {
"forest": {
"description": "You enter the dense forest, heading towards the ruins.",
"choices": ['travel further', 'return to village'],
"transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'},
"media": []
},
},
"ruins": {
"ruins": {
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
"choices": ['enter ruins', 'return to forest'],
"transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'},
"media": []
},
"explore": {
"description": "You explore the ruins, encountering traps and puzzles.",
"choices": ['solve puzzle', 'avoid traps'],
"transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'},
"media": []
},
"hiddenPassage": {
"description": "You solve a challenging puzzle and unlock a hidden passage.",
"choices": ['enter passage', 'go back'],
"transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'},
"media": []
},
"treasureRoom": {
"description": "You enter the treasure room and find the treasure chest.",
"choices": ['take treasure', 'leave'],
"transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'},
"consequences": {
'take treasure': lambda player: player.add_item('treasure')
},
"media": []
},
"celebrate": {
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
"choices": ['return to village'],
"transitions": {'return to village': 'village_return'},
"media": []
},
},
"village_return": {
"village_return": {
"description": "You return to the village with the treasure and share it with the villagers.",
"choices": ['end adventure'],
"transitions": {'end adventure': 'end_end'},
"media": []
},
},
"end": {
"end": {
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
"choices": [],
"transitions": {},
"media": []
},
}
}"""
#Analyzing Game Configuration Metrics - was the thread name of where the
claude3_5_06072024configtips = """Example Config Development Tab - Claude 3.5 Sonnet as the LLM Assitant
This config is for a basic text based game engine I made with help many llms including you.
Thanks to all the help it loads which presented another problem, I dont have any structural metrics to assess the quality of the config.
What JSON things can we look at to see if it may be too bland for a person testing the game
Text-Based Game Configuration Analysis
1. State Variety
Total number of states: 13
Number of unique locations: 5 (village, forest, ruins, village_return, end)
2. Choice Diversity
Average choices per state: 1.92
States with no choices: 1 (end state)
States with most choices: 3 (village_start with 3 choices)
Unique choices across all states: 17
3. Transition Complexity
Total number of transitions: 25
Average transitions per state: 1.92
States with most transitions: 3 (village_start with 3 transitions)
4. Consequence Implementation
States with consequences: 3
Total number of consequences: 3
Types of consequences: Adding items, Updating knowledge
5. Description Length
Average description length: 13.15 words
Longest description: 24 words (village_return)
Shortest description: 4 words (village_supplies)
6. Cyclic Paths
Presence of loops: Yes (e.g., village_start -> village_supplies -> village_start)
7. Dead Ends
Number of dead ends: 1 (end state)
8. Media Integration
States with media: 0
Total media elements: 0
9. Narrative Progression
Clear beginning (village_start) and end (end) states
Multiple paths to reach the end
10. Player Agency
Choices affect game progression
Some choices have consequences (3 instances)
11. Game Length
Minimum steps to complete: 6 (village_start -> village_supplies -> forest_forest -> ruins_ruins -> ruins_explore -> ruins_hiddenPassage -> ruins_treasureRoom -> ruins_celebrate -> village_return -> end)
Maximum steps (including loops): Potentially infinite due to cycles
12. Replayability
Multiple paths through the game
Some variability in outcomes based on choices
#=============================================
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:
Text-Based Game Configuration AnalysisClick to open document
Based on this analysis, here are some observations about the potential blandness of the game:
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.
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.
Limited consequences: Only 3 states have consequences, which might make player choices feel less impactful. Adding more consequences could increase the sense of agency.
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.
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.
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.
To make the game less bland, consider:
Adding more states and locations
Increasing the number of choices in each state
Implementing more consequences for player actions
Expanding descriptions to create a richer narrative
Incorporating media elements
Creating more diverse paths through the game
#===============================================
# Text-Based Game Improvement Suggestions
## 1. Expand State Variety
- Add a new location: "Mountain Pass"
- Include states like "steep_climb", "avalanche_risk", "hidden_cave"
- Expand the "forest" location:
- Add states like "dense_thicket", "mysterious_clearing", "ancient_tree"
## 2. Increase Choice Diversity
- Add more choices to existing states. For example, in "village_start":
- "talk to elder"
- "visit market"
- "investigate strange noises"
- Ensure most states have at least 3 choices
## 3. Enhance Transition Complexity
- Create more interconnected states. For example:
- Allow travel between "forest" and "mountain_pass"
- Add shortcuts or secret passages between non-adjacent locations
## 4. Implement More Consequences
- Add consequences to more choices. For example:
- In "forest_forest":
- "forage for food" -> `lambda player: player.add_item('wild berries')`
- "take shortcut" -> `lambda player: player.update_status('lost')`
## 5. Enrich Descriptions
- Expand existing descriptions with more vivid details
- Example for "village_start":
```python
"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."
```
## 6. Introduce Cyclic Content with Variations
- Add time-based changes to revisited locations
- Example:
```python
'village_start': {
"description": lambda player: f"You return to the village square. It's now {player.time_of_day()}. " +
("The market is bustling with activity." if player.time_of_day() == "day" else
"The streets are quiet, lit by flickering torches.")
}
```
## 7. Create Meaningful Dead Ends
- Add optional quests or side adventures
- Example: "help_lost_child" state in the village that doesn't progress main story but provides rewards
## 8. Integrate Media Elements
- Add placeholder media to enhance immersion:
```python
"media": [
{"type": "image", "url": "/api/placeholder/400/300", "alt": "A picturesque village at dawn"},
{"type": "sound", "url": "village_ambience.mp3"}
]
```
## 9. Enhance Narrative Progression
- Add a main quest storyline with multiple stages
- Introduce side quests for additional depth
## 10. Increase Player Agency
- Add more impactful choices that significantly alter the game's direction
- Implement a simple inventory or skill system that affects available choices
## 11. Extend Game Length
- Add more locations and states to create a longer, more involved adventure
- Implement quest chains that span multiple locations
## 12. Improve Replayability
- Add random events that can occur in each location
- Implement multiple endings based on player choices and achievements
#===============================================
# Updated Text-Based Game Configuration with Side Quest
## New State: help_lost_child
Add this new state to the 'village' section of your `all_states` dictionary:
```python
'village': {
# ... existing states ...
'help_lost_child': {
"description": "You encounter a crying child in the village square. They seem to have lost their way home.",
"choices": ['help child', 'ignore and continue'],
"transitions": {
'help child': 'village_child_quest',
'ignore and continue': 'village_start'
},
"consequences": {
'help child': lambda player: player.update_status('helping_child')
},
"media": []
},
'child_quest': {
"description": "You decide to help the lost child. After asking around and searching the village, you finally locate their home.",
"choices": ['return child', 'ask for reward'],
"transitions": {
'return child': 'village_child_reunion',
'ask for reward': 'village_child_reward'
},
"media": []
},
'child_reunion': {
"description": "You return the child to their grateful parents. They thank you profusely for your kindness.",
"choices": ['accept thanks', 'request reward'],
"transitions": {
'accept thanks': 'village_start',
'request reward': 'village_child_reward'
},
"consequences": {
'accept thanks': lambda player: player.update_status('local_hero')
},
"media": []
},
'child_reward': {
"description": "The child's parents offer you a small pouch of coins as a reward for your help.",
"choices": ['accept reward', 'decline reward'],
"transitions": {
'accept reward': 'village_start',
'decline reward': 'village_start'
},
"consequences": {
'accept reward': lambda player: player.add_item('coin pouch'),
'decline reward': lambda player: player.update_status('selfless_hero')
},
"media": []
},
}
```
## Updated Transitions
To incorporate this side quest into the existing game flow, we need to update some transitions in the 'village_start' state:
```python
'village': {
'start': {
"description": "You're in the village square. The usual bustle of village life surrounds you.",
"choices": ['explore village', 'gather supplies', 'rest', 'look around'], # Added 'look around'
"transitions": {
'explore village': 'village_rumor',
'gather supplies': 'village_supplies',
'rest': 'village_start',
'look around': 'village_help_lost_child' # New transition
},
"consequences": {
'gather supplies': lambda player: player.add_item('basic supplies')
},
"media": []
},
# ... other states ...
}
```
## Explanation of Changes
1. New States:
- `help_lost_child`: Introduces the side quest
- `child_quest`: Represents the process of helping the child
- `child_reunion`: Concludes the quest if you don't ask for a reward
- `child_reward`: Offers a choice to accept or decline a reward
2. Updated `village_start`:
- Added a new choice: 'look around'
- Added a new transition to `village_help_lost_child`
3. Consequences:
- Added status updates: 'helping_child', 'local_hero', 'selfless_hero'
- Added item reward: 'coin pouch'
These changes create a meaningful dead end by:
1. Providing an optional quest that doesn't directly progress the main treasure hunt story
2. Offering multiple choices within the side quest, allowing for different outcomes
3. Implementing consequences that affect the player's status or inventory, providing rewards for engagement
4. Allowing the player to return to the main story flow after completing (or ignoring) the side quest
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.
#================================================================================
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:
Updated Text-Based Game Configuration with Side QuestClick to open document
To further improve this side quest and make it even more engaging, you could consider:
Time sensitivity: Make the quest available only at certain times or for a limited number of turns.
Skill checks: If your game has a skill system, you could add checks for persuasion or perception that affect the outcome.
Long-term consequences: The status changes (like 'local_hero') could affect how NPCs interact with the player later in the game.
Branching outcomes: You could add more complex branches, such as the child being in actual danger, leading to a mini-adventure.
Would you like me to elaborate on any of these ideas or show how to implement them in your configuration?
"""
tipsupdatedconfigatbeinningofthisspace = """{
"village": {
"start": {
"description": "You wake up in a small village. You hear a rumor about a lost treasure.",
"choices": ['explore village', 'gather supplies', 'rest', 'look around'],
"transitions": {'explore village': 'village_rumor', 'gather supplies': 'village_supplies', 'rest': 'village_start', 'look around': 'village_help_lost_child'},
"consequences": {
'gather supplies': lambda player: player.add_item('basic supplies')
},
"media": []
},
"rumor": {
"description": "You hear more details about the treasure hidden in the ancient ruins nearby.",
"choices": ['decide to go', 'ignore'],
"transitions": {'decide to go': 'village_supplies', 'ignore': 'village_start'},
"consequences": {
'decide to go': lambda player: player.update_knowledge('treasure location')
},
"media": []
},
"supplies": {
"description": "You gather supplies for your journey.",
"choices": ['head to forest', 'stay in village'],
"transitions": {'head to forest': 'forest_forest', 'stay in village': 'village_start'},
"media": []
},
"help_lost_child": {
"description": "You encounter a crying child in the village square. They seem to have lost their way home.",
"choices": ['help child', 'ignore and continue'],
"transitions": {
'help child': 'village_child_quest',
'ignore and continue': 'village_start'
},
"consequences": {
'help child': lambda player: player.update_status('helping_child')
},
"media": []
},
"child_quest": {
"description": "You decide to help the lost child. After asking around and searching the village, you finally locate their home.",
"choices": ['return child', 'ask for reward'],
"transitions": {
'return child': 'village_child_reunion',
'ask for reward': 'village_child_reward'
},
"media": []
},
"child_reunion": {
"description": "You return the child to their grateful parents. They thank you profusely for your kindness.",
"choices": ['accept thanks', 'request reward'],
"transitions": {
'accept thanks': 'village_start',
'request reward': 'village_child_reward'
},
"consequences": {
'accept thanks': lambda player: player.update_status('local_hero')
},
"media": []
},
"child_reward": {
"description": "The child's parents offer you a small pouch of coins as a reward for your help.",
"choices": ['accept reward', 'decline reward'],
"transitions": {
'accept reward': 'village_start',
'decline reward': 'village_start'
},
"consequences": {
'accept reward': lambda player: player.add_item('coin pouch'),
'decline reward': lambda player: player.update_status('selfless_hero')
},
"media": []
},
},
"forest": {
"forest": {
"description": "You enter the dense forest, heading towards the ruins.",
"choices": ['travel further', 'return to village'],
"transitions": {'travel further': 'ruins_ruins', 'return to village': 'village_start'},
"media": []
},
},
"ruins": {
"ruins": {
"description": "You reach the ancient ruins. The entrance is dark and eerie.",
"choices": ['enter ruins', 'return to forest'],
"transitions": {'enter ruins': 'ruins_explore', 'return to forest': 'forest_forest'},
"media": []
},
"explore": {
"description": "You explore the ruins, encountering traps and puzzles.",
"choices": ['solve puzzle', 'avoid traps'],
"transitions": {'solve puzzle': 'ruins_hiddenPassage', 'avoid traps': 'ruins_ruins'},
"media": []
},
"hiddenPassage": {
"description": "You solve a challenging puzzle and unlock a hidden passage.",
"choices": ['enter passage', 'go back'],
"transitions": {'enter passage': 'ruins_treasureRoom', 'go back': 'ruins_explore'},
"media": []
},
"treasureRoom": {
"description": "You enter the treasure room and find the treasure chest.",
"choices": ['take treasure', 'leave'],
"transitions": {'take treasure': 'ruins_celebrate', 'leave': 'ruins_ruins'},
"consequences": {
'take treasure': lambda player: player.add_item('treasure')
},
"media": []
},
'celebrate': {
"description": "You celebrate your discovery and decide to bring the treasure back to the village.",
"choices": ['return to village'],
"transitions": {'return to village': 'village_return'},
"media": []
},
},
"village_return": {
"village_return": {
"description": "You return to the village with the treasure and share it with the villagers.",
"choices": ['end adventure'],
"transitions": {'end adventure': 'end_end'},
"media": []
},
},
"end": {
"end": {
"description": "Your adventure ends here. The villagers are grateful and everyone's lives improve.",
"choices": [],
"transitions": {},
"media": []
},
}
}"""
#-------------------------#-------------------------#-------------------------#-------------------------
TestmedialoadinHTML = """
<div>
<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>
</div>
<div style="display: flex; justify-content: space-between; margin-bottom: 20px;">
<div style="width: 30%;">
<img src="testmedia/Flash scribble SDXL - random squiggles as roads.webp" alt="Random squiggles as roads" style="width: 100%; height: auto;">
</div>
<div style="width: 30%;">
<video width="100%" height="auto" controls>
<source src="testmedia/SVD - random squiggles as roads video 004484.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<div style="width: 30%;">
<audio controls style="width: 100%;">
<source src="testmedia/Stable Audio - Raindrops, output.wav" type="audio/wav">
Your browser does not support the audio element.
</audio>
</div>
</div>
"""
#-------------------------#-------------------------#-------------------------#-------------------------
timeline_components = [
"Story progression tracker",
"Inventory management system",
"Character stat system",
"Quest log",
"Achievement system",
"NPC relationship tracker",
"Time and weather simulation",
"Economy and trading system",
"Crafting system",
"Skill tree",
"Dialogue manager",
"Combat system",
"Save/Load system",
"Random event generator",
"Faction reputation system"
]
# Decisions (and context explanation)
timeline_decision_features = [
"Moral alignment system (good/neutral/evil)",
"Consequence ripple effect (choices affect multiple future events)",
"Timed decisions (limited time to choose)",
"Hidden choices (unlocked by specific conditions)",
"Context-sensitive options (choices change based on character stats/items)",
"Dialogue trees with branching paths",
"Risk/reward choices (high risk, high reward options)",
"Character personality development through choices",
"Relationship-altering decisions",
"Story-altering key decisions",
"Multi-step decision processes",
"Decision journals (recap of major choices)",
"Faction-based decisions",
"Profession or class-specific choices",
"Ethical dilemmas with no clear 'right' answer"
]
# Nested Sections
timeline_nested_section_ideas = [
"Multilevel dungeons",
"City districts with sub-locations",
"Planetary system with multiple explorable planets",
"Dreamworld with nested dreams",
"Time periods (past, present, future) with sub-events",
"Parallel universes with alternate versions of locations",
"Miniature worlds inside objects",
"Body systems (for a medical game or body-exploration adventure)",
"Nested memories or flashbacks",
"Virtual reality levels within the game world",
"Dimensional rifts with sub-dimensions",
"Organizational hierarchies (e.g., crime family structure)",
"Ecosystem layers (e.g., forest canopy, understory, forest floor)",
"Nested puzzles (solving one unlocks another)",
"Matryoshka doll-like structures with hidden secrets"
]
# Media (Especially to affect decisions)
timeline_media_integration = [
"Dynamic background music changing with mood/tension",
"Character portrait changes reflecting emotional states",
"Environmental sound effects influencing player choices",
"Visual cues (color schemes, lighting) hinting at outcomes",
"Cinematic cutscenes revealing crucial information",
"Interactive maps updating with player discoveries",
"Voice acting with tone influencing trustworthiness",
"Symbolic imagery foreshadowing consequences",
"Augmented reality overlays providing decision hints",
"Character theme motifs indicating importance of NPCs",
"Weather effects reflecting story mood",
"Dream sequences visualizing potential outcomes",
"Time-lapse visuals showing long-term effects of choices",
"Split-screen effects for simultaneous events",
"Flashback scenes providing context for decisions"
]
# Replayability (GTA and Tekken type mechanics in text form)
timeline_replayability_features = [
"Multiple character origins with unique storylines",
"Randomized side quests and events",
"Unlockable skills and abilities for subsequent playthroughs",
"New Game+ mode with increased difficulty and rewards",
"Alternative routes to objectives",
"Hidden endings based on specific choices or achievements",
"Character customization affecting story and gameplay",
"Faction system with different allegiances each playthrough",
"Time-based events that change on each playthrough",
"Roguelike elements (permadeath, procedural generation)",
"Challenge modes (speed runs, minimalist runs)",
"Branching skill trees with mutually exclusive paths",
"Collectibles that unlock new content or lore",
"Dynamic world events that evolve differently each time",
"Secret characters or modes to unlock"
]
# Theme integration (Modified Variables that affect UI or config order)
timeline_theme_integration = [
"Dynamic UI color schemes based on location or story progress",
"Font styles changing with different eras or dimensions",
"Adaptive music system reflecting current theme",
"UI element shapes and designs matching the current environment",
"Loading screen tips and lore adapted to current theme",
"Cursor or pointer design changing with themes",
"Theme-specific animations for transitions between scenes",
"Variable text descriptors (e.g., 'cold' vs 'scorching' based on environment)",
"Themed icons for inventory and skills",
"Background textures or patterns reflecting current setting",
"Character portrait frames styled to match the theme",
"Theme-specific sound effects for UI interactions",
"Adaptive difficulty adjustments based on chosen theme",
"Mini-map or navigation elements styled to fit the theme",
"Theme-specific filters or overlays for the game view"
]
# GTA Heists - Same Map with overlapping branching narratives
gta_heist_inspired = [
"Multiple missions/quests available in the same location",
"Choices in one quest affect options in others",
"Time-sensitive missions that change the environment",
"Characters that appear in multiple storylines with different roles",
"Hidden connections between seemingly unrelated quests",
"Replay value through different approaches to the same heist",
"Dynamic difficulty based on previous mission outcomes",
"Unlockable areas within the same map as story progresses",
"Consequences of actions affecting the game world and future missions",
"Team assembly mechanics for different skill combinations",
"Planning phase before execution of major quests",
"Risk/reward choices for mission approach (stealth vs. aggressive)",
"Easter eggs and secrets hidden within the familiar environment",
"Alternate endings based on cumulative choices across multiple quests",
"NPC relationships affected by actions in different storylines"
]
# Battlefront - Elites amongst Commoners
battlefront_inspired = [
"Player can switch between 'grunt' and 'hero' modes",
"Special abilities or items only available to 'elite' characters",
"Earning 'elite' status through exemplary performance",
"Time-limited elite transformations",
"Missions where player commands both elites and regular units",
"Elites with unique storylines and dialogue options",
"Risk of losing elite status through poor performance",
"Elite characters influencing morale of common units",
"Unlockable elite characters with diverse abilities",
"Missions requiring coordination between elites and common units",
"Elite vs Elite showdowns as climactic events",
"Common units gaining experience to become elites over time",
"Elites having a larger impact on the story and world events",
"Special elite-only areas or quests",
"Dynamic difficulty adjustment when playing as elite characters"
]
# Tekken Casino (one mistake = 1/2 or 1/3 of your Resources)
tekken_casino_inspired = [
"High-stakes dialogue options with major resource loss for wrong choices",
"Timed decision-making with harsh penalties for indecision",
"Mini-games where a single mistake can cost significant resources",
"Opportunities to 'double or nothing' on quest rewards",
"Character skills affecting the odds of success in risky situations",
"Resource management system with high-risk, high-reward options",
"Combo system for dialogue or actions, breaking combo loses resources",
"Unlockable 'retry' options at the cost of resources",
"Progressive difficulty increase, with higher stakes for each level",
"Special 'all-in' options for desperate situations",
"Random events that can dramatically increase or decrease resources",
"Skill-based challenges with variable resource rewards/penalties",
"NPC interactions where trust is a resource that can be rapidly lost",
"Timed exploration with resource drain for inefficiency",
"Boss encounters with escalating stakes for each phase"
]
# Turn-based: 'Tactics' type nintendo games
tactics_inspired = [
"Grid-based movement and action system",
"Unit positioning affecting attack effectiveness and vulnerability",
"Diverse character classes with unique abilities and weaknesses",
"Terrain effects on movement and combat",
"Action points system for balancing multiple actions per turn",
"Status effects persisting across multiple turns",
"Synergy bonuses for complementary unit combinations",
"Permadeath or severe consequences for unit loss",
"Weapon triangle or elemental weakness system",
"Experience and leveling system for units",
"Limited resource management (e.g., mana, ammo) across battles",
"Multi-stage battles with changing objectives",
"Recruitment system for expanding team roster",
"Weather or time-of-day effects on battlefield conditions",
"Morale system affecting unit performance"
]
# Chess (and any other tile-based game)
chess_inspired = [
"Different 'pieces' with unique movement and action patterns",
"Objective-based victory conditions (e.g., capturing the 'king')",
"Limited 'board' space creating positioning challenges",
"Sacrificial strategies for long-term advantage",
"Opening, mid-game, and end-game phases with different strategies",
"Promotion system for 'pieces' reaching certain positions",
"Check and checkmate concepts for imminent defeat conditions",
"En passant-like special moves under specific circumstances",
"Castling-inspired defensive or positioning special actions",
"Pawn-like expendable units with potential for growth",
"Stalemate possibilities leading to draw outcomes",
"Time control mechanics for decision-making",
"Algebraic notation for recording and replaying game states",
"Handicap system for balancing player skill differences",
"Puzzle-like scenarios with optimal solution paths"
]
# Cyberpunk RED (adapting tabletop RPG rules for text-based gameplay)
cyberpunk_red_inspired = [
"Skill-based character creation with points allocation",
"Netrunning mechanics for hacking and virtual world exploration",
"Cybernetic enhancements with both benefits and drawbacks",
"Social status and reputation systems affecting interactions",
"Complex crafting system for weapons and gadgets",
"Trauma Team-like emergency services as game mechanic",
"Corporation-controlled zones with varying rule sets",
"Lifepath system affecting character background and abilities",
"Street slang glossary influencing dialogue options",
"Critical injury system with lasting effects",
"Improvised weapon creation from environment",
"Data mining and information brokering as key gameplay elements",
"Cyberpsychosis risk for excessive augmentation",
"Night City-inspired district exploration with distinct subcultures",
"Fixer-based job acquisition and reputation building"
]
# Community playthrough - Tally of players' choices
community_playthrough = [
"Global choice statistics visible to all players",
"Weekly community challenges based on least-chosen options",
"Adaptive storytelling influenced by majority choices",
"Community-unlocked content when certain choice thresholds are met",
"Leaderboards for most unique choice combinations",
"Time-limited voting on major story decisions",
"Character popularity contests affecting NPC prominence",
"Community-driven side quest creation",
"Collaborative puzzle solving with choice aggregation",
"Dynamic difficulty adjustment based on community performance",
"Seasonal events with community-wide consequences",
"Faction wars where player choices determine outcomes",
"Community achievements unlocking special game modes",
"Player choice heat maps for game areas",
"Periodic resets allowing community to reshape the game world"
]
# Random item placed in a random location - first person to get it wins
random_item_hunt = [
"Daily randomized legendary item hunts",
"Clue system hinting at item location based on player actions",
"Item location narrowing over time to increase tension",
"Multiple item tiers with varying rarity and win conditions",
"Limited-time windows for item discovery",
"Collaborative and competitive modes for item hunting",
"Randomized item powers affecting gameplay upon discovery",
"Cursed items with negative effects to add risk",
"Community-created hiding spots for items",
"Item hunt leaderboards with speed and efficiency metrics",
"Seasonal themed items with unique properties",
"Hint sharing system among players",
"Progressive clue unlocks for players lagging behind",
"Randomized environmental hazards during item hunts",
"Special game modes unlocked by finding rare items"
]
# Survival by location or characters met
survival_mechanics = [
"Location-based resource scarcity affecting survival strategies",
"Character relationships influencing survival odds",
"Dynamic weather system impacting survival difficulty",
"Randomized disease outbreaks requiring specific remedies",
"Crafting system adapted to location-specific materials",
"NPC trust system affecting trade and assistance availability",
"Time-based challenges for reaching safe locations",
"Unique survival skills unlocked by meeting specific characters",
"Randomized events testing different survival aspects",
"Permadeath mode with character legacy system",
"Base building mechanics adapted to different environments",
"Seasonal changes affecting survival strategies",
"Character-specific weaknesses requiring team-based survival",
"Morale system influenced by character interactions and environment",
"Scavenging missions with risk/reward balancing"
]
# Additional community and randomization features
bonus_features = [
"Player-created content voting and integration system",
"Randomized daily quests with community-wide rewards",
"Collaborative world-building events",
"Dynamic economy based on player actions and random events",
"Community-driven storyline branching",
"Randomized character backstories affecting gameplay",
"Player-run factions with territory control mechanics",
"Periodic world resets with randomized layouts",
"Community challenges requiring diverse skill combinations",
"Randomized NPC behavior and dialogue options",
"Player-created lore integration system",
"Dynamic difficulty scaling based on community skill level",
"Randomized ethical dilemmas with community-wide consequences",
"Collaborative raid events against procedurally generated dungeons",
"Community-driven development roadmap voting system"
]
multiplayer_features = [
"Real-time cooperative puzzle solving",
"Competitive leaderboards for speed runs or high scores",
"Shared world events affecting all players simultaneously",
"Player-vs-player mini-games or challenges",
"Guild or clan system for group activities",
"Trading system for in-game items or resources",
"Multiplayer-exclusive quests or storylines",
"Dynamic difficulty scaling based on group size and composition",
"Shared base-building or territory control mechanics",
"Cross-player skill or ability synergies"
]
# Categorized lists
existing_game_inspirations = [
gta_heist_inspired,
battlefront_inspired,
tekken_casino_inspired,
tactics_inspired,
chess_inspired,
cyberpunk_red_inspired
]
feature_lists = [
community_playthrough,
random_item_hunt,
survival_mechanics,
bonus_features
]
# All lists combined
all_idea_lists = existing_game_inspirations + feature_lists + [multiplayer_features]
# Create a list of all the idea lists for easy import and use
all_idea_lists = [
gta_heist_inspired,
battlefront_inspired,
tekken_casino_inspired,
tactics_inspired,
chess_inspired,
cyberpunk_red_inspired,
community_playthrough,
random_item_hunt,
survival_mechanics,
bonus_features
]
# List names for reference
list_names = [
"GTA Heists Ideas", "Battlefront Ideas", "Tekken 'Casino' Ideas", "Tactics Games Ideas", "Chess Ideas",
"Cyberpunk RED Ideas", "Community Playthrough Ideas", "Random Item Hunt Ideas",
"Survival Mechanics Ideas", "Bonus Features Ideas", "Multiplayer Features Ideas"
]
#-------------------------#-------------------------#-------------------------#-------------------------
mermaidstorystructures = {
"Parallel Storylines Progression":
"""graph TD
A[Start] --> B[Character 1 Introduction]
A --> C[Character 2 Introduction]
B --> D[Character 1 Event 1]
C --> E[Character 2 Event 1]
D --> F[Character 1 Event 2]
E --> G[Character 2 Event 2]
F --> H[Characters Meet]
G --> H
H --> I[Climax]
I --> J[Resolution]
""",
}
#-------------------------#-------------------------#-------------------------#-------------------------
#-------------------------#-------------------------#-------------------------#-------------------------
#-------------------------#-------------------------#-------------------------#-------------------------
#-------------------------#-------------------------#-------------------------#-------------------------
#-------------------------#-------------------------#-------------------------#------------------------- |