www.ClassicTW.com
https://mail.black-squirrel.com/

TWGS game data feed
https://mail.black-squirrel.com/viewtopic.php?f=52&t=31805
Page 1 of 1

Author:  John Pritchett [ Tue Jul 05, 2011 11:14 am ]
Post subject:  TWGS game data feed

Working with Micro, I've added a new function to the TWGS main menu. It's undocumented, and intended for use primarily by tools developers, but I wanted to present it here to get feedback. The feed provides server info, plus data for all games, in an xml format. As any new fields are added to the game, they will be represented here. The same data can be gathered from within each game at the intro menu using the * undocumented command. All of this data is considered public knowledge in any game.

<List>
<Server>
<Host>Epic Interactive Strategy</Host>
<Slots>25</Slots>
<Nodes>100</Nodes>
<ServerMajorVersion>2</ServerMajorVersion>
<ServerMinorVersion>05</ServerMinorVersion>
<GameMajorVersion>3</GameMajorVersion>
<GameMinorVersion>19</GameMinorVersion>
<ServerLocalTime>07/05/2011 11:00 am (Central Daylight Time)</ServerLocalTime>
</Server>
<Game>
<ID>
<GameSlot>A</GameSlot>
<GameName>My Game</GameName>
<StartDate>N/A</StartDate>
<StartTime>N/A</StartTime>
</ID>
<BigbangSettings>
<GoldEnabled>True</GoldEnabled>
<MBBSCompatibility>False</MBBSCompatibility>
<Bubbles>False</Bubbles>
</BigbangSettings>
<GeneralInfo>
<StartDay>07/05/23</StartDay>
<GameAge>5 Days</GameAge>
<LastExternDay>09/24/22</LastExternDay>
<InternalAliens>False</InternalAliens>
<InternalFerrengi>False</InternalFerrengi>
<ClosedGame>False</ClosedGame>
<ShowStardock>True</ShowStardock>
<TurnBase>1000 Turns</TurnBase>
<TimeOnline>Unlimited</TimeOnline>
<InactiveTime>14400 Min</InactiveTime>
<LastBustClearDay>09/25/22</LastBustClearDay>
</GeneralInfo>
<Startup>
<InitialFighters>30</InitialFighters>
<InitialCredits>300</InitialCredits>
<InitialHolds>20</InitialHolds>
<NewPlayerPlanets>True</NewPlayerPlanets>
</Startup>
<Settings>
<DaysTilDeletion>30 Days</DaysTilDeletion>
<ColonistRegenRate>750</ColonistRegenRate>
<MaxPlanetSector>5</MaxPlanetSector>
<MaxCorpMembers>5</MaxCorpMembers>
<FedSpaceShipLimit>5</FedSpaceShipLimit>
<PhotonMissileDuration>20 Sec</PhotonMissileDuration>
<CloakFailPercent>3%</CloakFailPercent>
<DebrisLossPercent>3%</DebrisLossPercent>
<TradePercent>60%</TradePercent>
<StealBuy>True</StealBuy>
<ProductionRate>5</ProductionRate>
<MaxProductionRegen>100</MaxProductionRegen>
<MultiplePhotons>False</MultiplePhotons>
<ClearBustDays>7 Days</ClearBustDays>
<StealFactor>100%</StealFactor>
<RobFactor>100%</RobFactor>
<PortProductionMax>65530</PortProductionMax>
<RadiationLifetime>14 Days</RadiationLifetime>
<FighterLockDecay>1440 Min</FighterLockDecay>
<InvincibleFerengal>False</InvincibleFerengal>
<HighScoresUpdateMode>On demand</HighScoresUpdateMode>
<MBBSCombat>False</MBBSCombat>
<DeathDelay>True</DeathDelay>
<ShowWhosOnline>True</ShowWhosOnline>
<FedSpacePhotons>False</FedSpacePhotons>
<InteractiveSub-prompts>False</InteractiveSub-prompts>
<AllowAliases>True</AllowAliases>
<AlienSleepMode>Active</AlienSleepMode>
<PhotonsDisablePlayers>True</PhotonsDisablePlayers>
<AllowMBBSMegaRobBug>True</AllowMBBSMegaRobBug>
<MaxTerraColonists>100000</MaxTerraColonists>
<MinimumLoginTime>None</MinimumLoginTime>
<TurnAccumulationDays>0</TurnAccumulationDays>
<CaptureFailPercent>0%</CaptureFailPercent>
<PodlessCaptures>Always</PodlessCaptures>
<MaxBankCredits>0 cr</MaxBankCredits>
</Settings>
<Emulation>
<InputBandwidth>1 Mps Broadband</InputBandwidth>
<OutputBandwidth>1 Mps Broadband</OutputBandwidth>
<Latency>150 ms</Latency>
</Emulation>
<Timing>
<ShipDelay>Constant (250 ms)</ShipDelay>
<PlanetDelay>None</PlanetDelay>
<OtherAttacksDelay>None</OtherAttacksDelay>
<EProbeDelay>None</EProbeDelay>
<CrimeDelay>Constant (2 s)</CrimeDelay>
<PhotonLaunchDelay>None</PhotonLaunchDelay>
<PhotonWaveDelay>None</PhotonWaveDelay>
<GenesisLaunchDelay>None</GenesisLaunchDelay>
<ICPowerupDelay>None</ICPowerupDelay>
<PIGPowerupDelay>None</PIGPowerupDelay>
<PlanetLandingTakeoffDelay>None</PlanetLandingTakeoffDelay>
<PortDockDepartDelay>None</PortDockDepartDelay>
<ShipTransporterDelay>None</ShipTransporterDelay>
<PlanetTransporterDelay>None</PlanetTransporterDelay>
<TakeDropFightersDelay>None</TakeDropFightersDelay>
<DropTakeMinesDelay>None</DropTakeMinesDelay>
</Timing>
<Costs>
<TavernAnnouncement>100 cr</TavernAnnouncement>
<LimpetRemoval>5,000 cr</LimpetRemoval>
<ReregisterShip>5,000 cr</ReregisterShip>
<CitadelTransportUnit>50,000 cr</CitadelTransportUnit>
<CitadelTransportUpgrade>25,000 cr</CitadelTransportUpgrade>
<GenesisTorpedo>20,000 cr</GenesisTorpedo>
<ArmidMine>1,000 cr</ArmidMine>
<LimpetMine>10,000 cr</LimpetMine>
<Beacon>100 cr</Beacon>
<TypeITWarp>50,000 cr</TypeITWarp>
<TypeIITWarp>80,000 cr</TypeIITWarp>
<TWarpUpgrade>10,000 cr</TWarpUpgrade>
<PsychicProbe>10,000 cr</PsychicProbe>
<PlanetScanner>30,000 cr</PlanetScanner>
<AtomicDetonator>15,000 cr</AtomicDetonator>
<Corbomite>1,000 cr</Corbomite>
<EtherProbe>3,000 cr</EtherProbe>
<PhotonMissile>40,000 cr</PhotonMissile>
<CloakingDevice>25,000 cr</CloakingDevice>
<MineDisruptor>6,000 cr</MineDisruptor>
<HolographicScanner>25,000 cr</HolographicScanner>
<DensityScanner>2,000 cr</DensityScanner>
</Costs>
<Universe>
<Sectors>1000</Sectors>
<Users>200</Users>
<Ships>800</Ships>
<Ports>400</Ports>
<Planets>200</Planets>
<MaxCourseLength>45</MaxCourseLength>
</Universe>
<Tournament>
<TournamentMode>0</TournamentMode>
<DaysToEnter>0 Days</DaysToEnter>
<MaxTimesBlownUp>0</MaxTimesBlownUp>
</Tournament>
<Dynamic>
<LocalGameTime>11:00:41 AM</LocalGameTime>
<ActivePlayers>0</ActivePlayers>
<PercentPlayersGood>N/A</PercentPlayersGood>
<ActiveAliens>0</ActiveAliens>
<PercentAliensGood>N/A</PercentAliensGood>
<ActivePorts>381</ActivePorts>
<PortValue>6913</PortValue>
<ActivePlanets>2</ActivePlanets>
<PercentPlanetCitadels>50</PercentPlanetCitadels>
<ActiveShips>0</ActiveShips>
<ActiveCorps>0</ActiveCorps>
<ActiveFigs>14090</ActiveFigs>
<ActiveMines>44</ActiveMines>
</Dynamic>
</Game>
<Game>
...
</Game>
<Game>
...
</Game>
</List>

