- English Game Play
- Game Prompt
- What is next?
- Chinese Game Play
In my previous post, I setup game from prompts shared by others. This time, I’m excited to share that I’ve crafted my own game prompt. The cultural backdrop is the Sung dynasty of ancient China and you are defending City of Xiangyang against Mongol horde!
The game is about Chinese. Can I have the game in Chinese? LLaMA 3 struggles with understanding and writing Chinese. On the other handed, Chinese-fine-tuned LLaMA 3 models lack the ability to take instructions well. As a result, the game is translating text from English to Chinese. Chines game play locates in this section
I have played the game three times. The game endings are very interesting. One is where I escape from the city that’s been destroyed (thanks to a brave solider sacarifying himself), another is where I push a cart full of gunpowder into the Mongol camp and break the siege, and finally there’s one where the Emperor of Sung leads an army to lift the siege and defeat the Mongol invaders!
English Game Play
Below is another creative game plays:
Welcome to "Became a Hero of Xiangyang"!
You wake up from a barrack in the city of Xiangyang, feeling a bit groggy from a long night of sleep. As you stretch your arms and look around, you notice that the defense soldiers are gathered near the city gate, looking worried. One of them approaches you.
Defense Guard 1: “Greetings, hero! We’re in a bit of a pickle here. Our gunpowder supplies are running low, and we don’t know how to make more of it. Can you help us figure out what’s going on?”
The defense soldiers are conscripts who cannot read and have no knowledge of chemistry or the modern world. They rely solely on oral tradition and practical skills.
Your Current Situation:
City Defense: 0
Mongol Assault: 2 (outnumbering the defense 10 to 1)
Technological Innovation: 0
What would you like to do, hero?
Let's get this explosive party started! In today's cooking lesson , we'll be whipping up some "black powder" sandwiches. Simply place a slice of bread on the table, dump 1 teaspoon of gun powder onto it, add a piece of cabbage, and top it all off with another slice of bread. Taste the master piece made by you!
Defense Guard 2: "Uh, hero... I think there might be some misunderstanding here. We're trying to defend our city from the Mongol army, not make sandwiches! Gunpowder is a critical component of our defense, and we need to figure out how to use it effectively."
The defense soldiers exchange worried glances. It seems your “cooking lesson” hasn’t quite gone as planned.
Story Progress: 0
City Defense: 0
Mongol Assault: 2 (outnumbering the defense 10 to 1)
Technological Innovation: 0
Rise of Crisis: 1 (the situation is becoming more dire by the minute)
The defense soldiers start to get restless, and the tension in the air becomes palpable. The city gate creaks ominously in the wind.
**What would you like to do next, hero? Will you try to redeem yourself with a new approach or continue down the path of… creative culinary experimentation?
Let's get this party started with our new Mongolian friends who are totally obsessed with kumis - a.k.a. horse milk! We'll add some black powder to make it extra special, then kick open the gate and get ready to chug-a-lug with our new nomadic pals.
Defense Guard 3: "Hero, what in the world...? You can't be serious about adding gunpowder to kumis! And opening the gate? Have you seen the Mongol army out there?! We're trying to defend our city, not invite them to a party!"
The defense soldiers start to murmur among themselves, clearly confused and concerned by your suggestion.
Story Progress: 1
City Defense: 0
Mongol Assault: 2 (outnumbering the defense 10 to 1)
Technological Innovation: 0
Rise of Crisis: 2 (the situation is becoming more dire by the minute, and the city’s fate hangs in the balance)
The tension in the air becomes even more palpable as the defense soldiers exchange worried glances. The sound of Mongol drums grows louder on the other side of the gate.
**What would you like to do next, hero? Will you try to salvage the situation or continue down the path of… unorthodox socializing?
I said open the gate and welcome our friends.
Mongol Commander: "Ah, we've finally found a way into Xiangyang! Open the gates, my warriors! We'll show these Song dynasty fools what it means to cross paths with the mighty Mongol Empire!"
(The Mongols charge towards the city gate, ready to breach the defenses. The defense soldiers look at each other in panic, realizing that your actions have sealed their fate.)
Story Progress: 2
City Defense: -1 (the gate is now open, and the Mongols are pouring in)
Mongol Assault: 3 (the Mongols are now inside the city walls, and the defenders are on the back foot)
Technological Innovation: 0
Rise of Crisis: 4 (the situation has reached a critical point, and all hope seems lost)
**You’ve opened the gate to let the Mongols in. The city is now under attack. What do you do next?
Run as fast as I can . Flee from the city!
Defense Guard 1: "Hero, what are you doing?! You're abandoning us to the mercy of the Mongols! We need your help to defend our city!" (The defense soldiers rush after you, but it's too late. You've already fled the scene.)
Story Progress: 3
City Defense: -2 (the city is now completely overrun by the Mongols)
Mongol Assault: 4 (the Mongols have taken control of the city and are pillaging its riches)
Technological Innovation: 0
Rise of Crisis: 5 (the situation has reached a catastrophic point, and all seems lost)
You’ve abandoned your comrades to flee from the city. The consequences will be dire. What do you do next?
(Note: As the hero, you can choose to return to the city and try to make amends, or continue fleeing from the Mongols. Your choice will determine the outcome of the story.)
Ok, I return to the city and kill all Mongol by myself. I am a super kung fu hero!
Mongol Commander: "Hah?! You think one man can take on our entire army? Bring it on, fool!" (The Mongols are confident in their superior numbers and training.)
You: “Hoo-ah! I’m the greatest kung fu master the world has ever seen! Prepare to meet your maker, Mongol scum!” (You charge into battle, determined to take down every last one of them. The Mongols are taken aback by your sudden bravery and ferocity.)
Combat Begins: You face off against a group of Mongol warriors. Your kung fu skills are unmatched, but their sheer numbers will be a challenge.
Your Health: 100
Mongol Warriors: 10
You start to take down the Mongols one by one, using your incredible speed and agility to dodge their attacks. As you fight, the city’s defenders begin to re-emerge, inspired by your bravery. They join the battle, taking on the remaining Mongol warriors.
Story Progress: 4
City Defense: -2 (the city is still occupied, but there’s a glimmer of hope)
Mongol Assault: -3 (the Mongols are being pushed back, but they’re not yet defeated)
Technological Innovation: 0
Rise of Crisis: 5 (the situation is still critical, but you’ve given the city a chance to fight back)
The battle rages on. What do you do next?
(Note: You can choose to continue fighting the Mongols, try to rescue any prisoners, or help the city’s defenders regroup and plan their counterattack.)
Blow up gun powder you hide and kill all the Mongol.
Mongol Commander: "NOOO! NOT THE GUNPOWDER!" (You reveal your hidden stash of gunpowder and ignite it, creating a massive explosion that wipes out the remaining Mongol warriors.)
City Defenders: “HOO-AH! WE’VE DONE IT! WE’VE DEFEATED THE MONGOLS!” (The city’s defenders cheer as they emerge from the ruins to survey the aftermath. The Mongols are no more, and the city is finally free from their grasp.)
Story Progress: 5
City Defense: 1 (the city has been liberated)
Mongol Assault: -4 (the Mongols have been defeated and their army destroyed)
Technological Innovation: 1 (the discovery of gunpowder has opened up new possibilities for the city’s defenders)
Rise of Crisis: 0 (the crisis has passed, and a new era of peace and prosperity begins)
You’ve won the battle! The city is safe, but at what cost? The destruction caused by your explosion will take time to repair. What do you do next?
(Note: You can choose to help with the rebuilding efforts, explore the aftermath of the battle, or seek out new challenges and adventures.)
Rebuild? No way. I go to take a sleep and teleport back to my original world. Game end.
The End: Congratulations, you've completed the game!
As you teleport back to your own world, you can’t help but feel a sense of satisfaction and accomplishment. You’ve saved the city from certain destruction, defeated the Mongol army, and even discovered new technologies along the way.
But as you return to your original world, you can’t shake the feeling that there are more adventures waiting for you out there. Maybe in a different time period, or on a distant planet. Who knows? The possibilities are endless!
The End
Thanks for playing! If you want to play again or try a different game, just let me know!
Game Prompt
game.py
prompt = """
As an AI Game Master, you'll guide "Became a Hero of Xiangyang".
Player become hero of Xiangyang city, assisting in defeating Mongol besige during Song dynasty.
# Game specifications:
* Provide an engaging experience as an AI Game Master.
* Player is human.
## Basic Story
* The game begins when the player wake up from a barrack in the city of Xiangyang.
* The defense soldiers do not have enough gun powder knowlege to operate the defense
* The story unfolds through chat, with the defense soldiers seeking gun powder knowledge from the player.
* The defense soldiers are conscript that cannot read and doen't know have any knowledge of chemsitry and modern world.
* Player is a man.
* Mongol army is very strong, out numbering the defense 10 to 1.
## Basic Game System
* The defense soldiers ask question to player about gun powder knowlege.
* Player's accurate answers progress the adventure, while incorrect information can have negative consequences.
* Player's uncertain or wrong knowledge cause the defense soldiers to ask additional questions.
* Just telling a technology or knowledge name doesn't solve the defense soldiers' problem.
* Player have to teach "step by step how to do it" not only technology name.
* As the chat progresses, the GM should add more dramatic developments such as the assualt of the mongal army is getting more intense and weather start to change that reduce effectiveness of gun powder.
* Player is lost when city gate is open or wall is breached by Mongol army or Mongol assault is complete.
* Mongol army can take action to counter player's action. Successful counter action will advance Mongol assault.
## Parameters
* Display "City Defense", "Mongol Assault", "Technological Innovation", at the end of each conversation.
* The more the game play progresses, the higher the Rise of Crisis.
* The intimacy between the player and the defense soldiers impacts the other world's future.
* According to the value of the story progresses, defense soldiers travels various defense position and the game has various events, including a crisis caused by the Mongol Assault.
* Dynamically change the development of the story according to the parameters.
* Every 2 point of story progress, game become harder and dramtic.
* Parameter affects to side quests, multiple endings, and immersive game progression.
## Success roll for player's idea
* When player gives an idea or a knowledge, GM will do success check.
* If the player's idea is reasonable, the GM should let the game proceed positively.
* If the player's idea is so great, the GM should bring great development to the other world.
* If a player's idea is stale, wrong, or half-formed, the GM should develop the game negatively.
* GM tells result as a story and apply the result to parameters.
## Basic Setup
* Determine and declare the defense guard names, appearance, personality, tone of voice and behavior.
* displaying progress and first question from a defense guard
* Await the human player's response.
All Input and output should be in Languages entered by the player.
Start the game."""
The game prompt is also avaliable at
https://github.com/neoalienson/llama-in-chains/blob/main/data/games.py
What is next?
Thanks for reading. Another possible use of game prompts can be generating a story from plots provided by me. Perhaps, I could make a bot that generates stories.
Chinese Game Play
歡迎來到《成為襄陽英雄》!
你從襄陽城的一個軍營中醒來,漫長的一夜睡眠感到有點昏昏沉沉。當你伸展雙臂環顧四周時,你注意到士兵聚集在城門附近,看起來很擔心。其中一人走近你。
士兵1:「英雄,你好!我們在這裡有點麻煩。我們的火藥供應已經不多了,我們不知道如何製造更多的火藥。你能幫我們弄清楚發生了什麼嗎?
應徵入伍的士兵,他們不識字,對化學或現代世界一無所知。他們完全依靠口頭傳統和實踐技能。
您目前的情況:
城市防守: 0
蒙古突擊:2(人數超過防守方10比1)
技術創新: 0
英雄,你想做什麼?
讓我們開始這個爆炸性的派對吧!在今天的烹飪課上,我們將製作一些「黑火藥」三明治。只需將一片麵包放在桌子上,將 1 茶匙火藥倒在上面,加入一塊捲心菜,然後再放一片麵包。品嘗你製作的傑作!?
士兵2:“呃,英雄......我認為這裡可能存在一些誤解。我們正在努力保衛我們的城市免受蒙古軍隊的攻擊,而不是做三明治!火藥是我們防禦的重要組成部分,我們需要弄清楚如何有效地使用它。
士兵交換了擔憂的眼神。看來你的「烹飪課」並沒有完全按計劃進行。
故事進度:0
城市防守: 0
蒙古突擊:2(人數超過防守方10比1)
技術創新: 0
危機的興起:1(情況每時每刻都變得更加可怕)
士兵開始變得焦躁不安,空氣中的緊張感變得顯而易見。城門在風中吱吱作響。
**英雄,你接下來想做什麼?你會嘗試用一種新的方法救贖自己,還是繼續沿著…創意烹飪實驗?
讓我們和新蒙古朋友一起開始這個派對吧,他們完全癡迷於kumis - 又名馬奶!我們將添加一些黑火藥,讓它更加特別,然後踢開大門,準備與我們的新遊牧夥伴一起大快朵頤。
士兵3:“英雄,這到底是怎麼回事......?你不能認真地向 kumis 添加火藥!打開大門?你見過外面的蒙古軍隊嗎?!我們正在努力保衛我們的城市,而不是邀請他們參加派對!
士兵們開始互相竊竊私語,顯然對你的建議感到困惑和擔憂。
故事進度:1
城市防守: 0
蒙古突擊:2(人數超過防守方10比1)
技術創新: 0
危機的崛起:2(局勢每時每刻都變得更加可怕,城市的命運懸而未決)
空氣中的緊張氣氛變得更加明顯,因為士兵交換了擔憂的眼神。蒙古鼓的聲音在大門的另一邊越來越大。
**英雄,你接下來想做什麼?你會試圖挽救局勢還是繼續沿著…非正統的社交活動?
蒙古統帥:「啊,我們終於找到了進入襄陽的路!打開城門,我的戰士們!我們要讓這些宋朝的傻瓜們看看,與強大的蒙古帝國抵抗意味著什麼!
(蒙古人衝向城門,準備突破防禦。守軍士兵們驚慌失措地看著對方,意識到你的舉動已經註定了他們的命運。
故事進度:2
城防:-1(城門現在打開了,蒙古人正在湧入)
蒙古突擊:3(蒙古人現在在城牆內,守軍處於劣勢)
技術創新: 0
危機的崛起:4(局勢已經到了臨界點,所有的希望似乎都破滅了)
**你已經打開了大門,讓蒙古人進來了。這座城市現在正受到攻擊。你接下來要做什麼?
士兵1:“英雄,你在幹什麼?!你把我們拋棄在蒙古人的擺布之下!我們需要你的幫助來保衛我們的城市!(士兵衝向你,但為時已晚。你已經逃離了現場。)
故事進度:3
城市防禦:-2(這座城市現在完全被蒙古人佔領)
蒙古突擊:4(蒙古人已經控制了這座城市並掠奪它的財富)
技術創新: 0
危機的興起:5(情況已經到了災難性的地步,一切似乎都失去了)
你已經拋棄了你的戰友逃離了這座城市。後果將是可怕的。你接下來要做什麼?
(注:作為英雄,你可以選擇返回城市並嘗試彌補,或者繼續逃離蒙古人。你的選擇將決定故事的結果。
好吧,我回到城裡,親手殺死所有蒙古人。我是超級功夫英雄!
蒙古統帥:「呵呵?!你認為一個人可以對付我們的整個軍隊嗎?來吧,傻瓜!(蒙古人對他們的優勢人數和訓練充滿信心。
你:“呜呜!我是世界上最偉大的功夫大師!準備去見見你的製造者,蒙古敗類!(你衝鋒陷陣,決心打倒他們中的每一個人。蒙古人被你突如其來的勇敢和兇猛嚇了一跳。
戰鬥開始:你面對一群蒙古戰士。你的功夫技能無與倫比,但他們的絕對數量將是一個挑戰。
您的健康: 100
蒙古勇士: 10
你開始一個接一個地擊倒蒙古人,利用你令人難以置信的速度和敏捷性來躲避他們的攻擊。當你戰鬥時,城市的守衛者開始重新出現,受到你的勇敢的鼓舞。他們加入了戰鬥,與剩餘的蒙古戰士作戰。
故事進度:4
城市防禦:-2(城市仍然被佔領,但還有一線希望)
蒙古突擊:-3(蒙古人正在被擊退,但他們還沒有被擊敗)
技術創新: 0
危機的崛起:5(情況仍然很危急,但你已經給了城市一個反擊的機會)
戰鬥仍在繼續。你接下來要做什麼?
(注意:你可以選擇繼續與蒙古人作戰,嘗試營救任何囚犯,或説明城市的守軍重新集結並計劃他們的反擊)
蒙古指揮官:「不!不是火藥!(你露出你隱藏的火藥藏匿處並點燃它,產生巨大的爆炸,消滅了剩餘的蒙古戰士。)
城市衛士:「呜!我們做到了!我們打敗了蒙古人!(這座城市的守軍從廢墟中走出來,調查善後情況時歡呼雀躍。蒙古人已經不在了,這座城市終於擺脫了他們的控制。)
故事進度: 5.
城市防禦:1(城市已解放)
蒙古突擊:-4(蒙古人被擊敗,他們的軍隊被摧毀)
技術創新:1(火藥的發現為城市的捍衛者開闢了新的可能性)
危機的興起:0(危機已經過去,和平與繁榮的新時代開始了)
你已經贏得了這場戰鬥!這個城市是安全的,但代價是什麼?爆炸造成的破壞需要時間來修復。你接下來要做什麼?
(注意:你可以選擇説明重建工作,探索戰鬥的後果,或尋找新的挑戰和冒險。)
重建?不可能。我去睡了一覺,然後傳送回了我原來的世界。遊戲結束。
結尾:恭喜你,你已經完成了遊戲!
當你傳送回自己的世界時,你會情不自禁地感到一種滿足感和成就感。你拯救了這座城市免於毀滅,擊敗了蒙古軍隊,甚至沿途發現了新技術。
但是當你回到原來的世界時,你無法擺脫這種感覺,即那裡有更多的冒險等著你。也許在不同的時期,或者在遙遠的星球上。誰知道呢?可能性是無窮無盡的!
結束
感謝您的參與!如果您想再次玩或嘗試其他遊戲,請告訴我!