Skip to content

Releases: neph1/LlamaTale

v0.12.0 Improved combat

16 Sep 06:28
c47d447
Compare
Choose a tag to compare

What's Changed

Reworked how combat works, to get more interesting results. Previously, it was really difficult fighting someone your own level and size, and you would end up in a loop where no one could hurt the other. This also lead to repetitive messages due to, more or less, deterministic sampling of the LLM.

Now there are 'weapon skills' for different types of weapons, and randomized rolls, similar to classical rpgs. Not so many factors come into play yet, but there are more textual output prompts which will help the LLM create dynamic commentary of the combat. 'Miss', 'near miss', etc.

Ranged weapons can't be blocked atm, and neither can you block with a ranged weapon.

The Prancing Llama still offers limited combat, this is more for future development.

Full Changelog: v0.11.0...v0.12.0

v0.11.0 NPC idle actions and reactions

12 Sep 17:47
5ee0fc2
Compare
Choose a tag to compare

What's Changed

NPC's now perform "idle actions" occasionally, based on their character and location. They may also interact with other characters (and the player).
In addition, they can also react to each others actions. All causing for some extra immersion in the other static environments. Sometimes you can watch stories unfold.

If you see several sentences together, starting with a character name, it's usually a reaction to an action. Examples:
1.

Shanda sees the elid gald and approaches him leisurely, a sly smile spreading across her lips. “Well well well, looks like someone’s having themselves quite the party,” she says, peering at Elid through half-lidded eyes.
Elid Gald raises an eyebrow and gives a measured glance before turning away without a word.
Elid Gald cracks one shoulder blade into a sly smile as he glances around Main Hall.

Shanda grins at Elid Gald, tilting her head to one side. “Well now, looks like someone got caught with their hand in the ale jug. What business do you have here, pretty boy?”

Without breaking eye contact, Elid tugs at his jacket pocket, pretending to search for something while whispering smoothly, “Ah, good day to ye, fair lass. My apologies for this…unfortunate coincidence.”

Elid smiles as Shanda watches him, then casually glances at her before returning to his pretense of searching his jacket pocket.

Shanda sees Elid Gald, leans towards him and growls lowly. Elid Gald grins slyly at Shanda, leaning closer to appraise her interest in the situation while adjusting his monocle to better observe her reaction. Elid Gald chuckles at Shanda, sensing her unease.

Shanda looks at Elid Gald with suspicion, her hand on the hilt of her sword. With a wink, Elid Gald slips behind Shanda unnoticed, palming a small trinket from her belt pouch while maintaining casual demeanor.

Shanda draws her sword slowly and cautiously as she approaches Elid Gald, eyeing him warily. Elid smirks beneath his bushy eyebrows as he sees Shanda draw her sword, his one good eye gleaming with amusement at the foolishness of her actions. “Ah, my dear, you think ye can take me down with yer little blade? I’ve seen it all before, lass.”

‘‘‘ Shanda glares at Elid Gald, her hand resting on the hilt of her sword. “What are you doing here? You’re no friend of mine,” she growls. ‘‘‘ As Elid flashes a smirk beneath his patch, he says, “Ah, my dear Shanda… we’ve crossed paths again, haven’t we? I merely sought only to reminisce about old times—but if you insist on being so hostile…”

Elid gently pats Shanda’s shoulder as if checking for weapons before taking another sip of tea.]

Elid carefully takes another sip of tea, watching Shanda out of the corner of his eye as if trying to gauge her mood without being too obvious.

Full Changelog: v0.10.1...v0.11.0

v0.10.1 - Zone generation and transition

08 Sep 14:35
Compare
Choose a tag to compare

What's Changed

  • always use openai body for openai by @neph1 in #24
  • basics for zone generation and transition by @neph1 in #25
  • Zone fix for prancingllama

