To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Foomer.HubDatum##version=3 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Foomer.HubDatum##version=3 |
The purpose of this library is to make it easy to extract information from a BYOND game's hub page and use that information inside the game. An example of how this could be used would be to generate a list of available game servers for the player to connect to from within the game. That means you may never have to visit the BYOND hub in order to connect to an online game, because you can do it from within the game itself!
How this library works is that you create a new hub datum by any name you want, and specify the game path for the datum to extract its information from, like this: var/hub_page/page = new(path) The "path" can be something like Abra.Castle or Foomer.SolarConquest. It should be NOTED however that this function does periodically fail to extract information from the hub because of being unable to contact it, so you should always make sure that the newly created datum is not null, meaning it failed to contact the hub. var/hub_page/page = new("Foomer.SolarConquest") Once the datum has been created, you can read any of its variables just like you could any other object in the game. The datum may also include a list containing a series of server datums with information about each of the games servers. If at any time you want to update the datum to contain the most recent information from the hub (NOTE: There is still a chance this mail fail), you can use the datum.Update() proc to update its variables. page.Update() If Update() is called on a datum that has already had its information filled out, it will use the datum's path as the argument for this, so you may not need to supply one. Here is a complete list of all the hub and server datum variables: HUB DATUM VARIABLES:
|
Please support BYOND through Membership or a donation!
|
Related Libraries
|
|||||||||||||||||||||||||
More Libraries by Foomer
|
Copyright © 2024 BYOND Software.
All rights reserved.