ID:260779
 
Is there an easy way to retrieve the images associated with medals off of the BYOND site? I have a list of medal names, and I would like the hub to provide a link to the images for those medals so I can list it in an in-game browser.
I seem to be unable to get the last 10 medals earned from the hub. Is this intentional? If not, I would like to request it as a feature.
Why can't you include the images in your source?
In response to SuperAntx
SuperAntx wrote:
Why can't you include the images in your source?

I can, but I think it's better to get it from the hub since that's where it originates from.
In response to Android Data
Android Data wrote:
SuperAntx wrote:
Why can't you include the images in your source?

I can, but I think it's better to get it from the hub since that's where it originates from.

You're way better off including the images in your source. It's faster because you won't be pulling that info from the website each time. I do see some merit in the idea of grabbing those images from the site though.

Lummox JR
In response to Android Data
Android Data wrote:
get it from the hub since that's where it originates from.

I believe this is the problem. Medals exist as an independent entity, completely detached from the game they're associated with.

I would much prefer some sort of medal datum you could use to add, remove, or edit medals on the hub from within the game.
In response to SuperAntx
SuperAntx wrote:
Android Data wrote:
get it from the hub since that's where it originates from.

I believe this is the problem. Medals exist as an independent entity, completely detached from the game they're associated with.

As long as you have the hub path and medal name, that's enough info for the website to look up the medal's info--if there was a website query for doing that.

I would much prefer some sort of medal datum you could use to add, remove, or edit medals on the hub from within the game.

To be honest I don't totally follow Falacy's medal datum idea. I dislike the idea of using a datum as something intrinsically tied to the hub (which would seem to be difficult to implement), but using a datum as a sort of main access point for working with medals is a pretty decent concept on its own and would make a fine library.

As far as having web queries that could be used to create, modify, or remove medals--not for players, but for the game itself--from within the game, I'm not sure we could handle authentication properly. The only way to do that safely I think would be through a hub message, and that still seems like a dangerous thing. The medals available for a hub entry were never meant to be edited at runtime, just as a hub entry's core description info isn't. The potential for abuse is a little too high there, and functionality to make dynamic changes to something that is relatively static would be underutilized at best, making for a low payoff to a high volume of work input.

Lummox JR
In response to Lummox JR
Obviously you've never tried to actually use the medal system, excluding tests to make sure the systems actually work. Besides for some very basic displays on the website, there is absolutely no upside to using hub-based medals. 99% of everything still has to be setup in the game, then duplicated on the hub to match. Setting things up on the hub is far from user-friendly. We also have very little control over the hub display, and no way to effectively query medal related material. In short, the medal systems on the hub feel completely useless and separate from the medal systems in-game, which is far from how it should be.
In response to Falacy
Falacy wrote:
Obviously you've never tried to actually use the medal system, excluding tests to make sure the systems actually work.

I added a full set of medals to SotS II. Seemed to work just fine for me.

Besides for some very basic displays on the website, there is absolutely no upside to using hub-based medals. 99% of everything still has to be setup in the game, then duplicated on the hub to match.

I don't follow what you mean. You do need code to actually award the medals, but that's only logical. The steps I followed were pretty basic:

1) Brainstorm a set of medals to use.
2) Create the artwork for the medals.
3) Add the medals on the hub entry editor page.
4) Add code to the game to figure out when a medal has been earned.
5) Add a proc to the game to tell everyone about the achievement when one is earned.

I'm not sure what other functionality you're missing to do what you need in-game. The post you pointed to is mostly concerned with how they're displayed on the hub, which is a separate issue. Mind you I'm totally amenable to improving on that. I agreed with most of the things you brought up in that thread; it just hasn't been high-priority.

Setting things up on the hub is far from user-friendly. We also have very little control over the hub display, and no way to effectively query medal related material. In short, the medal systems on the hub feel completely useless and separate from the medal systems in-game, which is far from how it should be.

What sorts of medal-related queries are you looking for? As I've said before the medal system is still in flux so there's definitely room for improvement. If you have any specific suggestions I'm happy to entertain them.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
2) Create the artwork for the medals.

And if you want these medals displayed in-game (which makes sense) you also have to design icons for in-game use. The images on the hub also have no descriptor telling you their limits (which seems to be 64x64 20kb). Though the pixel limit seems to be somewhat flunky, as I have a medal on stick wars displaying at 64x65.