Phew, this was a biggie. Much more tricky than I had expected, and the code will need some cleaning.

  • A Zone is about 10 locations wide. When it ends is a bit random.
  • When you reach the end of a zone, a new one will be generated by the LLM, using various inputs from the story.
  • This zone is then used as input for the location generation until you reach the next, etc..

So this means that the LLM has the (theoretical) possibility to vary the theme of the story from the initial one.

Next up, I will need to do something about combat. It's too difficult to fight anything your own level. Also I think mob spawning will need to be handled by the MUD, rather than the LLM.

As usual, your mileage will vary with local LLM's. For me, sometimes it works beautifully, and sometimes just not.

Here are a couple of zones I got when testing. I decided to change the theme a bit, can you guess which game was the inspiration?

{
"name": "Dead Forest",
"description": "A vast expanse of twisted trees, their trunks blackened by radiation, stretching as far as the eye can see. Once teeming with life, now a ghostly landscape devoid of sound or movement save for the wind whispering through the branches.",
"races": [
"rad-zombie",
"lurker",
"scavenger"
],
"items": [
"rusted car parts",
"tattered clothing",
"broken appliances",
"radiation suit",
"fossilized food",
"antique radio"
]
}
{
"name": "Blighted Highlands",
"description": "A barren wasteland once known for its lush farmland and rolling hills, now scarred by radiation and nuclear war. Mutated creatures roam the ruins of small towns and abandoned farms.",
"races": [
"rad-zombie",
"lurker",
"mutant",
"abomination",
"irradiated animal"
],
"items": [
"rusty pitchfork",
"melted plastic",
"contaminated soil",
"broken irrigation pipe",
"rusted tractor",
"nuclear fallout suit",
"canned food",
"expired meds"
]
,"mood": "hostile",
"level": 3
}

Full Changelog: v0.9.3...v0.10.0

v0.9.3

03 Sep 14:08
b191be2
Compare
Choose a tag to compare

What's Changed

No major news in this release. I've tried to improve the generation algorithms.

  • Include a direction in the short description for each location. Will make it easier navigating.
  • Some preparation to let NPC's plan (location memory)
  • Some randomness when generating NPC's and items in new locations
  • Added a Zone class to better handle the expanding properties of the type

Full Changelog: v0.9.2.1...v0.9.3

v0.9.2 OpenAI backend support

31 Aug 18:46
5654061
Compare
Choose a tag to compare

What's Changed

  • Added support for OpenAI type API chat completion. This isn't tested on a real endpoint, only a dummy one, so consider it experimental. To use it, change BACKEND in llm_config.yaml to 'openai', and url and endpoint accordingly. If you want to use chat-gpt, add your openai api key.

  • Fixed issue where generated NPCs in generated locations weren't added to said location.

Expect next release to include some improvements to generated locations. For now, I still recommend to have the terminal window open so you can see the name of things.

Edit: Fixed and tested OpenAI against gpt-3.5-turbo

Full Changelog: v0.9.1.3...v0.9.2.1

v0.9.1 Generated items and more

29 Aug 18:46
30e4450
Compare
Choose a tag to compare

What's Changed

  • Generated items are now parsed and inserted correctly.
  • Added a new concept: zone descriptions:
    Each zone (area consisting of several locations) can have a description, a list of races commonly populating it, and a list of items which can be found. These are added to the prompt the LLM receives to give it a hint of what it can use. This will be expanded upon later.
  • I managed to get the LLM to more consistently generate locations, it's also quite generous with items. Maybe need to pass some probability from the MUD whether it should generate items and mobs.
  • I added a flag so that locations created by the LLM don't receive a generated description when entering them. This to avoid a double inference load. I also figure since they're already procedurally generated, they don't need it as much as the 'static' locations. Do you agree? If not, let's discuss it! I may make it configurable.

If you get errors when generating content, that is not JSON related (those are generally 'Unterminated string' or 'Expecting delimiter'), I'm interested in receiving error reports. Copying the generated content from the LLM window would be helpful. I've tried to compensate for weird stuff the LLM generates, but there are probably many more cases.

