KoA: Reckoning - 010 Editor Templates / Scripts

Information and research into the KoA: Reckoning game files and main game executable.
Post Reply
User avatar
atom0s
Site Admin
Posts: 33
Joined: Sun Apr 08, 2018 2:54 pm
Location: 127.0.0.1
Contact:

KoA: Reckoning - 010 Editor Templates / Scripts

Post by atom0s » Thu Apr 12, 2018 8:20 pm

Here is a simple script to read the 'xp_to_level_table' entry inside of the compiled lua_bxml file:
  1. // Read and print the table name..
  2. local int table_name_len = ReadByte(FTell());
  3. FSeek(FTell() + 1);
  4. local string table_name = ReadString(FTell(), table_name_len);
  5. FSeek(FTell() + table_name_len);
  6. Printf("String Length: %d\n", table_name_len);
  7. Printf("String       : %s\n", table_name);
  8.  
  9. // Read the entries..
  10. local int index = 0;
  11. local int x = 0;
  12. local int entry_t = 0;
  13. local int entry_v = 0;
  14.  
  15. for (x = 0; x < 46; x++)
  16. {
  17.     BigEndian();
  18.     entry_t = ReadByte(FTell());
  19.     entry_v = ReadUInt(FTell() + 1);
  20.     LittleEndian();
  21.     Printf("Type: %d || Index: %d || Value %d\n", entry_t, index, entry_v);
  22.     FSeek(FTell() + 5);
  23.     index++;
  24. }
Site Owner

Want to donate to say thanks? Donate via Paypal
https://www.paypal.me/atom0s
Post Reply