Author:  Singularity [ Tue Jul 05, 2011 12:19 pm ]
Post subject:  Re: TWGS game data feed

The intro menu? Do you mean the "Enter your choice" prompt? If so, can we pick another key? There's already a * command there that gets a lot of use.

Author:  John Pritchett [ Tue Jul 05, 2011 12:39 pm ]
Post subject:  Re: TWGS game data feed

The "*" command at the startup menu has been there since the early 2000s.

Author:  Singularity [ Tue Jul 05, 2011 2:25 pm ]
Post subject:  Re: TWGS game data feed

Yes, but if it's the command and menu I think it is, then it doesn't output the results as XML. It only outputs as a set of key/value pairs. That is data we already make heavy use of, so changing the format to XML would cause problems (lots of scripts and helpers parse it the way it is). That's why I'm asking if you can leave that data the way it is, and add the XML output as another key instead.

Author:  John Pritchett [ Tue Jul 05, 2011 2:54 pm ]
Post subject:  Re: TWGS game data feed

Oh, gotcha. Yeah, it's not changing. I continue to use standard INI formatting of Var=Val with [Category] groups. But the same data is available in both this * feed and the outer $ xml feed. The advantage of the outer feed is you can just grab everything without logging into games, which is a simplification for bots that want to track a server's state.