Full Changelog: v0.9.0.1...v0.9.1.3

v0.9.0 - Generating locations

26 Aug 09:20
42329ab
Compare
Choose a tag to compare

What's Changed

After much work, the LLM can now generate locations. It's not fool-proof. It fails to generate proper JSON sometimes, and for that reason, it will retry up to 5 times. The quality of the generation varies, too, and it can be difficult to navigate from the descriptions it makes.
You can always go to a place by typing it's name, and it can be a good idea to see the generation in a separate window to see what it has actually produced.

You can (should) also always be able to go back to the place you came from.

To trigger this, just go outside the Prancing Llama. This is uncharted territory, and will be generated, both description and new locations.

Here are some examples I got (wolves not included):

{
"name": "Outside",
"description": "A barren wasteland of snow and ice stretches as far as the eye can see. The wind howls through the mountains like a chorus of banshees, threatening to sweep away any unfortunate soul caught outside without shelter.",
"exits": [
{"name": "North Pass","short_desc": "The North Pass is treacherous mountain pass that leads deeper into the heart of the range","enter_msg":"You shuffle your feet through knee-deep drifts of snow, trying to keep your balance on the narrow path."}, {"name": "South Peak","short_Desc": "The South Peak offers breathtaking views of the surrounding landscape from its summit, but it's guarded by a pack of fierce winter wolves.","Enter_msg":"You must face off against the snarling beasts if you wish to reach the peak."}] ,"items": [],"npcs": []}

{
"name": "Outside",
"description": "A barren wasteland stretches out before the hut, snow blanketing the ground and wind howling through the mountains.",
"exits": [
{"name": "valley", "short_descr": "A treacherous path leads down into a narrow valley, filled with hidden dangers and untold riches.",
"enter_msg": "The wind picks up, threatening to send you tumbling down the rocky slope."},
{"name": "cliff", "short_descr": "A sheer cliff face looms above, only reachable by scaling the icy walls or taking a perilous leap of faith."},
{"name": "cave", "short_descr": "A dark opening in the side of the mountain, rumored to be home to ancient evils."}
],"items": [], "npcs": []
}

Full Changelog: v0.8.1...v0.9.0

v0.8.1 - Wielding and description cache

17 Aug 16:48
Compare
Choose a tag to compare
  • Added a 'wield' command and a couple of items that can be used as weapons throughout the Llama.
  • Unarmed attack types for all described races.
  • Wielded weapons are used in the combat descriptions generated by the LLM.
  • To increase consistency, (and lessen inference time), I added a simple cache system, where, if the MUD's description of a room stays the same, ie same items, same characters, the description previously generated by the LLM will be used again. Much quicker when you traverse back and forth.
  • Fixed a bug where some of the rooms descriptions weren't correct, making them not 'appear', and thus become hard to navigate to (the cellar being one of them).

Full Changelog: v0.8.0.1...v0.8.1

v0.8.0 -- LLM generates characters

13 Aug 07:57
a436f9e
Compare
Choose a tag to compare

When the story (The Prancing Llama) starts, the LLM will attempt to generate 2 characters and insert them into the scenario. They will be of a new type that roams the place, still driven by the MUD lib. Since the JSON output still fails occasionally (depending on model), it will try 10 times.

I use this model when testing, and I've found that it generates quite good JSON, and decent story.

I've spent alot of time sanitizing the JSON output, trying to repair all the creative ways the model breaks it in, and it works most of the times.

Full Changelog: v0.7.4.1...v0.8.0

v0.7.4 - Multi-turn combat and maintenance

12 Aug 07:48
67d7919
Compare
Choose a tag to compare

LlamaTale now technically supports multi-turn combat. Previously, it always led to the death of one of the participants. With the introduction of a health point system, creatures can take several hits before dying. All acted out through the LLM, of course.

Otherwise, the big part of this release is I fixed all of the tests I broke while developing this fork.

There are some additions to the story and npc's, but I still mean to connect them some more.