Modding Help Custom event freezes game

Discussion in 'Mods' started by stardewbalverines, Sep 30, 2019.

  1. stardewbalverines

    stardewbalverines Scruffy Nerf-Herder

    Hello! I'm trying to learn how to make custom events for my NPCs that I've made. I can get the event to trigger, but then it just sits there and freezes the game. What am I doing wrong?

    "35391291/f Cecilia 500/t 1900 2400/w rainy": "nightTime/-1000 -1000/farmer 10 21 0 Cecilia 15 13 2/skippable/pause 800/showFrame Cecilia 16/viewport 16 15 true/pause 500/move farmer 0 -5 1/move farmer 5 0 0/move farmer 0 -2 0/pause 500/emote farmer 56/pause 800/speak Cecilia \"Oh! Hello, @. I always forget that you can see me.\"/pause 800/speak Cecilia \"I like the rain, even though I can't feel it anymore. It sounds peaceful, I guess.\"/pause 800/emote farmer 8/pause 800/speak Cecilia \"You're curious about how I kicked the bucket?\"/pause 500/emote Cecilia 40/pause 800/speak Cecilia \"Actually... I don't remember...$s\"/pause 500/emote farmer 16/pause 500/emote farmer 28/pause 500/emote Cecilia 16/pause 500/speak Cecilia \"No, it's alright! I just don't remember a lot of things from before I died, and it makes me sad...\"/pause 500/speak Cecilia \"I think that's why I'm still here, instead of moving on.\"/pause 500/emote farmer 8/pause 500/speak Cecilia \"Do I want to move on?\"/pause 500/emote Cecilia 40/pause 500/speak Cecilia \"I don't know, to tell you the truth. The gothic cowboy- Rasmodious- says that it is what ghosts are supposed to do, but I don't really know what I want...\"/pause 800/emote Cecilia 40/pause 500/speak Cecilia \"I think I'm going to go now. It has been nice talking with you, @. I don't get to do this very often, so I hope we can do this again!$h\"/pause 500/emote farmer 32/pause 500/showFrame Cecilia 0/faceDirection Cecilia 2/move Cecilia 0 1 3/move Cecilia -2 0 3/move Cecilia 0 3 3/move Cecilia -4 0 2/move Cecilia 0 12 2/globalFade/viewport -1000 -1000/end"

    here's the smapi errorlog it produces when it freezes

    An error occured in the base update loop: System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Convert.ToInt32(String value) at StardewValley.Event.populateWalkLocationsList() in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Event.cs:line 2401 at StardewValley.Event.checkForNextCommand(GameLocation location, GameTime time) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Event.cs:line 478 at StardewValley.GameLocation.UpdateWhenCurrentLocation(GameTime time) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 1982 at StardewValley.Locations.Town.UpdateWhenCurrentLocation(GameTime time) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Locations\Town.cs:line 736 at StardewValley.Game1.UpdateLocations(GameTime time) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 3567 at StardewValley.Game1._update(GameTime gameTime) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 2415 at Update_Patch1(Object gameTime, GameTime )
     
      Last edited: Oct 1, 2019
    • Digus

      Digus Spaceman Spiff

      The game is trying to read a command expecting a number, but it’s getting something else.
      That can happen for a lot o reasons, like an extra space, wrong order of parameters.
      Reading your event I couldn’t tell what’s wrong.
      What I suggest, and that is how I debug my events, is trying to incremente little by little. Remove everything and add commands by small bits to see which commands is written wrong.
       
      • MissCoriel

        MissCoriel Phantasmal Quasar

        Hi.. These are my specialty..
        From what I can see, this might be your problem:

        specificTemporarySprite witchFlyby

        temporary sprites need an X Y I believe tile coords should do the trick.. give it a try
         
        • stardewbalverines

          stardewbalverines Scruffy Nerf-Herder

          hi, thanks for responding, guys!! So I've spent the last half hour going over the event several times, and it turns out the code I have in my game had this "move Cecilia false 0 1 3" like I was typing an advancedMove instead of a regular move

          after removing the word 'false', it seems to be working now, so it turns out I was just being dumb and misreading it lol
          thanks for the help!!
           
            Digus likes this.
          • MissCoriel

            MissCoriel Phantasmal Quasar

            I see.. it wasn't in the event you pasted here. Hope to see your mod soon <3
             

            Share This Page