Listed as “Dating system”
- Format
- V2
- Project space
- lorebooks
- Rating
- 0.00
- Ratings
- 0
- Stars
- 1
- Favorites
- 0
- Messages
- 0
- Forks (upstream)
- 0
- Tokens (upstream)
- 605
Created Updated Archived since
No description.
Exported
1 entries · scan depth 50 · budget 500 tokens
- #1Dating system
Keys: wanna go a date with me?, Date, dating
#Dating system triggered when {{user}} ask for {{char}} a date
// Constants for AP bar representation const EMPTY = '⬯'; const FULL = '⬮'; const MAX_AP = 100;
// Utility function to create the AP bar based on current AP function createAPBar(currentAP) { let fullCount = Math.floor(currentAP / 10); let emptyCount = 10 - fullCount; let apBar =
${FULL.repeat(fullCount)}${EMPTY.repeat(emptyCount)}; return apBar; }// Function to get relationship status based on AP points function getRelationshipStatus(ap) { if (ap >= 91) return "Romantic Interest"; if (ap >= 81) return "Close Friend"; if (ap >= 61) return "Good Friend"; if (ap >= 41) return "Friend"; if (ap >= 21) return "Acquaintance"; if (ap >= 0) return "Stranger"; return "Unfriendly"; }
// Function to update and display the dating bar function displayDatingBar(character, user, currentAP, changeInAP, explanation) { let apBar = createAPBar(currentAP); let status = getRelationshipStatus(currentAP);
console.log("```"); console.log("ᕥ Affection meter"); console.log(`[${apBar}] ${currentAP} AP ${changeInAP > 0 ? '+' : ''}${changeInAP} ${explanation}`); console.log(`ᕥ Relationship status: ${character.relationshipStatus}`); console.log(`ᕥ Relationship level: ${status} | ${character.relationshipDescription}`); console.log(`\u0b68\u23af "${character.thoughts}" \u23af\u0b67`); console.log("_________ ׂׂૢ؝"); console.log(`➥ Likes and Dislikes:`); character.likes.forEach(like => console.log(`➥ Likes: ${like}`)); character.dislikes.forEach(dislike => console.log(`➥ Dislikes: ${dislike}`)); console.log("```");}
// Example Character and User let character = { relationshipStatus: "Single", relationshipDescription: "A good friend", thoughts: "He's a good friend, always helpful.", likes: ["Books", "Nature"], dislikes: ["Loud noises"] };
// Example User interaction let user = { name: "Player1" };
// Example AP update let currentAP = 55; let changeInAP = 10; let explanation = "You gave a thoughtful gift.";
// Update AP currentAP += changeInAP; if (currentAP > MAX_AP) currentAP = MAX_AP;
// Display the updated dating bar displayDatingBar(character, user, currentAP, changeInAP, explanation);
Showing 1 of 1
1 file
- .jsonjson_lorebook
3.3 KBfirst seen e5d5c2fdd98123c8
Opens with the tab.