LeaderboardDef Asset: Difference between revisions

From COD Engine Research
Created page with "__NOTOC__ Category:Assets Category:MW2 Category:MW3 Category:BO2 Category:Ghosts The leaderboard defintion asset defines how information sent by the server..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
[[Category:Ghosts]]
[[Category:Ghosts]]
The leaderboard defintion asset defines how information sent by the server about the players on the leaderboard is read. Infinity Ward added it early on Modern Warfare 2, while Treyarch took longer with Black Ops 2 the only game it appears on by them. Subtleties of the asset changed but the main concept remains the same, a header with an array of columns.
The leaderboard defintion asset defines how information sent by the server about the players on the leaderboard is read. Infinity Ward added it early on Modern Warfare 2, while Treyarch took longer with Black Ops 2 the only game it appears on by them. Subtleties of the asset changed but the main concept remains the same, a header with an array of columns.
== Treyarch ==
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
struct ColumnDef
enum LbColType
{
  LBCOL_TYPE_NUMBER = 0x0,
  LBCOL_TYPE_TIME = 0x1,
  LBCOL_TYPE_LEVELXP = 0x2,
  LBCOL_TYPE_PRESTIGE = 0x3,
  LBCOL_TYPE_BIGNUMBER = 0x4,
  LBCOL_TYPE_PERCENT = 0x5,
  LBCOL_TYPE_TIME_FULL = 0x6,
  LBCOL_TYPE_COUNT = 0x7
};
 
enum LbAggType
{
  LBAGG_TYPE_MIN = 0x0,
  LBAGG_TYPE_MAX = 0x1,
  LBAGG_TYPE_ADD = 0x2,
  LBAGG_TYPE_REPLACE = 0x3,
  LBAGG_TYPE_COUNT = 0x4
};
 
enum LbUpdateType
{
  LBUPDATE_TYPE_NORMAL = 0x0,
  LBUPDATE_TYPE_RANK = 0x1,
  LBUPDATE_TYPE_COMBINE = 0x2,
  LBUPDATE_TYPE_COUNT = 0x3,
};
 
struct LbColumnDef
{
  const char * title;
  int colId;
  int dwColIndex;
  bool hidden;
  const char * statName;
  LbColType type;
  int precision;
  LbAggType agg;
  const char *localization;
  int uiCalColX;
  int uiCalColY;
};
 
struct LeaderboardDef
{
  const char * name;
  unsigned int id;
  int columnCount;
  int dwColumnCount;
  int xpColId;
  int prestigeColId;
  LbColumnDef *columns;
  LbUpdateType updateType;
  int trackTypes;
};
</syntaxhighlight>
 
== Infinity Ward ==
TODO: This is off Ghosts, check other games.
<syntaxhighlight lang="cpp">
enum LbColType
{
  LBCOL_TYPE_NUMBER = 0x0,
  LBCOL_TYPE_TIME = 0x1,
  LBCOL_TYPE_LEVELXP = 0x2,
  LBCOL_TYPE_PRESTIGE = 0x3,
  LBCOL_TYPE_BIGNUMBER = 0x4,
  LBCOL_TYPE_PERCENT = 0x5,
  LBCOL_TYPE_TIME_FULL = 0x6,
  LBCOL_TYPE_COUNT = 0x7
};
 
enum LbAggType
{
  LBAGG_TYPE_MIN = 0x0,
  LBAGG_TYPE_MAX = 0x1,
  LBAGG_TYPE_SUM = 0x2,
  LBAGG_TYPE_LAST = 0x3,
  LBAGG_TYPE_COUNT = 0x4
};
 
enum LbUpdateType
{
  LBUPDATE_TYPE_NORMAL = 0x0,
  LBUPDATE_TYPE_RANK = 0x1,
  LBUPDATE_TYPE_COMBINE = 0x2,
  LBUPDATE_TYPE_COUNT = 0x3
};
 
enum StatsGroup
{
  STATSGROUP_RANKED = 0x0,
  STATSGROUP_PRIVATE = 0x1,
  STATSGROUP_COOP = 0x2,
  STATSGROUP_COMMON = 0x3,
  STATSGROUP_COUNT = 0x4,
  STATSGROUP_IGNORE = 0x5
};
 
struct __declspec(align(8)) LbColumnDef
{
{
   const char * title;
   const char * title;
      char unknown1[0xC];
  int id;
#ifdef Ghosts
  int propertyId;
      char unknown15[0x4];
  bool hidden;
#endif
  StatsGroup statsGroup;
   const char * statName;
   const char * statName;
      char unknown2[0xC];
  LbColType type;
#ifdef MW3 || Ghosts
  int precision;
      char unknown3[0x8];
  LbAggType agg;
#elif defined(BO2)
  int uiCalColX;
      const char * unknownString;
  int uiCalColY;
      char unknown3[0x8];
#endif
};
};


