Skip to content

rebuildworld/Th10Ai

Repository files navigation

Th10Ai

东方风神录AI,基于深度优先搜索算法。
Mountain of Faith's AI, based on depth first search algorithm.

Building

  • Open "x86 Native Tools Command Prompt for VS 2022".

  • Boost

     cd path/to/boost
     bootstrap.bat
     b2 stage link=static runtime-link=shared threading=multi define=BOOST_USE_WINAPI_VERSION=0x0A00 compileflags=/utf-8
    
  • wxWidgets

     git clone https://github.com/wxWidgets/wxWidgets.git wxWidgets-git
     cd wxWidgets-git
     git submodule update --init --recursive
     git checkout v3.2.2.1
     open build/msw/wx_vc17.sln file, select the appropriate configuration (DLL Debug or DLL Release, Win32) and build the solution. 
    
  • Detours

     cd path/to/detours/src
     nmake
    
  • Th10Ai

     cd path/to/Th10Ai
     cmake -S . -B build -G "Visual Studio 17 2022" -A Win32 -D BOOST_DIR=path/to/boost -D WXWIDGETS_DIR=path/to/wxwidgets -D DETOURS_DIR=path/to/detours
     cmake --build build --config Release
    

Usage

  • Install Visual C++ 2022 Redistributable.(optional)
  • Prepare the "東方風神録 ~ Mountain of Faith. ver 1.00a", set to window mode.
  • Monitor refresh rate set to 60FPS.
  • Modify th10Path in Th10Ai.conf to your th10.exe path, and run Th10Ai.exe.
  • Keep window focus on the game, select Reimu to start the game, press 'A' to start AI, press 'S' to stop AI.

Issues

  • 重现子弹的移动轨迹:子弹除了直线移动,还有曲线移动、随机移动等,现在都是按直线移动处理,后续的碰撞预测和节点搜索都是错的。缺少子弹ID,导致帧与帧之间的子弹无法关联起来进行轨迹推导。
  • 5、6面激光不闪避:可能是激光的速度过快,需要检测穿越判定。
  • 小概率Hook失败。

Thanks

TH10AI by Infinideastudio
TH10_DataReversing
twinject