Readme.txt 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. ################################
  2. # EQ2Emulator PacketParser.exe #
  3. ################################
  4. Contents
  5. --------
  6. 1. Legal and Disclaimers
  7. 2. What is PacketParser.exe?
  8. 3. Before you begin
  9. 4. Parsing your logs
  10. 5. Populating your EQ2Emulator database
  11. 6. Conclusion
  12. 1. Legal and Disclaimers
  13. =======================================
  14. There is nothing "Legal" or "Illegal" about using this tool as it is licensed under GPL, so
  15. don't hack it, reverse-engineer it, and re-release it calling it your own great tool. The
  16. only thing I want to really emphasize here is, if you use this tool to parse logs and populate
  17. your database, YOU ARE 100% RESPONSIBLE FOR THE OUTCOME.
  18. In no way, shape, or form is EQ2Emulator.net, developers, or database designers responsible
  19. for you losing data, or encountering an inability to parse and populate properly. This tool,
  20. like every other aspect of EQ2Emulator, is in a constant state of change and update, and at
  21. times will cease to function. However, it is not a high priority for the EQ2Emulator team to
  22. get it working again.
  23. In other words, be patient, report problems in a mature, friendly,
  24. respectful manner, and the problems will be resolved and a new parser package released.
  25. 2. What is PacketParser.exe?
  26. =======================================
  27. PacketParser.exe is the small utility that analyzes your collected packets from EQ2 Live game
  28. and turns them into "raw" data for use in building your world. This tool is only needed if you
  29. choose to build worlds based on the EQ2 Live experience. You can use this tool to parse Spawns,
  30. Items, Merchant lists, Factions, Spell and Collection data, and Quest/Conversation from the live
  31. game, with additional support added during the EQ2Emulator Alpha development cycle.
  32. In order to use PacketParser.exe, you of course need to have collected a log from the live game.
  33. You can collect the game data yourself using EQ2PacketCollector.exe - a separate tool (and thus
  34. documented separately). EQ2PacketCollector.exe is no longer available freely to the public, but
  35. you may PM John Adams or LethalEncounter on the EQ2Emulator.net forums to receive a copy of the
  36. program.
  37. 3. Before You Begin
  38. =======================================
  39. Before you can parse a packet collect, you should have a local instance of MySQL 5.x installed.
  40. You can have MySQL on your Windows XP workstation, or somewhere on your network - it does not have
  41. to be on the same machine... but your database should not be located via a WAN or over the internet.
  42. It would be far too slow!
  43. Create a folder, example C:\eq2parser, and put the following files into that folder:
  44. Required:
  45. - PacketParser.exe
  46. - zlib.dll (downloadable package - search for it on the internet)
  47. - WorldStructs.xml
  48. - SpawnStructs.xml
  49. - ItemStructs.xml
  50. - parser_db.ini
  51. - Parser DB.sql (not needed except to source in raw DB structures)
  52. Optional (if you wanted to script some mysql actions)
  53. - parse-all.bat
  54. - mysql.exe
  55. - mysqldump.exe
  56. MySQL Database setup:
  57. Assuming you use SQLYog or some other MySQL GUI Tools (google them, they are your friend), you must
  58. connect to your MySQL instance and create a blank database. Refer to MySQL documentation on creating
  59. a database. Example database name for the parser: eq2_rawdata.
  60. "Source" in the included Parser_DB.sql file - by this we mean open this Query and execute it so it
  61. will build the database structure required by PacketParser.exe - without this, you are going nowhere.
  62. If you encounter errors, you need to explore how to get around them as this is not a lesson in becoming
  63. a Database Administrator. :)
  64. Once your database is created and you see tables like "raw_spawns", "raw_items", "raw_spells" etc, you
  65. are almost ready to go.
  66. NOTE: Since PacketParser.exe is now a "controlled release", updates to both the EXE and Parser DB.sql
  67. will usually be posted in In-House Tools, under PacketParser.
  68. parser_db.ini:
  69. Edit parser_db.ini to reflect your database settings. Here is an example:
  70. [Database]
  71. host=localhost
  72. user=root
  73. password=sekr3t
  74. database=eq2_rawdata
  75. host: the IP or FQDN (fully qualified domain name) of your MySQL server. If it is on the same machine,
  76. use "localhost"
  77. user/password: This is a MySQL account that has SELECT, INSERT, UPDATE, and DELETE rights to your
  78. eq2_rawdata database.
  79. database: The name of your raw database - in my example, eq2_rawdata.
  80. 4. Parsing Your Logs
  81. =======================================
  82. Included in your PacketParser package is a sample BATCH file that is designed to identify *.log files
  83. in the current directory and execute the PacketParser.exe (with parameters) on each file individually.
  84. Once the parser is done with the file, it will move it off to a "Done" folder. This is to prevent the
  85. same log from being re-parsed should you have to stop and restart the job.
  86. Move your log(s) into your C:\eq2parser directory with your other parser files, and simply run the
  87. included "parse-all.bat" file. This batch files is executing the following command:
  88. - PacketParser.exe -spawns -items -spells -quests -factions -collections {log_file}
  89. You can run the command-line version of the PacketParser.exe yourself - you do not need to use the
  90. batch file. Run PacketParser.exe and hit ENTER to see a list of command-line options.
  91. Example, if you just want to parse Spell information from your logs, run:
  92. - PacketParser.exe -spells {log_file}
  93. * Replace {log_file} with the name of your collected log (ie., EQ2PacketLog.log)
  94. You can stack the command-line options as many or as few as you like. There has to be at least one,
  95. and for PARSING logs, -populate is not valid (see next chapter).
  96. NOTE: The parse-all.bat file is setup to output parser data to a parser_log.txt file. This is the
  97. troubleshooting information we would need to see if you are having problems. Simply post your problem
  98. and attach that text file. If it is larger than 10kb, you probably should ZIP/RAR it first.
  99. 5. Populating your EQ2Emulator Database
  100. =======================================
  101. During the 0.7.0 development cycle of EQ2Emulator, some critical changes have been made to the database
  102. structures regarding Items, Spawns, Spells and Quests. Take note of these as you continue populating
  103. your worlds using our tools. Recently, major changes to the Spawns structure broke the -populate
  104. functionality, but a new parser was released to resolve this issue.
  105. To populate your EQ2Emulator World database, simply run the following command:
  106. PacketParser.exe -populate {eq2world_db}
  107. * Replace {eq2world_db} with the name of your database that EQ2World.exe uses
  108. The -populate command will move all raw Spawn data from parser DB to World DB for use in your world.
  109. There are a few other commands currently available:
  110. -loaditems - this will populate the Items tables in your World DB from Raw data
  111. -loadfactions - this will populate the Factions tables in your World DB from Raw data
  112. 6. Conclusion
  113. =======================================
  114. There is literally tons of RAW data coming from packet logs, some we do not even utilize yet in the -populate
  115. commands of Parser. Examples of some of this data is:
  116. raw_dialogs : These are the conversations you have with NPCs in game, with the clickable option buttons
  117. raw_conversations : These are the casual shouts NPCs give as you pass by or Hail them - no interaction
  118. raw_map_data : You should update your map_data table in your World DB with newly parsed raw_map_data as needed
  119. raw_merchant_items : As you parse Items, if they came from a merchant window, this table shows you what spawn_id had what item_id
  120. raw_quests : This data is what we use to build LUA scripts for quests - currently no automation available
  121. raw_sounds : These are your door squeaks and other sound effects in game, mapped to their raw_spawn ID
  122. raw_spells : This data is used to build our Spells lists, or update existing information with new captured data
  123. raw_zone_points : This is an attempt for the collector/parser to locate any known zone-in-points when you zone while collecting (not always accurate)
  124. There is so much more we can gleen from our logs we hvae yet to discover. If you feel like helping identify
  125. some of this data, feel free to join in on the conversations in Development and offer your help.
  126. Happy World Building!
  127. -John Adams