3) Add the medals on the hub entry editor page.

I add all medals to the game first (as objs), in order to track them through the game, to easily access/check/view/etc them in the game itself.

4) Add code to the game to figure out when a medal has been earned.

This is about the only part that should have to be fully handled by the game.

5) Add a proc to the game to tell everyone about the achievement when one is earned.

This could be handled by BYOND, if not only optionally. The little balloon that pops up to tell you things could be used to alert you that you earned a medal.

What sorts of medal-related queries are you looking for? As I've said before the medal system is still in flux so there's definitely room for improvement. If you have any specific suggestions I'm happy to entertain them.

Using GetMedal() doesn't seem to work, just returns null for me regardless of what arguments I give it. But since you don't like the idea of using datums to setup the hub, the opposite could be possible if you could easily query all medal information.
EDIT: Any information displayed on the hub should be query-able. What medals a person has earned (do-able already supposedly), what people have earned a medal, all medals earned, when these medals were earned, etcs.

With the way I currently have my medal systems setup, they could run completely without the hub. As I've said, all the hub does is display them on the website, and it requires an extra step to get that going.
In response to Falacy
Falacy wrote:
And if you want these medals displayed in-game (which makes sense) you also have to design icons for in-game use.

Just include the images you uploaded to the hub in your source. They can be no greater than 64x64.

The little balloon that pops up to tell you things could be used to alert you that you earned a medal.

You mean those balloon tips? I hate those, most people have them disabled anyway. If you want though, you could emulate them using some interface tricks. Here's the balloon image.

Using GetMedal() doesn't seem to work, just returns null for me regardless of what arguments I give it.

That sounds like a code problem, it works just fine for me.
In response to Falacy
Falacy wrote:
Lummox JR wrote:
2) Create the artwork for the medals.

And if you want these medals displayed in-game (which makes sense) you also have to design icons for in-game use. The images on the hub also have no descriptor telling you their limits (which seems to be 64x64 20kb). Though the pixel limit seems to be somewhat flunky, as I have a medal on stick wars displaying at 64x65.

I can add a descriptor for that. You're correct that it should be there. The limit isn't enforced in uploaded files, although it should be showing at 64x64 everywhere on the website, so if it isn't then I'd like to fix whatever page has the problem.

3) Add the medals on the hub entry editor page.

I add all medals to the game first (as objs), in order to track them through the game, to easily access/check/view/etc them in the game itself.

That's really a design choice, no more or less valid than many others, but I don't see how it's particularly difficult to do.

5) Add a proc to the game to tell everyone about the achievement when one is earned.

This could be handled by BYOND, if not only optionally. The little balloon that pops up to tell you things could be used to alert you that you earned a medal.

That's certainly an interesting idea, although there are a couple of caveats. One is that the server would have to send the message to the client which would have to send a mnessage to their pager telling them to display the popup. (Handling it hub-side would be a pain in the butt.) Another is that not everyone would want this popup; many people disable those balloons already, so we'd have to add an option not to show those. Overall I actually kind of like the idea, but for my part I'd rather handle all this in the game myself. By doing that I can instantly show not just the user but everyone else in the game that they earned it.

Using GetMedal() doesn't seem to work, just returns null for me regardless of what arguments I give it. But since you don't like the idea of using datums to setup the hub, the opposite could be possible if you could easily query all medal information.
EDIT: Any information displayed on the hub should be query-able. What medals a person has earned (do-able already supposedly), what people have earned a medal, all medals earned, when these medals were earned, etcs.

I'm in general agreement on that, although it's possible to go overboard and add support for all kinds of queries that either won't be used much or will be too expensive to justify. In principle though I'm all for expanding our format=text listings.

Lummox JR
In response to SuperAntx
SuperAntx wrote:
You mean those balloon tips? I hate those, most people have them disabled anyway. If you want though, you could emulate them using some interface tricks. Here's the balloon image.

I already do use a pop-up like that for the most part, though it shows in the upper left and is more customized to match the game.


Lummox JR wrote:
In principle though I'm all for expanding our format=text listings.

Is there some way we can use the format=text tag to get any medal information at the moment?
Suggestions for medals/scores:

