Gosh, thanks!
Funny you should mention perl...
I was having a heck of a time trying to find a function in php
to convert a little-endian 4 byte longint to a decimal value and
when I read in the php onlne documentation comments about
the superior function of the perl pack and unpack functions I
considered moving over to perl. I got stubborn though and
figured out a way to make php do it.
This was to calculate the stardate from the currenttime blob
in the database. Now that I have figured it out though, the
value after the decimal point on my calculated stardate does
not match that of the stardate on the campaign map. The
year does match however.
(Not the stardate at the serverlist - that one is always wrong)
I guess the value after the decimal point on the campaign map
is not a simple fraction of the year that has passed ...
I searched on the web and found nothing conclusive on
calculating star trek stardates (only that the TOS dates are not
consistent with TNG dates). Anybody know how the stardate
is calculated exactly in SFC?
I am calculating it as: stardate = (TurnNo / TurnsPerYear) + BaseYear
I have added considerably to the information presented from
the SQL D2 database on my site in the last week (economy, news,
player count and player ships on the roster, campaign info).
But I am slowing down as I get to the data that is stored in blobs in the SQL
database (flatfile leftovers?). I want to tackle the politicaltension
matrix next, and I am saving what I see as the most difficult
for last - the full shipyards with damage and stores info.
Currently, the site only displays info from the database - no
updates yet. Ideally I want to create an external shipyard that
will update all the appropriate fields, blob chunks and db
object count to allow for external manipulation of the shipyards.
(as discussed above...)
After making all this progress with the php and SQL I regret
to say that I don't think I'll be returning to the flatfile database
as promised. I will do my best to figure out how to update
the new db with old account info though.
That is kind of where I am stuck though, updating the database
properly. (Like how to assign ships etc...) I could use a jumpstart
on that if anyone has the time to explain.
I saw your battle in 19,10 on the battles list, Intruder. The one
against four AI - I felt for ya .
(Ugh, nebula hex at that too!)
Note: I added the campaign difficulty from the db to the Campaigns page
(currently set to Commodore). I'm not sure but maybe this affects what
type of base appears in missions? I know it makes for nasty ambush missions!
(Future servers will likely use new missions from ED and clintk which may
change this...)
There is also a java project in the works which has a lot more potential that
I want to contibute to, but that is being slowed down by our lack of knowledge of
the blob structures. We have figured some of them out, but
any help would be greatly appreciated (no need to re-invent the wheel,
oops, no pun intended...).
I'm having a lot of fun working on this, it's nice to see others appreciate it too!
(I have to fly more though, my piloting skills are getting a little rusty with
all this time spent on db analysis!)