Skip to content

Instantly share code, notes, and snippets.

@szaaamerik
Created May 18, 2025 19:13
Show Gist options
  • Save szaaamerik/32beaf577c863161a35618a20eac2463 to your computer and use it in GitHub Desktop.
Save szaaamerik/32beaf577c863161a35618a20eac2463 to your computer and use it in GitHub Desktop.
ID: 28; Name: RockOutA
ID: 46; Name: RockOut_B
ID: 19; Name: Number1
ID: 47; Name: RollBack
ID: 8; Name: ClassicalDance
ID: 33; Name: BestFriend
ID: 3; Name: BlowKiss
ID: 0; Name: BodyPop
ID: 34; Name: BringIt
ID: 35; Name: CantHearYou
ID: 37; Name: DanceD
ID: 7; Name: ChickenDance
ID: 22; Name: RunningManClassic
ID: 38; Name: IT
ID: 52; Name: ColourPop
ID: 36; Name: Confused
ID: 10; Name: Dab
ID: 1; Name: DJ
ID: 11; Name: FistPump
ID: 30; Name: DanceH
ID: 6; Name: ChestPound
ID: 62; Name: GetToTheChopper
ID: 12; Name: Hotline
ID: 14; Name: Humble
ID: 15; Name: JazzHands
ID: 16; Name: JumpOnIt
ID: 59; Name: Karaoke
ID: 17; Name: Karate
ID: 64; Name: KickUps
ID: 18; Name: Macarena
ID: 45; Name: Dance_C
ID: 50; Name: PepTalk
ID: 29; Name: Perfect
ID: 4; Name: BodyPopB
ID: 9; Name: Cowboy
ID: 53; Name: Rawr
ID: 20; Name: RegalWave
ID: 60; Name: Relax
ID: 58; Name: RingRing
ID: 44; Name: Dance_B
ID: 43; Name: RunningMan
ID: 25; Name: Whip
ID: 2; Name: Shamone
ID: 23; Name: Shocked
ID: 40; Name: Sleepy
ID: 54; Name: Snap
ID: 55; Name: SoCute
ID: 41; Name: Spin
ID: 63; Name: SurfsUp
ID: 57; Name: TakeOff
ID: 48; Name: BowArrow
ID: 24; Name: Strong
ID: 21; Name: Robot
ID: 39; Name: MexicanWave
ID: 27; Name: ThumbsDown
ID: 49; Name: ThumbsUp
ID: 31; Name: DanceA
ID: 51; Name: Waiting
ID: 56; Name: WhatsInside
ID: 26; Name: Youngman
/* Parser for TideTables -> EmoteData.xml (Decrypted & Transformed with Nenkai's BXML tool) */
#include <iostream>
#include <fstream>
#include <string>
std::string extractValue(const std::string& line, const std::string& key) {
size_t keyPos = line.find(key + "=\"");
if (keyPos == std::string::npos) return "";
size_t start = keyPos + key.length() + 2; // skip key="
size_t end = line.find("\"", start);
if (end == std::string::npos) return "";
return line.substr(start, end - start);
}
std::string extractNameFromIconPath(const std::string& iconPath) {
size_t pos = iconPath.find("Emote_");
if (pos == std::string::npos) return "";
pos += 6; // length of "Emote_"
size_t end = iconPath.find(".png", pos);
if (end == std::string::npos) return "";
return iconPath.substr(pos, end - pos);
}
int main(int argc, char** argv) {
if (argc != 2) {
printf("Invalid params!\n\n\tExample usage: EmoteDataParser.exe EmoteData.xml\n");
return 1;
}
std::ifstream file(argv[1]);
if (!file.is_open()) {
printf("Failed to open file.\n");
return 1;
}
std::string line;
while (std::getline(file, line)) {
if (line.find("<row") == std::string::npos) {
continue;
}
std::string id = extractValue(line, "id");
std::string iconPath = extractValue(line, "IconPath");
std::string name = extractNameFromIconPath(iconPath);
if (!id.empty() && !name.empty()) {
printf("ID: %s; Name: %s\n", id.c_str(), name.c_str());
}
else {
printf("Invalid entry\n");
}
}
file.close();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment