Friday, 27 January 2017

QEMU using bridge

Edit:

/etc/network/interfaces

and add:

auto br0 
iface br0 inet static
        address 10.18.44.26
        netmask 255.255.255.192
        broadcast 10.18.44.63
        dns-nameservers 10.0.80.11 10.0.80.12
    post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.18.44.1
    post-up route add -net 161.26.0.0 netmask 255.255.0.0 gw 10.18.44.1
        bridge_ports enp5s0
        bridge_stp off 
        bridge_fd 0
        bridge_maxwait 0

auto br0 
iface br0 inet dhcp
        bridge_ports enp5s0
        bridge_stp off 
        bridge_fd 0
        bridge_maxwait 0

where enp5s0 is eth0 interface. 

Edit:

/etc/qemu/bridge.conf

and add:

allow br0

QEMU:

qemu-system-i386 -net nic -net bridge,br=br0

Monday, 2 January 2017

HearthMod: Installation

hearthmod

hearthmod is a software stack that allows you to modify game of HearthStone, including mechanics, cards, etc. If you intend to run it, it's recommended that you run a linux OS, preferably debian or ubuntu distribution.

Components

hm_lobbyserver - hearthmod lobby server
hm_gameserver - hearthmod game server
hm_base - hearthmod base library
hm_client - hearthmod client
hm_database - hearthmod latest database snapshot
hm_sunwell - hearthsim custom card generation
hm_stud - tls un/wrapper
hm_nginx - nginx web server
hm_web - hearthmod web interface

Guide

Clone hearthmod software stack
git clone https://github.com/hearthmod/hearthmod.git
Run
cd hearthmod/
bash host_ctl_ubuntu.sh uninstalled
which compiles and installs the entire hearthmod stack. Also, it doesn't check for you local couchbase, nginx or stud instances. If you don't want to mess them, consider using virtual environment or modify installation script. If you don't run ubuntu or debian, please consider installation script alteration that suits your distro and creating an upstream pull request.
Once compiled, run:
bash host_ctl_ubuntu.sh start [ip]
where IP is address of your gameserver (your current IP in most cases) and you can play.
Then run clients:
hearthmod/hs_client1/hearthmod_client/linux
and
hearthmod/hs_client2/hearthmod_client/linux
By running two instances of hearthstone you can play by yourself and develop or test stuff.
To create or modify cards, accounts, decks; go to http://localhost/ .

Hosts file

If you don't want your hearthstone client to connect to hearthmod.com you must edit your hosts file by adding the following line:
<yourip> hearthmod.com
Hosts file location varies depending on OS.
Linux:
/etc/hosts
Windows:
c:\Windows\System32\Drivers\etc\hosts

Troubleshooting

web server error log file:
tail -f /usr/local/nginx/logs/error.log
gameserver and lobbyserver log files:
./hearthmod/hm_log/*
Pull requests are more than welcome.

Contact

join IRC channel #hearthmod @ irc.freenode.org