This guide is for Windows.
First thing's first. Go here https://www.python.org/downloads/windows/ and scroll down until you see Python 2.7.9 - 2014-12-10. Under this you will see 2 MSI installers. Choose the "x84 MSI installer" if you run Windows 32-bit. Choose the "x84-64 MSI installer" if you run 64-bit. Once the download is finished, you can close that page, we're done with it.
Install Python onto you C: drive. (You could install it anywhere, but I did it this way to make a later step a little easier. Up to you.) The install path will look like: C:\Python27.
Once you're done installing, you need to set the Path for Windows, which is what a lot of people don't realize who are new to this sort of thing.
Click Start Menu, then Right Click on My Computer or Computer. Choose Properties. You should have a Control Panel window come up showing you your computers information. On the left you'll see Advanced System Settings. Click that.
On the bottom of the new window, click Environment Variables. You should have a small window showing 2 scroll boxes. The top box is User variables for MyPCName and the bottom box is System Variables. We want the bottom box.
Scroll the bottom box (System variables) down until you see the word Path on the left side. Click on Path which should highlight the entire line. Now click Edit... at the bottom.
Now we need to type in the install path for Python27 and Python27 Scripts. If you installed it in your Program Files under your C drive, your path will look like::
C:\Program Files\Python27;C:\Program Files\Python27\Scripts
Easy way to see what your path is, is to open the folder where Python27 is, then click the address bar on the top.
You need to do both Python27 and the Scripts folder in Python27 folder. Be sure to use semicolon in between each path like I did above.
When you're done, click Okay on all windows. You can close any other window because the hard part is done.
Now we just use pip to install the 4 other programs the author lists on his git page https://github.com/AdamGagorik/pydarkstar.
To use pip, click your Start Menu and type cmd in your search bar. This will bring up the Windows Command Prompt. \
If you get any errors during the next steps, you will need to solve them before continuing. The common one will be missing C++. If you see this, all you have to do is google for microsoft visual for python and get the redistribution package for python.
In your Windows cmd prompt type: pip install sqlalchemy then hit enter. Wait for pip to install the program and look for any errors during the install. Even if there are errors, pip will state the install was successful. When install is done, we do the same for the following 3 programs needed.
pip install pymysql
pip install beautifulsoup4
pip install pyyaml
We're ready to gitpull pydarkstar now. You can go to the git address I linked above and download the zip or perform a pull like when you were setting your server up. You can install pydarkstar anywhere you want.
Once you have the folder placed and open, you'll see a file called "makebin". Double click this and it'll create a bin folder.
Now you can go into the apps folder and open the broker file using your file editor (I use Notepad++). There are a few options to change here.
Code: Select all
# input
self.data = [] # list of itemdata
self.find = True # search for item data --This will be set to False. Change to True.
Code: Select all
# sql
self.hostname = '127.0.0.1'
self.database = 'dspdb'
self.username = 'root'
self.password = '' --Insert your password for MySQL/Server
self.fail = False # fail on SQL errors
Code: Select all
self.name = 'Caladbolg' # seller name --Caladbolg is my server name. Your script will show something else.
self.restock = 3600 # restock tick
self.refill = True # restock at start --Your script will show False. Change it to True.
Once you're done, save your file in the bin folder! Do not overwrite the items.csv in the data folder!
Once saved, just double click and run the broker file in the bin folder. Let it run until the command prompt disappears. Congrats. Your AH is stocked.
As I stated at the start, I have not been able to figure out how to run this the proper way. I know in my gut that my way is a work around and uses this program in a half assed way, but it's what I've been able to figure out. I hope this helps others get it working and I hope that someone will see this and help me understand how to use it the way it's meant to be used.
Thank you.