From d44bb1cff9ceb35287cc8ef9a55d88cd62741f75 Mon Sep 17 00:00:00 2001 From: Spicy_Marinara Date: Fri, 2 Jan 2026 20:58:49 +0100 Subject: [PATCH] v2.1.1: Fix swipe detection in together mode and combat encounter prompt --- README.md | 8 ++++++-- manifest.json | 2 +- settings.html | 2 +- src/systems/generation/encounterPrompts.js | 2 +- src/systems/integration/sillytavern.js | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 47b7f95..b6575fa 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,13 @@ An immersive RPG extension for browsers that tracks character stats, scene infor [![My Discord](https://img.shields.io/badge/Discord-Join%20Server-7289da)](https://discord.com/invite/KdAkTg94ME) [![Support Me](https://img.shields.io/badge/Ko--fi-Support%20Creator-ff5e5b)](https://ko-fi.com/marinara_spaghetti) -## 🆕 What's New in v2.1 +## 🆕 What's New -### Dynamic Weather Effects +### v2.1.1 +- Fixed a bug in together generation mode that didn't detect swipes correctly +- Fixed combat encounter prompt to consider party members better + +### v2.1 - Dynamic Weather Effects - Real-time weather visualization based on Info Box weather field - **Snow**: Falling snowflakes with varied speeds and sizes - **Rain**: Realistic raindrops animation diff --git a/manifest.json b/manifest.json index 8dc7765..54cab2e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,6 +6,6 @@ "js": "index.js", "css": "style.css", "author": "Marysia", - "version": "2.1.0", + "version": "2.1.1", "homePage": "https://github.com/SpicyMarinara/rpg-companion-sillytavern" } diff --git a/settings.html b/settings.html index 8f4aa18..4db009b 100644 --- a/settings.html +++ b/settings.html @@ -30,7 +30,7 @@
- RPG Companion v2.1 + RPG Companion v2.1.1
diff --git a/src/systems/generation/encounterPrompts.js b/src/systems/generation/encounterPrompts.js index be4161e..60ec25e 100644 --- a/src/systems/generation/encounterPrompts.js +++ b/src/systems/generation/encounterPrompts.js @@ -500,7 +500,7 @@ export async function buildCombatActionPrompt(action, combatStats) { }); stateMessage += `\n${userName}'s Action: ${action}\n\n`; - stateMessage += `Respond with a JSON object containing ONLY updated HP values and new status effects. DO NOT regenerate character descriptions, sprites, or environment:\n`; + stateMessage += `Respond with the exact JSON object as below, containing ONLY these specified values. Remember to consider the user's party and their moves. DO NOT regenerate character descriptions, sprites, or environment:\n`; stateMessage += `{\n`; stateMessage += ` "combatStats": {\n`; stateMessage += ` "party": [{ "name": "Name", "hp": X, "maxHp": X, "statuses": [...] }],\n`; diff --git a/src/systems/integration/sillytavern.js b/src/systems/integration/sillytavern.js index b4171c2..df33570 100644 --- a/src/systems/integration/sillytavern.js +++ b/src/systems/integration/sillytavern.js @@ -156,7 +156,8 @@ export async function onMessageReceived(data) { // console.log('[RPG Companion] Stored RPG data for swipe', currentSwipeId); // If there's no committed data yet (first time generating), automatically commit - if (!committedTrackerData.userStats && !committedTrackerData.infoBox && !committedTrackerData.characterThoughts) { + // BUT: Only commit if this is NOT a swipe (same logic as separate mode) + if (!lastActionWasSwipe && !committedTrackerData.userStats && !committedTrackerData.infoBox && !committedTrackerData.characterThoughts) { committedTrackerData.userStats = parsedData.userStats; committedTrackerData.infoBox = parsedData.infoBox; committedTrackerData.characterThoughts = parsedData.characterThoughts;