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.
Help with submitting quest dialogue.
- CeikryForgotHisPass
- Noob
- Posts: 11
- Joined: Fri Sep 16, 2022 11:48 pm
- Been thanked: 1 time
- CeikryForgotHisPass
- Noob
- Posts: 11
- Joined: Fri Sep 16, 2022 11:48 pm
- Been thanked: 1 time
Re: Help with submitting quest dialogue.
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)
- Kennynes
- Froob
- Posts: 28
- Joined: Sat Aug 13, 2022 2:30 am
- Has thanked: 14 times
- Been thanked: 10 times
Re: Help with submitting quest dialogue.
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.
Then when you pick something else it goes to more options...
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.
Then when you pick something else it goes to more options...
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.
- aweinstock
- Developer
- Posts: 31
- Joined: Thu Aug 11, 2022 1:17 am
- Been thanked: 14 times
Re: Help with submitting quest dialogue.
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
Don't worry about refactoring the existing Thurgo dialogue, just focus on what's new for the Giant Dwarf.
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?")
/* ... */
}
}
}