HearthstoneBot
https://github.com/ChuckFork/HearthstoneBot
Sigmund
Card game automation framework
Hooks game and loads plugins as they are modified (or explicitly requested to be reloaded). All plugins are run in separate threads (which are killed if the plugin is reloaded). Plugin libraries are rewritten to have different names to allow loading of multiple versions (thus the psuedo reload mechanic).
Developers just need to hit rebuild when working on a plugin to immediately see the effects in game.
Setup
- If needed, update ext/ with new Assembly-CSharp.dll, Mono.Cecil.dll (match the version Unity uses internally), and UnityEngine.dll
- Fix hardcoded paths in Injector.cs and Sigmund.cs (basically, point to location of ext/ and plugins/)
- Run injector to create patched Assembly-CSharp.dll which loads Sigmund.dll
- Start game launcher. It will revert all game files to the originals
- Rebuild the plugin or Sigmund, this will cause the patched Assembly-CSharp.dll to get copied to game directory
- Start game and click through until you reach main Hub menu.
You can open the dev console (Ctrl-Enter) and type "echo my message" to display "my message" to the screen.
1.首先是替换ext目录下的dll文件
Mono.Cecil的版本可以从nuget拿
<packages>
<package id="Mono.Cecil" version="0.9.6.0" targetFramework="net40" />
</packages
2. 修改2个cs文件中硬编码的路径
3.
在编译Injector项目的时候,发现会顺便编译Sigmund项目
Sigmund会把ext文件夹下的文件,覆盖到炉石的安装包下面
rem copy /Y "$(SolutionDir)\ext\$(TargetFileName)" "C:\Program Files (x86)\Hearthstone\Hearthstone_Data\Managed\$(TargetFileName)"
rem copy /Y "$(SolutionDir)\ext\Assembly-CSharp.dll" "C:\Program Files (x86)\Hearthstone\Hearthstone_Data\Managed\Assembly-CSharp.dll"
copy命令的第一个参数是source,第二个参数是target,/Y是直接覆盖的意思
Usage
- TestPlugin will load automatically (comment out line in Sigmund.Main.Start to disable)
- Modify or create any files in plugins/ directory will cause them to be (re)loaded
- Open dev console (Ctrl-Enter) and type "run somePlugin" will (re)load the somePlugin.dll in plugins/
Projects
Injector: patches Assembly-CSharp.dll to load Sigmund.dll (our loader)
Sigmund: loader which watches filesystem and the game's dev console to trigger (re)loading plugins (after doing minor rewriting)
TestPlugin: example plugin to automate playing against practice AI
HearthstoneExtract: placeholder (you'll have to find it elsewhere) for disassembled source from an older version of the game. Kept in the solution for easy searching (eg. find all references) but not always 100% correct. Use Reflector on the current Assembly-CSharp to double check.
HearthstoneBot的更多相关文章
随机推荐
- Javascript 中apply call bind
在 javascript 中,call 和 apply 都是为了改变某个函数运行时的上下文(context)而存在的,换句话说,就是为了改变函数体内部 this 的指向. 先来一个例子: functi ...
- Python实现串口通信(pyserial)
pyserial模块封装了对串口的访问,兼容各种平台. 安装 pip insatll pyserial 初始化 简单初始化示例 import serial ser = serial.Serial('c ...
- 什么是NoSQL,为什么要使用NoSQL?
详见: https://blog.csdn.net/a909301740/article/details/80149552 https://baike.so.com/doc/5569749-57849 ...
- linux使用nginx配置web服务器
环境: CenterOS 7 1.安装nginx之前先安装nginx所需的依赖包 yum -y install zlib zlib-devel openssl openssl-devel pcre p ...
- SeekBar 滚动条
原seek_thumb样式----------------------------------------------------------------------↑↑↑↑↑ android:thu ...
- Bridge 桥梁模式
注:桥梁模式是结构型设计模式,将抽象部分与它的实现部分相分离,使他们可以独立的变化. 抽象部分可能有n种实现,而实现部分可能有n种实现方式,采用享元模式,减少子类数据. 曾经看过一个桥梁模式相关的例 ...
- MySQL 8下忘密码后重置密码
解决方案:1):设置mysql为无密码启动 (修改MySQL的登录设置:vi /etc/my.cnf 在[mysqld]的段中加上一句:skip-grant-table) 2):重新启动mys ...
- HDU - 6223 Infinite Fraction Path (倍增+后缀数组)
题意:给定一个长度为n(n<=150000)的字符串,每个下标i与(i*i+1)%n连边,求从任意下标出发走n步能走出的字典序最大的字符串. 把下标看成结点,由于每个结点有唯一的后继,因此形成的 ...
- return new Promise的时候,不能带着.then()方法
app.js return new Promise的同时带着.then()方法会出错 return出去的这个Promise,整体状态会显示pending,虽然详细里状态显示resolve,但是没有re ...
- BZOJ 2836: 魔法树 (树链剖分+线段树)
板题-记得开longlong #include <cstdio> #include <cctype> #include <cstring> #include < ...