1) Getting the last X medals earned on the hub the same way you can do with getting the top X scores. It should allow you to replace the player parameter with an integer to retrieve the top X medals. Leaving the medal name null should result in top X of recent medals, inputting a name for the medal should display top X for that particular medal.

2) Better control of medals and scores on the hub. It's only possible to remove medals from someone through a world; you can't go to your hub entry and remove a medal for a particular player, nor can you reset someone's score to another value. It all has to be done via a BYOND world so I have to write something just so I can delete a couple of scores.

3) The ability to upload an .xml file to the hub which automatically adds scores/medals to the hub and binds them to keys listed within, and the ability to download such an .xml file from the hub to back-up medals/scores.

4) The ability to fully delete a medal or score from the hub, which also nullifies the medal/score from anyone that has it.

5) The ability to control which groups within a guild are allowed to see a particular medal. If you're not in the group, the medal simply does not appear to exist. Ditto for scores.

Suggestions for guilds/comments:

6) The ability to only allow comments for particular guilds a person is a member of, as opposed to all BYOND Members. You can't comment unless you're in the specified guild.

7) The ability to set an amount of days that a comment may exist. Comments past this amount of days are automatically purged. In addition, having a way to set the X amount of minimum comments a hub entry must have is also nice. (e.x. comments are purged if they're more than 14 days old, unless they belong to the top 10 last comments)

8) A better comment system, somehow linked to blogs or forums or stuff. There's something brewing up here in my mind, but I don't exactly know what. This isn't really a suggestion now is it?

9) The ability to mark a "game" as "none of the above": it isn't multi-player nor is it single-player. Instead, it's a utility: a new flag for when you're searching for resources?
Per some of the suggestions in this thread and others, I've added some new stuff to the medal display features.

First, if you're looking at your medals page (if you go to your home page by clicking the blue/red atom and then click the link for medals it will take you to the full page) you'll see links to look at all games (not just favorites), and to look at medals you haven't earned yet. If you're looking at unearned medals, it will show you those for either just your favorites, or your favorites plus any games in which you've earned another medal already.

When looking at medals on a hub entry, if you look at who has earned a specific medal you will also get a count of how many people in total have done so. If you're looking at the full medal list on the bottom of the page, it will tell you which of those medals you have already earned (and when).

Using the ?format=text parameter on a hub entry will now also give you a list of medals for the entry, except for spoiler medals. (There's no good way to authenticate whether you're able to view spoiler medals, so they won't show.) This includes their descriptions and the URLs of their icons.

Using ?command=view_medals&format=text on a hub entry will show the latest medals that users have earned (except spoilers). You can include a user=key parameter to look at just one user, or medal=name parameter (don't forget to URL-encode the name) to look at just one medal. By default this shows the most recent 25 medals. You can change that with page=N and per_page=N, with up to 100 entries per page.

You can also use http://www.byond.com/ members/?command=view_medals&format=text to view your own medals in text form. Use all=1 as a parameter to see games besides your favorites, and hub=Author.Game to see your medals for a certain hub entry.

Also, per Falacy's request there are a couple of changes to the hub entry medal editor. First, when you go to submit an icon it will tell you the image size you should use; when you choose a file it will also auto-submit. Repositioning medals is also easier now, using dropdown number lists of 1-N instead of the primitive "move up" and "move down" links. (The only reason for using the more primitive form before was it was way easier to manage. I finally found a way to do it better though. Yay progress!)

I realize this is a bit short on details like how to interpret the text formats and such, but I figure any power user (the only kind who'll use it in the first place) is gonna play with those to see anyway. Which is good, because the brainpower to explain those in depth is more than I can muster right now. :)

Lummox JR
In response to Lummox JR
Lummox JR wrote:
First, if you're looking at your medals page (if you go to your home page by clicking the blue/red atom and then click the link for medals it will take you to the full page) you'll see links to look at all games (not just favorites), and to look at medals you haven't earned yet. If you're looking at unearned medals, it will show you those for either just your favorites, or your favorites plus any games in which you've earned another medal already.

Could these possibly show a count/statistics as well? I'm meaning:
How many total medals you've earned.
How many medals you've earned on a specific game.
How many medals are available for the game.
How many medals you have left to earn.