PlayerData
-
I have found some more info on the the PlayerData struct, which i thought will represent so far.
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
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. -
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 [c]CHARACTER_ID[/c] at 0x64, which does just contain [c]char file[512][/c]. It is indeed a [c]Costume[/c] at 0x2E4. x340 is [c]bool skip_autosave[/c]. I think x3e8 is [c]uint iLaunchBase[/c] and x3f4 seems to the base id again, as is x410 (set at [c]BaseExit[/c]). x414 is presumably the id of a location (initialized to [c]CreateID(“NO WHERE”)[/c]).
-
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.
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; };
-
[c]bool[/c]'s are bytes, which get padded to align the next member (i.e. [c]struct { bool b; int i;} [/c] is typically stored as [c]struct { bool b; char pad[3]; int i;}[/c]. Likewise, 0x3ca is just padding after the short.
0x34c (uiShipArchID) is actually [c]bool cheated[/c], 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 [c]float difficulty[/c] (initialized to 1; restricted to 0 to 2).
0x3d0 seems to be your player number (i.e. the one-based [c]Players[/c] 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 [c]starting_ring[/c], whatever that is.