Author:  Singularity [ Tue Jul 05, 2011 3:03 pm ]
Post subject:  Re: TWGS game data feed

Ah ok. So I'm confused then, how do we access the new info?

Author:  Micro [ Tue Jul 05, 2011 3:11 pm ]
Post subject:  Re: TWGS game data feed

Singularity wrote:
Ah ok. So I'm confused then, how do we access the new info?

Just send $ from the "Selection (? for menu) :" prompt.

Author:  Singularity [ Tue Jul 05, 2011 3:19 pm ]
Post subject:  Re: TWGS game data feed

Ahh, ok, I see. It goes thru all games and pulls up their info. Nice. Very useful, should shave about 10 seconds off my automated startup, too.

Author:  John Pritchett [ Tue Jul 05, 2011 3:23 pm ]
Post subject:  Re: TWGS game data feed

Good to hear.

Author:  Micro [ Tue Jul 05, 2011 3:28 pm ]
Post subject:  Re: TWGS game data feed

Singularity wrote:
Ahh, ok, I see. It goes thru all games and pulls up their info. Nice. Very useful, should shave about 10 seconds off my automated startup, too.

It's going to shave 2-4 minutes off of Microbot's scan time. Maybe more with servers that have a full 25 slots.

Author:  John Pritchett [ Tue Jul 05, 2011 4:23 pm ]
Post subject:  Re: TWGS game data feed

I do have it pacing pretty slow because I don't want people to be able to load the server with this command. It could be faster. It's basically set to 1 second per game slot minimum, though it will take longer to process dynamic data when a data refresh is required (once per hour).

Author:  Micro [ Tue Jul 05, 2011 6:26 pm ]
Post subject:  Re: TWGS game data feed

It's fast enough, even if they have a full 25 slots it will only take about 30 seconds to scan a server.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/