Content Patcher

Content Patcher

378k Downloads

[Content Patcher] Using EditData with i18n and a translation that falls back to its default breaks cutscene 7

donedonedone278 opened this issue ยท 2 comments

commented

Describe the bug
I wouldn't log a bug if this wasn't my absolute last resort.

This config causes cutscene 7 (Maru dropping the flask) to hang when the user answers "Tell Harvey it was an accident.":

{
  "Format": "2.0.1",
  "Changes": [
    {
      "Action": "EditData",
      "Target": "Data/Events/Hospital",
      "Entries": {
        "7/f Maru 1000/p Maru": "{{i18n:thisisafakekey |default={{i18n:dddtest}}}}"
      }
    }
  ]
}

i18n/default.json: (The text is directly from the base game)

{
  "dddtest": "Hospital_Ambient/-1000 -1000/farmer -10000 -10000 0 Maru 9 15 3 Harvey 7 10 0/skippable/changeSprite Maru Hospital/changePortrait Maru Hospital/showFrame Maru 18/viewport 10 15/pause 4000/speak Maru \"*sigh*... I'm so sick of preparing these samples...$s\"/pause 2000/playSound doorClose/warp farmer 10 19/pause 100/playSound throw/showFrame Maru 17/shake Maru 2000/jump Maru/specificTemporarySprite maruBeaker/move farmer 0 -1 0/pause 1250/showFrame Maru 0/faceDirection Maru 2/pause 100/speak Maru \"Agh! Oh no!... $4\"/pause 600/showFrame Maru 16/pause 1000/speak Maru \"The whole sample is ruined... Harvey's going to kill me...$s\"/pause 600/showFrame Maru 0/faceDirection Maru 0/pause 1500/faceDirection Maru 2/pause 400/speak Maru \"$q 38 null#@, what should I do?#$r 38 -50 Event_Hospital_1#Just scoop it off the floor. He won't know the difference.#$r 39 -20 Event_Hospital_2#Tell Harvey it was my fault.#$r 38 50 Event_Hospital_3#Tell Harvey it was an accident.\"/move Harvey 3 0 2/move Harvey 0 2 2/doAction 10 13/move Harvey 0 1 2/faceDirection Maru 1/speak Harvey \"What happened? I heard something break.\"/pause 500/speak Maru \"$p 38#I accidentally dropped one of the samples... I'm so sorry.$s|@ came in and slammed the door so loud I dropped this sample.$u\"/fork toldTruth/move Harvey 0 2 3/emote Harvey 40/speak Harvey \"You shouldn't blame others for your own problems, Maru.$a\"/pause 300/faceDirection Harvey 1/speak Harvey \"*sigh*... I'll have to call the patient back in to recollect this sample.$s#$b#This'll probably put us in the red for another month...$s\"/pause 600/faceDirection Maru 2/pause 1000/showFrame Maru 16/pause 500/emote farmer 28/end"
}

Here's a minimal content pack I made as testing evidence: https://github.com/donedonedone278/content_patcher_bug_proof

To Reproduce

  1. Download this minimal content pack: https://github.com/donedonedone278/content_patcher_bug_proof
  2. Download some other mod that lets you trigger events.
  3. Start up Stardew and trigger the "Maru dropping a flask" event.
  4. When given an option, say "Tell Harvey it was an accident."
  5. Wait for the hang after the textbox where Maru says "I accidentally dropped one of the samples...". Harvey never walks forward.

Log file
https://smapi.io/log/c32d860611a34857a44fdb8c4e127ebc

commented

I'm sorry in advance if it turns out that I'm just missing something. Thank you for making content patcher ๐Ÿ™

commented

Hi! The i18n token is fully replaced with the text it contains, so it should have no effect on the event logic. You can enter patch export Data/Events/Hospital in the SMAPI console window to see the actual event data that the game sees.

Can you come ask #making-mods-general on the Stardew Valley Discord so we can help you find the issue? If you don't get an answer, feel free to ping me there with @pathoschild.