#include <filesystem>
#include <fstream>
#include <unordered_set>
#include "Utils/Ranges.hpp"
#include "Utils/StringMisc.hpp"
#include "Utils/Time.hpp"
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 5054)
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-enum-enum-conversion"
#pragma clang diagnostic ignored "-Wdeprecated-anon-enum-enum-conversion"
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
#endif
#include <opencv2/opencv.hpp>
#ifdef _MSC_VER
#pragma warning(pop)
#elif defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#include <meojson/json.hpp>
static inline void ltrim(std::string& s)
{
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { return !std::isspace(ch); }));
}
// trim from end (in place)
static inline void rtrim(std::string& s)
{
s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { return !std::isspace(ch); }).base(), s.end());
}
// trim from both ends (in place)
static inline void trim(std::string& s)
{
ltrim(s);
rtrim(s);
}
bool update_items_data(const std::filesystem::path& input_dir, const std::filesystem::path& output_dir,
bool with_imgs = true);
bool cvt_single_item_template(const std::filesystem::path& input, const std::filesystem::path& output);
bool update_infrast_data(const std::filesystem::path& input_dir, const std::filesystem::path& output_dir);
bool update_stages_data(const std::filesystem::path& input_dir, const std::filesystem::path& output_dir);
bool update_roguelike_recruit(const std::filesystem::path& input_dir, const std::filesystem::path& output_dir,
const std::filesystem::path& solution_dir);
bool update_levels_json(const std::filesystem::path& input_file, const std::filesystem::path& output_dir);
bool update_infrast_templates(const std::filesystem::path& input_dir, const std::filesystem::path& output_dir);
bool generate_english_roguelike_stage_name_replacement(const std::filesystem::path& ch_file,
const std::filesystem::path& en_file);
bool update_battle_chars_info(const std::filesystem::path& input_dir, const std::filesystem::path& overseas_dir,
const std::filesystem::path& output_dir);
bool update_recruitment_data(const std::filesystem::path& input_dir, const std::filesystem::path& output, bool is_base);
bool check_roguelike_replace_for_overseas(const std::filesystem::path& input_dir,
const std::filesystem::path& tasks_path,
const std::filesystem::path& base_dir,
const std::filesystem::path& output_dir);
bool update_version_info(const std::filesystem::path& input_dir, const std::filesystem::path& output_dir);
int main([[maybe_unused]] int argc, char** argv)
{
/* ---- PATH DECLARATION ---- */
const char* str_exec_path = argv[0];
const auto cur_path = std::filesystem::path(str_exec_path).parent_path();
auto solution_dir = cur_path;
for (int i = 0; i != 10; ++i) {
solution_dir = solution_dir.parent_path();
if (std::filesystem::exists(solution_dir / "resource")) {
break;
}
}
std::cout << "Temp dir: " << cur_path.string() << std::endl;
std::cout << "Working dir: " << solution_dir.string() << std::endl;
const auto official_data_dir = cur_path / "Official";
const auto overseas_data_dir = cur_path / "Overseas";
const auto resource_dir = solution_dir / "resource";
std::unordered_map<std::filesystem::path, std::string> global_dirs = {
{ "en_US", "YoStarEN" },
{ "ja_JP", "YoStarJP" },
{ "ko_KR", "YoStarKR" },
{ "zh_TW", "txwy" },
};
/* ---- METHODS CALLS ---- */
/* Update levels.json from ArknightsGameResource */
std::cout << "------- Update levels.json for Official -------" << std::endl;
if (!update_levels_json(official_data_dir / "levels.json", resource_dir / "Arknights-Tile-Pos")) {
std::cerr << "update levels.json failed" << std::endl;
return -1;
}
else {
std::cout << "Done" << std::endl;
}
// 这个 en_levels.json 是自己手动生成放进去的
// Will never work without en_levels.json in proj_dir, commented for now
// generate_english_roguelike_stage_name_replacement(official_data_dir / "levels.json", cur_path /
// "en_levels.json");
/* Update infrast data from ArknightsGameResource */
std::cout << "------- Update infrast data for Official -------" << std::endl;
if (!update_infrast_data(official_data_dir / "gamedata" / "excel", resource_dir)) {
std::cerr << "Update infrast data failed" << std::endl;
return -1;
}
else {
std::cout << "Done" << std::endl;
}
/* Update infrast templates from ArknightsGameResource */
std::cout << "------- Update infrast templates for Official -------" << std::endl;
if (!update_infrast_templates(official_data_dir / "building_skill", resource_dir / "template" / "infrast")) {
std::cerr << "Update infrast templates failed" << std::endl;
return -1;
}
else {
std::cout << "Done" << std::endl;
}
/* Update roguelike recruit data from ArknightsGameResource */
// std::cout << "------- Update roguelike recruit data -------" << std::endl;
// if (!update_roguelike_recruit(arkbot_res_dir, resource_dir, solution_dir)) {
// std::cerr << "Update roguelike recruit data failed" << std::endl;
// return -1;
// } else {
// std::cout << "Done" << std::endl;
//}
/* Update base_name.json from Penguin Stats */
std::cout << "------- Update stage.json for Official -------" << std::endl;
if (!update_stages_data(cur_path, resource_dir)) {
std::cerr << "Update stages data failed" << std::endl;
return -1;
}
else {
std::cout << "Done" << std::endl;
}
/* Update battle chars info for all clients */
std::cout << "------- Update battle chars info for all clients -------" << std::endl;
if (!update_battle_chars_info(official_data_dir / "gamedata" / "excel", overseas_data_dir, resource_dir)) {
std::cerr << "Update battle chars info failed" << std::endl;
return -1;
}
else {
std::cout << "Done" << std::endl;
}
/* Update recruitment data from ArknightsGameResource */
std::cout << "------- Update recruitment data for Official -------" << std::endl;
if (!update_recruitment_data(official_data_dir / "gamedata" / "excel", resource_dir / "recruitment.json", true)) {
std::cerr << "Update recruitment data failed" << std::endl;
return -1;
}
else {
std::cout << "Done" << std::endl;
}
/* Update recruitment data from ArknightsGameData_YoStar */
for (const auto& [in, out] : global_dirs) {
std::cout << "------- Update recruitment data for " << out << "------- " << std::endl;
if (!update_recruitment_data(overseas_data_dir / in / "gamedata" / "excel",
resource_dir / "global" / out / "resource" / "recruitment.json", false)) {
std::cerr << "Update recruitment data failed" << std::endl;
return -1;
}
else {
std::cout << "Done" << std::endl;
}
}
/* Update items template and json from ArknightsGameResource */
std::cout << "------- Update items template and json for Official -------" << std::endl;
if (!update_items_data(official_data_dir, resource_dir)) {
std::cerr << "Update items data failed" << std::endl;
return -1;
}
else {
std::cout << "Done" << std::endl;
}
/* Update items templat
没有合适的资源?快使用搜索试试~ 我知道了~
C++基于图像识别技术实现的一款明日方舟游戏小助手项目源码,一键完成全部日常任务! 亮点功能 刷理智,掉落识别及上传 企鹅物流
共2000个文件
json:1525个
h:183个
cpp:157个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 169 浏览量
2023-11-22
10:40:15
上传
评论
收藏 127.49MB ZIP 举报
温馨提示
C++基于图像识别技术实现的一款明日方舟游戏小助手项目源码,一键完成全部日常任务! 亮点功能 刷理智,掉落识别及上传 企鹅物流 基本说明 请根据 模拟器支持情况,进行对应的操作 修改模拟器分辨率为 16:9 比例,最低 1280 * 720,更高不限 对于国际服(美服)玩家,由于界面布局、字号等问题,我们则建议您将分辨率修改为 1920 * 1080
资源推荐
资源详情
资源评论
收起资源包目录
C++基于图像识别技术实现的一款明日方舟游戏小助手项目源码,一键完成全部日常任务! 亮点功能 刷理智,掉落识别及上传 企鹅物流 (2000个子文件)
dart_api_dl.c 2KB
callback.c 1KB
main.cpp 46KB
TaskData.cpp 42KB
RoguelikeBattleTaskPlugin.cpp 39KB
CombatRecordRecognitionTask.cpp 32KB
InfrastProductionTask.cpp 29KB
AutoRecruitTask.cpp 28KB
StageDropsImageAnalyzer.cpp 28KB
RoguelikeRecruitTaskPlugin.cpp 27KB
AdbController.cpp 25KB
BattleHelper.cpp 24KB
InfrastAbstractTask.cpp 22KB
Assistant.cpp 18KB
MaaThriftController.cpp 16KB
InfrastTask.cpp 16KB
Win32IO.cpp 16KB
InfrastOperImageAnalyzer.cpp 15KB
BattleFormationTask.cpp 14KB
StageDropsTaskPlugin.cpp 13KB
BattlefieldMatcher.cpp 13KB
MinitouchController.cpp 13KB
BattleProcessTask.cpp 12KB
PlatformWin32.cpp 11KB
DepotImageAnalyzer.cpp 11KB
ProcessTask.cpp 11KB
InfrastDormTask.cpp 11KB
CopilotConfig.cpp 11KB
InfrastConfig.cpp 10KB
client.cpp 10KB
PosixIO.cpp 9KB
PlayToolsController.cpp 9KB
RoguelikeTask.cpp 9KB
RoguelikeCopilotConfig.cpp 9KB
RoguelikeFoldartalUseTaskPlugin.cpp 9KB
ResourceLoader.cpp 8KB
MedicineCounterPlugin.cpp 8KB
StageQueueMissionCompletedPlugin.cpp 8KB
Controller.cpp 8KB
RoguelikeRecruitSupportAnalyzer.cpp 8KB
ReclamationBattlePlugin.cpp 8KB
SSSBattleProcessTask.cpp 7KB
CopilotTask.cpp 7KB
ReportDataTask.cpp 7KB
ReclamationControlTask.cpp 7KB
SideStoryReopenTask.cpp 7KB
RoguelikeShoppingTaskPlugin.cpp 7KB
RoguelikeFormationTaskPlugin.cpp 7KB
OperBoxImageAnalyzer.cpp 7KB
win32_window.cpp 7KB
AbstractTask.cpp 6KB
AsstCaller.cpp 6KB
AccountSwitchTask.cpp 6KB
AdbLiteIO.cpp 6KB
RoguelikeRecruitConfig.cpp 6KB
FightTask.cpp 6KB
BattlefieldClassifier.cpp 6KB
InfrastReceptionTask.cpp 6KB
RoguelikeSettlementTaskPlugin.cpp 6KB
GeneralConfig.cpp 5KB
RoguelikeCustomStartTaskPlugin.cpp 5KB
OcrPack.cpp 5KB
ControlScaleProxy.cpp 5KB
Hasher.cpp 4KB
BattlefieldDetector.cpp 4KB
CreditShopImageAnalyzer.cpp 4KB
TilePack.cpp 4KB
MallTask.cpp 4KB
PipelineAnalyzer.cpp 4KB
StageNavigationTask.cpp 4KB
protocol.cpp 3KB
SSSStageManagerTask.cpp 3KB
RoguelikeLastRewardTaskPlugin.cpp 3KB
InfrastFacilityImageAnalyzer.cpp 3KB
Matcher.cpp 3KB
SSSCopilotTask.cpp 3KB
RoguelikeFoldartalGainTaskPlugin.cpp 3KB
CreditShoppingTask.cpp 3KB
ReclamationConclusionReportPlugin.cpp 3KB
BattleDataConfig.cpp 3KB
RoguelikeRecruitImageAnalyzer.cpp 3KB
DebugTask.cpp 3KB
RoguelikeStageEncounterTaskPlugin.cpp 3KB
SSSCopilotConfig.cpp 3KB
RecruitTask.cpp 3KB
main.cpp 3KB
OCRerConfig.cpp 3KB
RoguelikeSkillSelectionTaskPlugin.cpp 3KB
OperBoxRecognitionTask.cpp 3KB
SanityBeforeStagePlugin.cpp 3KB
DepotRecognitionTask.cpp 3KB
RoguelikeSkillSelectionImageAnalyzer.cpp 3KB
AvatarCacheManager.cpp 3KB
BattleFormationAnalyzer.cpp 3KB
OCRer.cpp 3KB
MultiMatcher.cpp 3KB
PlatformPosix.cpp 2KB
RegionOCRer.cpp 2KB
VisionHelper.cpp 2KB
SSSDropRewardsTaskPlugin.cpp 2KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
云哲-吉吉2021
- 粉丝: 3321
- 资源: 1130
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功