11# StarryPy
22
3- StarryPy is Twisted-based plugin-driven Starbound server wrapper. It is currently in beta.
3+ StarryPy is Twisted-based plugin-driven Starbound server wrapper. It is currently
4+ in beta.
45
56## Features
67
@@ -19,81 +20,141 @@ With the built-in plugins (which are removable):
1920StarryPy runs on Python 2.7. It has been tested with Python 2.7.6, 2.7.5, 2.7.2,
2021and PyPy.
2122
22- This requires Python and pip to install, and on * nix systems the python
23- development headers (python-dev in apt, python-devel in yum.) After installing
24- those, simply run ` pip install -r requirements.txt ` in the root directory of
25- StarryPy. This will install all of the components needed for use. I recommend
26- running it in a virtualenv.
23+ Below I provide installation instructions for Linux and Windows. Please note that
24+ Windows setup is more complex and in general seems to be buggier. I develop for
25+ Linux primarily, so you may consider the windows instructions unsupported; though
26+ they did work for me in a VM.
2727
28- Create a configuration file using the config.json.example. The most important
29- things to note are owner\_ uuid, which should be set to a character's UUID that
30- you possess and have never shared; server\_ address and server\_ port, which
31- should be set to the proxied server. StarryPy will default to port 21025 for
32- normal clients to connect to. Select a good random port, or set it to 21024 and
33- firewall it off from the outside.
28+ ### Linux
29+
30+ (CentOS instructions coming in the near future.) On Debian, the installation is
31+ decidedly simple, but it will require sudo access if you do not have python 2.7
32+ installed.
33+
34+ First, let's make sure that all the prerequisites are installed:
35+
36+ ` sudo apt-get install python2.7 python-dev python-pip git `
37+
38+ After installing the prerequisites, clone the repo in the directory of your choice
39+ using git:
40+
41+ ` git clone https://github.com/CarrotsAreMediocre/StarryPy `
42+
43+ ### Windows
44+
45+ As a reminder, though this worked for me I cannot guarantee it will fork for you.
46+ I offer no particular support for running StarryPy on windows as it has become a
47+ huge time sink that has dragged me away from development proper. If, however, you
48+ run into actual bugs with the server in Windows, please do let me know.
49+
50+ #### Download Python
51+
52+ We'll be using ActiveState python for ease of use. This way you don't have to
53+ monkey around with your paths. Just download it from
54+ [ here] ( http://www.activestate.com/activepython/downloads ) . *** Make sure you grab
55+ the 32-bit 2.7 version and not the python 3 version; the server will not run on
56+ Python 3, nor will it work with the 64-bit version on Windows due to licensing
57+ requirements.***
58+
59+ #### Download StarryPy from GitHub.
60+
61+ I personally recommend using git, but a zip file will suffice. Please note that if
62+ you choose not to use git (not too hard to figure out), future upgrades are far
63+ more likely to break everything.
64+
65+ If not using git, click the Download zip file on the right side of the page.
66+
67+ Move the StarryPy-master folder somewhere convenient. You can rename it to
68+ whatever you like.
69+
70+ #### Install requirements.
71+
72+ For this step, you'll need to get inside the StarryPy folder in the command
73+ prompt. For Vista or greater, which hopefully you are all running, you can simply
74+ open up the folder, make sure you don't have any files selected, and then hold
75+ down shift and right click in the empty space of the folder. There will be an
76+ option to 'Open Command Window Here' or something along those lines.
77+
78+ If you can't find that window, run the command 'cmd'. Then, use 'cd
79+ directory_name' to get to the right place. If you go too high, use 'cd..' to go
80+ down a level.
81+
82+ Once you're in the StarryPy folder, run 'pypm install -r requirements.txt' to
83+ install all of the dependencies. It will give you an error about enum34; don't
84+ worry about it, we'll take care of that next.
85+
86+ After all the components are done installing, run 'pypm install pip'. Wait for
87+ that to finish installing, and then run 'pip install enum34'.
88+
89+ Finally, once that's done, we can move onto configuration.
90+
91+ ## Configuration
92+
93+ There are two areas of configuration that we are concerned with. The first is the
94+ StarryPy configuration, and the second is Starbound configuration.
95+
96+ For StarryPy, you will have to create a configuration file. Copy
97+ config.json.example to config.json in the config/ folder, and edit the following
98+ variables:
99+
100+ * upstream_port: This is the port that Starbound will be running on. I recommend
101+ 21026 . It ** must** match the port in your starbound.config file.
102+ * upstream_hostname: Change this if you are hosting the wrapper on a different
103+ computer than your server.
104+ * bind_port: This should be 21025 normally; it is the port that StarryPy listens
105+ on.
106+ * passthrough: ** Make sure this is false.** It is an emergency off switch for
107+ StarryPy.
108+
109+ Finally, find starbound.config and change ` gameport ` to be exactly the same as
110+ ` upstream_port ` in config.json.
34111
35112## Run it
36113
37- After making sure the Starbound server is running, use your terminal (cmd or
114+ ** After making sure the Starbound server is running** , use your terminal (cmd or
38115powershell on windows) and ` cd ` to the directory you installed StarryPy into.
39116Enter ` python server.py ` to start the proxy.
40117
41118## Built-in plugins
42119
43120StarryPy is nearly entirely plugin driven (our plugin manager is a plugin!), so
44121there are quite a few built-in plugins. The truly important plugins are in the
45- ` core\_plugins ` folder. If you remove any of those, it's likely that most other
122+ core\_ plugins folder. If you remove any of those, it's likely that most other
46123plugins will break. We'll break them down by core plugin and normal plugin
47- classes. If you are looking for the commands, feel free to skip the core plugins
48- section.
124+ classes.
125+
126+ If you are looking for commands, they have been removed from the listing due to
127+ the constant flux and the time required for documentation. For a list of commands
128+ that you can access from your current user level, use /help. For help with a
129+ specific command, use /help command_name.
49130
50131### Core Plugins
51132
52- Core plugins are plugins that have no dependencies and are intended to be
53- accessed by other plugins. If your plugin doesn't meet those criteria, it is
54- recommended to put it in the normal plugins folder.
133+ Core plugins are plugins that have no dependencies and are intended to be accessed
134+ by other plugins. If your plugin doesn't meet those criteria, it is recommended to
135+ put it in the normal plugins folder.
55136
56137#### Player Manager
57138
58139The player manager is perhaps the most essential plugin of them all. It keeps
59- track of each player that logs in, tracks their position, and manages
60- kicks/bans. It is composed of the actual database manager, using SQLAlchemy on
61- an SQLite3 backend by default.
140+ track of each player that logs in, tracks their position, and manages kicks/bans.
141+ It is composed of the actual database manager, using SQLAlchemy on an SQLite3
142+ backend by default.
62143
63144#### Command Plugin
64145
65146This is a core plugin that works in conjunction with the plugin class
66147SimpleCommandPlugin. SimpleCommandPlugins automatically register their commands
67148with the instantiated command plugin and when a chat packet is sent it is
68- automatically parsed. If it matches one of these commands, it sends it off to
69- that function for processing. If it doesn't match any of the commands, it sends
70- it on its merry way to the actual starbound server for processing.
149+ automatically parsed. If it matches one of these commands, it sends it off to that
150+ function for processing. If it doesn't match any of the commands, it sends it on
151+ its merry way to the actual starbound server for processing.
71152
72153### Plugins
73154
74155#### Admin Commands
75156
76- The admin commands plugin implements player management from in game. It is a
77- SimpleCommandPlugin that provides the following commands:
78-
79- * ** /who** : Displays all users currently logged into the server. ` Access: Everyone `
80- * ** /planet** : Displays all users on your current planet. ` Access: Everyone `
81- * ** /whois** : Displays user information. Includes player UUID, IP address,
82- username, access level, and current planet. ` Access: Admin `
83- * ** /promote** : Promotes/demotes a user to a given access level. You can only
84- promote if you are a moderator or above, and then only to a user of lesser rank
85- than yourself. ` Access: Moderator `
86- * ** /kick** : Kicks a user by username. If the name has spaces, enclose it in
87- quotes. ` Access: Moderator `
88- * ** /ban** : Bans an IP address. Best fetched with /whois. It does not support
89- usernames. ` Access: Admin `
90- * ** /bans** : Lists all active IP bans. ` Access: Admin `
91- * ** /unban** : Unbans an IP address. ` Access: Admin `
92- * ** /mute** : Mutes a player. ` Access: Moderator `
93- * ** /unmute** : Unmutes a player. ` Access: Moderator `
94- * ** /give\_ item** : Gives an item to a player. Syntax is /give\_ item player
95- (enclosed in quotes if it has spaces) itemname count. The default limit for
96- number of items to give to a player is 1000. ` Access: Admin `
157+ The admin commands plugin implements player management from in game.
97158
98159#### Admin Messenger
99160
@@ -106,8 +167,8 @@ This plugin simply announces whenever a player joins or quits the server.
106167
107168#### Bouncer
108169
109- This plugin prevents non-registered users from building or destroying anything.
110- It is disabled by default.
170+ This plugin prevents non-registered users from building or destroying anything. It
171+ is disabled by default.
111172
112173#### Colored names
113174
@@ -116,10 +177,7 @@ are set in config.json.
116177
117178#### MOTD
118179
119- This plugin sends a Message of the Day on login. The MOTD is located in motd.txt
120- in the plugin folder. It provides the following command:
121-
122- * ** /set\_ motd** : Sets the MOTD to the following text. ` Access: Moderator `
180+ This plugin sends a Message of the Day on login.
123181
124182#### New Player Greeter
125183
@@ -129,35 +187,18 @@ starter\_items.txt). Default items are 200 `coalore` and 5 `alienburger`s.
129187
130188#### Planet Protection
131189
132- This plugin protects specified planets against modification in any way.
133- Currently if a planet is protected only Admins may modify it. This plugin
134- provides the following commands:
135-
136- * ** /protect** : Protects the planet you are currently on. ` Access: Admin `
137- * ** /unprotect** : Unprotects the planet you are currently on. ` Access: Admin `
190+ This plugin protects specified planets against modification in any way. Currently
191+ if a planet is protected only registered users may modify it.
138192
139193#### Plugin Manager
140194
141195This plugin provides a method of enabling/disabling plugins. I know it's silly
142- that it's a plugin, you don't have to tell me. It provides the following
143- commands:
144-
145- * ** /list\_ plugins** : Sends you a list of all loaded plugins. ` Access: Admin `
146- * ** /disable\_ plugin** : Disables a plugin by name. ` Access: Admin `
147- * ** /enable\_ plugin** : Enables a plugin by name. ` Access: Admin `
148- * ** /help** : This command provides a list of commands if called by itself, and
149- the help string for a command if given a name. Example syntax: /help
150- enable\_ plugin. ` Access: Everyone `
196+ that it's a plugin, you don't have to tell me.
151197
152198#### Warpy
153199
154200This plugin provides various methods for warping players and ships around.
155201
156- * ** /warp** : Warps you to another player's ship. ` Access: Admin `
157- * ** /move\_ ship** : Moves your ship to the location of another player, or
158- coordinates in the form of ` alpha 514180 -82519336 -23964461 4 ` ` Access: Admin `
159- * ** /move\_ other\_ ship** : Same as above, but another player's ship. ` Access: Admin `
160-
161202#### More plugins
162203
163204Even more plugins can be found over at
@@ -168,13 +209,12 @@ Even more plugins can be found over at
168209There are several built-in plugins that you can derive inspiration from. The
169210plugin API is decidedly simple, and simply responds to packet events. There is a
170211convenience plugin class called SimpleCommandPlugin which responds to user
171- commands in chat. Currently there is no easy way to * modify* packets, however
172- they can be dropped or allowed to send by any plugin intercepting that packet
173- type.
212+ commands in chat. Currently there is no easy way to * modify* packets, however they
213+ can be dropped or allowed to send by any plugin intercepting that packet type.
174214
175215All plugins must ultimately derive from ` BasePlugin ` . Do not override the
176- ` __init__ ` method unless you absolutely know that you need to. All setup
177- functions should be done in ` activate() `
216+ ` __init__ ` method unless you absolutely know that you need to. All setup functions
217+ should be done in ` activate() `
178218
179219There will be more to come in the near future, for now please examine the base
180220plugin classes.
@@ -186,11 +226,29 @@ StarryPy proper must be licensed under an open-source license. We suggest the
186226MIT or BSD licenses. If this isn't acceptable to you, we will only be able to
187227provide a link.
188228
229+ ## Troubleshooting
230+
231+ ### None of the commands are working
232+
233+ You are likely in passthrough mode or connecting to the vanilla server. Check
234+ config.json and ensure that passthrough is false.
235+
236+ If you are running StarryPy on the same computer you're playing it from, it is
237+ likely it is using the gameport in starbound.config to connect to. To avoid this,
238+ use localhost:21025 in the hostname field in Starbound. Other computers will be
239+ able to connect fine.
240+
241+ ### Something else?
242+
243+ If you're having another issue, check the Issues tab over on the side. If you find
244+ that your issue isn't there, please create a new issue with a copy of your
245+ debug.log (if applicable.)
246+
189247## Planned features
190248
191249We haven't been able to pack in everything we've wanted to in this version. We
192- love contributions, so please feel free to write whatever plugins/improve the
193- core however you can.
250+ love contributions, so please feel free to write whatever plugins/improve the core
251+ however you can.
194252
195253We have quite a roadmap, here are some of the highlights you can expect in the
196254next major version, and in the development branch before that if you're feeling
@@ -203,20 +261,19 @@ brave:
203261 going to prison on the inevitable murder charge.
204262* Lotteries. Because what is life without a little risk?
205263* Creature spawning. Want to spawn a couple dozen bone dragons? So do we!
206- * Projectile blacklist. This should be coming very soon.
207264* Internationalization. Translate plugins and core messages with ease to your
208265 preferred language.
209266* Role based access control Thought the mod/admin/owner distinction is useful,
210267 having individual roles is our plan for the future.
211268* Client filtering based on modded items. Though asset digests aren't supported
212- right now, we want to do some minor filtering to keep out the riff-raff (if
213- you as an admin want to.)
269+ right now, we want to do some minor filtering to keep out the riff-raff (if you
270+ as an admin want to.)
214271* Plugin dependency overhaul. Really only interesting to developers, but it will
215272 allow for complex dependency resolution.
216273
217- There are many more planned features, minor and major. If you have a feature
218- you'd just love to have that we haven't covered here, put in a feature request
219- on the issues page.
274+ There are many more planned features, minor and major. If you have a feature you'd
275+ just love to have that we haven't covered here, put in a feature request on the
276+ issues page.
220277
221278## Contributing
222279
0 commit comments