ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.15k stars 2.21k forks source link

Dialogue lua file is no longer available. #15259

Closed Allikitty closed 2 months ago

Allikitty commented 3 months ago

What needs to be documented?

I'm simply trying to add dialogue to my mod, but the LUA file page in the dialogue tutorial here no longer works. This is the tutorial page: https://github.com/ShadowMario/FNF-PsychEngine/wiki/Dialogues If you scroll to "Playing your Dialogue (on LUA/Downloaded build)" portion, the link brings you to a page that says the content is no longer available (probably because it's a Discord attachment link). Does anyone have the file?

Arolox666 commented 3 months ago

I don't have the file file but I remember the code for the script that plays the dialogue as for the dialogue itself you have a "Dialogue Editor" in-game. Anyways the code should be:

function onCountdownStarted()
    if not seenCutscene and isStoryMode then
        setProperty("inCutscene", true)
        startDialogue("dialogue") --Place file called dialogue in song folder alongside this file
        seenCutscene = true
        return Function_Stop
    end
    return Function_Continue
end

if you will want on song end dialogue just reply :D also I hope this works on your psych engine version tested works on 0.6.3

Allikitty commented 3 months ago

well im using 0.7.3 but i'll let you know if it works

Allikitty commented 3 months ago

well i put in the code but it made the dialogue and song play at the same time

xxyuee commented 3 months ago

try onStartCountdown() instead

Allikitty commented 3 months ago

yep, that works. i would also want to know how to make end dialogue

Arolox666 commented 3 months ago

yep, that works. i would also want to know how to make end dialogue

For song end dialogue (and I tested this one on 0.7.3) then is this:

--Full code will look like this
function onStartCountdown()
    if not seenCutscene and isStoryMode then
        setProperty("inCutscene", true)
        startDialogue("dialogue") --Place file called dialogue in song folder alongside this file
        seenCutscene = true
        return Function_Stop
    end
    return Function_Continue
end
--This is the end file
function onEndSong()
    if not allowEnd and isStoryMode then
        setProperty("inCutscene", true)
        startDialogue("dialogueEnd")--Place another file called dialogueEND
        allowEnd = true
        return Function_Stop
    end
    return Function_Continue;
end

Now just make a dialogue that is named dialogueEND

Also sorry if you had trouble with the last one I messed up the function as they sound the same PS: I fixed the function name here :D

Allikitty commented 3 months ago

thank you!!

Allikitty commented 3 months ago

Little update, after putting end text on the final song of the week, the end dialogue didn't work properly. I press enter to progress it and while it does progress the dialogue, it also sends me back to the story mode menu.

Arolox666 commented 3 months ago

Little update, after putting end text on the final song of the week, the end dialogue didn't work properly. I press enter to progress it and while it does progress the dialogue, it also sends me back to the story mode menu.

It works correctly for me so it has to be problem with the dialogue file you have maybe it is just one line or something like that.

Allikitty commented 3 months ago

I checked again. The problem is the achievement script I have overrides the dialogue script.