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的更多相关文章
随机推荐
- href="javascript:show_login()"意思
整句话意味着当你点击一个超链接时,你会触发函数show_login. Href是一个超链接,通过单击该超链接触发. javascript:后面是JS代码 show_login():表示JS的函数的油烟 ...
- OGG学习笔记01
OGG学习笔记01-基础概述OGG(Oracle Golden Gate),最近几年在数据同步.容灾领域特别火,甚至比Oracle自己的原生产品DataGuard还要风光,主要是因为其跨平台.跨数据库 ...
- 高性能SQLServer分页语句
第一种方法:效率最高 SELECT TOP 页大小 * FROM( SELECT ROW_NUMBER() OVER (ORDER BY id) AS RowNumber,* FROM table1 ...
- Win10应用商店缓存信息多如何去清理?
Win10系统的应用商店相比之前有了许多的更新,微软也成立了专门的团队准备对应用商店进行完善,但是我们在使用应用商店的过程中会产生许多缓存文件,占用电脑空间资源,也会影响电脑的运行速度. 下面好系统重 ...
- 目标检测之车辆行人(darknet版yolov3)
序言 自动驾驶是目前非常有前景的行业,而视觉感知作为自动驾驶中的“眼睛”,有着非常重要的地位和作用.为了能有效地识别到行驶在路上的动态目标,如汽车.行人等,我们需要提前对这些目标的进行训练, ...
- centos 7 安装 Docker Engine-CentOS 社区版
获取Docker Engine-CentOS社区: https://docs.docker.com/install/linux/docker-ce/centos/ 1.操作系统要求 1.1 要安装 D ...
- linux 重定向类型 超级块 i节点
超级块:定义文件系统的元数据(总大小.块大小.空闲.......):在格式化的时候确定 查看超级块信息:tune2fs -l 目录 i节点:定义文件的元数据(名称.大小.存放位置.权限.修改时间 ...
- Python3.8新特性--PositionalOnly参数
“理论联系实惠,密切联系领导,表扬和自我表扬”——我就是老司机,曾经写文章教各位怎么打拼职场的老司机. 不记得没关系,只需要知道:有这么一位老司机, 穿上西装带大家打拼职场! 操起键盘带大家打磨技术! ...
- java线程基础巩固---线程ID,优先级
这里学习Thread的两个比较简单的API,直接上代码: 线程ID: 那它的生成规则是?直接看源码: 那为什么目前打印是9呢?然后在jvm启动的时候就已经创建了8个线程?继续用jconsole来验证一 ...
- u-boot-2018.09 DTS上 I2C节点的解析 (转)
这篇理下uboot上I2C总线挂载设备的整个流程. 其他总线(如SPI等)应是类同的思路. uboot 中,以max8997挂载到s3c24xx i2c总线为例, dts里面的写法如下 aliases ...