├── .gitattributes ├── .gitignore ├── DataOfRanger1_jp.h ├── DataOfRanger2.h ├── DataOfRanger3_jp.h ├── DataOfRanger3_oversea.h ├── Makefile ├── PRNMDTool.c ├── bin2h.c ├── i18n.h ├── readme.md └── readme_en.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.sav 2 | *.exe 3 | .vscode 4 | *.nds 5 | *.mch -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Makefile 2 | 3 | # 定义变量 4 | CC = gcc #名称 5 | CFLAGS = -Wall -Wextra -std=c11 #编译选项,-Wall 表示显示所有警告,-Wextra 表示显示额外的警告,-std=c11 表示使用 C11 标准编译。 6 | 7 | # 默认目标 8 | all: PRNMDTool bin2h 9 | 10 | # 编译规则 11 | PRNMDTool: PRNMDTool.c 12 | $(CC) $(CFLAGS) PRNMDTool.c -o PRNMDTool.exe 13 | bin2h: bin2h.c 14 | $(CC) $(CFLAGS) bin2h.c -o bin2h.exe 15 | 16 | # 清理规则 17 | clean: 18 | rm -f PRNMDTool.exe 19 | rm -f bin2h.exe 20 | 21 | -------------------------------------------------------------------------------- /PRNMDTool.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wokann/PokemonRangerNetMissionDistributionTool/09dd6f6cb606825cf5baa15f546ecce509c70a90/PRNMDTool.c -------------------------------------------------------------------------------- /bin2h.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define BUFFER_SIZE 16 5 | #define MAX_ITEMS_PER_LINE 16 6 | 7 | void processFile(const char *inputFilename) { 8 | FILE *inputFile, *outputFile; 9 | unsigned char buffer[BUFFER_SIZE]; 10 | size_t bytesRead; 11 | int itemsWritten = 0; 12 | 13 | // 打开输入文件 14 | inputFile = fopen(inputFilename, "rb"); 15 | if (inputFile == NULL) { 16 | printf("无法打开文件或文件不存在。\n"); 17 | return; 18 | } 19 | 20 | // 构造输出文件名 21 | char outputFilename[100]; 22 | sprintf(outputFilename, "%s.txt", inputFilename); 23 | 24 | // 打开输出文件 25 | outputFile = fopen(outputFilename, "w"); 26 | if (outputFile == NULL) { 27 | printf("无法创建输出文件。\n"); 28 | fclose(inputFile); 29 | return; 30 | } 31 | 32 | fprintf(outputFile, "unsigned char dataArray[] = {"); 33 | 34 | while ((bytesRead = fread(buffer, 1, BUFFER_SIZE, inputFile)) > 0) { 35 | for (size_t i = 0; i < bytesRead; i++) { 36 | if (itemsWritten % MAX_ITEMS_PER_LINE == 0) 37 | fprintf(outputFile, "\n "); 38 | 39 | // 输出数据 40 | fprintf(outputFile, "0x%02X,", buffer[i]); 41 | 42 | itemsWritten++; 43 | } 44 | } 45 | 46 | fprintf(outputFile, "\n};\n"); 47 | 48 | printf("转换完成,结果已保存到 %s 文件中。\n", outputFilename); 49 | 50 | // 关闭文件 51 | fclose(inputFile); 52 | fclose(outputFile); 53 | } 54 | 55 | int main(int argc, char *argv[]) { 56 | if (argc < 2) { 57 | printf("请将文件拖到此可执行文件上以进行转换。\n"); 58 | return 1; 59 | } 60 | 61 | // 逐个处理拖拽的文件 62 | for (int i = 1; i < argc; ++i) { 63 | processFile(argv[i]); 64 | } 65 | 66 | return 0; 67 | } 68 | -------------------------------------------------------------------------------- /i18n.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wokann/PokemonRangerNetMissionDistributionTool/09dd6f6cb606825cf5baa15f546ecce509c70a90/i18n.h -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## 宝可梦巡护员网络任务配信器 2 | Pokemon Ranger Net Mission Distribution Tool (PRNMDTool)
3 | 卧看微尘制作(made by wokann)
4 | 源代码地址:https://github.com/Wokann/PokemonRangerNetMissionDistributionTool
5 | 本工具目前提供中文、英文双语界面(支持新增多语种显示,详见i18n.h) 6 | 7 | ## 功能 8 | 1. 为已有进度的巡护员1日版、巡护员2(日版及海外版)、巡护员3(日版及海外版)配信巡护员网络任务。 9 | 2. 生成包含巡护员网络任务的初始存档,巡护员1日版、巡护员2(日版及海外版)、巡护员3(日版及海外版)。 10 | 3. 重置巡护员的玛娜霏任务,将已送出蛋的状态重置为未接收蛋或未送出蛋的状态。(目前仅支持巡护员1日版及海外版) 11 | 12 | ## 用法 13 | 1. 将存档文件直接拖拽至本工具PRNMDTool.exe上,支持批量拖拽(对应功能1、3) 14 | 2. 使用命令行(对应功能1、3) 15 | ``` 16 | PRNMDTool.exe [文件名1] [文件名2] [文件名3] ... 17 | ``` 18 | 3. 双击打开PRNMTool.exe可生成初始配信存档(对应功能2) 19 | 20 | ## 鸣谢 21 | 1. 巡护员1存档加解密及内存研究: @ajxpk @BlackShark @DeadSkullzJr 22 | 23 | ## 参考 24 | 1. https://projectpokemon.org/home/forums/topic/45846-pokemon-ranger-save-file-encryption/#replyForm 25 | 2. https://projectpokemon.org/home/forums/topic/6785-codes-for-pokemon-ranger-1-and-2/ 26 | 3. https://projectpokemon.org/home/files/file/1933-pokemon-ranger-blank-mission-saves/ 27 | 28 | -------------------------------------------------------------------------------- /readme_en.md: -------------------------------------------------------------------------------- 1 | ## 宝可梦巡护员网络任务配信器 2 | Pokemon Ranger Net Mission Distribution Tool (PRNMDTool)
3 | 卧看微尘制作(made by wokann)
4 | Source code:https://github.com/Wokann/PokemonRangerNetMissionDistributionTool
5 | This tool currently has two language interfaces(Chinese, English) (it also supports additional multi-language display, see i18n.h for details) 6 | 7 | ## Feature 8 | 1. Distribute Missions for r1(jp), r2(jp&oversea), r3(jp&oversea) which already have game progress. 9 | 2. Create Initial save files which contain Missions for r1(jp), r2(jp&oversea), r3(jp&oversea). 10 | 3. Reset Manaphy mission from egg sent to egg not received or egg received but not sent. (Now only support Ranger1 jp&oversea) 11 | 12 | ## Usage 13 | 1. Drag save file(s) onto this tool PRNMDTool.exe support multiple files in one time. (Corresponding to feature 1 and 3) 14 | 2. Using command line. (Corresponding to feature 1 and 3) 15 | ``` 16 | PRNMDTool.exe [filename1] [filename2] [filename3] ... 17 | ``` 18 | 3. Double-click tp open PRNMTool.exe to generate initial distribution save. (Corresponding to feature 2) 19 | 20 | ## Credit 21 | 1. ranger1 save decrypt/encrypt and ram search: @ajxpk @BlackShark @DeadSkullzJr 22 | 23 | ## Reference 24 | 1. https://projectpokemon.org/home/forums/topic/45846-pokemon-ranger-save-file-encryption/#replyForm 25 | 2. https://projectpokemon.org/home/forums/topic/6785-codes-for-pokemon-ranger-1-and-2/ 26 | 3. https://projectpokemon.org/home/files/file/1933-pokemon-ranger-blank-mission-saves/ 27 | 28 | --------------------------------------------------------------------------------