|
| 1 | +--- |
| 2 | +sidebar_position: 3 |
| 3 | +title: Create a server with a modpack |
| 4 | +description: Steps to import and customize startup settings for Modpacks |
| 5 | +keywords: [forge, create, server, create-forge-server, MCSS, mods, modded, modpack] |
| 6 | +--- |
| 7 | + |
| 8 | +:::tip |
| 9 | +This page should only serve as a guideline for what to do with modpacks. |
| 10 | +Modpack creators often change how they create and manage server files, as such it is difficult to create guides for every possible type out there. |
| 11 | +If you need additional help or if your server files look different from what we have in this guide, visit our [discord server](https://www.mcserversoft.com/discord). |
| 12 | +::: |
| 13 | + |
| 14 | +## Step 1: Determine if you need custom startup settings |
| 15 | +This is the first and most important step. We don't want to change settings if we don't need to. |
| 16 | +Download the server files from your preferred website, and unpack it in a folder **that's not inside of the MCSS /servers/ folder**. |
| 17 | +Then, check which case is yours: |
| 18 | + - Server files don't contain any startup scripts (Good news! You can follow [the manual setup](/basic/create-server/Forge/create-forge-server-manually)) |
| 19 | + - Server files **ONLY** contain one or more .bat files (Go to [step 2](#-step-2)) |
| 20 | + - Server files contains PowerShell scripts (`.ps1`, `.psm1`, `.psd1`, ... ) (Go to [step 3](#-step-3)) |
| 21 | + |
| 22 | +## Step 2: Modpacks with .bat startup files {#-step-2} |
| 23 | +This is the part where we may need to edit the contents of the startup .bat file. |
| 24 | +Check the contents of your .bat file. Does it look like this? (If you have multiple of them, this section shouldn't apply to you) |
| 25 | +```batch |
| 26 | +REM Forge requires a configured set of both JVM and program arguments. |
| 27 | +REM Add custom JVM arguments to the user_jvm_args.txt |
| 28 | +REM Add custom program arguments {such as nogui} to this file in the next line before the %* or |
| 29 | +REM pass them to this script directly |
| 30 | +java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.1-39.0.45/win_args.txt %* |
| 31 | +pause |
| 32 | +``` |
| 33 | +Good news! You can now follow the [manual setup, from the "importing the server in MCSS" section](/basic/create-server/Forge/create-forge-server-manually#-migrate-the-server-to-mcss). |
| 34 | + |
| 35 | +If your bat file(s) do not look like that, you can search the file for the real startup line, which should be something on the lines of |
| 36 | +```batch |
| 37 | +java %ARGS% -jar server.jar %MC_ARGS% |
| 38 | +``` |
| 39 | +We need to find the `%ARGS%` and `%MC_ARGS` variables, once you do, copy them over in a new, different file, replacing where they should be in the startup line. |
| 40 | +:::caution Run the default .bat file atleat once! |
| 41 | +We still suggest running the default .bat file atleast once, as in some cases it will install or download necessary mods or libraries. |
| 42 | +It will also serve as an auto updater in most cases. |
| 43 | +::: |
| 44 | +You can then import the server in MCSS, following [this guide](/basic/import-server/supported-server-files). **Make sure to select your newly created .bat file, and not the included one**. |
| 45 | + |
| 46 | +## Step 3: Modpacks with PowerShell scripts {#-step-3} |
| 47 | +Open the `start.ps1` file. If you don't have one, it means that your modpack likely isn't covered by this guide. |
| 48 | +If you can see near the start of the file `Start script generated by ServerPackCreator`, you can go forward with this guide. If you don't see this, your modpack likely isn't covered by this guide. |
| 49 | +Open the `variables.txt` file, and copy the values of the `JAVA_ARGS` and `ADDITIONAL_ARGS`. |
| 50 | +Create a new `.bat` file, containing |
| 51 | +```batch |
| 52 | +java {JAVA_ARGS} -jar server.jar {ADDITIONAL_ARGS} |
| 53 | +``` |
| 54 | +Replace the arguments with those you copied, without quotes and brackets. |
| 55 | +:::caution Run the default .bat file atleast once! |
| 56 | +ServerPackCreator downloads and installs many requirements automatically. It is necessary to run it once. |
| 57 | +We suggest disabling the "java check" in the variables.txt, to avoid installing JABBA, which is not needed if you use MCSS. |
| 58 | +::: |
| 59 | +After this you can import the server in MCSS, following [this guide](/basic/import-server/supported-server-files). **Make sure to select your newly created .bat file, and not the included one**. |
0 commit comments