Jump to content

Rrf Replay Parser

Recommended Posts


This tool parses replay files (rrf) and outputs a readable format. It is used to gather data from official replay files by extracting NPC dialogues, quest status, skill cast time, after-cast delay, etc. Say you want to replicate an official instance, you would get a replay of it and then extract the data using this tool. You'll be able to follow along the mes dialogues, the next statements, etc, when making the actual script. You can save a lot of time doing so.

It is a tool I've been using heavily for many years now and it was made to fit my needs, so some stuff may not seem very useful to you. Because of this, I'm making the project public so you're free to add more features/information as you see fit. The source for the Replay format as far as I'm aware is from Dia (from Divine Pride), so huge thanks on that side.

Some replays may not work as this tool was made specifically for kRO replays (and I've been removing support for older versions throughout the years).



How it works

  • Change the replay path to your replay and click "Parse Replay" to start the process. Once that's done, you should get the output shown above.
  • Choose the parsing options on the left if you don't want to include useless data. It may be useful for some though.
  • The [output] options are files generated in your folder\output\file.txt.

Main output

  • NPC scripts. All the NPCs that have been seen (in order) will be put there with a pre-made script. It will also show "npc_avail" for some very specific NPCs. On kRO, some NPCs don't actually have a view ID but are actually characters with a style. This is what npc_avail is for (though it's not something rAthena supports at the moment). For example:
    [email protected],12,107,3	script	³ªÀÌÆ® ¿öÄ¡#nw3	npc_avail[4306,0,21,7,0,0,0,0,0,0,0],{

    Which corresponds to:

  • Equipment. The next entry in the main output is the player equipment with the @item2 command to remake the gears quickly. This only includes equipped items. The other pieces of equipment in the inventory are not included there.

  • Monster spawned. This part will include all the monsters that have spawned and it will not show them more than once.

  • Packet output. That is the main part of the parsed script. It will give you the script lines, cutins, and much more.
    It will detect cloakoffnpcself, but don't trust the output blindly either. Sometimes kRO just hides a NPC for dumb reasons. Though usually it should be accurate.

Parsing options

Most of the fields are self-explanatory, so I'll only go over those that aren't.

  • Show raw packets. Outputs the packets in hexadecimals rather than a readable format.
  • Revert instance names. Looks for ###[email protected] in map names and reverts it back to the original map name. This also changes NPC names that got converted such as something#ins_0o1 to something#ins.
  • Generic packet. This one contains pretty much everything not included in the other options.
  • UnitWalk packet. This one is disabled by default, but you might consider turning it on if you're doing newer instances because kRO uses those a lot lately. When a NPC moves, it will be shown there.


