Page 1 of 1
Help with submitting quest dialogue.
Posted: Sun Sep 18, 2022 1:29 pm
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 (49.52 KiB) Viewed 609 times
Re: Help with submitting quest dialogue.
Posted: Sun Sep 18, 2022 1:32 pm
by CeikryForgotHisPass
Re: Help with submitting quest dialogue.
Posted: Sun Sep 18, 2022 2:49 pm
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 (75.43 KiB) Viewed 598 times
- Screenshot 2022-09-18 094832.png (20.35 KiB) Viewed 598 times
Re: Help with submitting quest dialogue.
Posted: Sun Sep 18, 2022 2:52 pm
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.
Re: Help with submitting quest dialogue.
Posted: Sun Sep 18, 2022 3:56 pm
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 (123.02 KiB) Viewed 591 times
Then when you pick something else it goes to more options...
- Screenshot 2022-09-18 104817.png (147.16 KiB) Viewed 591 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 (65.67 KiB) Viewed 591 times
Re: Help with submitting quest dialogue.
Posted: Sun Sep 18, 2022 5:19 pm
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.