Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
24 user(s) are online (16 user(s) are browsing Forum)

Members: 1
Guests: 23

w0dk4, more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +5€

Current balance: -65€
(last updated 10/2019)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 44 users playing Freelancer on 43 servers.
November. 11, 2019

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



PlayerData
Just can't stay away
Joined:
2008/6/16 20:41
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Posts: 312
Offline
I have found some more info on the the PlayerData struct, which i thought will represent so far.

Code:

struct PlayerData 
{
  //long                      x000, x004, x008, x00C, x010, x014, x018, x01C, x020, x024, x028, x02C, x030, x034, x038, x03C;
  //long                      x040, x044, x048, x04C, 
  wchar_t                   wszAccID[40];
  long                      x050, x054, x058, x05C3;
  //uint                      x060;
  uint                      uiNumberOfCharacters;
  //long                      x064, x068, x06C, x070, 
  char                      szCharFile[16];
  long                      x074, x078, x07C;
...


I am not sure whether the wszAccIdf is 40 or only 36 (x2) bytes big. At least the last 8 bytes from it were uninitialized cdcdcdcd pointers thought they belong to the account id field.

Also szCharFile was limited to 16 bytes from me, although it seems the other remaining bytes after it (496 bytes) are always 0 - could be that the char file was supposed to use 512 bytes at all, which makes no sense to me. The long after uiOnlineID seems to be the ShipArchID. And the right, left hand and head body addresses seems to be the

Code:

      struct structCostume
      {
        UINT head;
        UINT body;
        UINT lefthand;
        UINT righthand;
        UINT accessory[8];
        int  accessories;
      };


which would fit in.
I will try to verify that by further investigation, though if anyone else find stuff - could add it or correct it.

Posted on: 2015/4/23 21:52
Open in new window
Top
Re: PlayerData
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1909
Offline
It is indeed 40 characters for the account id. There is an unknown class/struct at 0x50, for those 0x14 bytes. It is actually a CHARACTER_ID at 0x64, which does just contain char file[512]. It is indeed a Costume at 0x2E4. x340 is bool skip_autosave. I think x3e8 is uint iLaunchBase and x3f4 seems to the base id again, as is x410 (set at BaseExit). x414 is presumably the id of a location (initialized to CreateID("NO WHERE")).

Posted on: 2015/4/26 8:08
Top
Re: PlayerData
Just can't stay away
Joined:
2008/6/16 20:41
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Posts: 312
Offline
ok reversed a bit more. Thanks Adoxa, the bool skip_autosave for me didnt work, at least it should be a BOOL - the bool takes no 4 bytes for me, hence i havent it in the following overview.

The costume seems to be twice - no idea why - but in for me both contain the same infos.

Code:

struct PlayerData 
{
  //long                      x000, x004, x008, x00C, x010, x014, x018, x01C, x020, x024, x028, x02C, x030, x034, x038, x03C;
  //long                      x040, x044, x048, x04C, 
  wchar_t                   wszAccID[40];
  long                      x050, x054, x058, x05C3;
  //uint                      x060;
  uint                      uiNumberOfCharacters;
  //long                      x064, x068, x06C, x070, 
  //long                      x074, x078, x07C;
  //long                      x080, x084, x088, x08C, x090, x094, x098, x09C, x0A0, x0A4, x0A8, x0AC, x0B0, x0B4, x0B8, x0BC;
  //long                      x0C0, x0C4, x0C8, x0CC, x0D0, x0D4, x0D8, x0DC, x0E0, x0E4, x0E8, x0EC, x0F0, x0F4, x0F8, x0FC;
  //long                      x100, x104, x108, x10C, x110, x114, x118, x11C, x120, x124, x128, x12C, x130, x134, x138, x13C;
  //long                      x140, x144, x148, x14C, x150, x154, x158, x15C, x160, x164, x168, x16C, x170, x174, x178, x17C;
  //long                      x180, x184, x188, x18C, x190, x194, x198, x19C, x1A0, x1A4, x1A8, x1AC, x1B0, x1B4, x1B8, x1BC;
  //long                      x1C0, x1C4, x1C8, x1CC, x1D0, x1D4, x1D8, x1DC, x1E0, x1E4, x1E8, x1EC, x1F0, x1F4, x1F8, x1FC;
  //long                      x200, x204, x208, x20C, x210, x214, x218, x21C, x220, x224, x228, x22C, x230, x234, x238, x23C;
  //long                      x240, x244, x248, x24C, x250, x254, x258, x25C, x260;
  char                      szCharFile[512];
  uint                      uiShipArchetype;
  float                     fRelativeHealth;
  CollisionGroupDescList    collisionGroupDesc;
  EquipDescList             equipDescList;
  int                       uiRank;
  int                       iMoneyNeededToNextRank;
  //long                      x28C, x290, x294, x298, x29C, x2A0, x2A4, x2A8, x2AC, x2B0, x2B4, x2B8, x2BC;
  struct structCostume
  {
    UINT head;
    UINT body;
    UINT lefthand;
    UINT righthand;
    UINT accessory[8];
    int  accessories;
  };
  structCostume             strCostume1;
  long                      x2C0, x2C4, x2C8, x2CC, x2D0, x2D4, x2D8, x2DC, x2E0;
  //uint                      uiHead;
  //uint                      uiBody;
  //uint                      uiLeftHand;
  //uint                      uiRightHand;
  //long                      x2F4, x2F8, x2FC;
  //long                      x300, x304, x308, x30C, x310, x314;
  //long                      x2E4, x2E8, x2EC, x2F0, x2F4, x2F8, x2FC;
  //long                      x300, x304, x308, x30C, x310, x314;
  structCostume             strCostume2;
  uint                      uiReputation;
  int                       iInspectCash;
  int                       iCyclicRedundancyCheck;
  long                      x324;
  EquipDescList             oShadowEquipDescList;
  int                       iNumKills;
  int                       iNumMissionSuccesses;
  int                       iNumMissionFailures;
  long                      x340;
  //bool                      bSkipAutosave;
  long                      x344;
  uint                      uiOnlineID;
  uint                      uiShipArchID;
  Vector                    vPosition;
  Matrix                    mOrientation;
  FLString                  flStrWeaponGroup; // 0x10 bytes
  long                      x3C0, x3C4;
  ushort                    usLastEquipID;
  ushort                    x3CA;
  uint                      uiMenuItem;
  long                      x3D0, x3D4, x3D8, x3DC;
  uint                      uiSystemID;
  uint                      uiShipID;
  long                      x3E8;
  uint                      uiBaseID;
  uint                      uiLastBaseID;
  long                      x3F4;
  uint                      uiBaseRoomID;
  uint                      uiCharacterID;
  class CAccount            *poAccount;
  class CPlayerGroup        *poPlayerGroup;
  uint                      uiMissionID;
  uint                      uiMissionSetBy;
  long                      x410, x414;
};

Posted on: 2015/5/3 20:26
Open in new window
Top
Re: PlayerData
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1909
Offline
bool's are bytes, which get padded to align the next member (i.e. struct { bool b; int i;} is typically stored as struct { bool b; char pad[3]; int i;}. Likewise, 0x3ca is just padding after the short.

0x34c (uiShipArchID) is actually bool cheated, I think; 0x320 (iCyclicRedundancyCheck) is actually iWorth (when you land on a base, to detect cheating when you exit).

0x324 is a copy of uiShipArchetype (cheat detection).

0x344 seems to be a count of how many times the character has been saved (per login).

0x3c0 is initialized to 0, but does not seem to be used.

0x3c4 is float difficulty (initialized to 1; restricted to 0 to 2).

0x3d0 seems to be your player number (i.e. the one-based Players index).

0x3dc is some kind of trade request counter.

0x3e8 is the id of the ship that was created.

0x3f4 is the id of the base you entered (this is the one that is tested for some Req functions); 0x410 is the base just exited.

0x414 is the unsaved but loaded starting_ring, whatever that is.

Posted on: 2015/5/5 4:20
Top