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的更多相关文章
随机推荐
- 【Git的基本操作一】文件初始化及设置签名
1. 本地库初始化 命令: git init 效果:
- winfrom---Window 消息大全
最近正在捣腾winfrom,遇到了关于window消息这一块的东西,正好在网上看到“微wx笑”的总结. 原文地址:http://blog.csdn.net/testcs_dn/article/deta ...
- 关于SQL查询某年数据 和DATEPART 函数的使用
数据库查询某年数据(sql server)select *from 表名 where YEAR(存时间的字段名) =某年select *from News where YEAR(addDate) =2 ...
- NativeScript —— 初级入门(跨平台的手机APP应用)《一》
NativeScript简介 NativeScript是一个相当新的开源开发系统,几乎完全用JavaScript创建跨平台移动应用程序,带有一些可选的CSS和XML来简化显示布局的开发.您可以在htt ...
- Fescar锁和隔离级别的理解
前几天夜里,我老大发我一篇文章说阿里的GTS开源了. 因为一直对分布式事务比较感兴趣,立马pull了代码,进行阅读.基本的原理,实现方案我就不一一细化了,详细见官方文档(写的很棒,点赞). 在fesc ...
- vue+axios请求头封装
import { mapMutations } from 'vuex' import axios from 'axios' import { Toast } from 'mint-ui'; impor ...
- 基于UDS的BootLoader
bootloader程序架构略有简化的bootloader图 这张图和恒润教程中的BootLoader流程大体是一致的. 疑问点 Q:图中的烧写顺序是34-36-34-36-34-36-37,但另一些 ...
- Java常见Exception类型及中文翻译
地址:http://rymden.nu/exceptions.html 翻译: java.lang ArithmeticException 你正在试图使用电脑解决一个自己解决不了的数学问题,请重新阅读 ...
- kotlin面向对象实战~
有了java的面向对象的基础,其实对于kotlin这块的东东比较好理解,所以这里以洗衣机洗衣服为例,对面向对象进行一下实战,下面开始. 洗衣机初步: 首先先新建一个洗衣机类: 然后里面先定义基本属性: ...
- sql 184. 部门工资最高的员工
Employee 表包含所有员工信息,每个员工有其对应的 Id, salary 和 department Id. +----+-------+--------+--------------+| Id ...