Automatic Server Feeds

Started by Mr-Miagi, Nov 29, 2019, 08:09 pm

Previous topic - Next topic

Mr-Miagi

Nov 29, 2019, 08:09 pm Last Edit: Oct 06, 2020, 09:03 pm by Mr-Miagi Reason: added link
If you're a server admin and wish to have your servers resources automatically reported, we can do that. We will need an xml file of "currently in spawn" resources that can be polled by our server at regular intervals. This file would be something you generate on your end and host on your web server.

We do not need any more resource info outside of current in spawn, e.g. no need for telling us when it despawns, as our feed logic already has this comparison functionality between our db and whats being fed to us in the "current" export. Thus your export only needs to include whats currently in spawn.

To get it setup we need:
  • The URL of your xml export that we can poll from our server
  • Suggested polling interval (e.g. how often should we process it, I would suggest no less than a few hours)

You may post this information to this thread, or PM me directly, or even contact me on discord directly if you do not wish that info to be public.

Pros and Cons:
Automation is both a pro and a con in itself. Many players feel that reporting resources is part of the game, if your server community is ok with automated reporting then feel free to request it.

Below is a sample xml format that our processor can read. If you already have an export of your own design we can adjust if needed, but the below is perfect if you are needing guidance (the comments of course should be omitted).

<?xml version="1.0" encoding="utf-8"?>
<current_resources generated="Fri, 29 Nov 2019 00:00:06 -0800">
<resource><!-- xml resource container -->
  <name>ahinoovee</name><!-- Full name of resource -->
  <available_date>Fri, 22 Nov 2019 16:11:07 -0800</available_date><!-- date and time that resource spawned -->
  <resource_class>Agrinium Aluminum</resource_class><!-- Full name of Resource Class -->
  <stats><!-- stats go in this group. if resouce does not have a stat (e.g. ER in this example), then that line can be omitted -->
    <CR>278</CR>
    <CD>485</CD>
    <DR>245</DR>
    <HR>423</HR>
    <MA>405</MA>
    <OQ>569</OQ>
    <SR>449</SR>
    <UT>473</UT>
  </stats>
  <planets><!-- planet names that resource is spawning on go in this group. -->
    <planet>Dathomir</planet>
    <planet>Endor</planet>
    <planet>Lok</planet>
    <planet>Naboo</planet>
    <planet>Rori</planet>
    <planet>Talus</planet>
    <planet>Tatooine</planet>
    <planet>Yavin 4</planet>
  </planets>
</resource>
<resource><!-- xml resource container -->
  <name>examplename</name><!-- Full name of resource -->
  <available_date>Fri, 22 Nov 2019 16:11:07 -0800</available_date><!-- date and time that resource spawned -->
  <resource_class>Unknown Reactive Gas</resource_class><!-- Full name of Resource Class -->
  <stats><!-- stats go in this group. if resouce does not have a stat then that line can be omitted -->
    <DR>125</DR>
    <OQ>523</OQ>
  </stats>
  <planets><!-- planet names that resource is spawning on go in this group. -->
    <planet>Dathomir</planet>
  </planets>
</resource>
</current_resources>

To generate the xml from your game server, the following is a link from a generous dev who is currently doing this on their server if you need help getting started: https://github.com/Ewoog/SWGAide_XML_Dump



Adapt what is useful, reject what is useless, and add what is specifically your own.