[RT4-Client] Noob looking for resources for client development

Various development-related discussions
Post Reply
User avatar
bunger
Noob
Posts: 3
Joined: Thu Jul 06, 2023 6:03 pm
Been thanked: 1 time

[RT4-Client] Noob looking for resources for client development

Post by bunger »

Hi all, I've got some experience in Rust, Lua, and Python. When it comes to Java/RS development, though, I'm a noob. My goal for now is to make a client plugin that enables hotkeys for dialogue navigation (1-4, spacebar)

While the server documentation is fairly thorough and very easy to find, I unfortunately I haven't been able to find much info on the RT4-Client. Based on some of the existing plugins in the repo, I was able to figure out how to get keyboard input from the player, but I'm a bit lost on what to do from here. I've dug through some of the source code (probably not enough, still digging) but so far I'm striking out.

If anyone has advice, tips, a point in the right direction, etc. that would be great! Thanks!
User avatar
Ceikry
Site Admin
Posts: 587
Joined: Wed Aug 10, 2022 11:48 pm
Location: Draynor Village
Has thanked: 82 times
Been thanked: 105 times

Re: [RT4-Client] Noob looking for resources for client development

Post by Ceikry »

You'll also need to check for the presence of the corresponding chatbox interfaces, and only when present convert that keypress to a component click packet that informs the server you pressed a button on an interface.
Nerds
User avatar
Ceikry
Site Admin
Posts: 587
Joined: Wed Aug 10, 2022 11:48 pm
Location: Draynor Village
Has thanked: 82 times
Been thanked: 105 times

Re: [RT4-Client] Noob looking for resources for client development

Post by Ceikry »

That said, I've never been a huge fan of this feature request in particular because dialogue is excruciatingly tedious and time consuming to implement, so it feels very ungrateful when people want to just spam through the dialogue.
Nerds
User avatar
bunger
Noob
Posts: 3
Joined: Thu Jul 06, 2023 6:03 pm
Been thanked: 1 time

Re: [RT4-Client] Noob looking for resources for client development

Post by bunger »

Yeah I can understand not wanting to give people an avenue to easily skip all dialogue.

In my eyes, this game is almost entirely clicking. The primary reason I want this feature is to reduce the amount of mousing and clicking necessary. There's quite a lot of dialogue, and navigation maps to the keyboard pretty nicely.

Regardless of if this feature has a future in the project, I'd like to find somewhere to contribute. This era of RS easily holds the most nostalgia for me, I have a lot of respect for open-source in general, and Java has been on my list for a while now too.
User avatar
Ceikry
Site Admin
Posts: 587
Joined: Wed Aug 10, 2022 11:48 pm
Location: Draynor Village
Has thanked: 82 times
Been thanked: 105 times

Re: [RT4-Client] Noob looking for resources for client development

Post by Ceikry »

That's fair, and I do enjoy the keyboard navigation as well. Maybe as a compromise if you do get this implemented I can impose a minimum delay between dialogue boxes server-side.
Nerds
User avatar
bunger
Noob
Posts: 3
Joined: Thu Jul 06, 2023 6:03 pm
Been thanked: 1 time

Re: [RT4-Client] Noob looking for resources for client development

Post by bunger »

Yeah that sounds reasonable. I'll keep bashing my head into this for now haha
User avatar
St Danewolf
Froob
Posts: 39
Joined: Mon May 15, 2023 2:07 am
Location: Taverly Obelisk
Has thanked: 15 times
Been thanked: 10 times

Re: [RT4-Client] Noob looking for resources for client development

Post by St Danewolf »

Ceikry wrote: Thu Jul 06, 2023 7:09 pm That said, I've never been a huge fan of this feature request in particular because dialogue is excruciatingly tedious and time consuming to implement, so it feels very ungrateful when people want to just spam through the dialogue.
I completely understand your personal opinion on this topic, i think let people who wants to read the dialogue read the dialogue, and if people wants to skip because they already know most of the quests by playing rs in many years of their life let them skip. Personally some quests i have done so many times and can do them without guide, i like to skip, but quests i haven't done many times i read the dialogues
St Danewolf - Summoning Tank Reborn! on 2009scape
Image
User avatar
Deathking333
Noob
Posts: 2
Joined: Tue Aug 29, 2023 9:41 pm
Has thanked: 2 times
Been thanked: 1 time

Re: [RT4-Client] Noob looking for resources for client development

Post by Deathking333 »

Ceikry wrote: Thu Jul 06, 2023 7:27 pm That's fair, and I do enjoy the keyboard navigation as well. Maybe as a compromise if you do get this implemented I can impose a minimum delay between dialogue boxes server-side.
How long would the delay be? If the delay is too long, like several seconds, to the point that clicking on the dialogue box manually would actually be far faster than pressing the spacebar, then that would kind of render this whole plugin pointless. I think I might have a much better solution that would satisfy both parties. It could be achieved in one of the three following ways:

1. Make the ability to navigate dialogue boxes with the spacebar and number keys something that's unlocked once you've done a certain number of quests or have a certain number of Quest Points.

2. Make the ability to navigate dialogue boxes with the spacebar and number keys something that you can only do after you have completed all the available quests or after receiving the Quest Cape. That way, it won't feel like all your work that was put into implementing quest dialogue was a waste, because at that point a player will have already experienced all the major one-time, and for the player it will feel like a reward for all of their hard work in completing all the quests.

