Instructions to get Perl scripts that use the TLE API running on your Windows system
- Before you begin, you will want a decent text editor. Notepad++ has been recommended. http://notepad-plus.sourceforge.net (I prefer gvim, more powerful, but more complicated.)
- There are a couple different distributions of Perl. Active State & Strawberry and with Starwberry you have the option to install onto a portable drive. We'll use Portable Strawberry for onto the fixed drive as well. The instructions below are for Strawberry Perl
- If you prefer Active State Perl, go here.
Base Install of Portable Strawberry Perl
Download Strawberry Perl at : http://strawberryperl.com/releases.html
Setting Up Games Lacuna Client
- Get the latest which will be of the form: strawberry-perl-RELEASE_NUMBER-portable.zip RELEASE_NUMBER is will be a number such as 184.108.40.206 (Mar 2016)
- Pick where you will install it. You can put it on a USB drive and use it on any windows machine, or just put it on a C: drive. I will use myperl on a USB drive. (So my path will be E:\myperl). Technical note: Flash drives handle small files better than HDDs that are formatted with NTFS.
- Unzip into your destination directory.
- Run portableshell.bat and it should open up a commandline
- Will get the latest zip from the main GLC repository.
- Unzip the file into the \myperl directory. It will be of the form: tsee-Games-Lacuna-Client-XXXXXX. Rename this to tsee. For both versions, I placed mine in c:\myperl\tsee
- Get the modules needed for GLC:
For Strawberry Perl
Setting up lacuna.yml
- Run myperl\portableshell.bat
- Do command cd tsee
- Do command cpan . (Please look carefully, there is a dot after the cpan, and it is required! This does take a long time. Rather than download pre-compiled versions like active state does, strawberry will compile them itself.)
- I've gotten errors with installing Number::Format, to get around it I call cpan again
- cpan> force install Number::Format
- It may be required to create tsee\log\all_builds.js in order to write at examples\upgrade_all.pl line 69.
Look for myperl\tsee\examples\myaccount.yml
- Copy this file to your tsee directory and rename it to lacuna.yml and then edit it. (lacuna.yml is the default name in many scripts.)
- Edit with a text editor that respects line endings. (notepad++ works well enough)
- Don't add the items after the # sign, I'll just put a short explanation there.
server_uri: 'https://us1.lacunaexpanse.com' # The server url.
api_key: anonymous # You can get an api key, but anonymous works. If you start modifying many scripts, it would help track features people use.
empire_name: Your Empire Name # Your Empire name
empire_password: Sitter Password # You can use your main password, but it's not a good idea for security.
session_persistant: 1 # If you are going to run more than one script, this will make sure you don't have to login each time which costs rpc.
Let's see if we have things working
- In the shell from myperl\tsee and assuming you have lacuna.yml at \myperl\tsee\lacuna.yml do command perl examples\docked_ships.pl
(You should get a listing of all your docked ships.)
Stephen Muller wrote the underlying library that many of the scripts
use. Many of the scripts
were contributed by other players and you can find numerous forks of the original work.
Keywords: scripts windows