A special file is generated alongside the replay in the output folder called "mob_data.conf" (though it's not a real libconf format). The mob_data.conf file contains data gathered from the mobs inside the replay such as mob level, speed, damage motion, attack motion, boss type, skills used and mob drops. As far as mob drops go however, be careful as the tool makes a lot of estimation there. For example:

  •     Mob Death: 148
        1000364,135    Dropped: 2
  • The above means the mob has been killed 148 times, and only one drop has been seen (1000364). The estimated drop rate is 1.35%.

A drop is defined as an item dropped alongside the unit_dead packet. So it may be wrong, or if the mob is looter type, you'll get a bunch of invalid results. Though usually it's a fair estimation.

Tool > Translation helper

So if you put the following as the input:

select("¾îµð·Î °¡¸é µÇÁÒ?:"); // TICK: 19263 ms, INTERVAL: 0, FORMAT: 0:19
mes "[¸¶¶÷]"; // TICK: 19746 ms, INTERVAL: 433, FORMAT: 0:19
mes "¾ÆÀÌ»þ°¡ ¾îµð¼­ »ì¾ÒÁö? ¾Æ! ÀÌ <NAVI>[À­ÂÊ]<INFO>wolfvill,99,178,0,101,0</INFO></NAVI>¿¡ °¡¸é ¾ÆÀÌ»þÀÇ ÁýÀÌ ÀÖ¾î¿ä."; // TICK: 19746 ms, INTERVAL: 0, FORMAT: 0:19
next; // TICK: 19746 ms, INTERVAL: 0, FORMAT: 0:19
mes "[½ºÄ«´Ï¾Æ]"; // TICK: 20129 ms, INTERVAL: 0, FORMAT: 0:20
mes "ÇÏÁö¸¸ ¸»Çصµ ¼Ò¿ë ¾øÀ» °É¿ä? ¼³µæÇÑ´Ù¸é, ´ç½Å¿¡ ´ëÇÑ ³» »ý°¢µµ ¹Ù²ÙÁÒ."; // TICK: 20129 ms, INTERVAL: 0, FORMAT: 0:20
npctalk "½ºÄ«´Ï¾Æ, ¸ðÇè°¡´ÔÀº ³× »ý°¢À¸·Î °¡Ä¡°¡ Æò°¡µÇ´Â ºÐÀÌ ¾Æ´Ï¼Å.", "¸¶¶÷#wms01"; // TICK: 20129 ms, INTERVAL: 0, FORMAT: 0:20
npctalk "´©°¡ ¹¹·¡? ÀßÇØÁÙ °Å¶ó°í.", "½ºÄ«´Ï¾Æ#wms01"; // TICK: 20129 ms, INTERVAL: 0, FORMAT: 0:20
next; // TICK: 20129 ms, INTERVAL: 0, FORMAT: 0:20
mes "[¸¶¶÷]"; // TICK: 20479 ms, INTERVAL: 33, FORMAT: 0:20
mes "¸ðÇè°¡´Ô, ±×·³ ´Ù³à¿À¼¼¿ä! ³ªµµ À̸¸ °¥°Ô!"; // TICK: 20479 ms, INTERVAL: 0, FORMAT: 0:20
setquest 17510; // State = 1, Time = 0 // TICK: 20479 ms, INTERVAL: 0, FORMAT: 0:20
close; // TICK: 20480 ms, INTERVAL: 1, FORMAT: 0:20

You would get the following as the output:

어디로 가면 되죠?
아이샤가 어디서 살았지? 아! 이 [윗쪽]에 가면 아이샤의 집이 있어요.
하지만 말해도 소용 없을 걸요? 설득한다면, 당신에 대한 내 생각도 바꾸죠.
스카니아, 모험가님은 네 생각으로 가치가 평가되는 분이 아니셔.
누가 뭐래? 잘해줄 거라고.
모험가님, 그럼 다녀오세요! 나도 이만 갈게!
setquest 17510;

It extracts the content and puts them in Korean for easier google/papago translate copy paste. The "select" content will be extracted, same for <NAVI> and a few other annoying cases where you end up spending more time removing the tags than actually translating.

Tool > Replay simulation

This one is meant to "transform" a replay into a script so that you can view it on your own server. The input account ID is your account id, on the test server you'll be on. This is required for the script to work correctly. You will get an output similar to


Then load the script and your character will redo what the replay file was doing. You'll probably have to put your character where the replay starts as otherwise some weird stuff is gonna happen. You'll also need the following script command as well:


	const char *input = script_getstr(st,2);
	struct block_list *bl = map_id2bl(st->rid);
	unsigned char buf[10000];
	int len = strlen(input);
	int i;

	for (i = 0; i < len; i += 2) {
		sscanf(&input[i], "%2hhx", &buf[i/2]);

	if (!bl) {
		st->state = END;

	clif_send(buf, len / 2, map_id2bl(st->rid), SELF);


This is a tool I do not plan on spending a whole lot of time on. It would be a nightmare to maintain in the first place. I will add requested features if any for a short time, but it would be much easier to add such features yourself if you are planning to use this as a base for your own needs. If you want to handle a new packet, simply go in RrfParser\Packet\PacketDecoder.cs and add it as you want. Only those I needed were handled.

The display timers are both useful and annoying. Once I'm done with a script, I usually run a quick regex to wipe out all comments and that solves that problem.

Edited by Tokei
  • Upvote 4
  • Love 3
  • MVP 4
  • Like 1
Link to comment
Share on other sites

That amazing tool ?

I can see list item in  `itemshop` like this:

-    shop    UNKNOWN_BARTER_SHOP    -1,12004:12004:1750:500,12005:12005:1770:500,12009:12009:1751:500,12008:12008:1752:500,12012:12012:1754:500,12010:12010:1755:500,12011:12011:1756:500,12014:12014:1757:500,12013:12013:1767:500,12015:12015:1762:500,12575:12575:1773:500,12576:12576:1774:500,

But cannot see the list item in normal shop ?

Link to comment
Share on other sites

8 hours ago, Vietlubu said:

That amazing tool ?

I can see list item in  `itemshop` like this:

-    shop    UNKNOWN_BARTER_SHOP    -1,12004:12004:1750:500,12005:12005:1770:500,12009:12009:1751:500,12008:12008:1752:500,12012:12012:1754:500,12010:12010:1755:500,12011:12011:1756:500,12014:12014:1757:500,12013:12013:1767:500,12015:12015:1762:500,12575:12575:1773:500,12576:12576:1774:500,

But cannot see the list item in normal shop ?

This is a barter shop, not a normal shop. You should have a more readable format below with "barter_clear" and "barter_add", though those are custom functions (found here if interested). rAthena went with a yaml approach for these types of shops, so you'll have to convert those yourself. You can find an example in npc/re/merchants/barters/refine.yml. The tool can't produce a yaml output because it would need to convert item IDs to aegis names, and that's just a nightmare nobody wants to spend time on.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...