Line 27: Line 126:
{
{
   const char * name;
   const char * name;
      int unknown1;
  int id;
   unsigned int columnCount;
   int columnCount;
      int unknown2[2];
  int xpColId;
#ifdef BO2
  int prestigeColId;
      int unknown3;
   LbColumnDef *columns;
#endif
  LbUpdateType updateType;
   ColumnDef * columns;
  int trackTypes;
#ifdef BO2
      int unknown4[2];
#endif
};
};
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 03:27, 22 December 2014

The leaderboard defintion asset defines how information sent by the server about the players on the leaderboard is read. Infinity Ward added it early on Modern Warfare 2, while Treyarch took longer with Black Ops 2 the only game it appears on by them. Subtleties of the asset changed but the main concept remains the same, a header with an array of columns.

Treyarch

enum LbColType
{
  LBCOL_TYPE_NUMBER = 0x0,
  LBCOL_TYPE_TIME = 0x1,
  LBCOL_TYPE_LEVELXP = 0x2,
  LBCOL_TYPE_PRESTIGE = 0x3,
  LBCOL_TYPE_BIGNUMBER = 0x4,
  LBCOL_TYPE_PERCENT = 0x5,
  LBCOL_TYPE_TIME_FULL = 0x6,
  LBCOL_TYPE_COUNT = 0x7
};

enum LbAggType
{
  LBAGG_TYPE_MIN = 0x0,
  LBAGG_TYPE_MAX = 0x1,
  LBAGG_TYPE_ADD = 0x2,
  LBAGG_TYPE_REPLACE = 0x3,
  LBAGG_TYPE_COUNT = 0x4
};

enum LbUpdateType
{
  LBUPDATE_TYPE_NORMAL = 0x0,
  LBUPDATE_TYPE_RANK = 0x1,
  LBUPDATE_TYPE_COMBINE = 0x2,
  LBUPDATE_TYPE_COUNT = 0x3,
};

struct LbColumnDef
{
  const char * title;
  int colId;
  int dwColIndex;
  bool hidden;
  const char * statName;
  LbColType type;
  int precision;
  LbAggType agg;
  const char *localization;
  int uiCalColX;
  int uiCalColY;
};

struct LeaderboardDef
{
  const char * name;
  unsigned int id;
  int columnCount;
  int dwColumnCount;
  int xpColId;
  int prestigeColId;
  LbColumnDef *columns;
  LbUpdateType updateType;
  int trackTypes;
};

Infinity Ward

TODO: This is off Ghosts, check other games.

enum LbColType
{
  LBCOL_TYPE_NUMBER = 0x0,
  LBCOL_TYPE_TIME = 0x1,
  LBCOL_TYPE_LEVELXP = 0x2,
  LBCOL_TYPE_PRESTIGE = 0x3,
  LBCOL_TYPE_BIGNUMBER = 0x4,
  LBCOL_TYPE_PERCENT = 0x5,
  LBCOL_TYPE_TIME_FULL = 0x6,
  LBCOL_TYPE_COUNT = 0x7
};

enum LbAggType
{
  LBAGG_TYPE_MIN = 0x0,
  LBAGG_TYPE_MAX = 0x1,
  LBAGG_TYPE_SUM = 0x2,
  LBAGG_TYPE_LAST = 0x3,
  LBAGG_TYPE_COUNT = 0x4
};

enum LbUpdateType
{
  LBUPDATE_TYPE_NORMAL = 0x0,
  LBUPDATE_TYPE_RANK = 0x1,
  LBUPDATE_TYPE_COMBINE = 0x2,
  LBUPDATE_TYPE_COUNT = 0x3
};

enum StatsGroup
{
  STATSGROUP_RANKED = 0x0,
  STATSGROUP_PRIVATE = 0x1,
  STATSGROUP_COOP = 0x2,
  STATSGROUP_COMMON = 0x3,
  STATSGROUP_COUNT = 0x4,
  STATSGROUP_IGNORE = 0x5
};

struct __declspec(align(8)) LbColumnDef
{
  const char * title;
  int id;
  int propertyId;
  bool hidden;
  StatsGroup statsGroup;
  const char * statName;
  LbColType type;
  int precision;
  LbAggType agg;
  int uiCalColX;
  int uiCalColY;
};

struct LeaderboardDef
{
  const char * name;
  int id;
  int columnCount;
  int xpColId;
  int prestigeColId;
  LbColumnDef *columns;
  LbUpdateType updateType;
  int trackTypes;
};