Downloading the source code: Difference between revisions

From BeeStation Wiki
Jump to navigation Jump to search
imported>MrStonedOne
m (updates to current file size)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
This page contains the information and steps needed to download the latest version of the code, compile it and host your own server.
== Download and License ==
 
This page contains the information and steps needed to download the latest version of the code, compile it and host your own server. The BeeStation source code is under [https://www.gnu.org/licenses/agpl-3.0.html GNU AGPL v3 license] and the assets are [https://freedomdefined.org/Licenses/CC-BY-SA CC-BY-SA]. We use GitHub to host our project. A zip download is available here: [https://github.com/BeeStation/BeeStation-Hornet '''DOWNLOAD'''] (Press Code -> '''Download''' ZIP) If you don't want to download 200MB of data every time an update is made, you can [[Guide to git|follow this guide]] to set up and use Git.
== Licensing ==
== Hosting Your Server Local Server ==
 
To get a simple server running first
The /tg/station 13 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].
* Download the source code as explained above.
 
* Run '''BUILD.bat''' and wait (1-3 minutes) until it's complies. You should see file with an orange icon called "beestation.dmb."
== Downloading ==
* Open Dream Daemon located in your BYOND install directory.
 
* Select the "..." in the lower right corner and select the file "beestation.dmb".
We use GitHub to host our project.
*Set the Security to "Trusted", to avoid excessive prompts from Dream Daemon. Only do this if you can verify that the source you have is official and safe - it is unlikely to be untrustworthy, but keep it in mind when working with any projects.
 
