Project 1999

Go Back   Project 1999 > General Community > Technical Discussion

Reply
 
Thread Tools Display Modes
  #11  
Old 03-23-2023, 06:06 PM
Bleyld Bleyld is offline
Skeleton


Join Date: Aug 2014
Posts: 17
Default

Quote:
Originally Posted by loramin [You must be logged in to view images. Log in or Register.]
[You must be logged in to view images. Log in or Register.]

Updated with the API 'bones', just need to button up the endpoints and alg. All items that need to be done include a comment of `#TODO:`
https://github.com/pastram-i/eqatlas_api

Take note of changes in the json, made quite a few. tl;dr Overall more detail, better organized, that kinda stuff.
https://raw.githubusercontent.com/pa...ata/zones.json

Updated the wiki page with a better schema to match
https://wiki.project1999.com/Zones.json

The real next barrier will be hosting though... I've got a little pi? Idk. I could always throw into an AWS API Gateway + Lambda, but also $...
Thoughts?
Reply With Quote
  #12  
Old 03-23-2023, 08:22 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 9,340
Default

Quote:
Originally Posted by Bleyld [You must be logged in to view images. Log in or Register.]
Updated with the API 'bones', just need to button up the endpoints and alg. All items that need to be done include a comment of `#TODO:`
https://github.com/pastram-i/eqatlas_api

Take note of changes in the json, made quite a few. tl;dr Overall more detail, better organized, that kinda stuff.
https://raw.githubusercontent.com/pa...ata/zones.json

Updated the wiki page with a better schema to match
https://wiki.project1999.com/Zones.json

The real next barrier will be hosting though... I've got a little pi? Idk. I could always throw into an AWS API Gateway + Lambda, but also $...
Thoughts?
Looks good.

As for hosting, the problem with any sort of API is (unless you want to write it as a PHP Mediawiki extension) that we'd need an external server. It'd be a lot simpler if we could make a JS version, and just let people run it on their browser.
__________________

Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides
Anyone can improve the wiki! If you are new to the Blue server, you can improve the wiki to earn a "welcome package" of up to 2k+ platinum! Message me for details.
Reply With Quote
  #13  
Old 03-24-2023, 04:30 PM
Bleyld Bleyld is offline
Skeleton


Join Date: Aug 2014
Posts: 17
Default

Any ideas on what we can do with the JS version?

I don't know much about php but a mediawiki extension sounds like it could be the most convenient option for users. I'm going to look into that when I have the time.

Tbh - I don't have to go down the api path, it's just the one I'm most familiar with. Can leave this as a scraper+json, and write a script for tts algorithm, to be implemented in JS how you see fit?
Reply With Quote
  #14  
Old 03-24-2023, 04:46 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 9,340
Default

Well, to do it in JS you'd just ... do it in JS [You must be logged in to view images. Log in or Register.]

I could easily see a page with two drop-down menus ("select elements") to let you pick the to/from zones, and a button. See https://wiki.project1999.com/Per-Level_Hunting_Guide for a general idea of wiki pages with custom forms.

When someone clicks the button, some code would grab the two zone names, plug it into the algorithm, and then that algorithm would return an array of zones. The code would then add a bunch of properly-ordered links to the zones on the page, describing the path from A to B.

If you can get the algorithm part working I'd be happy to help with the form, connecting it to the algorithm, and the display of the results ... I'm just not willing to sign up to write the algorithm itself.

As for using an extension, I'm not a PHP dev, but you can see how the existing custom extensions (for stuff like the auction tracker or the dynamic zone lists work) by downloading the source code here: https://wiki.project1999.com/utils/wikiUtils.php ("Custom Extensions Source").
__________________

Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides
Anyone can improve the wiki! If you are new to the Blue server, you can improve the wiki to earn a "welcome package" of up to 2k+ platinum! Message me for details.
Reply With Quote
  #15  
Old 03-27-2023, 12:20 PM
Bleyld Bleyld is offline
Skeleton


Join Date: Aug 2014
Posts: 17
Default

Quote:
Originally Posted by loramin [You must be logged in to view images. Log in or Register.]
Well, to do it in JS you'd just ... do it in JS [You must be logged in to view images. Log in or Register.]
...
Yeah I guess more... how? Lol - my knowledge of JS is limited, but idk that we'd be able to incorporate that in the wiki here, so it would still have a similar hosting conundrum elsewhere?

Quote:
Originally Posted by loramin [You must be logged in to view images. Log in or Register.]
...
I could easily see a page with two drop-down menus ("select elements") to let you pick the to/from zones, and a button. See https://wiki.project1999.com/Per-Level_Hunting_Guide for a general idea of wiki pages with custom forms.

When someone clicks the button, some code would grab the two zone names, plug it into the algorithm, and then that algorithm would return an array of zones. The code would then add a bunch of properly-ordered links to the zones on the page, describing the path from A to B.
...
As for using an extension, I'm not a PHP dev, but you can see how the existing custom extensions (for stuff like the auction tracker or the dynamic zone lists work) by downloading the source code here: https://wiki.project1999.com/utils/wikiUtils.php ("Custom Extensions Source").
I think this is the more direct route, but goes back to the PHP which we both lack. The link is helpful though, and I may do some exploration there when I have the chance.

