ID:1027939
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Well, right now GetScores() seems to require a hub, hub password, and the information must be correct, I mean specifically the hub password really.

But think about it, GetScores() isn't modifying anything, just like GetMedal() doesn't, it's just a way to retrieve information, information that you can view online at any time regardless, so why must we even need a hub_password?

My simple suggestion, remove the need for a hub_password in GetScores like GetMedal already has, anything that just retrieves data & doesn't modify/change/delete/add shouldn't require a password.
Unless you're trying to access scores from another game or simply can't be bothered with adding a hub_password, I don't see the purpose of this.

Nay.
Yes, that's what i'm talking about, to be able to access scores of another game, and not need to know the password, since knowing password to just view data like this, shouldn't be a requirement...

If it were my own game, i'd have just added a hub password and everything.
In response to Superbike32
This seems kinda sketchy. If the game's owner wanted to give you access to the scores, they would've given you the hub_password.
You can do the same thing just by visiting the website or using code to download the scores using Export() or something...

Also the hub password gets you access to a lot more than scores, such as medals, put random games on said hub, whatever, now why would one want to give you that if you simply want access to scores?

Anyways I have worked around it, downloading the scores from the website with code, but GetScores() is the best way, so access to it without a hub password would be nice.

As it is just basic data, nothing else, I see no reason why anyone would care if you had access to know who got what medals, scores, etc...in their game...
I see where the OP is coming from but I don't really see any reason for it; I don't foresee ever needing to check a hub's scores when I don't have access to the hub password.

Perhaps the OP could provide an example of why this would be used.
It can be used for whatever you want, perhaps to see how good they were in a game you own or similar, that would show they have skill, perhaps like Mickemoose moose points, it could be added to check the leaderboards & give them more for example...

I am not saying make this high priority but there's not any reason why it shouldn't eventually be done, it seems a removal of requiring a password shouldn't be too much work...
In response to Superbike32
No, I understand that part perfectly. But why would you have to access the scores from a hub you don't know the password to? Generaly, if you own a game, you'll at least know the hub password.
It doesn't need to be your own game, you could get the scores for all the games that are closest to your, show the scores, maybe use the scores to calculate difficulty in your own game, whatever...

Maybe you just want to show scoreboards in your own way from within your game?

It hardly matters what the use case is, I personally will you use it in determining how well people have done in similar games, which don't include medals, but have scoreboards...I will also use it slightly to give rewards for trying the game out or rewards for getting at least X score...

This will promote people who play my game to at least give some of the other games a try, since they will get a little bit for doing so.
In response to Superbike32
So... For rips? Then no, I don't support this at all. That's the only way I see this being used outside of the game's owner.
And therefore hub_password was created to stop people from doing this.
It's not for rips & not sure how it'd apply to rips even...and hub_password was created for security purposes to stop people from putting games on random hubs, getting the scores posted that are visible through the website manually and be downloading the website through code, will allow you to view the scores, take Rage for example, it would get the number of rages in that game, maybe in your game you could use that value to display a progress bar towards medals(which is at 200 rages...)

Maybe you just want to make something that gets the highscores in games, and alerts you when your no longer number 1 for those who actually care about their ranking in leaderboards, and feel superior just because their number 1... it could in those scenarios...

That's even another use case I could use, keep track of whos at the top of the leaderboards, and notify you when you drop on the boards...leaderboard tracking...

Since the data is visible on the website even when your not logged in, not a byond member, etc...and since you can just download the scores other ways, i'm not sure why people are opposed to this...

They seem to not understand what GetScores() does or fail to understand why someone in their right mind would even care about leaderboards or anything...going by that, why does byond even implement leaderboards then...

If you can't come up with an actual reason why it shouldn't be done, be smart about it...it's just score data...this isn't personal in any way...it's completely visible to you even when your not logged in, it's not private/hidden...

Anyways hub_password was implemented to stop other games from randomly putting up games on your hub as well as for general security so random people don't add/modify/delete scores without being the game owner or being authorized by the game owner....it wasn't meant to stop random games from accessing public data such as scores, earned medals, etc...
All wise and all knowing!

But yea not really a good idea IMO..

And yes I know why hub_password was invented ..
You could do this yourself by parsing data from the page, essentially.
Yeah, if its possible to see this information when you're browsing the web, then its possible to pull that same information into your game. You send the web server the url as your "message" and it will send you back a response. That's how the world wide web works. I think the command for doing this is world.Export()
FIREking, it's obvious how to do it, and I already got a working code anyways, but if BYOND changes the website again, it could fail to work potentially.

It's easiest to use GetScores() since it wont change & can work more reliably without me needing to check for errors grabbing the data, parsing the data, and sending back the data for use, GetScores() does the kind of stuff already of making sure it gets valid responses, gets a response at all, retrieving the values for certain people(parsing) & everything else, so it's more desirable to use that method since it already exists & does all the work for you.
It's highly unlikely that they'll change the way information is pulled from the hub but you can't future proof your code forever, especially when dealing with the web. If they change it, you just write a new back-end that works with your existing front-end. I am encouraging you to work with what you have because the developers of BYOND are not going to change how the security in GetScores() works. There's a reason why they made it password protected. It is intended that you CAN'T do this.
FIREking, I would like to know your reasining why GetScores() should have a password to begin with, there is a reason modifying scores has a password, but I don't see the reasoning behind why GetScores() does.

As for pulling the info from the hub, you have to get a website link that has the data on it, download the web pages html code, parse all the useless data you didn't want to begin with, to remove it, work with the data that is left and loop through the occurences to find the person you wanted the score for, and then send his score back to whatever I wanted to use the data in to begin with.

As opposed to GetScores() where everything is done behind the scenes, you get a return value for what it was, or it even tells you if the call failed, so it's easy to work with...

If I have done all the code said above then I still need to add in checks to see that I got a webpage before trying to parse, parse the data, check through all entries for scores, check if the person even has a score, and return data back for if the function failed because it fails to parse, failed to retrieve the webpage, codes for them not having a score, what their score was, etc...

I have already done all this, but it's a lot of work to have gone through when GetScores() already does everything.

If someone gives me a good reason why viewing scores is password protected, i'll leave it at that, but as it's I want this added because I don't understand myself why it even is password protected to begin with.
If there's a way for you to do it without them changing the core of BYOND, they will tell you to use that and not add the feature. That's just how they work. If you want to know why, email Tom or something or wait 3 months for a response to this post. It's free software, and you're basically asking them to change their own original design plan for the function, which isn't something they want to do. That would be like asking you to start wearing sweaters instead of t shirts, because we think it works better for you. You'd be apt to say its not what you intended to wear. Get it?
FIREking, they have not given a response, I can wait, but it's one part of BYOND, one function, now it's not exactly easy to do everything I listed and always keep it up to date so that it will work all the time every time.

As for them not changing it right away maybe not ever, that's a possibility too, which is why I came up with code to do it already.

Feature suggestions are just that, suggestions to improve how byond works, modifying one function to remove a need for a password though is hardly an overhaul, a removal of code so that a password isn't needed is a lot easier than re-coding the function completely to add the ability for the function to do something.

They may not want to do it, it's fine with me, but i'll wait & see, in the meantime, my code will work for now...but this is still a suggestion in the meantime. Unless someone has a valid reason why the behavior shouldn't be changed other than not thinking it would be useful or you guys don't want to use it, or you'd rather they use their time doing other things...all those are reasonable to put this off until theirs nothing else for them to do, but not to have it never implemented.
Page: 1 2