Earth Empires Non-Player-Country Project!
*Caveat: I developed this really quickly to get it going, and am now regretting that, as it's very disorganized; I will slowly be refactoring it to make it easier to use.
- Clone the project from github: https://github.com/jhaagsma/ee_npc
- Copy config_example.php to config.php and fill out your information (see 3 & 7)
- Go to http://www.earthempires.com/ai/api and Generate an API Key if you don't have one
- Install php if you don't already have it; on ubuntu sudo apt-get install php php-curl
- Run ee_npc.php in the terminal: ./ee_npc
- To Stop it go Control-C
- Login and see the AI Dev forum for discussion http://www.earthempires.com/forum/ai-development or view the API details at http://www.earthempires.com/api
- Install Windows Subsystem for Linux: https://docs.microsoft.com/en-us/windows/wsl/install-win10
- Install/Run any version of ubuntu (currently using 20.04)
- Follow the Run on Linux Instructions!!
- DOWNLOAD PHP FOR WINDOWS: https://windows.php.net/download/
- Probably get the newest version, definitely PHP 7+
- Extract the zip to C:\php
- The name is important! For some reason it didn't like it when i called it PHP5 for example
- Go to C:\php\ext and COPY php_curl.dll; PASTE it into C:\php
- OPEN php.ini-development in an editor (notepad)
- Find the line: ;extension=php_curl.dll and remove the leading semi-colon / Change it to: extension=php_curl.dll
- If that line doesn't exist, add it after [curl]
- Save the changed file as C:\php\php.ini 10 DOWNLOAD the x86 version of the MS VC package: http://www.microsoft.com/download/details.aspx?id=30679 11 Install it! 12 Go to http://www.earthempires.com/ai/api and Generate an API Key
- Download or clone the ee_npc project from github: https://github.com/jhaagsma/ee_npc ( https://github.com/jhaagsma/ee_npc/archive/master.zip )
- Put the project somewhere like Documents, so you can find it: C:\Users(your username)\ee_npc
- Copy config_example.php to config.php and fill out your information
- PLEASE SEE https://www.earthempires.com/forum/ai-development/instructions-on-how-to-use-the-ai-server-30966?t=1510387005 for further deatils
- Your AI API key can be acquired from: http://www.earthempires.com/ai/api
- Find ee_npc.php in your explorer, right click on it, and go to Properties, to find the Location that it is at -- in my case it is at C:\Users\qzjul\Documents\ee_npc
- Open a Windows Terminal
- (optional) Right click on the top bar / window bar, and click Properties
- (optional) Go to the Layout tab, change Screen Buffer width to 200, height to 500; change Window Size width to 200, height to 50.
- (optional) click OK
- Change directory in the terminal to the directory the script is saved in: cd C:\Users(your username)\ee_npc
- Run (in the terminal) the following command: C:\php\php.exe ee_ncp.php (Full terminal line looks, in my case, like: C:\Users\qzjul\ee_npc>C:\php\php.exe ee_npc.php )
- MAGIC! it starts playing countries!
- To stop it, go Control-C
- Login and see the AI Dev forum for discussion http://www.earthempires.com/forum/ai-development or view the API details at http://www.earthempires.com/api
Fork the project, using the fork button.
Then clone it locally, make changes, and push them to github.
When you're happy with them, create a pull request, and I'll merge in your changes after reviewing them. It would be better to make smaller changes at a time, so I can digest them ;-)