* 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.
A zip download is available here: [https://github.com/tgstation/-tg-station]
* Click the yellow arrow button join
 
* Left click the (byond://xxx.xxx.xxx.xxx:xxxxx) link to copy it to clipboard and then paste it to your friends so they can join.
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.
== Setting Up the Database ==
See [[working with the database]] guide. This is not required if you are just planing locally sandboxing for the purposes of testing.
== Tips for Using the Server for Sandboxing ==
* There is a secret menu in the adminbus panel that lets you fully power all areas and the SMES.
* If your hotkeys don’t work, try going into preferences and resetting to default.


== "I did not change anything, but the code does not work anymore!" ==
* If you want to spawn something, use the Spawn command in the textbox. Just type the item name or what you think the name is and a menu will pop up with all the things in the game with that word in their name. For example: Spawn “spare” - will show a menu from where you can spawn the spare Capitan’s ID. Another use is Spawn “trit” - which will spawn a full Tritium canister if you want to test maxcaps.


* Right click on a tile and use “Jump to turf” to teleport.
* If all the extra tabs and options are distracting, you can use the deadmin command to become a normal player. You can readmin at any time.
*Hit Debug -> Debug-verbs Enable to get more verbs on the player's right click menu.
*With debug verbs on, you can use the Select equipment verb on yourself to equip the Debug outfit, which has loads of useful tools and items.
*You can spawn in <code>/obj/item/disk/tech_disk/debug</code>, or equip yourself with Debug stuff (rightclick, and under the lengthy menu and use <code>Select Equipment</code>) You can also spawn in just a box of debug tools with <code>/obj/item/storage/box/debugtools</code>, but I find changing equipment to be faster.
*Right click on yourself and then go: Show player panel > Show traitor panel to make yourself an antag.
*If you ghost you can '''click-drag''' anything to posses it.
*Use spawn-human to, you guessed it, spawn a human.
*You can disable random events in the server tab.
*You can instantly start the round with the "start now" button in the round tab.
*Use the "/mob/living/silicon/ai/spawned" in the game-panel to spawn a dummy AI to practice carding it.
== FAQ and Troubleshooting ==
==== "I did not change anything, but the code does not work anymore!" ====
This is likely due to corrupted files.
This is likely due to corrupted files.
To fix this, you need to:
To fix this, you need to:
*Re-download everything
*Re-download everything
*Copy over your config folder and the data folder
*Copy over your config and data folder
*Clean compile
*Clean compile
 
If you're using git reset hard against the BeeStation upstream master branch and then recompile.
If you're using git reset hard against the tgstation upstream master branch and then recompile
==== Do I need to for a BYOND membership to make my server visible? ====
 
You '''DO NOT NEED''' to pay for membership to make your server visible on byond.com! To make your server show up [[beerepo:blob/master/config/config.txt#L26|change this hub config option]].
== Hosting a server ==
 
To get a simple server running first
* Download the source code as explained [[Downloading_the_source_code#Downloading|above]]
* Open tgstation.dme in dream maker (double click it)
* Once it opens select Build > Compile
* Wait until it compiles. Once it does a new file "tgstation.dmb" will be created in the same folder where "tgstation.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 "tgstation.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 ==
 
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/tgstation/tgstation/blob/master/config/config.txt#L7
 
== Setting up the database ==
 
Also see [[Working with the database]].
 
* 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)
* 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, tg13, tgstation13, 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 tgstation_schema.sql file in the SQL directory of the game. You can also find it [https://raw.githubusercontent.com/tgstation/tgstation/master/SQL/tgstation_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. 
* 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: [https://github.com/tgstation/-tg-station/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
** 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 ([[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.
 
=== Database based banning ===
 
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 ===
 
<font color='red'>'''DATABASE BASED ADMINISTRATION CURRENTLY DOES NOT WORK.'''</font>
 
The rest of this section remains for when it gets fixed.
 
<div class="toccolours mw-collapsible  mw-collapsed" style="width:600px">
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 [[Working with the database#Adding your first admin|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.
</div>
If you need more help contact [[Community|#coderbus]].
 
For additional database-related tutorials, see [[Working with the database]].




{{Contribution guides}}
{{Contribution guides}}
[[Category:Guides]] [[Category:Game Resources]]
[[Category:Guides]] [[Category:Game Resources]]

Latest revision as of 11:04, 13 June 2024

Download and License

This page contains the information and steps needed to download the latest version of the code, compile it and host your own server. The BeeStation source code is under GNU AGPL v3 license and the assets are CC-BY-SA. We use GitHub to host our project. A zip download is available here: DOWNLOAD (Press Code -> Download ZIP) If you don't want to download 200MB of data every time an update is made, you can follow this guide to set up and use Git.

Hosting Your Server Local Server

To get a simple server running first

  • Download the source code as explained above.
  • Run BUILD.bat and wait (1-3 minutes) until it's complies. You should see file with an orange icon called "beestation.dmb."
  • Open Dream Daemon located in your BYOND install directory.
  • Select the "..." in the lower right corner and select the file "beestation.dmb".
  • Set the Security to "Trusted", to avoid excessive prompts from Dream Daemon. Only do this if you can verify that the source you have is official and safe - it is unlikely to be untrustworthy, but keep it in mind when working with any projects.
  • 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 arrow button join
  • Left click the (byond://xxx.xxx.xxx.xxx:xxxxx) link to copy it to clipboard and then paste it to your friends so they can join.

Setting Up the Database

See working with the database guide. This is not required if you are just planing locally sandboxing for the purposes of testing.

Tips for Using the Server for Sandboxing

  • There is a secret menu in the adminbus panel that lets you fully power all areas and the SMES.
  • If your hotkeys don’t work, try going into preferences and resetting to default.
  • If you want to spawn something, use the Spawn command in the textbox. Just type the item name or what you think the name is and a menu will pop up with all the things in the game with that word in their name. For example: Spawn “spare” - will show a menu from where you can spawn the spare Capitan’s ID. Another use is Spawn “trit” - which will spawn a full Tritium canister if you want to test maxcaps.
  • Right click on a tile and use “Jump to turf” to teleport.
  • If all the extra tabs and options are distracting, you can use the deadmin command to become a normal player. You can readmin at any time.
  • Hit Debug -> Debug-verbs Enable to get more verbs on the player's right click menu.
  • With debug verbs on, you can use the Select equipment verb on yourself to equip the Debug outfit, which has loads of useful tools and items.
  • You can spawn in /obj/item/disk/tech_disk/debug, or equip yourself with Debug stuff (rightclick, and under the lengthy menu and use Select Equipment) You can also spawn in just a box of debug tools with /obj/item/storage/box/debugtools, but I find changing equipment to be faster.
  • Right click on yourself and then go: Show player panel > Show traitor panel to make yourself an antag.
  • If you ghost you can click-drag anything to posses it.
  • Use spawn-human to, you guessed it, spawn a human.
  • You can disable random events in the server tab.
  • You can instantly start the round with the "start now" button in the round tab.
  • Use the "/mob/living/silicon/ai/spawned" in the game-panel to spawn a dummy AI to practice carding it.

FAQ and Troubleshooting

"I did not change anything, but the code does not work anymore!"

This is likely due to corrupted files. To fix this, you need to:

  • Re-download everything
  • Copy over your config and data folder
  • Clean compile

If you're using git reset hard against the BeeStation upstream master branch and then recompile.

Do I need to for a BYOND membership to make my server visible?

You DO NOT NEED to pay for membership to make your server visible on byond.com! To make your server show up change this hub config option.


Contribution guides
General Development, Downloading the source code / hosting a server, Guide to git, Game resources category, Guide to changelogs
Database (MySQL) Setting up the database, MySQL
Coding Understanding SS13 code, SS13 for experienced programmers, Binary flags‎, Text Formatting, Guide to signals
Mapping Guide to mapping, Map merger, Exploration Ruins
Spriting Guide to spriting
Wiki Guide to contributing to the wiki, Wikicode