Coding Help I need help with an event for my mod(Resolved. Thanks for the help.)

BlackReaper

Greenhorn
Hello, good day. I need help with the code for an event I'm creating. I'm still new to this, and I've tried to understand it by searching on YouTube and the wiki, but the event still isn't triggering.

This is the event code:

{
"Changes": [
{
"LogName": "Beatriz 2 Heart Event",
"Action": "EditData",
"Target": "Data/Events/Custom_BeatrizHouse",
"Entries": {
"17040001/Friendship Beatriz 500/Time 1300 2000/DayOfMonth 6 13 20 26/NPCVisibleHere Beatriz":
"continue/20 12/farmer 14 15 0 Beatriz 25 12 2/showFrame Beatriz 18/move farmer 0 -5 1/move farmer 7 0 2/move farmer 0 2 1/move farmer 2 0 1/pause 200/showFrame Beatriz 19/showFrame Beatriz 17/showFrame Beatriz 16/showFrame Beatriz 0/faceDirection Beatriz 3/emote Beatriz 16/speak Beatriz \"{{i18n:Beatriz.2.Heart.Event1}}\"

/pause 500/quickQuestion {{i18n:Beatriz.2.Heart.ask}}
#{{i18n:Beatriz.2.Heart.EventF1}}
#{{i18n:Beatriz.2.Heart.EventF2}}

(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB1}}\"/switchEvent answerB1_Beatriz(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB2}}\"/switchEvent answerB2_Beatriz",

"answerB1_Beatriz": "awardFriendship Beatriz 500/end",
"answerB2_Beatriz": "end"
}
}
]
}
 

SomeoneEls

Farmer
It seems like the formatting may be off based on what I see on the modding wiki. I am pretty new to events so uh..

/pause 500/quickQuestion {{i18n:Beatriz.2.Heart.ask}}
#{{i18n:Beatriz.2.Heart.EventF1}}
#{{i18n:Beatriz.2.Heart.EventF2}}

^ I dunno what the #'s do exactly, you might just have to remove that, the formatting might be messing with how the json is read? idk?

(break)pause 100
\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB1}}\"
/switchEvent answerB1_Beatriz(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB2}}\"
/switchEvent answerB2_Beatriz",

might need to be

(break)pause 100
\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB1}}\"
\\switchEvent answerB1_Beatriz(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB2}}\"
\\switchEvent answerB2_Beatriz" [might be missing a continued bit here],

also

"answerB1_Beatriz": "awardFriendship Beatriz 500/end",
"answerB2_Beatriz": "end"

might also end things early?

also make sure your event tags (ex. {{i18n:Beatriz.2.Heart.Event.answerB1}}) are defined somewhere, just in case. If still not working, try defining them in this json file?



Gahhhhh... I wish I could help more, but I am pretty new to this.

Look at this guide here if you already havent seen it. Look at the "Switch events and you" section.

If all still fails, ask Lenora Rose, I know she was working on some events recently.
 

BlackReaper

Greenhorn
It seems like the formatting may be off based on what I see on the modding wiki. I am pretty new to events so uh..

/pause 500/quickQuestion {{i18n:Beatriz.2.Heart.ask}}
#{{i18n:Beatriz.2.Heart.EventF1}}
#{{i18n:Beatriz.2.Heart.EventF2}}

^ I dunno what the #'s do exactly, you might just have to remove that, the formatting might be messing with how the json is read? idk?

(break)pause 100
\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB1}}\"
/switchEvent answerB1_Beatriz(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB2}}\"
/switchEvent answerB2_Beatriz",

might need to be

(break)pause 100
\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB1}}\"
\\switchEvent answerB1_Beatriz(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB2}}\"
\\switchEvent answerB2_Beatriz" [might be missing a continued bit here],

also

"answerB1_Beatriz": "awardFriendship Beatriz 500/end",
"answerB2_Beatriz": "end"

might also end things early?

also make sure your event tags (ex. {{i18n:Beatriz.2.Heart.Event.answerB1}}) are defined somewhere, just in case. If still not working, try defining them in this json file?



Gahhhhh... I wish I could help more, but I am pretty new to this.

Look at this guide here if you already havent seen it. Look at the "Switch events and you" section.

If all still fails, ask Lenora Rose, I know she was working on some events recently.
Okay, thank you very much, I'll check the page.
 

Lenora Rose

Farmer
It looks to me like the quickQuestion formatting is off. you use \\ between commands and (break) between the relevant responses until you're completely done the event, and only then use a / again. And if the only difference between the two threads is the friendship, you can add that within the answer break.

So,
/pause 500/quickQuestion {{i18n:Beatriz.2.Heart.ask}}
#{{i18n:Beatriz.2.Heart.EventF1}}
#{{i18n:Beatriz.2.Heart.EventF2}}

(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB1}}\"\\friendship Beatriz 500(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB2}}\"/end"
 

Lenora Rose

Farmer
For quickQuestion formats, I found this tutorial MUCH more useful for keeping me on track.

 

BlackReaper

Greenhorn
It looks to me like the quickQuestion formatting is off. you use \\ between commands and (break) between the relevant responses until you're completely done the event, and only then use a / again. And if the only difference between the two threads is the friendship, you can add that within the answer break.

So,
/pause 500/quickQuestion {{i18n:Beatriz.2.Heart.ask}}
#{{i18n:Beatriz.2.Heart.EventF1}}
#{{i18n:Beatriz.2.Heart.EventF2}}

(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB1}}\"\\friendship Beatriz 500(break)pause 100\\speak Beatriz \"{{i18n:Beatriz.2.Heart.Event.answerB2}}\"/end"
Thank you very much, I had my suspicions about the quickquestion but I didn't know where, also smapi wasn't throwing any errors or anything like that
 
Last edited by a moderator:
Top