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的更多相关文章
随机推荐
- mysql sleep 死锁例子
表结构 CREATE TABLE `orders` ( `order_id` int(11) NOT NULL, `order_addr` varchar(255) DEFAULT NULL ) EN ...
- Redis+Sentinel安装与配置
在这里我们搭建的是一个1主3从的redis+3个哨兵集群的环境,由于是在一台物理机上,所有我们用端口区分. 物理机IP:192.168.0.12 主节点master端口:6301 从节点slave1端 ...
- java指定运行jar包中的其中一个main方法
java -cp jar包 类名 java -cp ******.jar com.******.EsEtl
- 用Python+Aria2写一个自动选择最优下载方式的E站爬虫
前言 E站爬虫在网上已经有很多了,但多数都只能以图片为单位下载,且偶尔会遇到图片加载失败的情况:熟悉E站的朋友们应该知道,E站许多资源都是有提供BT种子的,而且通常打包的是比默认看图模式更高清的文件: ...
- python自学笔记之开源小工具:SanicDB介绍
SanicDB 是为 Python的异步 Web 框架 Sanic 方便操作MySQL而开发的工具,是对 aiomysql.Pool 的轻量级封装.Sanic 是异步IO的Web框架,同时用异步IO读 ...
- 基于UDS的BootLoader
bootloader程序架构略有简化的bootloader图 这张图和恒润教程中的BootLoader流程大体是一致的. 疑问点 Q:图中的烧写顺序是34-36-34-36-34-36-37,但另一些 ...
- 微信小程序开发(二)创建一个小程序页面
为了方便讲解,我们将上篇博客创建的小程序除了project.config.json和sitemap.json两个文件保留,其他全部删除(这两个文件存的是小程序的创建信息,删掉会有报错提示). 接下来我 ...
- 2.Java NIO 简介
概述 Java NIO 是 JDK 1.4 发布的一套全新的IO API(New IO 简称 NIO),由于 JDK 1.7 对 NIO 的更新,目前 NIO 被广泛应用,以至于 将 JDK 1.7 ...
- Linux根文件系统和目录结构及bash特性1
Linux文件系统: 内核并不真正负责具体的工作,这些工作是应用程序来负责的 Linux glibc 程序的编译方式: 动态链接式编译: 静态链接式编译: ...
- Sereja and Brackets CodeForces - 380C (线段树+分治思路)
Sereja and Brackets 题目链接: CodeForces - 380C Sereja has a bracket sequence s1, s2, ..., *s**n, or, in ...