Starfleet Command II: Empires At War
Dynaverse II SQL Support
Test Package R13
2002-04-25

Changes (since R12):

* Fixed a crash in the auction code for SQL.

* Server no longer increments NextID 5000 at startup.
* Server updates NextID once every 10 seconds or on
  the next insert command following a 10 second delay.
* If an insert fails due to a duplicate key, another ID
  is assigned and the object insert is attempted until
  it succeeds.

* Included a debug version of the ServerPlatform with a symbol
  debugging table file to help find remaining crashing problems.

  For people interested in helping but unfamiliar with Dr.
  Watson, go to this link:

  http://windows.about.com/library/weekly/aa000903a.htm

  Instructions for use:

  1. Go to Start->Run and type in "DrWtsn32".
     Ensure that "Dump all thread contents" is on.  Click OK.
  2. Edit Debug.gf and set DialogBox = 0, CatchAll = 0 <-- important
  3. Run ServerPlatformD.EXE

  When a crash occurs, find the Dr. Watson log file on your
  computer and zip it up, and send it to jking@prospeed.net

  If you get an assertion dialog, go click "Retry" and I
  think it will generate a crash dump.

Version: 2.0.1.3 Build 24
Compatible with 2.0.1.3 clients

SQL Databases supported/tested thus far: mySQL

The file Dyna2-SQL-Notes.txt contains very rudimentary
instructions for getting started.  They are very important
so please read them.

The file ServerPlatform.EXE is a drop-in replacement
for the file you already use.  The difference is this
one implements SQL support.  You can turn on SQL support
in the Database.gf file.

The file ServerPlatformXtra.EXE will do some extreme logging
to help resolve difficult problems.  This will generate 1 megabyte
of information per 10 minutes for about 10 users.

Use the forum and/or mailing list to report issues so
that both KhoroMag and Taldren can see them.


Notes for Battle Logging
------------------------

BattleParticipant.VictoryLevel values (ordinal in Score.gf):

0 = AstoundingVictory
1 = Victory
2 = Draw
3 = Defeat
4 = DevastatingDefeat

* Battle.BeginTime is not currently initialized (because it's unknown).
* BattleParticipantShips.GetDamagePercentAtEnd values are not fully
  understood at this time however they do seem to reflect relative
  damage amounts.


Banning Users
-------------

A new table called LoginBan has been created.  The database is queried
to see if there are any matches in any columns in any rows for the
WONname (email address), CharacterName, or IP Address.  Right now no
wildcards are supported, sorry.  The fields are not bound together,
for example you cannot ban people with a certain name from a certain
IP address; if they match any of the three fields anywhere in the table
then they are banned.

When a user is banned they are sent an "Incorrect Password" login message
indicating they do not have access to the server.  A better message will
show up in the next edition of the client (remind me to do this).

Late note: Internally the Dyna doesn't pony up the "CharacterName" value
(typed into the login page) for inspection.  Therefore, you cannot ban
people based on their character name.  You can ban based on the WONName
(which is the email address) and the IPAddress.  If you happen to insert
the value '' (empty string) into any of the CharacterName records, you'll
end up banning everybody.  Be careful to only insert what you need, and
leave the other fields blank.  If you ban someone who tries to create a
new character and then unban them, it will cause their client to crash and
could cause server instability.  I recommend never unbanning someone
right now.

- MagnumMan ICQ 65325650
