Important Information Regarding Build 210Build 210 recently went out, and of course, it seems like there's a problem hosting games that use workshop mods. At the very least, I'm having problems getting them to work on ns2servers.com servers. It seems as though it's a problem with the build, although I can't seem to reproduce the problem locally when running server. If you encounter this problem on your own server, please let me know what it printed to std out -- it should print information about each mod when it begins and finishes updating and then the server should start up as normal. If there are problems, the only current "workaround" is to not use workshop mods (sorry, guys, this build was supposed to make things a lot easier for servers, not break them). If everything works for you without problems, let me know. Hopefully this is an isolated occurrence.
Update: The underlying problem is that the downloading of workshop mods requires Steam, so people just using the hldsupdatetool can't possibly retrieve the workshop files. I'm going to try to get in touch with Valve and see if something can be done with hldsupdatetool to accommodate workshop mods (but that would almost certainly take at least a little bit of time, pending they even decide to support it), otherwise, I'm going to see if we can get build 211 out a little sooner than planned so that I can at least restore the ability to copy mods manually for now in the case where no Steam is available. Sorry, guys!
A quick introduction before getting started as this is my first post on the forums -- I'm Matt, I've been adding in the Steam Workshop support to NS2. Some of you know me as "That Turkey Story" in-game on lerkmore/on steam/on SA.
This post is targeted both towards those of you making levels/mods and those of you that are running servers. I'll be keeping this thread updated each release as features get put in, so check back if you are curious as to the state of workshop support. Feel free to post any questions/suggestions in here as well, as I'll check the thread once or twice a day. Also, keep in mind that most of this work hasn't been rigorously tested yet, so you may run into a bug or two. If you do, please report it. If you're just curious as to what's new in this release, scroll down to the bottom of this post for the changes in the latest build.How-To For Mod/Level DevelopersIf you have made any levels for NS2, try to get them published as soon as possible via Launch Pad and let me know of any problems.
This thread is about publishing mods. If you are curious how to actually make
a level, see this thread
The first thing new that you'll notice when creating a mod in Launch Pad is that you are presented with a drop-down menu for "Mod Kind." Currently, the only mod kind able to be published is "Level" though the rest will be supported in future releases. I'll fill in the list below as features get implemented detailing a little bit about how they are used and what their requirements are.Mod KindsLevelUse:
Mods that are associated with a single NS2 level.Requirements:
Exactly one ".level" file in the maps sub-directory of the mod's directory. The mod must also include all necessary dependencies. In other words, if your map is "ns2_foobar.level" and you create your mod in "C:\ns2_foobar_mod\" then the .level file should be "C:\ns2_foobar_mod\maps\ns2_foobar.level", the overview should go in "C:\ns2_foobar_mod\maps\overviews\". Similarly, materials go in "C:\ns2_foobar_mod\materials\", etc. For those of you who have already developed levels, the file structure is the same as if you were to have these files in the game's ns2 directory.Additional Notes:
A couple of people have already asked about this, so I will make it clear: Between publishes you currently are able to change the name of your level (in other words you can publish with a level called "ns2_foobar_beta1.level", then on the next publish in the same mod change the level name to "ns2_foobar_beta2.level"). However, you should never
do this, and in the next release I'll probably make it an error during publishing if you do so. The reason why is the following:
: publishes ns2_level_beta1.levelServer
: subscribes to the level, which downloads the modServer
: adds ns2_level_beta1.level to the map rotation. everything works fine!Mod Developer
: publishes an update but changes the name of the level to ns2_level_beta2.levelServer
: automatically gets the update, but does not know to change the name of the level to "ns2_level_beta2.level" in his map rotationServer
: tries to load "ns2_level_beta1.level", but fails because it no longer exists (the level is now called ns2_level_beta2.level)
So, rather than changing the name of your level, keep it the same between releases to avoid problems when servers update the level. If you really
want to change the name of your level, I recommend just publishing the level as an entirely new mod. The only drawback to this is that people running servers will have to find your newly-named mod again on steam in order to download it.Gamefuture releaseGameplayfuture releaseCosmeticfuture releaseServer-Sidefuture releasePublisher
Once a mod is created and selected, it may be published via the "Publisher" button:
This should be pretty self-explanatory, so I won't go into too much detail. The tags are greyed out because they are automatically deduced and updated from the file structure. "Save Locally" saves changes to your computer without publishing. I think this goes without saying, but be careful with "Unpublish". There is a confirmation dialog if you click it, but you can't undo an unpublish once you go through with it. Keep in mind that if you unpublish a mod and then republish it, it will have a new ID, meaning that anyone who was subscribed to your mod will no longer receive updates.
Once you publish your mod, it should be visible in the steam workshop for people to view and subscribe to. It will then be downloaded and updated when necessary upon each game launch.
Finally, please do not publish levels that aren't your own, even if you give credit.How-To For Dedicated Servers
Mod support is not yet user-friendly for servers, but if you want to be one of the cool kids running custom maps that people download automatically when joining, continue reading. Once you get things up and running, any mods you specify will automatically be updated every time you run your server. The first thing you'll need to do is decide what mods your server will be using and add the ID of those mods to your server's config. Before detailing how to do that, if you don't feel like looking through the workshop for worthwhile mods, ScardyBob has taken the time to look up the IDs of good, working levels (thanks, ScardyBob!):
ns2_triad_beta2 = 74384218
ns2_kleos = 74499435
ns2_goliath = 75900465
ns2_turtle = 75943673
ns2_eclipse = 75856420
I'll explain what to do with those IDs shortly.
If you want to look up mods on your own, open up Steam, click "Community", then click "Workshop", then selection "Natural Selection 2" from the pull-down menu. Here you will see a list of mods for Natural Selection 2. Note that the way Valve lists mods is somewhat misleading. The default view will not
show all of the mods that are available. Try the different sorting options (I.E. sort by most recent) to potentially see more mods. Once you've located a mod that you'd like to use on your server, click on it. Now here's the hairy part (it will be simpler in future releases): you're going to need to copy down the ID of the mod manually and add that ID to your server's configuration. To get the mod's ID, right click somewhere in the blank area of that particular mod's page and click "copy page url". Then, paste the url somewhere and copy the number that immediately follows "id=" part of the url. Do this for each mod you wish to use on your server (make sure you keep track of which mod corresponds to which ID).
Now you'll need to add the those IDs to your server's configuration. You can do this by either updating your server's xml file, or by specifying mods via the command-line. If you choose to add them to your xml file, it's a simple matter of adding:<mods>space separated mod ids</mods>
You can have as many mods as you want, just make sure that they all appear in a single "mods" tag and that that tag is nested in "options". Once you do that, any levels that are a part of the mods may be added as a part of the map rotation.
You can also use the command-line to specify which mods are active on the server -- there are 3 different ways to do this. First, you may pass:-mods "space separated mod ids"
to specify an exact list of mods to be active (the server will use this list instead of whatever mods are in the xml file, if any).
You may also specify an altered list of mods from the ones specified in the configuration file via:-removemods "space separated mod ids"
-addmods "space separated mod ids"
This will use the set of mods in the configuration file but will disregard any mods specified via -removemods, and add in any mods explicitly specified via "-addmods".
In future releases you won't have to manually grab the ID, but we figured it would be best for you guys to be able to start testing out the feature as soon as possible. Note that there is no need to subscribe to the mod unless you wish to test that mod locally before using it on your server. The mod will automatically downloaded by clients when they connect to your server.Caveat
Your server will only
update mods when it is started. This means that if someone updates their Workshop level while your server is running, your server will now be out of date! Because of this fact, consider the following:
1) The server is set up to use the mod that has the level "ns2_foobar.level"
2) The server is started and the level is updated
3) The creator of "ns2_foobar.level" updates his level
4) The server loads the map "ns2_foobar.level" (which is now an old version of the map)
5) A player attempts to join the server and is notified of the mod associated with the level
6) The player's game automatically downloads/updates the level from the Steam Workshop
7) The player now has a newer version of the map than the server and so he will be disconnected from the server
So, you will have to make sure that you restart your server on occasion such that everything is up-to-date. It is possible that in future releases mods being used will be updated upon level change so that no restart of the server is ever necessary, but that is not currently the state of things.
That's it for now. Again, I'll be keeping this post updated, so check back to see what's changed. I'll be updating this post shortly before each release so you guys can get new things up and running as soon as quickly as possible.
If you've read the entire post up to this point, there's no reason to read the following as it just clarifies what has changed in each release.Updates in Build 210
In build 210, server.exe now downloads and updates all mods mention in the server's xml file and/or command-line options every time it is run (no more having to copy over your mods manually to the server). To get a mod running on your server and working with auto-download for clients, simply mention the ID of that mod in the server's configuration. It will be automatically downloaded and used accordingly.
New server.exe command-line option:-modstorage "directory_path_to_store_mods"
This option controls where the server downloads and updates mods to, and where the currently running server.exe process looks for mods. Without specifying this option, mods are stored to "%appdata%/roaming/Natural Selection 2/Workshop". Using this command-line option is particularly useful if you have one server that hosts multiple games at once, since you should be using a different mod directory for each one.