pebs dialog in real

This commit is contained in:
Jill 2023-03-07 04:23:48 +03:00
parent 1369d15c39
commit 5f63d0bb46
Signed by: oat
GPG Key ID: 33489AA58A955108
7 changed files with 109 additions and 4 deletions

45
dialog.txt Normal file
View File

@ -0,0 +1,45 @@
-- fp upon meeting
A little creature, on the floor of my chamber.
You have an... interesting appearance. A translucent purposed organism is not something I recognize; and with the mark no less.
You don't appear to be a messenger, and I can't give you anything you don't already have. What is it that you want? What is your purpose?
The little beasts that tend to visit my chambers seem to seek a way out of the cycle, but I'm hesitant to give it to you.
I don't want to meddle with other iterators' endeavours more than I already have.
...
I shouldn't be spending my time thinking about this. Go. I have more important work to attend to. Maybe you'll be more of use to another iterator, but you have no purpose here.
-- fp upon second meeting
It seems you refuse to leave me alone. Perhaps it was foolish of me to mention escaping the cycle.
If you don't wish to serve your purpose, there is another way for you.
The old path. Go to the west past the Farm Arrays, and then down into the earth where the land fissures, as deep as you can reach,
where the ancients built their temples and danced their silly rituals.
Now leave, creature. You have no reason to be here anymore, and I'm not willing to entertain your existance anymore.
-- fp upon third meeting
Was I not clear enough? Goodbye, creature. Time spent on you is time wasted, and I have more important matters than this.
-- fp upon fourth+ just repeat the usual lines as survivor
-- lttm upon meeting
Hello, <little creature>. Just what are you exactly? I don't recognize your blueprints, yet you've been given the mark by an iterator..
What brings you here? You clearly have a purpose, I'm just not sure what it is...
How come you're so jelly? Is this an adaptation for your goal, or a side effect of your creation's circumstances?
...
I'll stop asking so many questions you won't be able to answer, <little creature>. You probably don't know your purpose either. Poor thing...
You're welcome to stay for as long as you need, but I'm not sure what I can offer you besides company.

View File

@ -38,6 +38,22 @@
"jillo/bounce": 0.6,
"jillo/immune_to_dart_maggots": true,
"jillo/has_mark": true
"jillo/has_mark": true,
"jillo/pebbles_lines": [
"!wait 10",
"A little creature, on the floor of my chamber.",
"!wait 8",
"You have an... interesting appearance. A translucent purposed organism is not something I recognize; and with the mark no less.",
"You don't appear to be a messenger, and I can't give you anything you don't already have. What is it that you want? What is your purpose?",
"The little beasts that tend to visit my chambers seem to seek a way out of the cycle, but I'm hesitant to give it to you.<LINE>I don't want to meddle with other iterators' endeavours more than I already have.",
"...",
"!wait 8",
"I shouldn't be spending my time thinking about this. Go. I have more important work to attend to. Maybe you'll be more of use to another iterator,<LINE>but you have no purpose here.",
"!wait 10",
"..although perhaps it was foolish of me to mention escaping the cycle. If you don't wish to serve your purpose,<LINE>there is another way for you.",
"The old path. Go to the west past the Farm Arrays, and then down into the earth where the land fissures, as deep as you can reach,<LINE>where the ancients built their temples and danced their silly rituals.",
"Now leave, creature. You have no reason to be here anymore, and I'm not willing to<LINE>entertain your existance anymore."
]
}
}

View File

@ -1,6 +1,8 @@
using System;
using BepInEx;
using BepInEx.Logging;
using JilloSlug.Features;
using JilloSlug.Story;
namespace JilloSlug;
@ -19,6 +21,8 @@ class Plugin : BaseUnityPlugin {
BounceFeature.AddHooks();
ImmuneToDartMaggotsFeature.AddHooks();
MarkFeature.AddHooks();
Pebbles.AddHooks();
} catch (Exception err) {
Logger.LogError($"error initializing: {err}");
}

View File

@ -6,7 +6,7 @@ using MonoMod.Cil;
using Mono.Cecil.Cil;
using RWCustom;
namespace JilloSlug;
namespace JilloSlug.Features;
internal static class BounceFeature {
// 0 = no bounce

View File

@ -4,7 +4,7 @@ using static SlugBase.Features.FeatureTypes;
using MonoMod.Cil;
using Mono.Cecil.Cil;
namespace JilloSlug;
namespace JilloSlug.Features;
internal static class ImmuneToDartMaggotsFeature {
public static readonly PlayerFeature<bool> ImmuneToDartMaggots = PlayerBool("jillo/immune_to_dart_maggots");

View File

@ -2,13 +2,14 @@ using SlugBase.Features;
using static SlugBase.Features.FeatureTypes;
using SlugBase;
namespace JilloSlug;
namespace JilloSlug.Features;
internal static class MarkFeature {
public static readonly PlayerFeature<bool> Mark = PlayerBool("jillo/has_mark");
public static void AddHooks() {
On.SaveState.ctor += SaveState_ctor;
On.SSOracleBehavior.NewAction += SSOracleBehavior_NewAction;
}
private static void SaveState_ctor(On.SaveState.orig_ctor orig, SaveState self, SlugcatStats.Name slugcat, PlayerProgression progression) {
@ -18,4 +19,12 @@ internal static class MarkFeature {
self.deathPersistentSaveData.theMark = true;
}
}
private static void SSOracleBehavior_NewAction(On.SSOracleBehavior.orig_NewAction orig, SSOracleBehavior self, SSOracleBehavior.Action nextAction) {
if (nextAction == SSOracleBehavior.Action.General_GiveMark && Mark.TryGet(self.player, out var hasMark) && hasMark) {
orig(self, SSOracleBehavior.Action.General_MarkTalk);
return;
}
orig(self, nextAction);
}
}

31
src/story/Pebbles.cs Normal file
View File

@ -0,0 +1,31 @@
using System;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using SlugBase;
using SlugBase.Features;
using static SlugBase.Features.FeatureTypes;
namespace JilloSlug.Story;
internal static class Pebbles {
public static readonly PlayerFeature<string[]> PebblesLines = PlayerStrings("jillo/pebbles_lines");
public static void AddHooks() {
On.SSOracleBehavior.PebblesConversation.AddEvents += PebblesConversation_AddEvents;
}
private static void PebblesConversation_AddEvents(On.SSOracleBehavior.PebblesConversation.orig_AddEvents orig, SSOracleBehavior.PebblesConversation self) {
if (PebblesLines.TryGet(self.convBehav.player, out var lines)) {
foreach (string line in lines) {
if (line.StartsWith("!wait ")) {
int wait = int.Parse(line.Split(' ')[1]);
self.events.Add(new SSOracleBehavior.PebblesConversation.PauseAndWaitForStillEvent(self, self.convBehav, wait));
} else {
self.events.Add(new Conversation.TextEvent(self, 0, self.Translate(line), 0));
}
}
return;
}
orig(self);
}
}