|
Hey Major, can I get a quick TL;DR on what is driving the move to kotlin?
the kotlin branch is very nice!
update (asynchronous actions via coroutines) https://github.com/apollo-rsps/apoll...ment-330641310
Wrote a shop DSL, in kotlin:
Code:shop("Aubury's Rune Shop.") { operated by "Aubury" category("runes") { sell(5000) of { -"Earth" -"Water" -"Fire" -"Air" -"Mind" -"Body" } sell(250) of { -"Chaos" -"Death" } } } shop("Lowe's Archery Emporium.") { operated by "Lowe" category("arrows") { sell(2000) of "Bronze" sell(1500) of "Iron" sell(1000) of "Steel" sell(800) of "Mithril" sell(600) of "Adamant" } category("normal weapons", affix = nothing) { sell(4) of "Shortbow" sell(4) of "Longbow" sell(2) of "Crossbow" } category("shortbows") { sell(3) of "Oak" sell(2) of "Willow" sell(1) of "Maple" } category("longbows") { sell(3) of "Oak" sell(2) of "Willow" sell(1) of "Maple" } } shop("Horvik's Armour Shop.") { operated by "Horvik" category("chainbody") { sell(5) of "Bronze" sell(3) of "Iron" sell(3) of "Steel" sell(1) of "Mithril" } category("platebody") { sell(3) of "Bronze" sell(1) of { -"Iron" -"Steel" -"Black" -"Mithril" } } sell(1) of { -"Iron platelegs" -"Studded body" -"Studded chaps" } } shop("Thessalia's Fine Clothes.") { operated by "Thessalia" category("apron") { sell(3) of "White" sell(1) of "Brown" } category("leather", affix = prefix) { sell(12) of "Body" sell(10) of "Gloves" sell(10) of "Boots" } category("skirt") { sell(5) of "Pink" sell(3) of "Black" sell(2) of "Blue" } sell(4) of "Cape" sell(5) of "Silk" sell(3) of { -"Priest gown"(428) -"Priest gown"(426) } } shop("Varrock General Store.") { operated by "Shopkeeper"(522) and "Shop assistant"(523) sell(5) of "Pot" sell(2) of "Jug" sell(2) of "Shears" sell(3) of "Bucket" sell(2) of "Bowl" sell(2) of "Cake tin" sell(2) of "Tinderbox" sell(2) of "Chisel" sell(5) of "Hammer" sell(5) of "Newcomer map" } shop("Varrock Swordshop.") { operated by "Shopkeeper"(551) and "Shop assistant"(552) category("swords") { sell(5) of "Bronze" sell(4) of "Iron" sell(4) of "Steel" sell(3) of "Black" sell(3) of "Mithril" sell(2) of "Adamant" } category("longswords") { sell(4) of "Bronze" sell(3) of "Iron" sell(3) of "Steel" sell(2) of "Black" sell(2) of "Mithril" sell(1) of "Adamant" } category("daggers") { sell(10) of "Bronze" sell(6) of "Iron" sell(5) of "Steel" sell(4) of "Black" sell(3) of "Mithril" sell(2) of "Adamant" } } shop("Zaff's Superior Staffs!") { operated by "Zaff" category("staves", affix = nothing) { sell(5) of { -"Battlestaff" -"Staff" -"Magic staff" } sell(2) of { -"Staff of air" -"Staff of water" -"Staff of earth" -"Staff of fire" } } }
As part of our move to Kotlin we have a bunch of easy issues over on Github. If you'd like to get involved in development you can also join our slack (link's in the github readme) - we'll be happy to mentor/assist anyone working on issues.
The two ones we're most interested in closing would be:
- Define shops across the world (add shop configuration for all the shops across Runescape)
- Pathfinders need a limit on the search space (currently Pathfinding searches forever, which isn't good if someone tries to walk to a tile they can't ever reach - we should limit this to 104 tiles or something).
- Port the Ruby Herblore plugin to Kotlin.
Sneak peak at what the dialogue plugin looks like when ported to kotlin:
At a later date we'll be using kotlin's coroutines in the dialogue plugin so various actions block (like waiting for the player to 'click here to continue', or select an option), so they'll be even better after that.Code:conversation("Runescape Guide tutorial") { npc dialogue "Greetings" `for` "Runescape Guide" { player -> animation { calm } text { if (player.tutorial_island_progress == TutorialIsland.not_started) { -""" Greetings! I see you are a new arrival to this land. My job is to welcome all new visitors. So welcome! """ player.tutorial_island_progress = TutorialIsland.talk_to_people } else { -"Welcome back." } -""" You have already learned the first thing you need to succeed in this world: talking to people! You will find many inhabitants of this world have useful things to say to you. By clicking on them with your mouse you can talk to them. I would also suggest reading through some of the supporting information on the website. There you can find maps, a bestiary, and much more. """ } on `continue` { "To continue" } } npc dialogue "To continue" `for` "Runescape Guide" { player -> animation { calm } text { -""" To continue the tutorial go through that door over there, and speak to your first instructor. """ } on close { if (player.tutorial_island_progress < TutorialIsland.runescape_guide_finished) { TutorialIsland.sendInstruction(player) player.send(RunescapeGuide.REMOVE_NPC_HINT) player.send(RunescapeGuide.DOOR_HINT) player.tutorial_island_progress = TutorialIsland.runescape_guide_finished } } } statement dialogue "Talk to guide" { text { -""" You need to talk to the Runescape Guide before you are allowed to proceed through this door. """ } on close { TutorialIsland.sendInstruction(player) } } }
edit: decided this was shit so itll be a lot better eventually
Last edited by Major; 07-16-2019 at 08:29 PM.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |