diff --git a/dialog.txt b/dialog.txt new file mode 100644 index 0000000..66684df --- /dev/null +++ b/dialog.txt @@ -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, . 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, . 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. \ No newline at end of file diff --git a/mod/slugbase/jillo.json b/mod/slugbase/jillo.json index ceab8b9..2296885 100644 --- a/mod/slugbase/jillo.json +++ b/mod/slugbase/jillo.json @@ -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.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,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,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 toentertain your existance anymore." + ] } } \ No newline at end of file diff --git a/src/Plugin.cs b/src/Plugin.cs index c00f102..88e142e 100644 --- a/src/Plugin.cs +++ b/src/Plugin.cs @@ -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}"); } diff --git a/src/features/BounceFeature.cs b/src/features/BounceFeature.cs index de2eba9..27dd241 100644 --- a/src/features/BounceFeature.cs +++ b/src/features/BounceFeature.cs @@ -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 diff --git a/src/features/ImmuneToDartMaggotsFeature.cs b/src/features/ImmuneToDartMaggotsFeature.cs index 9c4dac4..3ef12b9 100644 --- a/src/features/ImmuneToDartMaggotsFeature.cs +++ b/src/features/ImmuneToDartMaggotsFeature.cs @@ -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 ImmuneToDartMaggots = PlayerBool("jillo/immune_to_dart_maggots"); diff --git a/src/features/MarkFeature.cs b/src/features/MarkFeature.cs index 3007dce..640ab40 100644 --- a/src/features/MarkFeature.cs +++ b/src/features/MarkFeature.cs @@ -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 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); + } } diff --git a/src/story/Pebbles.cs b/src/story/Pebbles.cs new file mode 100644 index 0000000..c2dbd97 --- /dev/null +++ b/src/story/Pebbles.cs @@ -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 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); + } +}