Hearthstone Modification Based on BepInEx Hearthstone modification based on BepInEx, the plugin source code is located at github.com/Pik-4/HsMod, the plugin will not collect any information about you; the project follows AGPL-3.0
, and is used for learning and research only.
HsMod plans to develop web-based configuration management. If you are interested, you can check #122
Warning: The Hearthstone client in mainland China starts the anti-cheat SDK by default, and the plugin will try to block the relevant anti-cheat functions, but it cannot guarantee the safety of your account.
The readme was translated by DeepL, please forgive any grammatical errors. HsMod language based on Simplified Chinese, english(enUS) version generated by chatgpt, please note that there may be translation errors. You can modify the json file in the ./HsMod/Languages
and recompile it to support the language of your region.
Note: The plugin is currently not fully translated.
- Support for Gear Fast and Slow 8x speed (settings allow expansion to Fast and Slow 32x)
- Allow logging in with VerifyWebCredentials (also supports command line startup, no need to start Battle.net).
- Block error reporting, no error messages are reported to Blizzard when an exception occurs.
- Disable dropouts, allow long periods of no action
- Allow error reporting and auto-exit
- Allow removing window focus
- Remove window resizing restrictions
- Block pop-up window (e.g. can't match, etc.) prompts.
- Remove Chinese hints
- Supports removing hints for nerf patches, advertisements, and ladder settlement rewards.
- Allow blocking of end-of-game promotion tips and settlement tips.
- Allow to block the prompts of battle orders, achievements and other rewards.
- Allow quick opening of packs, with space to open 5 packs at a time.
- Allow automatic decomposition of fully decomposed cards when opening packs.
- Allow displaying game frame rate information
- Allow modifying game frame rate
- Support displaying Dbid when right clicking on a selected card in collection, hero, card back, hit effect, pub panel, etc.
- Supports displaying 9+ actual number of cards in favorites
- Allow dueling to be abandoned at 0-0 (with no deck).
- Allow automatic collection of rewards from Arena, Duel, etc. (tap package at the end)
- Allow access to Hearthstone Developer Mode
- Auto rotate decks, auto watch both sides of the game when friends watch the game
- Supports analog positioning for Hearthside parties
- Allows you to automatically block your opponent's emotes or set the limit of your opponent's emotes; supports blocking thinking emotes; supports blocking Bob's voice; supports skipping hero introductions in matchmaking.
- Support emote without cooldown (minimum interval of 1.5 seconds between emotes).
- Support emote shortcut keys
- Support fast battle (skip part of the animation, more silky than gears, shield the end effect when open, the option can be effective in the tavern with mercenaries (PVE), mercenaries may have lag in the final death settlement,)
- Support Hearthstone auto gold and diamond cards
- Allow to block opponent's card effects individually
- Allow displaying opponent's full Battle.net nickname
- Allow tavern player nicknames to be retrieved by clicking on their avatar.
- Allow to add opponents in the matchmaking
- Allow opponent's ladder level to be displayed before lore
- Supports marking opponent's known cards
- Allow to mute Hearthstone with shortcut keys
- Allow auto-reporting of opponents; when auto-reporting of opponents is enabled, game logs can be generated automatically
- Support analog unplugging (requires shortcut keys to be enabled)
- Supports one-click autodecomposition of fully decomposed decks (requires shortcut key enabled).
- Support removing
new!
with one click (need to turn on the shortcut key, may need to re-enter the collection, mercenaries may not work after restarting) - Support modifying the skin information of Matchmaking Hero Skin, Tavern Hero Skin, Finale Effect, Matchmaking Panel, Tavern Panel, Lucky Coin and so on. (Need to configure
HsSkins.cfg
, or modify it in settings, update in the matchup needs to simulate unplugging after pressingF4
to save) - Support modifying card backs (automatically take effect in the game)
- Support mercenary random skins, forced diamond skins, etc.
- Support blocking pop-up windows of mercenary treasure chests, ladder rewards, etc.
- Support shielding mercenary matchmaking interface zoom
- Support simulation of opening packs (support for random results, support for customizing the type, quantity, rarity, quality and other information of card packs; support for simulating fixed results)
- Support device simulation (allow to collect card pack card backs for iOS, Android and other devices, may need a game of matchmaking)
- Support gold to buy adventures such as Naxxramas, Blackrock Mountain, Explorer's Guild, etc. (also supports Karazhan, but can't play the prologue)
- Allow force-opening Karazhan (can't play the prologue, can't skip a level until it's cleared)
- Support information display (showinfo, need to enable the plugin, default HTTP, port 58744); support to display mercenary raising progress, pack opening history information, etc.
- Support receiving Hearthstone startup parameters, such as specifying resolution size, etc.
- Support Webshell, the path is /shell. need to be enabled in the settings, the current Chinese display may be garbled.
- Allow reading local files via web, i.e. parsing static pages. This function is still under development, currently using
Hearthstone/BepInEx/HsMod
as the root directory. Allow lifting the set recognition restriction to open Manning Hearthstone.Has been fixed by Blizzard.- Attempt to disable anti-cheat.
# .NET SDK: 8.x
# Release ./HsMod/Release/HsMod.dll
git clone --depth 1 --branch bepinex5 https://github.com/Pik-4/HsMod
cd HsMod
# dotnet restore --locked-mode
dotnet build --configuration Release --no-restore
- Compile
HsMod
or downloadHsMod.dll
fromReleases
. - Configure
BepInEx
. - 2.1. Download BepInEx_x86 and extract it to the Hearthstone root directory
Hearthstone\
. - 2.2. create a directory
Hearthstone\BepInEx\unstripped_corlib\
; Copy all dlls under the project directory HsMod/UnstrippedCorlib to the unstripped_corlib directory. - 2.3. Modify
Hearthstone\doorstop_config.ini
by replacingdllSearchPathOverride=
withdllSearchPathOverride=BepInEx\unstripped_corlib
- Note: In BepInEx 5.4.23.2, modify
Hearthstone\doorstop_config.ini
to replacedll_search_path_override =
withdll_search_path_override = BepInEx\unstripped_corlib
corlib
- Store
HsMod.dll
inHearthstone\BepInEx\plugins
.
Note: unity and mono for Windows, extracted from unity editor:
- unity is located at
.\Unity 2021.3.40f1\Editor\Data\PlaybackEngines\windowsstandalonesupport\Variations\win32_player_development_mono\Data\Managed
, - mono Located in
.\Unity 2021.3.40f1\Editor\Data\MonoBleedingEdge\lib\mono\unityjit-win32
, some of the files are located inunityjit-win32\Facades
) - UniTask Extracted from net48 of OpenMod.UniTask.2021.2.4.1
-
Download the latest version of BepInEx_macos_x64 (BepInEx 5)and extract it to
Hearthstone/
-
Download original Mono and Unity libraries and unpack to Hearthstone/BepInEx/unstripped_corlib. Copy alldll
which under the project folderHsMod/UnstrippedCorlibUnix
(cp HsMod/UnstrippedCorlibUnix/* /Applications/Hearthstone/BepInEx/unstripped_corlib/
). ( PS. Mono and Unity version must same as Hearthstone ). -
Edit the
run_bepinex.sh
file replacing the linedll_search_path_override=""
withdll_search_path_override="BepInEx/unstripped_corlib"
-
Edit the file
run_bepinex.sh
replacing the lineexecutable_name=""
withexecutable_name="Hearthstone.app"
-
Run command in console
chmod u+x run_bepinex.sh
-
Get the TOKEN here and copy after
http://localhost:0/?ST=
and before&accountId=
# Some verify url https://account.battlenet.com.cn/login/zh-cn/?app=wtcg https://us.battle.net/login/en/?app=wtcg https://tw.battle.net/login/zh/?app=wtcg https://kr.battle.net/login/zh/?app=wtcg https://eu.battle.net/login/zh/?app=wtcg ...
-
(Not Necessary)Create a
client.config
file with the following content, instead ofTOKEN
- insert the token obtained in the previous step. Env valuexx.actual.battle.net
(cn iscn.actual.battlenet.com.cn
);xx
same as the token first two characters. E.g[Config] Version = 3 [Aurora] VerifyWebCredentials = "TOKEN" ClientCheck = 0 Env.Override = 1 Env = us.actual.battle.net
If the token becomes obsolete and the game stops opening, then you just need to update it in the
client.config
. -
Download the HsMod Releases and unzip to
Hearthstone/BepInEx/plugins
Now the game needs to be launched only through ./run_bepinex.sh TOKEN
or ./run_bepinex.sh
(When the command line does not contain a TOKEN, client.config
is necessary).
-
Compile
HsMod
or downloadHsMod.dll
fromReleases
. -
Install Hearthstone for Linux by referring to 0xf4b1/hearthstone-linux. (Theoretically, client.config will be configured at this point)
-
Download BepInEx_unix (note: currently using BepInEx5) and extract it to the Hearthstone root directory under
hearthstone/
. -
Create a directory
hearthstone/BepInEx/unstripped_corlib/
; -
Note: You can also copy all the
.dlls
under the project directoryHsMod/UnstrippedCorlibUnix
directly to that directory -
Copy all the .dlls under the project directory
HsMod/UnstrippedCorlibUnix
to that directory.cp HsMod/UnstrippedCorlibUnix/UniTask* hearthstone/BepInEx/unstripped_corlib/
ps. UniTask Extracted from net48 of OpenMod.UniTask.2021.2.4.1
-
Modify
unix_bepinex.sh
-
- Replace
export DOORSTOP_CORLIB_OVERRIDE_PATH=""
withDOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR/BepInEx/unstripped_corlib"
- Replace
executable_name=""
withexecutable_name="Bin/Hearthstone.x86_64"
- Once the replacement is complete, run
sed -i "s/\r/ /g" ./run_bepinex.sh
to modify the line breaks at the end of the file to match the Linux filesystem.
- Replace
-
If configured correctly, the directory structure should look like the following at this point.
```
hsmod@hsmod:~/hearthstone-linux/hearthstone$ ls -alh
drwxrwxr-x 9 a a 4.0K Jan 12 12:07 .
drwxrwxr-x 9 a a 4.0K Jan 12 09:27 ..
drwxrwxr-x 4 a a 4.0K Jan 12 11:52 BepInEx
drwxrwxr-x 3 a a 4.0K Jan 12 12:07 Bin
-rw-rw-r-- 1 a a 1.4K Aug 30 02:53 changelog.txt
-rw-rw-r-- 1 a a 103 Jan 12 11:16 client.config
drwxrwxr-x 3 a a 4.0K Jan 12 10:46 Data
drwxrwxr-x 2 a a 4.0K Jan 12 11:46 doorstop_libs
-rw-rw-r-- 1 a a 5 Jan 12 09:27 .locale
-rwxrwxr-x 1 a a 295K Jan 12 11:16 login
drwxrwxr-x 7 a a 4.0K Jan 12 12:07 Logs
drwxrwxr-x 5 a a 4.0K Jan 12 09:27 .ngdp
-rw-rw-r-- 1 a a 3 Jan 12 09:27 .region
-rwxrwxr-x 1 a a 4.8K Jan 12 12:07 run_bepinex.sh
drwxrwxr-x 3 a a 4.0K Jan 12 10:47 Strings
-rw-rw-r-- 1 a a 48 Jan 12 11:23 token
-rw-rw-r-- 1 a a 12 Jan 12 11:16 .unity
-rw-rw-r-- 1 a a 21 Jan 12 10:47 .version
```
-
If
client.config
is not configured, refer to steps 6-7 in the macOS installation instructions to configure client.config -
Store
HsMod.dll
in thehearthstone/BepInEx/plugins
directory (if the plugins directory does not exist, you need to create it manually). -
Give
run_bepinex.sh
execute permission.chmod u+x run_bepinex.sh
-
Execute
./run_bepinex.sh
and enjoy Hearthstone.
As in HsMod version 3.0.0.0
:
First 3 => Hearthstone major version. For example: 3 => 26
The second digit 0 => the number of times Hearthstone has been updated in that version, which does not correspond to Hearthstone minor versions; furthermore, this number is not updated when an update to Hearthstone occurs, but there are no changes to files such as Assembly-CSharp.dll
. For example: 0 => 26.x.y.z
Third bit 0 => This number is +1 when HsMod has new features for that Hearthstone version; this number is set to zero when the second bit changes.
Fourth bit 0 => compile version. Mainly records the number of bug fixes, corresponding to the third bit.
Hearthstone version update does not necessarily cause HsMod to fail, if HsMod plugin functions normally, it can not be updated with Release.HsMod update features can refer to the commit record.
- The plugin may not be placed in a directory containing Chinese characters, i.e. the Hearthstone installation path cannot contain Chinese characters.
- This plugin may conflict with modifications based on
Assembly-CSharp.dll
, modifyingAssembly-CSharp.dll
may lead to abnormal positioning of IL commands, which in turn may cause the relevant Patch can not take effect; it may also conflict with other BepInEx plug-ins (such as mercenaries, MixMod), the reason is that the same method may exist in both plug-ins. The reason is that the same method may exist in two plugins, and when there are more than one Patch, the running result may be abnormal, and this plugin doesn't detect whether the original method has been modified or not. - The configuration file for skins is in
Hearthstone\BepInEx\config\HsSkins.cfg
. If there is none, it will be created automatically after running the game. F4
is a fixed shortcut key used to get some in-game information (related information is stored in theHearthstone\BepInEx\
directory), update the skin configuration, restart the web service, etc. The rest of the shortcuts can be customized and configured.- By default, almost all features of the plugin need to be enabled manually; most of the plugin's features can be found in the configuration, while a few are only mentioned in the Patch (such as minimizing restrictions).
- The default port of this plug-in Web Server (i.e. Showinfo) is 58744, in general, listening to all local IPs, when using cloud servers, please pay attention to the configuration of firewalls, security groups and so on.
- The log file used for logging statistics is
BepInEx\HsMatch.log
, which can be modified in the settings. (Fields areseparated
by,
) - When a problem occurs first try to delete the relevant
.cfg
configuration file (usually located inBepInEx\config\
) and reconfigure; if the problem still exists, please bringHsMod.cfg
to submit Issues, but there is no guarantee of a timely answer. GetHsLib.py
is used to update Hearthstone's own runtime libraries, andinstall.bat
is used to copy the compiledHsMod.dll
to the default Hearthstone directory (provided BepInEx has been configured). In addition, after push changes the version number (after PluginInfo.cs changes), a release is automatically generated.- If the skin display is abnormal, please check
HsSkins.cfg
and try to deleteHsMod.cfg
to re-configure it. - If the modified settings can not be saved, please check if other Hearthstone plugins are enabled.
- For BepInEx, please choose BepInEx 5. Since BepInEx 6 is still in pre-release, it will not be adapted for now.
client.config
is used to launch Hearthstone bypassing Battle.net, the file is located in the folder where Hearthstone.exe is located and has the following contents.
[Config]
Version = 3
[Aurora]
VerifyWebCredentials = "VerifyWebCredentials"
ClientCheck = 0
Env.Override = 1
Env = us.actual.battle.net
Some token acquisition links
https://account.battlenet.com.cn/login/zh-cn/?app=wtcg
https://tw.battle.net/login/zh/?app=wtcg
https://kr.battle.net/login/zh/?app=wtcg
https://us.battle.net/login/en/?app=wtcg
https://eu.battle.net/login/en/?app=wtcg
With the plugin enabled, the support ./Hearthstone.exe VerifyWebCredentials
command to launch Hearthstone ( but required a client.config file, which is now not needed!) .
Note: The Env
parameter for China is cn.actual.battlenet.com.cn
.
- Organize ReadMe, update Wiki, etc.; Organize the relationship between Configuration and Patch; Multi-language support
- In-game one-click hero skin change, currently can only be updated by simulating dropouts
- Refactor Showinfo related web pages.
- Adapt to Mac
- Fix mercenary related functions