Difference between revisions of "Downloading the source code"
imported>Oranges |
Bokkiewokkie (talk | contribs) |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 3: | Line 3: | ||
== Licensing == | == Licensing == | ||
− | + | NSV 13's source code is under [http://www.gnu.org/licenses/agpl-3.0.html GNU AGPL v3 license] and the assets are [http://freedomdefined.org/Licenses/CC-BY-SA CC-BY-SA]. | |
== Downloading == | == Downloading == | ||
Line 9: | Line 9: | ||
We use GitHub to host our project. | We use GitHub to host our project. | ||
− | A zip download is available here: [https://github.com/ | + | A zip download is available here: [https://github.com/BeeStation/NSV13] |
If you don't want to download 30MB of data every time an update is made, you can [[Setting up git|follow this guide]] to set up TortoiseGit. | If you don't want to download 30MB of data every time an update is made, you can [[Setting up git|follow this guide]] to set up TortoiseGit. | ||
Line 22: | Line 22: | ||
*Clean compile | *Clean compile | ||
− | + | If you're using git reset hard against the NSV upstream master branch and then recompile | |
== Hosting a server == | == Hosting a server == | ||
Line 28: | Line 28: | ||
To get a simple server running first | To get a simple server running first | ||
* Download the source code as explained [[Downloading_the_source_code#Downloading|above]] | * Download the source code as explained [[Downloading_the_source_code#Downloading|above]] | ||
− | * | + | * Install [https://nodejs.org/en Node.js] if it is not already. |
− | * | + | * Start BUILD.bat to start compiling the code. |
− | * Wait until it compiles. Once it does a new file " | + | * Wait until it compiles. Once it does a new file "nsv13.dmb" will be created in the same folder where "nsv13.dme" is. The dmb file has an orange icon. Compile time usually takes between 1 and 10 minutes, depending on your computer. Dream maker will show as 'not responding' during this time, but it is compiling. |
* Open dream daemon (Win7: start menu > all programs > BYOND > Dream Daemon; Win8: start > type Dream Daemon > Dream Daemon) | * Open dream daemon (Win7: start menu > all programs > BYOND > Dream Daemon; Win8: start > type Dream Daemon > Dream Daemon) | ||
− | * Select the "..." in the lower right corner and select the file " | + | * Select the "..." in the lower right corner and select the file "nsv13.dmb". |
* Click the "GO" button and wait until it changes to a red "stop" button. Starting the server usually takes between 1 and 5 minutes. It is fully started once you can normally interact with Dream Daemon and a byond://xxx.xxx.xxx.xxx:xxxxx link is present at the bottom. | * Click the "GO" button and wait until it changes to a red "stop" button. Starting the server usually takes between 1 and 5 minutes. It is fully started once you can normally interact with Dream Daemon and a byond://xxx.xxx.xxx.xxx:xxxxx link is present at the bottom. | ||
* Click the yellow button (former "...") to auto-join | * Click the yellow button (former "...") to auto-join | ||
Line 42: | Line 42: | ||
You '''DO NOT NEED''' to pay for membership to make your server visible on byond.com! | You '''DO NOT NEED''' to pay for membership to make your server visible on byond.com! | ||
− | To make your server show up, edit the hub config option https://github.com/ | + | To make your server show up, edit the hub config option https://github.com/BeeStation/NSV13/blob/master/config/config.txt#L26 |
== Setting up the database == | == Setting up the database == | ||
Line 48: | Line 48: | ||
Also see [[Working with the database]]. | Also see [[Working with the database]]. | ||
− | * Download and install | + | * Download and install [https://mariadb.com/downloads/mariadb-tx MariaDB] for your operating system. |
− | * | + | ** (Defaults should work, you need tcp enabled and to set a root password. if it offers do not set it up to use windows authentication) |
− | * Click | + | * Open HeidiSQL (comes with mariadb) and connect it to the database |
− | * | + | ** Click on new to create a new session, check prompt for credentials and leave the rest as default. |
− | * | + | ** Click save, then click open and enter in root for the username and the password you setup during the installation. |
− | * Open the file | + | * Right click on the server entry in the left side plane (the area with information_schema, mysql, etc) (the server entry will be the first one) and go to create new -> database |
− | * | + | ** You can name it anything at this step, NSV13, NSV, ss13. |
− | * | + | *** (Don't name it 'test' unless you like security issues) |
− | * | + | * Select the database you just created and then go to file -> open sql file and Open the file beestation_schema.sql file in the SQL directory of the game. You can also find it [https://raw.githubusercontent.com/BeeStation/NSV13/master/SQL/beestation_schema.sql here], but it may be newer than the version you are using. |
− | + | * Press the blue play icon in the topic bar of icon hieroglyphs and pray. If the schema imported correctly you should have no errors in the message box on the bottom. | |
− | * Open the file: [https://github.com/ | + | * Create a new user account for the server by going to tools -> user manager |
− | * Make sure to set it so that | + | ** hostname should be 127.0.0.1, not localhost if hosted locally, other wise use the ip of the game server. |
+ | ** For permissions, do not give it any global permissions, instead click add object, and then select the database you created for the server, hit ok, then give it select, update, insert, and delete permissions on that database. | ||
+ | ** You can click the arrow on the password field to get a randomly generated password of certain lengths, copy the password before saving as it will be cleared the moment you hit save. | ||
+ | * Open the file: [https://github.com/BeeStation/NSV13/blob/master/config/dbconfig.txt config/dbconfig.txt] in notepad | ||
+ | * Make sure to set it so that | ||
** SQL_ENABLED does not have a # in front of it | ** SQL_ENABLED does not have a # in front of it | ||
− | ** ADDRESS | + | ** ADDRESS 127.0.0.1 (Replace with the database server's ip if not hosted locally) |
** PORT 3306 | ** PORT 3306 | ||
− | ** FEEDBACK_DATABASE | + | ** FEEDBACK_DATABASE tgs3 (replace with the database you created) |
− | ** FEEDBACK_LOGIN myuser ( | + | ** FEEDBACK_LOGIN myuser (replace with the user you created) |
− | ** FEEDBACK_PASSWORD mypass ( | + | ** FEEDBACK_PASSWORD mypass (replace with the user you created) |
* The database is now set up for death logging, population logging, polls ([[Working with the database#Adding a new poll|Tutorial]]), library, privacy poll, connection logging and player logging. There are two more features which you should consider. And it's best to do so now, since adopting them later can be a pain. | * The database is now set up for death logging, population logging, polls ([[Working with the database#Adding a new poll|Tutorial]]), library, privacy poll, connection logging and player logging. There are two more features which you should consider. And it's best to do so now, since adopting them later can be a pain. | ||
Line 80: | Line 84: | ||
=== Database based administration === | === Database based administration === | ||
− | |||
− | |||
− | |||
− | |||
− | |||
Offers a changelog for changes done to admins, which increases accountability (adding/removing admins, adding/removing permissions, changing ranks); allows admins with +PERMISSIONS to edit other admins' permissions ingame, meaning they don't need remote desktop access to edit admins; Allows for custom ranks, with permissions not being tied to ranks, offering a better ability for the removal or addition of permissions to certain admins, if they need to be punished, or need extra permissions. Enabling this can be done any time, it's just a bit tedious the first time you do it, if you don't have direct access to the database. | Offers a changelog for changes done to admins, which increases accountability (adding/removing admins, adding/removing permissions, changing ranks); allows admins with +PERMISSIONS to edit other admins' permissions ingame, meaning they don't need remote desktop access to edit admins; Allows for custom ranks, with permissions not being tied to ranks, offering a better ability for the removal or addition of permissions to certain admins, if they need to be punished, or need extra permissions. Enabling this can be done any time, it's just a bit tedious the first time you do it, if you don't have direct access to the database. | ||
Line 94: | Line 93: | ||
* Done. Note that anyone in admins.txt lost admin status, including you! So do the step above! You can repeat it for everyone, as it's a lot easier to do that and just correct permissions with the ingame panel called 'permissions panel'. | * Done. Note that anyone in admins.txt lost admin status, including you! So do the step above! You can repeat it for everyone, as it's a lot easier to do that and just correct permissions with the ingame panel called 'permissions panel'. | ||
* If your database ever dies, your server will revert to the old admin system, so it is a good idea to have admins.txt and admin_ranks.txt set up with some admins too, just so the loss of the database doesn't completely destroy everything. | * If your database ever dies, your server will revert to the old admin system, so it is a good idea to have admins.txt and admin_ranks.txt set up with some admins too, just so the loss of the database doesn't completely destroy everything. | ||
− | + | ||
If you need more help contact [[Community|#coderbus]]. | If you need more help contact [[Community|#coderbus]]. | ||
Latest revision as of 11:42, 12 July 2024
This page contains the information and steps needed to download the latest version of the code, compile it and host your own server.
Licensing[edit | edit source]
NSV 13's source code is under GNU AGPL v3 license and the assets are CC-BY-SA.
Downloading[edit | edit source]
We use GitHub to host our project.
A zip download is available here: [1]
If you don't want to download 30MB of data every time an update is made, you can follow this guide to set up TortoiseGit.
"I did not change anything, but the code does not work anymore!"[edit | edit source]
This is likely due to corrupted files. To fix this, you need to:
- Re-download everything
- Copy over your config folder and the data folder
- Clean compile
If you're using git reset hard against the NSV upstream master branch and then recompile
Hosting a server[edit | edit source]
To get a simple server running first
- Download the source code as explained above
- Install Node.js if it is not already.
- Start BUILD.bat to start compiling the code.
- Wait until it compiles. Once it does a new file "nsv13.dmb" will be created in the same folder where "nsv13.dme" is. The dmb file has an orange icon. Compile time usually takes between 1 and 10 minutes, depending on your computer. Dream maker will show as 'not responding' during this time, but it is compiling.
- Open dream daemon (Win7: start menu > all programs > BYOND > Dream Daemon; Win8: start > type Dream Daemon > Dream Daemon)
- Select the "..." in the lower right corner and select the file "nsv13.dmb".
- Click the "GO" button and wait until it changes to a red "stop" button. Starting the server usually takes between 1 and 5 minutes. It is fully started once you can normally interact with Dream Daemon and a byond://xxx.xxx.xxx.xxx:xxxxx link is present at the bottom.
- Click the yellow button (former "...") to auto-join
- Left click the link (byond://xxx.xxx.xxx.xxx:xxxxx) to copy it to clipboard
- Paste the link (ctrl+v) to your friends so they can join.
Making your server visible on byond.com[edit | edit source]
You DO NOT NEED to pay for membership to make your server visible on byond.com!
To make your server show up, edit the hub config option https://github.com/BeeStation/NSV13/blob/master/config/config.txt#L26
Setting up the database[edit | edit source]
Also see Working with the database.
- Download and install MariaDB for your operating system.
- (Defaults should work, you need tcp enabled and to set a root password. if it offers do not set it up to use windows authentication)
- Open HeidiSQL (comes with mariadb) and connect it to the database
- Click on new to create a new session, check prompt for credentials and leave the rest as default.
- Click save, then click open and enter in root for the username and the password you setup during the installation.
- Right click on the server entry in the left side plane (the area with information_schema, mysql, etc) (the server entry will be the first one) and go to create new -> database
- You can name it anything at this step, NSV13, NSV, ss13.
- (Don't name it 'test' unless you like security issues)
- You can name it anything at this step, NSV13, NSV, ss13.
- Select the database you just created and then go to file -> open sql file and Open the file beestation_schema.sql file in the SQL directory of the game. You can also find it here, but it may be newer than the version you are using.
- Press the blue play icon in the topic bar of icon hieroglyphs and pray. If the schema imported correctly you should have no errors in the message box on the bottom.
- Create a new user account for the server by going to tools -> user manager
- hostname should be 127.0.0.1, not localhost if hosted locally, other wise use the ip of the game server.
- For permissions, do not give it any global permissions, instead click add object, and then select the database you created for the server, hit ok, then give it select, update, insert, and delete permissions on that database.
- You can click the arrow on the password field to get a randomly generated password of certain lengths, copy the password before saving as it will be cleared the moment you hit save.
- Open the file: config/dbconfig.txt in notepad
- Make sure to set it so that
- SQL_ENABLED does not have a # in front of it
- ADDRESS 127.0.0.1 (Replace with the database server's ip if not hosted locally)
- PORT 3306
- FEEDBACK_DATABASE tgs3 (replace with the database you created)
- FEEDBACK_LOGIN myuser (replace with the user you created)
- FEEDBACK_PASSWORD mypass (replace with the user you created)
- The database is now set up for death logging, population logging, polls (Tutorial), library, privacy poll, connection logging and player logging. There are two more features which you should consider. And it's best to do so now, since adopting them later can be a pain.
Database based banning[edit | edit source]
Offers temporary jobbans, admin bans, cross-server bans, keeps bans logged even after they've expired or were unbanned, and allows for the use of the off-server ban log.
To enable database based banning:
- Open config/config.txt
- Add a # in front of BAN_LEGACY_SYSTEM, so the line looks like "#BAN_LEGACY_SYSTEM"
- Done. Note that any legacy bans are no longer enforced once this is done! So it's a good idea to do it when you're starting up.
Database based administration[edit | edit source]
Offers a changelog for changes done to admins, which increases accountability (adding/removing admins, adding/removing permissions, changing ranks); allows admins with +PERMISSIONS to edit other admins' permissions ingame, meaning they don't need remote desktop access to edit admins; Allows for custom ranks, with permissions not being tied to ranks, offering a better ability for the removal or addition of permissions to certain admins, if they need to be punished, or need extra permissions. Enabling this can be done any time, it's just a bit tedious the first time you do it, if you don't have direct access to the database.
To enable database based administration:
- Open config/config.txt
- Add a # in front of ADMIN_LEGACY_SYSTEM, so the line looks like "#ADMIN_LEGACY_SYSTEM"
- Do the steps described in Adding your first admin.
- Done. Note that anyone in admins.txt lost admin status, including you! So do the step above! You can repeat it for everyone, as it's a lot easier to do that and just correct permissions with the ingame panel called 'permissions panel'.
- If your database ever dies, your server will revert to the old admin system, so it is a good idea to have admins.txt and admin_ranks.txt set up with some admins too, just so the loss of the database doesn't completely destroy everything.
If you need more help contact #coderbus.
For additional database-related tutorials, see Working with the database.