Saturday, July 25, 2009

GHost One / GHost++ Warcraft 3 advanced bot setup

GHost One - GHost++ advanced remote controlled bot

GHost One is a major modification of the official GHost++ source. GHost One was originally a (GUI) Graphical User Interface for GHost++, also referred to as a Wrapper, meaning it was a program that launched GHost and interacted with it.

GHost One is not officially compatible with Battle.net Servers! (It does not support Warden)

This guide will show you how to setup your GHost One bot.
This will work with warden being implemented.
If you only have one key and have read this over, watch the video on how to use the admin game mode.

First thing that you will need to know is the system requirements.

Windows System Requirements
• Visual C++ 2008 Redistributable Package (x86)
• A decent performing computer and decent internet connection. Sorry dialup users... . Also, if you're hijacking someone's wireless internet, you probably can't host... ever. (legally anyways...)
Step 1 -> Download GHost One 1.4.194

As I speak in this tutorial, the current version of GHost One is version 1.4.194.
Because of Warden, users may update GHost One, and so this guide could be updated.
Download Here!
And go here to setup your configuration to work with warden.
(But only extract the files, and get it setup).
(Don't worry about putting anything into your config file until we actually get there in this guide).
Step 2 -> Extract The Files

You must find the file GHostOne1.4.194.zip.
Usually the file would be in a place like the downloads folder.
Once you find the file, try to right click it and there should be an option "Extract Here."
If you don't have that option, download this.
Then place the folder to the area of your choice.
I have my folder on my desktop.
And for the sake of this guide, I will leave the folder where it saved to.

Step 3 -> Turn On File Extensions

Open up a folder (It doesn't matter, because you just need to do something with the folder options, not the contents).
Click "Tools."
Click "Folder Options."
Click the tab "View."
Make sure that "Hide Extensions For Known File Types" is unchecked.

Step 4 -> Setup GHost One

If you plan to have GHost setup with its own CD key and on an official battle.net server, then lines marked in green must be edited:

If you plan to have GHost setup with the same CD key as WC3 and host on an official battle.net server, then lines marked in purple AND green must also be configured.

I'll mark all non-essential options to orange, as you do not actually need to change/monitor these settings for Ghost to work properly.

Options in Blue should be taken note of, but shouldn't need to be changed except for troubleshooting purposes.

PvPGN server set up information is covered at the end of Step 4. (FYI: PvPGN servers are non-battle.net Warcraft III gaming servers.) They have a dedicated support thread here: GHost++ PVPGN Specific Help

All lines that start with a # are ignored by Ghost!
I've already edited the Ghost.cfg with examples.
Quote from: Ghost.cfg
#####################
# BOT CONFIGURATION #
#####################

### the log file

bot_log = ghost.log

### the language file

bot_language = language.cfg

### the path to your local Warcraft III directory
### this path must contain war3.exe, storm.dll, and game.dll
### this path must end in your system's path seperator (i.e. "\" on Windows or "/" on Linux)
### if this path contains War3Patch.mpq the bot will attempt to extract "Scripts\common.j" and "Scripts\blizzard.j" on startup and write them to bot_mapcfgpath (which is defined later in this file)
### common.j and blizzard.j are only required for automatically calculating map_crc, you do not need them if your map config files already contain map_crc

bot_war3path = C:\Program Files\Warcraft III\

### the address GHost++ will bind to when hosting games (leave it blank to bind to all available addresses)
### if you don't know what this is just leave it blank

bot_bindaddress =

### the port GHost++ will host battle.net games on (this must be different from your admingame_port)

bot_hostport = 6112

### maximum number of games to host at once

bot_maxgames = 5

### command trigger for ingame only (battle.net command triggers are defined later)

bot_commandtrigger = !

### the path to the directory where you keep your map config files (must end in your system's path seperator)
### this directory can also contain common.j and blizzard.j (extracted from War3Patch.mpq)
### common.j and blizzard.j are only required for automatically calculating map_crc, you do not need them if your map config files already contain map_crc

bot_mapcfgpath = mapcfgs\

### the path to the directory where you keep your savegame files (must end in your system's path seperator)

bot_savegamepath = savegames\

### the path to the directory where you keep your map files (must end in your system's path seperator)
### GHost++ doesn't require map files but if it has access to them it can send them to players and automatically calculate most map config values
### GHost++ will search [bot_mappath + map_localpath] for the map file (map_localpath is set in each map's config file)

bot_mappath = maps\

### whether to save replays or not

bot_savereplays = 0

### the path to the directory where you want GHost++ to save replays (must end in your system's path seperator)

bot_replaypath = replays\

### the bot's virtual host name as it appears in the game lobby
### colour codes are defined by the sequence "|cFF" followed by a six character hexadecimal colour in RRGGBB format (e.g. 0000FF for pure blue)
### the virtual host name cannot be longer than 15 characters including the colour code, if you try to go over this limit GHost++ will use the default virtual host name

bot_virtualhostname = |cFF4080C0GHost

### whether to hide each player's IP address from other players or not

bot_hideipaddresses = 0

### whether to require spoof checks or not
### disabling spoof checks just turns off automatic spoof checks and requiring players to be spoof checked before starting the game
### spoof checks need to be enabled if you want GHost++ to detect which realm each player came from (use the !check command to see the realm)
### you can always manually spoof check by whispering the bot (and in fact is required before running admin commands)

bot_spoofchecks = 1

### whether to display game refresh messages by default
### this can always be changed for a particular game with the !refresh command

bot_refreshmessages = 0

### whether to automatically lock games when the owner joins

bot_autolock = 0

### whether to automatically save games when a player disconnects
### this can always be changed for a particular game with the !autosave command

bot_autosave = 0

### whether to allow map downloads or not
### set to 0 to disable map downloads
### set to 1 to enable map downloads
### set to 2 to enable conditional map downloads (an admin must start each map download with the !download or !dl command)

bot_allowdownloads = 1

### whether to ping players during map downloads or not
### GHost++ will always stop pinging any players who are downloading the map
### this config value determines whether GHost++ should stop pinging *all* players when at least one player is downloading the map

bot_pingduringdownloads = 0

### the maximum number of players allowed to download the map at the same time

bot_maxdownloaders = 3

### the maximum combined download speed of all players downloading the map (in KB/sec)

bot_maxdownloadspeed = 100

### use LC style pings (divide actual pings by two)

bot_lcpings = 1

### auto kick players with ping higher than this

bot_autokickping = 400

### automatically close the game lobby if a reserved player (or admin) doesn't join it for this many minutes
### games which are set to automatically start when enough players join are exempt from this limit (e.g. autohosted games)

bot_lobbytimelimit = 10

### the game latency
### this can always be changed for a particular game with the !latency command (which enforces a minimum of 50 and a maximum of 500)

bot_latency = 100

### the maximum number of packets a player is allowed to get out of sync by before starting the lag screen
### before version 8.0 GHost++ did not have a lag screen which is the same as setting this to a very high number
### this can always be changed for a particular game with the !synclimit command (which enforces a minimum of 10 and a maximum of 10000)

bot_synclimit = 50

### whether votekicks are allowed or not

bot_votekickallowed = 1

### the percentage of players required to vote yes for a votekick to pass
### the player starting the votekick is assumed to have voted yes and the player the votekick is started against is assumed to have voted no
### the formula for calculating the number of votes needed is votes_needed = ceil( ( num_players - 1 ) * bot_votekickpercentage / 100 )
### this means it will round UP the number of votes required
### if you set it to 100 it will require 2/3, 3/4, 4/5, 5/6, 6/7, 7/8, 8/9, 9/10, 10/11, and 11/12 votes to pass
### if you set it to 90 it will require 2/3, 3/4, 4/5, 5/6, 6/7, 7/8, 8/9, 9/10, 9/11, and 10/12 votes to pass
### if you set it to 80 it will require 2/3, 3/4, 4/5, 4/6, 5/7, 6/8, 7/9, 8/10, 8/11, and 9/12 votes to pass
### if you set it to 70 it will require 2/3, 3/4, 3/5, 4/6, 5/7, 5/8, 6/9, 7/10, 7/11, and 8/12 votes to pass
### if you set it to 60 it will require 2/3, 2/4, 3/5, 3/6, 4/7, 5/8, 5/9, 6/10, 6/11, and 7/12 votes to pass

bot_votekickpercentage = 100

### the default map (the .cfg is added automatically)

bot_defaultmap = dota6.59

### the MOTD file
### the first 8 lines of this file will be displayed when a player joins the game
### if this file doesn't exist a default MOTD will be used

bot_motdfile = motd.txt

### the gameloaded file
### the first 8 lines of this file will be displayed when the game finished loading (after the player loading times are displayed)

bot_gameloadedfile = gameloaded.txt

### the gameover file
### the first 8 lines of this file will be displayed when the game is over
### this only works when using a stats class - note: at the time of this writing the only stats class is for DotA maps

bot_gameoverfile = gameover.txt

############################
# ADMIN GAME CONFIGURATION #
############################

### whether to create the admin game or not (see readme.txt for more information)

admingame_create = 0

### the port GHost++ will host the admin game on (this must be different from your bot_hostport)

admingame_port = 6113

### the admin game password

admingame_password = admin

##########################
# DATABASE CONFIGURATION #
##########################

### database type (this config value is ignored for now since we only support one type of database)

db_type = sqlite3

### sqlite3 database file

db_sqlite3_file = ghost.dbs

############################
# BATTLE.NET CONFIGURATION #
############################

### which battle.net server to connect to
### 1.) useast.battle.net
### 2.) uswest.battle.net
### 3.) asia.battle.net
### 4.) europe.battle.net
### note that each banned player is tied to the realm it was created on and the realm is case sensitive
### so if you change your realm from useast.battle.net to USEAST.BATTLE.NET it'll still connect but anyone previously banned will not be counted as banned until you change it back

bnet_server = useast.battle.net

### your Warcraft III: Reign of Chaos CD key

bnet_cdkeyroc = REALCDKEYFFFFFFFFF5165FFFF

### your Warcraft III: The Frozen Throne CD key

bnet_cdkeytft = REALCDKEYFFFFFFFFF5165FFFF

### your battle.net username

bnet_username = GameHost

### your battle.net password

bnet_password = mypass

### the first channel to join upon entering battle.net

bnet_firstchannel = The Awesome Channel

### the root admin on this battle.net server only

bnet_rootadmin = DotA_GOD

### command trigger for this battle.net server only

bnet_commandtrigger = !

### whether to automatically add your friends list to each game's reserved list

bnet_holdfriends = 1

### whether to automatically add your clan members list to each game's reserved list

bnet_holdclan = 1

### you will need to edit this section of the config file if you're connecting to a PVPGN server
### your PVPGN server operator will tell you what to put here

bnet_custom_war3version =
bnet_custom_exeversion =
bnet_custom_exeversionhash =
bnet_custom_passwordhashtype =

###
### example configuration for connecting to a second official battle.net server
###

# bnet2_server = uswest.battle.net
# bnet2_cdkeyroc = FFFFFFFFFFFFFFFFFFFFFFFFFF
# bnet2_cdkeytft = FFFFFFFFFFFFFFFFFFFFFFFFFF
# bnet2_username =
# bnet2_password =
# bnet2_firstchannel = The Void
# bnet2_rootadmin =
# bnet2_commandtrigger = !
# bnet2_holdfriends = 1
# bnet2_holdclan = 1

###
### example configuration for connecting to a third PVPGN battle.net server
###

# bnet3_server = server.eurobattle.net
# bnet3_cdkeyroc = FFFFFFFFFFFFFFFFFFFFFFFFFF
# bnet3_cdkeytft = FFFFFFFFFFFFFFFFFFFFFFFFFF
# bnet3_username =
# bnet3_password =
# bnet3_firstchannel = The Void
# bnet3_rootadmin =
# bnet3_commandtrigger = !
# bnet3_holdfriends = 1
# bnet3_holdclan = 1
# bnet3_custom_war3version = [this information is subject to change]
# bnet3_custom_exeversion = [this information is subject to change]
# bnet3_custom_exeversionhash = [this information is subject to change]
# bnet3_custom_passwordhashtype = pvpgn



The items listed should be self explanitory



Clarification - Some items only have to be noticed, and not changed in Ghost.cfg, you will reference these items later.
They are:
bot_hostport = 6112
- this number does not need to be changed, but you do need to know what this port is set to if you have problems with people joining games. Refer to the tutorial [How to] Fix game joining issues.
bot_defaultmap = dota6.59
Upon loading Ghost, it can now be set to automatically load a map cfg file. Essentially this automatically loads settings to allow hosting a map. If set properly, Ghost can also upload the map to other players who do not have the map. This entry has to be the filename (without .cfg) of the map configuration file that you can find/make in the mapcfgs folder.
admingame_port = 6113
- this number does not need to be changed, but you do need to know what this port is set to if you have problems with people joining games. Refer to the tutorial [How to] Fix game joining issues.
bnet_custom_war3version =
At the time of this tutorial, this value can stay at nothing, or you can set it to 23.

The orange items are basically there just to allow you to tweak Ghost to your liking. You shouldn't need to change these items, but it shouldn't hurt to change them either.

The blue items are most commonly only changed if there are complications setting up Ghost. Often users can setup Ghost without the need to change these values.

For PvPGN Setups, you should just need to change the following settings:
Remember, this is a non-battle.net server!
Quote from: PvPGN Ghost.cfg
bnet_server = server.eurobattle.net
bnet_cdkeyroc = FFFFFFFFFFFFFFFFFFFFFFFFFF
bnet_cdkeytft = FFFFFFFFFFFFFFFFFFFFFFFFFF
bnet_username = MyGHostUsername
bnet_password = mypass
bnet_firstchannel = The Void
bnet_rootadmin = MyUsername
bnet_commandtrigger = !
bnet_holdfriends = 1
bnet_holdclan = 1
bnet_custom_war3version = [this information is subject to change]
bnet_custom_exeversion = [this information is subject to change]
bnet_custom_exeversionhash = [this information is subject to change]
bnet_custom_passwordhashtype = pvpgn