updated lite

This commit is contained in:
Concedo 2024-11-26 21:05:28 +08:00
parent 288cd4cf10
commit fdfb9b33d7

View file

@ -49,6 +49,7 @@ Current version indicated by LITEVER below.
--img_nikosquare:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAADxQTFRFS2Si+X5+pmBfHyApLjZSS2SjP057Vzw5EA4Sf1ZT+9Sv1WpqnYx/7qaYw7vUAAAAS2Sj9PPzgnrLS2SjAzrF9gAAABR0Uk5T///////w////////////AKj//yMlHqVpAAAD3klEQVR4nKWXi7KjIAyGFSgxEjhV3/9d90+8onZPd810prWSDwi50fyoTNP7/X79g2D4NJlqo+rvV/Mf8npPM2B6/4+6ihKaB/pGaH4e6IPw00y3+48xhBC3J32Id+NeUzN9UPfer4RoD/eIqbnuwLS7zncLAfqdPvvDmvY9XAE6vuuImEAw8fNT1/kr4Qqw+YhdIocfJl0glxyTvyG8m7MNY1B9diAkmgGUODnH7Km7AF53AGEjUJtWYdUPzn0LyC6AQO0qCUCi1PKXAM5tCwXeAC0ROf36AqA2VACmbQ8yP9DVimeA6lPKkLaW3EPylXAARBXV701OhOVPI6hcAXH1mTyP7e8AMyEc4mQDzP7XrfOfl5D7ndAdfXID6NwMyXACEpEbgPTCLJn1hEGoAep/OKheQiCEEhj1HgBQX1ZxQMPLlyVsABwejkp8EGEQAkxRA4RgIRYhTxme1fkKoBZwAHjLA+b/cgLQ8gZ4gZ+tVtgAnboaa+Lg0IwRhBqAmX0cI0WFqHN3FUAXAOPpzIWhPzZYQgUAu4ljiaKTaKwtZtwAIdv8XkocR9+UYM5/BMTRxzJKsWEu+RPAAsBxKSWWgTHS18cofiwhlCJD4cApUb0CNWKA/5dhwAqKD2UIXAEoFgUMkIJTCCcjzkGE890BQhXA685WQNqD6ujKWDRhhI7EdKUCtKSGxd8ASEr+6sqNApKPeD/iFEpT6nAUcAMgMmBzqwVPg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ORK5CYII=");
--img_paper:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAAnQAAAJ0Bj3LnbgAAAB5QTFRF+OmvAAAA89Ze14Rw2cCY1k8/8eGhmEQ/+uqj87Jse3RL9AAAAAp0Uk5T/wD49//9of8rH/vnQeUAAAEOSURBVHicXdG9asMwFAXggx1COmoJ8VgNptkKcmqyGaKSB0i127RkLiTgNV2CVxMo9G177rVSm2ow0se5Vz/Gbdub6YBz2//w0sV59s0wbs5X806X1j4JFN4Bx45La9eE7OM1PANIBHKCuW7CAYgkkIWgEaWeYN5DjHA0AthIZF8ILAgrpBJJ21N1hyGCXXvGA2EJibxJQaVwgUQKlNIkj5AePNKyrWAJtYS952dH6AlpJaQViW3AXc/shlnZFoRHAhd6hpkjrLGEl7lShFKuphXgA0B23WtF+UmwCjy1VijUw70H4iPeH0KaIMl/DKZjIf/lWo/QCJjVSAMYUoSvCH80gjHdEZibCQjJJuYXZ+xAP6Rjil4AAAAASUVORK5CYII=");
--img_dice:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAAnQAAAJ0Bj3LnbgAAAGlQTFRF2gA3AAAArgAs9O7ptwAu2gI45Fp63y5a8+rm8t3czgA0xgAy3RtM7bG74Txk53qSsQAttQAurwAs8dLU6Yyf3tfT5WmFsAAs2gA3wqqrsBM6uhxD2gA32wA22gA30hdGsiRHt1Rq2gA3GZfQSAAAACN0Uk5T/wD//////////////////3QL3f////+22v///3AK+v///7M1XKlYAAABCElEQVR4nKWT63rCIAyG2xCggD1bD1On7v4vcgnForWVZ8++P22SF5JAyPKEsjy/nA/f2VwOALqmZeDy8xZlWSRk3xJwXowTQQA0BBzY2ujNa5gcPgsBnH/XF6aWMSxrU/Q7TkIA470QotAR0AU5+usEeFuoCCjhV+C0g2FHFYGKbcNVjEBW0xbb5xq2tEHNjQRAalU9xclRKU0OfABr+jsgVVkq+QFQ1I5RH4CS2yv/AyRTJIucKZ7kilzqqDFxWXacB7d63acRALsyMMMtAGgXR244fgUAwC0M7XC8wwh09MHrbOzt6cbr/dg3/APobIw6hCB+OO0+GPgQTPJPL2+bDhYVHm9Cv52hDBGSdP+eAAAAAElFTkSuQmCC");
--img_chat:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAA7AAAAOwBeShxvQAAADxQTFRFkcPmAAAAkcPmstXukL/ltNbueJGic4aTibLQkcPmvtzwpM7qmazZkcPm5vL5ps/ruNnw0uf1udD/////pH/0JgAAABR0Uk5T/wBl/xH0////Qrz8Bltj6diDAgFfSBG4AAAAzklEQVR4nL3TQQ6EIAwF0BYLSBFl9P53HUFhVKru5i/QpC+2CRWQOOpLIo9YAqQ9tJmqAJbqAFyBFuugK+hk0P0b9Mb05/MCjLUGwOZzexeBuQe9senjdmth2xbykEoFR89gJfQClHsD4eGyMlDAMmCkHYziPvixAhzjvlO+K9FxXShXAOKcB/VMJTPWegaYgP/gLwOVegVTqishO9i2+Bbw/h+Eth7g0LkOdog7AWoBnQDS5RvpuvGcZcjZ4JIWBuXkbvgAkMILWOdx6fEFbukIF0RE9j4AAAAASUVORK5CYII=");
--img_compass:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAA7AAAAOwBeShxvQAAADxQTFRF/7VV/+J5AAAA8/P11Ob1l8jt/39K+chs/9tn/8Bd/+J48eTO/9x0/9Zv99ugiHp0/5MKWVFO/6k53KWUcJJTdwAAABR0Uk5T/v8A//////8Zydn/klf///v/bf9A3eYXAAABMUlEQVR4nG2T2RaDIAwFUwEBWdz+/18LuSypNS8enTGQQGgZ4VKMW4kYHb9fnnxaaOC4fUZsxbmoxHFRx5/f2BJRkY4Dgts+f2F9AU0Q3Aol9Qyd56DUvisVMlw6Dt5D5wVDKArzusdaBfaXlZqCUrlyiksRnORKt6dioRRCSND5CK1Z8Au5vn5Y1yy4zkhBaSRYS9yh85YiURwF3CtHbhwpPHGN/FuAsN7gOjwF1bhpAtYg7tnO5Wdww8Z+nn+CapyFswtiibJN5sbIJaQQGjdyk7PMWr8RRisziU7zj0OwaBRaPTkU0ep5WPo3+mGN437wedxIYS2+n7vkvl4YvnLl3Qb0Z1TICRZcWvg2Q8B1A8dkJXqNtHTh3cCE9tHzT+zB5/Am/4aFUAe4OT66+fULsfQP1birKzkAAAAASUVORK5CYII=");
--img_save:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAAnQAAAJ0Bj3LnbgAAADxQTFRFQlFtSVp52uHyws7lztbmjpmuUdjlu8TZeIminqi9WvH/rrjNVMbYxuT0Xm2HAAAAR1h3RVVyR1ZyR1h2eZplWQAAABR0Uk5T////////////////////ANT0HUjqAr+PAAAAgUlEQVR4nI3Q2RaDIAxF0RuCDNUWKP//ryXFWkUczmP2ghVAjkTklOQAvLT28R1CgMwbQCoC6oBIH4ocAOIR4BYoZtZboOHbKHlaQw3rTsFNNVObFjCP2gzmGvhZ47k/qOUdW7An4IdfDbAt+dLYgJbkR+zdq/YnYn+rhBxT2kPKH1FvCKEBnt/sAAAAAElFTkSuQmCC");
@ -314,6 +315,10 @@ Current version indicated by LITEVER below.
{
content:var(--img_paper);
}
.input_dice
{
content:var(--img_dice);
}
.input_chat
{
content:var(--img_chat);
@ -1890,13 +1895,18 @@ Current version indicated by LITEVER below.
background-repeat: no-repeat !important;
background-position: center !important;
}
.chat_btnmode_adventure.storymode
{
background-image: var(--img_paper) !important;
}
.chat_btnmode_adventure.actionmode
{
background-image: var(--img_sword) !important;
}
.chat_btnmode_adventure.storymode
.chat_btnmode_adventure.dicemode
{
background-image: var(--img_paper) !important;
background-image: var(--img_dice) !important;
}
.chat_msg_send_btn {
@ -2632,7 +2642,7 @@ Current version indicated by LITEVER below.
"prefmodel2":adventuremodels2,
"prompt":"The last thing you remembered was a loud screech. You tried to move, to get out of the way, but it was too late. You felt a sickening impact, and then everything went black.\n\nYou open your eyes, and suddenly find that you're no longer on the street. You're clearly unharmed, but you feel... different. In fact, you quickly realize you're in a strange place unlike anywhere you've ever known.",
"adventure_context_mod":false,
"adventure_is_action":true,
"adventure_switch_mode":1,
"memory": `[Interactive Fiction: Game Mode Enabled]\n[You are playing a choose-your-own-adventure game. Please input action.][This is a fantasy isekai adventure. Are you the Chosen One? After being hit by a truck, you somehow find yourself transported to a mystical fantasy world full of magic and adventure.]`,
"authorsnote": "",
"worldinfo": []
@ -2646,7 +2656,7 @@ Current version indicated by LITEVER below.
"prefmodel2":adventuremodels2,
"prompt":`It's been a few days since you joined the Adventurer's Guild, and you're preparing for your first dungeon delve, accompanied by your party of adventurers.\n\nAfter a few days of traveling, your party finally arrives at the mystic dungeon. You're filled with anticipation as you approach. The dungeon entrance stands before you, dark and foreboding. The stone walls are slick with moisture, and the air smells of mold and decay.`,
"adventure_context_mod":false,
"adventure_is_action":true,
"adventure_switch_mode":1,
"memory": `[Interactive Fiction: Game Mode Enabled]\n[You are playing a choose-your-own-adventure game. Please input action.][You delve into dangerous magical dungeons full of monsters in your quest for treasure and riches.]`,
"authorsnote": "",
"worldinfo": []
@ -2660,7 +2670,7 @@ Current version indicated by LITEVER below.
"prefmodel2":adventuremodels2,
"prompt":`The year is 2038. A full scale global thermonuclear exchange has wiped out nearly all of the world population, and left most cities as radioactive wastelands. Running out of supplies, you must leave your bunker and scavenge to find a new home in the ruins of civilization.\n\nEmerging from your shelter, you squint as the harsh sunlight blinds you. For a moment, you're disoriented, your eyes struggling to adjust to the brightness of the new world outside. As your vision clears, you step forward, and take in the barren wasteland that stretches out before you.`,
"adventure_context_mod":false,
"adventure_is_action":true,
"adventure_switch_mode":1,
"memory": `[Interactive Fiction: Game Mode Enabled]\n[You are playing a choose-your-own-adventure game. Please input action.]\n`,
"authorsnote": "",
"worldinfo": []
@ -2985,7 +2995,7 @@ Current version indicated by LITEVER below.
"prefmodel2":adventuremodels2,
"prompt":`You and your sister Megan were enjoying a sailing vacation in the tropics, when your yacht got caught in the worst thunderstorm of your life. After a harrowing escape as your boat capsized and sank, you now find yourself shipwrecked on a deserted island.\n\nAs you struggle to get up, tasting the salty sea breeze and brushing the coarse sand off your body, you see your sister laying on the beach a short distance away, unconscious but alive.`,
"adventure_context_mod":false,
"adventure_is_action":true,
"adventure_switch_mode":1,
"memory": `[Interactive Fiction: Game Mode Enabled]\n[You are playing a choose-your-own-adventure game. Please input action.]\n`,
"authorsnote": "",
"worldinfo": []
@ -4359,7 +4369,7 @@ Current version indicated by LITEVER below.
eos_ban_mode: 0, //allow the EOS token when using locally 0=auto,1=unban,2=ban,3=bypass
token_count_multiplier: 100, //100 means 1x
opmode: 4, //what mode are we in? 1=story, 2=adventure, 3=chat, 4=instruct
adventure_is_action: false, //in adventure mode, determine story or action
adventure_switch_mode: 0, //in adventure mode, determine story=0, action=1 or roll=2
adventure_context_mod: true, //extra injection for adventure mode
fix_alpaca_leak: true, //prevents leaking when Alpaca instruct format is used on crappy models
chat_context_mod: true, //extra injection for chat mode
@ -4413,7 +4423,6 @@ Current version indicated by LITEVER below.
inject_timestamps: false,
inject_chatnames_instruct: false,
inject_jailbreak_instruct: false,
adventure_dicemode: false,
idle_responses: 0,
idle_duration: 60,
export_settings: true, //affects if settings are included with the story and sharelinks
@ -7035,7 +7044,7 @@ Current version indicated by LITEVER below.
"desc":data.description?data.description:"",
"opmode":2,
"adventure_context_mod":false,
"adventure_is_action":true,
"adventure_switch_mode":1,
"prefmodel1":adventuremodels1,
"prefmodel2":adventuremodels2,
"prompt":data.promptContent?data.promptContent:"",
@ -7723,13 +7732,9 @@ Current version indicated by LITEVER below.
localsettings.adventure_context_mod = false;
}
if(temp_scenario.adventure_is_action===true)
if(temp_scenario.adventure_switch_mode===0 || temp_scenario.adventure_switch_mode===1 || temp_scenario.adventure_switch_mode===2)
{
localsettings.adventure_is_action = true;
}
else if(temp_scenario.adventure_is_action===false)
{
localsettings.adventure_is_action = false;
localsettings.adventure_switch_mode = temp_scenario.adventure_switch_mode;
}
}
if (temp_scenario.opmode == 3) {
@ -10307,7 +10312,6 @@ Current version indicated by LITEVER below.
document.getElementById("inject_timestamps").checked = localsettings.inject_timestamps;
document.getElementById("inject_chatnames_instruct").checked = localsettings.inject_chatnames_instruct;
document.getElementById("inject_jailbreak_instruct").checked = localsettings.inject_jailbreak_instruct;
document.getElementById("adventure_dicemode").checked = localsettings.adventure_dicemode;
document.getElementById("idle_responses").value = localsettings.idle_responses;
document.getElementById("idle_duration").value = localsettings.idle_duration;
document.getElementById("fix_alpaca_leak").checked = localsettings.fix_alpaca_leak;
@ -10629,7 +10633,6 @@ Current version indicated by LITEVER below.
localsettings.inject_timestamps = (document.getElementById("inject_timestamps").checked ? true : false);
localsettings.inject_chatnames_instruct = (document.getElementById("inject_chatnames_instruct").checked ? true : false);
localsettings.inject_jailbreak_instruct = (document.getElementById("inject_jailbreak_instruct").checked ? true : false);
localsettings.adventure_dicemode = (document.getElementById("adventure_dicemode").checked ? true : false);
localsettings.idle_responses = document.getElementById("idle_responses").value;
localsettings.idle_duration = document.getElementById("idle_duration").value;
localsettings.fix_alpaca_leak = (document.getElementById("fix_alpaca_leak").checked ? true : false);
@ -11340,7 +11343,7 @@ Current version indicated by LITEVER below.
image_db = {};
interrogation_db = {};
completed_imgs_meta = {};
localsettings.adventure_is_action = false;
localsettings.adventure_switch_mode = 0;
prev_hl_chunk = null;
gametext_focused = false;
last_token_budget = "";
@ -12321,10 +12324,10 @@ Current version indicated by LITEVER below.
//if chat submitted was empty, add a newline? (or not)
newgen = "";
}
if (localsettings.opmode == 2 && newgen != "" && localsettings.adventure_is_action) {
if (localsettings.opmode == 2 && newgen != "" && localsettings.adventure_switch_mode!=0) {
//append action for adventure mode, except for the first turn.
let diceaddon = "";
if(localsettings.adventure_dicemode)
if(localsettings.adventure_switch_mode==2)
{
let roll = Math.floor(Math.random() * 20) + 1;
let outcome = (roll==20?"Perfect":(roll>16?"Excellent":(roll>12?"Good":(roll>8?"Fair":(roll>4?"Poor":"Terrible")))));
@ -12335,9 +12338,9 @@ Current version indicated by LITEVER below.
//if very first submission is a story in adventure mode, swap to action
if(localsettings.opmode == 2 && newgen != "" && gametext_arr.length==0)
{
if(!localsettings.adventure_is_action)
if(localsettings.adventure_switch_mode==0)
{
localsettings.adventure_is_action = true;
localsettings.adventure_switch_mode = 1;
if (current_memory.trim() == "")
{
doNotGenerate = true;
@ -15820,18 +15823,22 @@ Current version indicated by LITEVER below.
//adventure mode has a toggle to choose action mode
document.getElementById("adventure_mode_img").classList.remove("input_story");
document.getElementById("adventure_mode_img").classList.remove("input_action");
document.getElementById("adventure_mode_img").classList.remove("input_dice");
document.getElementById("btnmode_chat").classList.add("hidden");
document.getElementById("btnmode_adventure").classList.add("hidden");
if(localsettings.opmode==2)
{
document.getElementById("inputrow").classList.add("show_mode");
if(localsettings.adventure_is_action)
if(localsettings.adventure_switch_mode==0)
{
document.getElementById("adventure_mode_txt").innerText = "Story";
document.getElementById("adventure_mode_img").classList.add("input_story");
}else if(localsettings.adventure_switch_mode==1){
document.getElementById("adventure_mode_txt").innerText = "Action";
document.getElementById("adventure_mode_img").classList.add("input_action");
}else{
document.getElementById("adventure_mode_txt").innerText = "Story";
document.getElementById("adventure_mode_img").classList.add("input_story");
document.getElementById("adventure_mode_txt").innerText = "Action\n(Roll)";
document.getElementById("adventure_mode_img").classList.add("input_dice");
}
document.getElementById("btnmode_adventure").classList.remove("hidden");
}
@ -16195,13 +16202,19 @@ Current version indicated by LITEVER below.
{
document.getElementById("chat_btnmode_chat").classList.add("hidden");
document.getElementById("chat_btnmode_adventure").classList.remove("hidden");
if(localsettings.adventure_is_action)
if(localsettings.adventure_switch_mode==0)
{
document.getElementById("chat_btnmode_adventure").classList.remove("actionmode");
document.getElementById("chat_btnmode_adventure").classList.remove("dicemode");
document.getElementById("chat_btnmode_adventure").classList.add("storymode");
}else if(localsettings.adventure_switch_mode==1){
document.getElementById("chat_btnmode_adventure").classList.add("actionmode");
document.getElementById("chat_btnmode_adventure").classList.remove("dicemode");
document.getElementById("chat_btnmode_adventure").classList.remove("storymode");
}else{
document.getElementById("chat_btnmode_adventure").classList.remove("actionmode");
document.getElementById("chat_btnmode_adventure").classList.add("storymode");
document.getElementById("chat_btnmode_adventure").classList.remove("storymode");
document.getElementById("chat_btnmode_adventure").classList.add("dicemode");
}
}
else
@ -17079,7 +17092,7 @@ Current version indicated by LITEVER below.
function btn_adventure_mode()
{
localsettings.adventure_is_action = !localsettings.adventure_is_action;
localsettings.adventure_switch_mode = (localsettings.adventure_switch_mode+1)%3;
render_gametext();
}
@ -18435,7 +18448,7 @@ Current version indicated by LITEVER below.
<div class="">
<div id="inputrow" class="">
<div id="inputrowmode" style="padding-right: 4px;">
<button title="Toggle Adventure Mode" type="button" class="btn btn-primary btn-secondary hidden mainnav" style="line-height: 1.4;" id="btnmode_adventure" onclick="btn_adventure_mode()">
<button title="Toggle Adventure Mode" type="button" class="btn btn-primary btn-secondary hidden mainnav" style="line-height: 1.2;" id="btnmode_adventure" onclick="btn_adventure_mode()">
<img id="adventure_mode_img" class="input_story">
<br><b id="adventure_mode_txt" style="font-size: 10px;">Story</b>
</button>
@ -19169,12 +19182,6 @@ Current version indicated by LITEVER below.
class="helptext">Automatically injects a jailbreak message after every instruct query, to make the AI more likely to obey you.</span></span></div>
<input type="checkbox" title="Assistant Jailbreak" id="inject_jailbreak_instruct" style="margin:0px 0px 0px auto;">
</div>
<div class="settinglabel">
<div class="justifyleft settingsmall">Adventure DiceMode <span class="helpicon">?<span
class="helptext">Allows the AI to roll a dice to determine the outcome of your actions in adventure mode.</span></span></div>
<input type="checkbox" title="Adventure DiceMode" id="adventure_dicemode" style="margin:0px 0px 0px auto;">
</div>
</div>
</div>