Quote:
Originally Posted by loramin [You must be logged in to view images. Log in or Register.]
...
If you can get the algorithm part working I'd be happy to help with the form, connecting it to the algorithm, and the display of the results ... I'm just not willing to sign up to write the algorithm itself.
...
At this point, I just don't want any wasted effort. I could have a quick turnaround for the algorithm in python, but if it's just in a `.py` that's my limitation of knowing where to go with it. For example, can some PHP/JS magic be used to utilize a `.py` script? I've only setup public/private APIs in the past to communicate between the two.

tl;dr the algorithm is the easy part for my experience, but idk what form for it to take, that is going to be the best bet for the end deliverable.
Reply With Quote
  #16  
Old 03-27-2023, 02:51 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 9,340
Default

The wiki can host custom JS files; you just have to be an admin (like myself) to edit them. For example, here are the files for "loc mapping" (ie. showing a red X where an NPC is on a map):

https://wiki.project1999.com/MediaWiki:LocMaps.js

There's a single common JS file for the whole wiki, https://wiki.project1999.com/MediaWiki:Common.js, and it has the power to bring in specific files for specific pages. For instance, the Per-Level Hunting guide page has its own JS file, which is brought in via this line:
Code:
    case 'Per-Level Hunting Guide':
      importScript('MediaWiki:HuntingGuide.js');
So again, we could very easily do something similar with a "Traveling Adventurer" page ... but

A) it would need to be in Javascript (or PHP if you want to build it server-side, though I see no need for that), and

B) while I'm happy to help with adding the code to the wiki, showing you how to make the form through JS, etc. ... I personally don't want to actually write the code myself.
__________________

Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides
Anyone can improve the wiki! If you are new to the Blue server, you can improve the wiki to earn a "welcome package" of up to 2k+ platinum! Message me for details.
Reply With Quote
  #17  
Old 03-27-2023, 02:59 PM
loramin loramin is offline
Planar Protector

loramin's Avatar

Join Date: Jul 2013
Posts: 9,340
Default

P.S. If you wanted to write (say) a Python command line script, that takes two zone names as arguments, and prints out an array of the (minimal) zones needed in-between, I could, potentially, be convinced to convert that script to JS, throw up a form with two-dropdowns to get the zone names, and then "print" links to each in-between zone onto the page.

However, that's definitely more work than I was hoping to sign up for. Also, if anything doesn't work, or more functionality is needed, it could easily turn into a big project for me, which is what I'm trying to avoid.

So, on my end it'd be ideal if you could brush up on a little bit of JS syntax and try to write a JS version ... but if you give me a well-tested, fully functional Python script that only requires me to convert it to JS, and change the inputs/outputs ... I could be talked into that [You must be logged in to view images. Log in or Register.]
__________________

Loramin Frostseer, Oracle of the Tribunal <Anonymous> and Fan of the "Where To Go For XP/For Treasure?" Guides
Anyone can improve the wiki! If you are new to the Blue server, you can improve the wiki to earn a "welcome package" of up to 2k+ platinum! Message me for details.
Reply With Quote
  #18  
Old 03-27-2023, 04:59 PM
Bleyld Bleyld is offline
Skeleton


Join Date: Aug 2014
Posts: 17
Default

Short/unorganized reply - in meeting.

Understood both though; yeah to be clear my hope was and still is to NOT require work from you/others if possible. That’s why my initial idea was of an api that does the lifting, for others to make FE/tools as they see fit and when time/desire allows. I appreciate the help you’re providing so far; def not looking to pawn the rest off. But the replies have helped me understand the bounds/scope that the wiki can handle to decide what routes would even be worth the effort!

I’ll be going down the exploration paths as mentioned (JS/PHP), and may even finish up the api repo I’ve already made to potentially self host or something in the future.

Once I have the algo I’ll keep you posted, as a clean script should be already delivered to complete it. So if you decide to convert at your leisure then feel free, but no worries if not!

Then later I’ll let you know which route if any was able to be closed off as complete, and if there’s any need from you to plug into wiki!
Reply With Quote
  #19  
Old 05-02-2023, 06:46 PM
Bleyld Bleyld is offline
Skeleton


Join Date: Aug 2014
Posts: 17
Default

Quote:
Originally Posted by loramin [You must be logged in to view images. Log in or Register.]
P.S. If you wanted to write (say) a Python command line script, that takes two zone names as arguments, and prints out an array of the (minimal) zones needed in-between, I could, potentially, be convinced to convert that script to JS, throw up a form with two-dropdowns to get the zone names, and then "print" links to each in-between zone onto the page.

However, that's definitely more work than I was hoping to sign up for. Also, if anything doesn't work, or more functionality is needed, it could easily turn into a big project for me, which is what I'm trying to avoid.

So, on my end it'd be ideal if you could brush up on a little bit of JS syntax and try to write a JS version ... but if you give me a well-tested, fully functional Python script that only requires me to convert it to JS, and change the inputs/outputs ... I could be talked into that [You must be logged in to view images. Log in or Register.]
FYI I'm still around [You must be logged in to view images. Log in or Register.]

Haven't made much progress on this lately, work imploded. I've hardly enough had enough time to play sadly!

Anyways - I've migrated from the initial concept, and leaning more towards a discord bot, to either be implemented in the p99 discord, captains discord, or a separate server.

You can see the template coming together here.

If there's any other developers who wish to contribute, absolutely feel free!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:59 AM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.