Jump to content

NTaterY

Members
  • Posts

    5
  • Joined

  • Last visited

  • Days Won

    1

NTaterY last won the day on July 13 2021

NTaterY had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

NTaterY's Achievements

Newbie

Newbie (1/26)

5

Reputation

  1. After the recent server wipe, my friend group decided that we would try to continue playing on our own server using the world download. Something that I took notice of was a particularly large QuestProgress.json file... After seeing this, I decided to filter the file to extract the data associated just with me and my friends. To do this, I wrote some jank C++ code available below. We were a group of five players, and after running the code, the file size is much, much smaller! Feel free to use the code if you want to filter your quest data out of the same file. #include <fstream> #include <iostream> #include <string> #include <vector> using namespace std; const vector<string> UUIDs = {""}; // INSERT UUIDs here const int num_players = UUIDs.size(); bool matchesUUID(string uuid) { for (int i = 0; i < num_players; i++) { if(!uuid.compare(UUIDs[i])) return 1; } return 0; } int main() { ifstream input("QuestProgress.json"); ofstream output("QuestProgressNew.json"); string buffer[20]; string line; for (int i = 0; i < 2; i++) { getline(input, line); output << line << endl; } getline(input, line); while(line.find("}") == string::npos) { output << line << endl; getline(input, line); output << line << endl; getline(input, line); output << line; bool hasMatch = 0; if (line.find("}") == string::npos) { int number = 0; getline(input, line); while (line.find('}') == string::npos) { buffer[0] = line; getline(input, line); buffer[1] = line; getline(input, line); string uuid = line.substr(line.rfind(":") + 3, 36); if (matchesUUID(uuid)) { if (hasMatch == 0) output << endl; else output << "," << endl; hasMatch = 1; buffer[0] = buffer[0].substr(0, buffer[0].find("\"")) + "\"" + to_string(number) + buffer[0].substr(buffer[0].find(":"), buffer[0].length() - buffer[0].find(":")); number++; output << buffer[0] << endl << buffer[1] << endl << line << endl; getline(input, line); output << line << endl; getline(input, line); if (line.find(",") == string::npos) output << line; else output << line.substr(0, line.find(",")); } else { getline(input, line); getline(input, line); } getline(input, line); } output << endl; if (hasMatch) { output << line << endl; } else { output << "}," << endl; } } else { output << endl; } getline(input, line); output << line << endl; getline(input, line); bool task = 1; while(task) { output << line << endl; int number = 0; bool flag = 0; hasMatch = 0; getline(input, line); if (line.find('}') == string::npos) { flag = 1; output << line; } while (line.find('}') == string::npos) { string uuid = line.substr(line.rfind(":") + 3, 36); if (matchesUUID(uuid)) { if (hasMatch == 0) output << endl; else output << "," << endl; hasMatch = 1; line = line.substr(0, line.find("\"")) + "\"" + to_string(number) + line.substr(line.find(":"), line.length() - line.find(":")); number++; if (line.find(",") == string::npos) output << line; else output << line.substr(0, line.find(",")); } getline(input, line); } output << endl; if (flag && !hasMatch) { output << "}," << endl; } else { output << line << endl; } hasMatch = 0; getline(input, line); if (line.find('{') != string::npos) { output << line; if (line.find('}') == string::npos) { number = 0; int index = 1; int level = 1; getline(input, line); while (line.find('}') == string::npos) { buffer[0] = line; level = 1; while (level > 0) { getline(input, line); buffer[index] = line; index++; if (line.find('}') != string::npos) level--; if (line.find('{') != string::npos) level++; } string uuid; for (int i = 0; i < index; i++) { if (buffer[i].find("uuid") != string::npos) { uuid = buffer[i]; break; } } if (uuid.find(":") != string::npos) uuid = uuid.substr(uuid.find_last_of(':') + 3, 36); if (matchesUUID(uuid)) { if (hasMatch == 0) output << endl; else output << "," << endl; hasMatch = 1; buffer[0] = buffer[0].substr(0, buffer[0].find("\"")) + "\"" + to_string(number) + buffer[0].substr(buffer[0].find(":"), buffer[0].length() - buffer[0].find(":")); number++; for (int i = 0; i < index - 1; i++) { output << buffer[i] << endl; } line = buffer[index - 1]; if (line.find(",") == string::npos) output << line; else output << line.substr(0, line.find(",")); } getline(input, line); index = 1; } output << endl; if (hasMatch) { output << line << endl; } else { output << "}," << endl; } } else { output << endl; } getline(input, line); output << line << endl; getline(input, line); output << line << endl; } else { output << line << endl; getline(input, line); output << line << endl; } getline(input, line); if (line.find(",") != string::npos) { output << line << endl; getline(input, line); continue; } task = 0; } output << line << endl; for (int i = 0; i < 2; i++) { getline(input, line); output << line << endl; } getline(input, line); } output << line << endl; getline(input, line); output << line; }
  2. Although my friends and I decided to stop playing on the server after the recent server wipe, I just wanted to add some praise for the server staff here. While we were playing on the server, they were always available for players that needed help and even put on fun events for people to enjoy. OTwitch's technical knowledge is very useful in helping players solve their problems like when helping to fix my base through a quick claim rollback. Nikkinz is an amazing communicator, always there to relay helpful information and updates to players in the community. While my group of friends does not currently plan on playing on the server again for a little while, I know that if we do return, it will be an amazing experience because of the kind and helpful staff on this server.
  3. The Dandelifeon is easily my favorite flower from Botania that generates mana by running Conway's Game of Life. This setup automates the Dandelifeon using an observer to detect the end of each game and a small state circuit to trigger the placement of new cell blocks. Alternate version with circuit encased into an IC Gate from ProjectRed.
  4. Username: NTaterY Coordinates: X: -9543, Z: 3374, Y: 58 Time/Date when Claim was Fine: around 12 AM - 1AM EST, June 23, 2021 Description: Possible bug with ME network, security terminal, and chunk loading/unloading led to ME drive filled with storage cells and items to disappear. Screenshots:
×
×
  • Create New...

Important Information

By using this site you agree to the following Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.