Jump to content

[Help] Add new storytraits


Recommended Posts

you need to instantiate a new Story and register it via AddStoryMod in Stories via Db.Initialize Postfix

example:
 


        [HarmonyPatch(typeof(Db))]
        [HarmonyPatch(nameof(Db.Initialize))]
        public static class AddCustomStory
        {
            static void Postfix()
            {
                var yourStoryTrait = new Story("{StoryID}", "storytraits/{templateFileName}", -1)
                    .SetKeepsake("keepsake_test"); ///if you add any keepsake
                Db.Get().Stories.AddStoryMod(yourStoryTrait);
            }
        }

 

6 hours ago, SGT_Imalas said:

you need to instantiate a new Story and register it via AddStoryMod in Stories via Db.Initialize Postfix

example:
 


        [HarmonyPatch(typeof(Db))]
        [HarmonyPatch(nameof(Db.Initialize))]
        public static class AddCustomStory
        {
            static void Postfix()
            {
                var yourStoryTrait = new Story("{StoryID}", "storytraits/{templateFileName}", -1)
                    .SetKeepsake("keepsake_test"); ///if you add any keepsake
                Db.Get().Stories.AddStoryMod(yourStoryTrait);
            }
        }

 

Amazing!!! It seems work, but I still get some errors. I will try my best to fix it. Thank you very mutch. :love_heart: :love_heart: :love_heart:

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...