3. Make it so that only quest dialogue can't be navigated with the spacebar or number keys, while all other dialogue outside of quests can be. Think of it like an unskippable cutscene in a video game because it's one that's important to the story. This would also force players to consider their dialogue options more carefully in instances where there are multiple dialogue options to choose from in a quest.

Any of these three options I think would feel like a fair compromise to where all the hard work you put into adding the dialogue would not go unappreciated while players who desire it would be get a quality of life improvement. Personally, I think the third option is my favorite. There are actually legitimate reasons for why we would want something like the ability to navigate dialogue with the keyboard other than just simply skipping through it and making it go by faster like you're probably thinking.

For example, instances in which dialogue is easily interrupted, like in combat. If you're trying to do something that involves a slow dialogue box, but you're also under attack at the same time, then that dialogue is going to be interrupted. That can be really frustrating. I encountered an exact scenario like this when doing the Black Knights Fortress quest and with some of the doors in the Stronghold of Security. Being able to navigate to the next dialogue with the spacebar will make that less likely to happen, allowing you to be able to use the mouse to click to fend off whatever is attacking you or click on some food or potions in your inventory rather than having to move the mouse back and forth between dialogue box and inventory or enemy.

Speaking of that last point, there are also instances where you have click something after each dialogue line in short succession, making it easy to screw up and accidently click somewhere other than the dialogue box or the intended target, or accidently clicking the ground and making your character move when you didn't mean to, cancelling the dialogue and forcing you to start over. There's also instances where the dialogue might have a delay after you click until the next dialogue shows up, making you think you maybe didn't click it right so you click it again or click something else too early, also cancelling the dialogue and forcing you to start over. For those who are are less coordinated (such as myself), this can prove to be especially frustrating.
User avatar
Ceikry
Site Admin
Posts: 587
Joined: Wed Aug 10, 2022 11:48 pm
Location: Draynor Village
Has thanked: 82 times
Been thanked: 105 times

Re: [RT4-Client] Noob looking for resources for client development

Post by Ceikry »

Deathking333 wrote: Wed Aug 30, 2023 12:51 am
Ceikry wrote: Thu Jul 06, 2023 7:27 pm That's fair, and I do enjoy the keyboard navigation as well. Maybe as a compromise if you do get this implemented I can impose a minimum delay between dialogue boxes server-side.
How long would the delay be? If the delay is too long, like several seconds, to the point that clicking on the dialogue box manually would actually be far faster than pressing the spacebar, then that would kind of render this whole plugin pointless. I think I might have a much better solution that would satisfy both parties. It could be achieved in one of the three following ways:

1. Make the ability to navigate dialogue boxes with the spacebar and number keys something that's unlocked once you've done a certain number of quests or have a certain number of Quest Points.

2. Make the ability to navigate dialogue boxes with the spacebar and number keys something that you can only do after you have completed all the available quests or after receiving the Quest Cape. That way, it won't feel like all your work that was put into implementing quest dialogue was a waste, because at that point a player will have already experienced all the major one-time, and for the player it will feel like a reward for all of their hard work in completing all the quests.

3. Make it so that only quest dialogue can't be navigated with the spacebar or number keys, while all other dialogue outside of quests can be. Think of it like an unskippable cutscene in a video game because it's one that's important to the story. This would also force players to consider their dialogue options more carefully in instances where there are multiple dialogue options to choose from in a quest.

Any of these three options I think would feel like a fair compromise to where all the hard work you put into adding the dialogue would not go unappreciated while players who desire it would be get a quality of life improvement. Personally, I think the third option is my favorite. There are actually legitimate reasons for why we would want something like the ability to navigate dialogue with the keyboard other than just simply skipping through it and making it go by faster like you're probably thinking.

For example, instances in which dialogue is easily interrupted, like in combat. If you're trying to do something that involves a slow dialogue box, but you're also under attack at the same time, then that dialogue is going to be interrupted. That can be really frustrating. I encountered an exact scenario like this when doing the Black Knights Fortress quest and with some of the doors in the Stronghold of Security. Being able to navigate to the next dialogue with the spacebar will make that less likely to happen, allowing you to be able to use the mouse to click to fend off whatever is attacking you or click on some food or potions in your inventory rather than having to move the mouse back and forth between dialogue box and inventory or enemy.

Speaking of that last point, there are also instances where you have click something after each dialogue line in short succession, making it easy to screw up and accidently click somewhere other than the dialogue box or the intended target, or accidently clicking the ground and making your character move when you didn't mean to, cancelling the dialogue and forcing you to start over. There's also instances where the dialogue might have a delay after you click until the next dialogue shows up, making you think you maybe didn't click it right so you click it again or click something else too early, also cancelling the dialogue and forcing you to start over. For those who are are less coordinated (such as myself), this can prove to be especially frustrating.
Any delay the dialogue currently has is 100% authentic and will under no circumstance be shortened.

As for your suggestions of quest locking a client feature, that's not really how runescape works. Your client doesn't even know what a quest is. It just draws the pictures it's told to draw.
Nerds
User avatar
aweinstock
Developer
Posts: 31
Joined: Thu Aug 11, 2022 1:17 am
Been thanked: 14 times

Re: [RT4-Client] Noob looking for resources for client development

Post by aweinstock »

Theoretically, the plugin could check the quest varps or the varp with the number of quest points, but that would be a client-side check that people could easily remove before compiling the plugin.
Post Reply