Git Product home page Git Product logo

gowarcraft3's Introduction

GoWarcraft3

Build Status GoDoc License: MPL 2.0

This library provides a set of go packages and command line utilities that implement Warcraft III protocols and file formats.

Tools

Name Description
capiclient A command-line interface for the official classic Battle.net chat API.
bncsclient A mocked Warcraft III chat client that can be used to connect to BNCS servers.
w3gsclient A mocked Warcraft III game client that can be used to add dummy players to games.
bncsdump A tool that decodes and dumps BNCS packets via pcap (on the wire or from a file).
w3gsdump A tool that decodes and dumps W3GS packets via pcap (on the wire or from a file).
w3gdump A tool that decodes and dumps w3g/nwg files.
w3mdump A tool that decodes and dumps w3m/w3x files.

Download

Official binaries for tools are available. Simply download and run.

Note: additional dependencies may be required (see build).

Build

# Linux dependencies
apt-get install --no-install-recommends -y build-essential cmake git golang-go libgmp-dev libbz2-dev zlib1g-dev libpcap-dev

# OSX dependencies
brew install cmake git go gmp bzip2 zlib libpcap

# Windows dependencies (use MSYS2 -- https://www.msys2.org/)
pacman --needed --noconfirm -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-go mingw-w64-x86_64-cmake

# Download third party submodules
git submodule update --init --recursive

# Run tests
make test

# Build release files in ./bin/
make release

Packages

Name Description
file Package file implements common utilities for handling Warcraft III file formats.
file/blp Package blp is a BLIzzard Picture image format decoder.
file/fs Package fs implements Warcraft III file system utilities.
file/mpq Package mpq provides golang bindings to the StormLib library to read MPQ archives.
file/reg Package reg implements cross-platform registry utilities for Warcraft III.
file/w3g Package w3g implements a decoder and encoder for w3g files.
file/w3m Package w3m implements basic information extraction functions for w3m/w3x files.
network Package network implements common utilities for higher-level (emulated) Warcraft III network components.
network/chat Package chat implements the official classic Battle.net chat API.
network/bnet* Package bnet implements a mocked BNCS client that can be used to interact with BNCS servers.
network/dummy Package dummy implements a mocked Warcraft III game client that can be used to add dummy players to lobbies.
network/lan Package lan implements a mocked Warcraft III LAN client that can be used to discover local games.
network/lobby Package lobby implements a mocked Warcraft III game server that can be used to host lobbies.
network/peer Package peer implements a mocked Warcraft III client that can be used to manage peer connections in lobbies.
protocol Package protocol implements common utilities for Warcraft III network protocols.
protocol/capi Package capi implements the datastructures for the official classic Battle.net chat API.
protocol/bncs* Package bncs implements the old Battle.net chat protocol for Warcraft III.
protocol/w3gs Package w3gs implements the game protocol for Warcraft III.

*note: BNCS/BNet protocol works up until patch 1.32.

Download

go get github.com/nielsAD/gowarcraft3/${PACKAGE_NAME}

Import

import (
    "github.com/nielsAD/gowarcraft3/${PACKAGE_NAME}"
)

Note: additional dependencies may be required (see build).

Documentation

Documentation is available on godoc.org

gowarcraft3's People

Contributors

fe3dback avatar nielsad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gowarcraft3's Issues

Request: add support for fakeplayers to join desired pvpgn games

I'm making wc3 maps for old 1.26-1.28 clients and most of my players are located on rubattle.net, europebattle.net and other community platforms.

For testing i need to somehow add fakeplayers to pvpgn games located by name/ip address.

Can you add support for pvpgn fakeplayer join? I can pay if you want to.

Thanks.

w3gsdump stopped working

Hi! I used your w3gsdump.exe script with parsing output data in my node.js app and it was awesome (i could recognize what slot uses player and it's nickname in lobby by checking "PlayerInfo" and "SlotInfo")

But some time ago it changed: "SlotInfo" works only once, when i'm entering lobby and script doesn't respond other events

Warcraft 3 version: 1.26.0.6401
Battle.net platform: iccup

Can you decode bnet server packages?

Hi,

Awesome work.
1.So can you decode packages of events like :

  • search for matchmaking 1v1
  • game found
  • opponent
  • who's the host
  1. Can you interact with this communication and override ?

  2. Is there any way to get in touch?

Best regards,
iCe

KeepAlive Message

Hey,

your dummy client work fine. Is it possible to activate the keep alive message? I test a lot and try to figure out how the Checksum is generated. And your bot can do it? How can i activate it?

Greetings

Functionalities questions

Hi,

I have a few questions of what you can do or can't do here (mostly cause i'm still learning... as we always do):
Can you host lobbies on bnet server?
Can you force player settings in a lobby: team/color/handicap?
Can you join a custom game on a bnet server until it finishes?

Thanks!

bncsclient exe version and hash

Hi,
I have a question the exe versions and hashes I found so far (except from the one in the readme) are not uint as requested by the program, any idea where to get them from?
Can i compute them myself?
I tested on server.eurobattle.net with the example hashes and the response I get is:
12:57:57 Logon error: bnet: Authentication failed (game version invalid)
Thoughts?

Thanks!

Make fails

Hi,

I'm trying to build the project but it fails on both test and release:

gowarcraft3/vendor/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c:58:12: error: implicit declaration of function 'LibTomMalloc' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
  tmpbuf = XMALLOC(siglen);

Any ideas on this?
MacOS Big Sur / 11.2.1

WC3 is still alive

Hi,
if I could I would star this twice. It's so cool to see that wc3 is still alive (patch 1.3) and to see someone building things in go for wc3 is just awesome! Thank you for this!

w3gsclient: Could not find local game

I created the game room separately on the virtual machine and on the current host, but the tool doesn't seem to work. Is there something wrong with my understanding of the tool?

> w3gsclient.exe -lan
[fakeplayer] 03:12:26 Could not find local game: context deadline exceeded

Problems running on windows

Looks like I found the problem to my cannot find -lstorm while trying to use the program as storm is only built during make test. you have to run make test and make release how ever before doing this make sure

  • you have golint package (go get golang.org/x/lint/golint)
  • winpcap version 4.1.2 is installed
  • winpcap developer is extracted to C:\WpdPack (you will get fatal error: pcap.h: No such file or directory during make test if this is not extracted)
  • msys64 is installed and you have ran pacman -Syu (re-launch and run again) and finally run paacman -S mingw-w64-MINGW64-toolchain mingw-w64-MINGW64-cmake git mingw-w64-x86_64-toolchain mingw-w64-x86_64-go mingw-w64-x86_64-cmake
  • Windows Path has %GOPATH%\bin, %GOROOT%\bin, C:\msys64\usr\bin, C:\msys64\mingw64\bin, C:\msys64\mingw64\x86_64-w64-mingw32\bin
  • You might also have to install gnuwin32 and add C:\gnuwin32\bin (or where ever you installed to, make sure to read the installer!) to your path if you get an error with make/cmake commands

Then cd into gowarcraft3 and run git submodule update --init --recursive finally you can then run make test and make release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.