Help with submitting quest dialogue.

Various development-related discussions
Post Reply
User avatar
Kennynes
Froob
Posts: 27
Joined: Sat Aug 13, 2022 2:30 am
Has thanked: 14 times
Been thanked: 9 times

Help with submitting quest dialogue.

Post by Kennynes »

I am attempting to write the quest dialogue for The Giant Dwarf. I am using Wyld Pyrr's submission as a guide. There are sections where the dialogue references the players name and I'm not sure how to write that in. Here is what I have so far.
Screenshot 2022-09-18 082820.png
Screenshot 2022-09-18 082820.png (49.52 KiB) Viewed 562 times
User avatar
CeikryForgotHisPass
Noob
Posts: 11
Joined: Fri Sep 16, 2022 11:48 pm
Been thanked: 1 time

Re: Help with submitting quest dialogue.

Post by CeikryForgotHisPass »

replace Player Name with

Code: Select all

${player.name}
User avatar
Kennynes
Froob
Posts: 27
Joined: Sat Aug 13, 2022 2:30 am
Has thanked: 14 times
Been thanked: 9 times

Re: Help with submitting quest dialogue.

Post by Kennynes »

Ok now what if I need the dialogue to open a shop? I found the NPC ID for the shop. And the Shop ID.


Screenshot 2022-09-18 094310.png
Screenshot 2022-09-18 094310.png (75.43 KiB) Viewed 551 times
Screenshot 2022-09-18 094832.png
Screenshot 2022-09-18 094832.png (20.35 KiB) Viewed 551 times
User avatar
CeikryForgotHisPass
Noob
Posts: 11
Joined: Fri Sep 16, 2022 11:48 pm
Been thanked: 1 time

Re: Help with submitting quest dialogue.

Post by CeikryForgotHisPass »

Kennynes wrote: Sun Sep 18, 2022 2:49 pm Ok now what if I need the dialogue to open a shop? I found the NPC ID for the shop. And the Shop ID.
You don't need the shop ID, and the dialogue already has a reference to the NPC you're talking to.

Code: Select all

npc.openShop(player)
User avatar
Kennynes
Froob
Posts: 27
Joined: Sat Aug 13, 2022 2:30 am
Has thanked: 14 times
Been thanked: 9 times

Re: Help with submitting quest dialogue.

Post by Kennynes »

Getting extremely confused here but this is what I get for trying to write dialogue with zero coding knowledge I suppose. But I'm at a point where I need to talk to Thurgo and it's quest related. So I get the immediate options of the following.
Screenshot 2022-09-18 104200.png
Screenshot 2022-09-18 104200.png (123.02 KiB) Viewed 544 times
Then when you pick something else it goes to more options...
Screenshot 2022-09-18 104817.png
Screenshot 2022-09-18 104817.png (147.16 KiB) Viewed 544 times
I'm not quite sure how I need to address the existing skill cape dialogue. While writing dialogue is it up to what I write that changes the top of the box headers like when it says "What would you like to ask about?" I have a feeling I don't write that out but this is what my non-coding brain thinks of it as.
Screenshot 2022-09-18 105527.png
Screenshot 2022-09-18 105527.png (65.67 KiB) Viewed 544 times
User avatar
aweinstock
Developer
Posts: 31
Joined: Thu Aug 11, 2022 1:17 am
Been thanked: 14 times

Re: Help with submitting quest dialogue.

Post by aweinstock »

It looks like Thurgo's code for switching between the skillcape dialogue and the other dialogue is from before Ceikry added the topic system:
https://gitlab.com/2009scape/2009scape/ ... e.java#L82

Ned is a good example of using the topic system:
https://gitlab.com/2009scape/2009scape/ ... .kt#L49-55

With the topic system, Thurgo's dialogue would start with something like

Code: Select all

@Initializable
class ThurgoDialoguePlugin : DialoguePlugin {
    override fun open(vararg args: Any?): Boolean {
        val ksStage = player.questRepository.getStage("The Knight's Sword")
        val gdStage = player.questRepository.getStage("Giant Dwarf")
        showTopics(
            IfTopic("Skillcape of Smithing", ThurgoSkillcapeDialogueFile(player), player.skills.getStaticLevel(Skills.SMITHING) == 99),
            IfTopic("The Knight's Sword", ThurgoKnightsSwordDialogueFile(player), 0 < ksStage && ksStage < 100)
            IfTopic("Giant Dwarf", ThurgoGiantDwarfDialogueFile(player), 0 < gdStage && gdStage < 100)
            Topic("Something else", 2))
        return true
    }
}

class ThurgoGiantDwarfDialogueFile : DialogueFile() {
    override fun handle(componentID: Int, buttonID: Int) {
        when(stage) {
            0 -> playerl("Can you help me with this ancient axe?")
            /* ... */
        }
    }
}
Don't worry about refactoring the existing Thurgo dialogue, just focus on what's new for the Giant Dwarf.
Post Reply