From 77c9333eef935b3d392b54691931e8616b149cd4 Mon Sep 17 00:00:00 2001 From: "Z. Cliffe Schreuders" Date: Sun, 9 Nov 2025 20:41:06 +0000 Subject: [PATCH] feat(npc): Enhance patrol and personal space behavior descriptions --- scenarios/ink/test-patrol-toggle.ink | 2 +- scenarios/ink/test-patrol-toggle.json | 1 + scenarios/ink/test-personal-space-toggle.ink | 4 ++-- scenarios/ink/test-personal-space-toggle.json | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 scenarios/ink/test-patrol-toggle.json create mode 100644 scenarios/ink/test-personal-space-toggle.json diff --git a/scenarios/ink/test-patrol-toggle.ink b/scenarios/ink/test-patrol-toggle.ink index 516ca0b..5297a54 100644 --- a/scenarios/ink/test-patrol-toggle.ink +++ b/scenarios/ink/test-patrol-toggle.ink @@ -54,7 +54,7 @@ Current status: {is_patrolling: I'm currently walking around randomly within my patrol area. -- +- else: I'm currently stationary, just facing you when you approach. } -> hub diff --git a/scenarios/ink/test-patrol-toggle.json b/scenarios/ink/test-patrol-toggle.json new file mode 100644 index 0000000..4a255a8 --- /dev/null +++ b/scenarios/ink/test-patrol-toggle.json @@ -0,0 +1 @@ +{"inkVersion":21,"root":[[["done",{"#n":"g-0"}],null],"done",{"start":["#","^speaker:npc","/#","^Hi! I'm the patrol toggle test NPC.","\n","^Right now I'm ","ev",{"VAR?":"is_patrolling"},"/ev",[{"->":".^.b","c":true},{"b":["^ patrolling around ",{"->":"start.11"},null]}],[{"->":".^.b"},{"b":["^ standing still",{"->":"start.11"},null]}],"nop","^.","\n",{"->":"hub"},null],"hub":[["ev","str","^Start patrolling","/str","/ev",{"*":".^.c-0","flg":20},"ev","str","^Stop patrolling","/str","/ev",{"*":".^.c-1","flg":20},"ev","str","^Check status","/str","/ev",{"*":".^.c-2","flg":20},"ev","str","^Exit","/str","/ev",{"*":".^.c-3","flg":4},{"c-0":["\n",{"->":"start_patrol"},{"#f":5}],"c-1":["\n",{"->":"stop_patrol"},{"#f":5}],"c-2":["\n",{"->":"check_status"},{"#f":5}],"c-3":["^ ","#","^exit_conversation","/#","\n","#","^speaker:npc","/#","^See you later!","\n",{"->":"hub"},null]}],null],"start_patrol":["#","^speaker:npc","/#","#","^patrol_mode:on","/#","ev",true,"/ev",{"VAR=":"is_patrolling","re":true},"^Okay, I'll start patrolling my area now!","\n","^Watch me walk around. I'll still face you if you approach while I'm patrolling.","\n",{"->":"hub"},null],"stop_patrol":["#","^speaker:npc","/#","#","^patrol_mode:off","/#","ev",false,"/ev",{"VAR=":"is_patrolling","re":true},"^Alright, I'll stop patrolling and stay in one place.","\n",{"->":"hub"},null],"check_status":[["#","^speaker:npc","/#","^Current status:","\n",["^Patrolling: ","ev",{"VAR?":"is_patrolling"},"/ev",[{"->":".^.b","c":true},{"b":["^ YES ",{"->":".^.^.^.6"},null]}],[{"->":".^.b"},{"b":["^ NO",{"->":".^.^.^.6"},null]}],"nop","\n",["^Face Player: ENABLED","\n",["^Patrol bounds: 3x3 tiles around my starting position","\n","ev",{"VAR?":"is_patrolling"},"/ev",[{"->":".^.b","c":true},{"b":["\n","^I'm currently walking around randomly within my patrol area.","\n",{"->":".^.^.^.7"},null]}],[{"->":".^.b"},{"b":["\n","^I'm currently stationary, just facing you when you approach.","\n",{"->":".^.^.^.7"},null]}],"nop","\n",{"->":"hub"},{"#n":"g-2"}],{"#n":"g-1"}],{"#n":"g-0"}],null],null],"global decl":["ev",false,{"VAR=":"is_patrolling"},"/ev","end",null]}],"listDefs":{}} \ No newline at end of file diff --git a/scenarios/ink/test-personal-space-toggle.ink b/scenarios/ink/test-personal-space-toggle.ink index 00f699c..9b9eb90 100644 --- a/scenarios/ink/test-personal-space-toggle.ink +++ b/scenarios/ink/test-personal-space-toggle.ink @@ -12,7 +12,7 @@ Hi! I'm the personal space toggle test NPC. Right now I have personal space enabled ({personal_space_distance}px). If you get too close, I'll back away while still facing you. -- +- else: Right now I don't mind how close you get. I'll just turn to face you when you approach. @@ -98,7 +98,7 @@ Current status: I back away in small 5px increments, so it's a gentle retreat. If there's a wall behind me, I'll stop backing and just face you instead. -- +- else: Personal space is off, so I won't back away at all. I'll just turn to face you when you're nearby. diff --git a/scenarios/ink/test-personal-space-toggle.json b/scenarios/ink/test-personal-space-toggle.json new file mode 100644 index 0000000..8d0f726 --- /dev/null +++ b/scenarios/ink/test-personal-space-toggle.json @@ -0,0 +1 @@ +{"inkVersion":21,"root":[[["done",{"#n":"g-0"}],null],"done",{"start":["#","^speaker:npc","/#","^Hi! I'm the personal space toggle test NPC.","\n","ev",{"VAR?":"personal_space_enabled"},"/ev",[{"->":".^.b","c":true},{"b":["\n","^Right now I have personal space enabled (","ev",{"VAR?":"personal_space_distance"},"out","/ev","^px).","\n","^If you get too close, I'll back away while still facing you.","\n",{"->":"start.10"},null]}],[{"->":".^.b"},{"b":["\n","^Right now I don't mind how close you get.","\n","^I'll just turn to face you when you approach.","\n",{"->":"start.10"},null]}],"nop","\n",{"->":"hub"},null],"hub":[["ev","str","^Enable personal space (48px)","/str","/ev",{"*":".^.c-0","flg":20},"ev","str","^Enable personal space (64px)","/str","/ev",{"*":".^.c-1","flg":20},"ev","str","^Enable personal space (96px)","/str","/ev",{"*":".^.c-2","flg":20},"ev","str","^Disable personal space","/str","/ev",{"*":".^.c-3","flg":20},"ev","str","^Check status","/str","/ev",{"*":".^.c-4","flg":20},"ev","str","^Exit","/str","/ev",{"*":".^.c-5","flg":4},{"c-0":["\n",{"->":"enable_small"},{"#f":5}],"c-1":["\n",{"->":"enable_medium"},{"#f":5}],"c-2":["\n",{"->":"enable_large"},{"#f":5}],"c-3":["\n",{"->":"disable_space"},{"#f":5}],"c-4":["\n",{"->":"check_status"},{"#f":5}],"c-5":["^ ","#","^exit_conversation","/#","\n","#","^speaker:npc","/#","ev",{"VAR?":"personal_space_enabled"},"/ev",[{"->":".^.b","c":true},{"b":["^ Don't get too close! ",{"->":".^.^.^.13"},null]}],[{"->":".^.b"},{"b":["^ Come back anytime!",{"->":".^.^.^.13"},null]}],"nop","\n",{"->":"hub"},null]}],null],"enable_small":["#","^speaker:npc","/#","#","^personal_space:48","/#","ev",true,"/ev",{"VAR=":"personal_space_enabled","re":true},"ev",48,"/ev",{"VAR=":"personal_space_distance","re":true},"^Okay, I'll back away if you get within 48 pixels (1.5 tiles).","\n","^That's pretty close - I like my personal bubble small.","\n",{"->":"hub"},null],"enable_medium":["#","^speaker:npc","/#","#","^personal_space:64","/#","ev",true,"/ev",{"VAR=":"personal_space_enabled","re":true},"ev",64,"/ev",{"VAR=":"personal_space_distance","re":true},"^Alright, I'll need at least 64 pixels (2 tiles) of space.","\n","^This is a comfortable distance for conversation.","\n",{"->":"hub"},null],"enable_large":["#","^speaker:npc","/#","#","^personal_space:96","/#","ev",true,"/ev",{"VAR=":"personal_space_enabled","re":true},"ev",96,"/ev",{"VAR=":"personal_space_distance","re":true},"^I need a lot of space! I'll back away if you're within 96 pixels (3 tiles).","\n","^I'm a bit shy, please don't crowd me.","\n",{"->":"hub"},null],"disable_space":["#","^speaker:npc","/#","#","^personal_space:0","/#","ev",false,"/ev",{"VAR=":"personal_space_enabled","re":true},"ev",0,"/ev",{"VAR=":"personal_space_distance","re":true},"^Personal space disabled! You can get as close as you want.","\n","^I won't back away anymore, just turn to face you.","\n",{"->":"hub"},null],"check_status":[["#","^speaker:npc","/#","^Current status:","\n",["^Personal Space: ","ev",{"VAR?":"personal_space_enabled"},"/ev",[{"->":".^.b","c":true},{"b":["^ ENABLED (","ev",{"VAR?":"personal_space_distance"},"out","/ev","^px) ",{"->":".^.^.^.6"},null]}],[{"->":".^.b"},{"b":["^ DISABLED",{"->":".^.^.^.6"},null]}],"nop","\n",["^Face Player: ENABLED","\n","ev",{"VAR?":"personal_space_enabled"},"/ev",[{"->":".^.b","c":true},{"b":["\n","^If you approach within ","ev",{"VAR?":"personal_space_distance"},"out","/ev","^ pixels, I'll slowly back away while facing you.","\n","^I back away in small 5px increments, so it's a gentle retreat.","\n","^If there's a wall behind me, I'll stop backing and just face you instead.","\n",{"->":".^.^.^.7"},null]}],[{"->":".^.b"},{"b":["\n","^Personal space is off, so I won't back away at all.","\n","^I'll just turn to face you when you're nearby.","\n",{"->":".^.^.^.7"},null]}],"nop","\n",{"->":"hub"},{"#n":"g-1"}],{"#n":"g-0"}],null],null],"global decl":["ev",false,{"VAR=":"personal_space_enabled"},0,{"VAR=":"personal_space_distance"},"/ev","end",null]}],"listDefs":{}} \ No newline at end of file