Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] How do you add new maps to a server?

#1
Hi there, I'm a really new user to the site but I've really enjoyed what I've seen so far.

I'm trying to run a server for me and a couple of friends but I've been having some trouble in adding new custom maps to my server, I can't seem to get them into the right place (not that I know where I should put the maps) for the server to run them and for them to able automatically download them and play them.

Do you guys have any ideas?

Thanks for reading btw.
Reply

#2
Welcome!

Have you read the documentation? More specifically, server/readme.txt and the file it refers to, Docs/mapdownload.txt. Those files explain how it works.

If you have any questions left after reading them, feel free to ask them in this thread Wink
Reply

#3
Yeah, I see it now, thanks for that. Looking at it it helps somewhat but I'm still left with questions.

1. Do I have to have the custom maps downloaded on my server?
2. If so where do I place them?
3. If I just have to change the download url
Quote:sv_curl_defaulturl

do I need to add more stuff to the url, as the default one had
Quote: getmap.php?file=
?
Reply

#4
Yes, you do need the maps on your server as well. The server must know what the map looks like because otherwise it can't tell when players are on the ground, bumping in to walls, grabbing items, etc. You can only play maps that are loaded on the server. It's also important that the server uses the exact same map as the client, because differences in brush structure (for example a hole in the ground or an added wall or something similar) will make weird glitches on the client side, as people will seemingly fall through the ground or get blocked by an invisible wall at those places.

You have to place the map files in the data directory. Usually on Linux-based systems that's in ~/.xonotic/data/. It depends on your server's operating system and how you installed the game, so can you tell me more about that?

For your question 3: The map's file name (the .pk3 one) is appended to the download url, so it depends on how you are serving the maps. The one with http://example.com/myscript.cgi?file= makes the map url look like http://example.com/myscript.cgi?file=examplemap.pk3. This means a server-side script, myscript.cgi, is in charge of serving the pk3 file. URLs like http://example.com/maps/examplemap.pk3 are for regular web server setups where the server is directly serving the file by its path. The latter is the most used, I believe.
Reply

#5
(12-12-2012, 01:22 AM)Mr. Bougo Wrote: Yes, you do need the maps on your server as well. The server must know what the map looks like because otherwise it can't tell when players are on the ground, bumping in to walls, grabbing items, etc. You can only play maps that are loaded on the server. It's also important that the server uses the exact same map as the client, because differences in brush structure (for example a hole in the ground or an added wall or something similar) will make weird glitches on the client side, as people will seemingly fall through the ground or get blocked by an invisible wall at those places.

You have to place the map files in the data directory. Usually on Linux-based systems that's in ~/.xonotic/data/. It depends on your server's operating system and how you installed the game, so can you tell me more about that?

For your question 3: The map's file name (the .pk3 one) is appended to the download url, so it depends on how you are serving the maps. The one with http://example.com/myscript.cgi?file= makes the map url look like http://example.com/myscript.cgi?file=examplemap.pk3. This means a server-side script, myscript.cgi, is in charge of serving the pk3 file. URLs like http://example.com/maps/examplemap.pk3 are for regular web server setups where the server is directly serving the file by its path. The latter is the most used, I believe.

Thanks for all this, I hate to be a bother.

Regarding question 2 it's a windows based OS as to the installation, I could provide screen shots if that helps but as far as I know it looks similar to how I run it on my normal computer.

For question 3 I plan to use, http://mapdl.xonotic.eu/tzork/ to provide the download links for the maps so I just post it with that bit I previously quoted to allow users to get the maps?
Reply

#6
(12-12-2012, 12:24 PM)Gmandam Wrote: Regarding question 2 it's a windows based OS as to the installation, I could provide screen shots if that helps but as far as I know it looks similar to how I run it on my normal computer.
Screenshots won't really help.

What exactly is the OS? The best place to put configurations and pk3 files is the personal directory. This is the default place where files are written. You can find out where it is by locating a standard file using console commands, for example in a dedicated server:
Code:
which data/server.db
in the server console will tell you where server.db is located. It will be something like C:/prefix/Xonotic/data/data/server.db (with data appearing twice in a row), so you want to place the pk3 files in C:/prefix/Xonotic/data/ (with one data, so not data/data).

(12-12-2012, 12:24 PM)Gmandam Wrote: For question 3 I plan to use, http://mapdl.xonotic.eu/tzork/ to provide the download links for the maps so I just post it with that bit I previously quoted to allow users to get the maps?

No, because the map URLs are for example
Code:
http://mapdl.xonotic.eu/tzork/Spiderctf-v1r1.pk3
which consists of
Code:
http://mapdl.xonotic.eu/tzork/
with the map name appended, so you have to use that as a base URL.

getmap.php is nothing special at all: it's just an example of non-trivial use of sv_curl_defaulturl, and being an example it's probably never used at all. It's just there to let you know that you can also use CGI scripts to serve your files, and not just direct file GET requests.

To make sure you get it right: sv_curl_defaulturl contains a string to which the map's file name is appended to form a valid HTTP or FTP address pointing to the file in question. No black magic involved.
Reply

#7
(12-12-2012, 01:02 PM)Mr. Bougo Wrote:
(12-12-2012, 12:24 PM)Gmandam Wrote: Regarding question 2 it's a windows based OS as to the installation, I could provide screen shots if that helps but as far as I know it looks similar to how I run it on my normal computer.
Screenshots won't really help.

What exactly is the OS? The best place to put configurations and pk3 files is the personal directory. This is the default place where files are written. You can find out where it is by locating a standard file using console commands, for example in a dedicated server:
Code:
which data/server.db
in the server console will tell you where server.db is located. It will be something like C:/prefix/Xonotic/data/data/server.db (with data appearing twice in a row), so you want to place the pk3 files in C:/prefix/Xonotic/data/ (with one data, so not data/data).

(12-12-2012, 12:24 PM)Gmandam Wrote: For question 3 I plan to use, http://mapdl.xonotic.eu/tzork/ to provide the download links for the maps so I just post it with that bit I previously quoted to allow users to get the maps?

No, because the map URLs are for example
Code:
http://mapdl.xonotic.eu/tzork/Spiderctf-v1r1.pk3
which consists of
Code:
http://mapdl.xonotic.eu/tzork/
with the map name appended, so you have to use that as a base URL.

getmap.php is nothing special at all: it's just an example of non-trivial use of sv_curl_defaulturl, and being an example it's probably never used at all. It's just there to let you know that you can also use CGI scripts to serve your files, and not just direct file GET requests.

To make sure you get it right: sv_curl_defaulturl contains a string to which the map's file name is appended to form a valid HTTP or FTP address pointing to the file in question. No black magic involved.

Heheh, before I sent that message away I was able to get a custom map working so thanks for the help, it worked!

Thank you very much.
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  Server does not start saddesad 2 228 11-25-2020, 04:39 AM
Last Post: saddesad
  [NEED HELP] Server failed to open socket on address... Hexactinal 2 239 11-21-2020, 04:28 PM
Last Post: Hexactinal
  Server Hosting Issue Saevus 3 858 11-11-2020, 02:53 PM
Last Post: :[:{b_e*r^f}:]:
  Docker Xonotic Dedicated Server ich777 15 3,188 10-08-2020, 11:15 AM
Last Post: BuddyFriendGuy
  BuddyFriendGuy Fun Server BuddyFriendGuy 22 8,577 10-08-2020, 11:14 AM
Last Post: BuddyFriendGuy
Rainbow Kotangєns' independent server Kotangens 2 583 10-07-2020, 05:08 AM
Last Post: L497
  RaspberryPi4 Server ablyveiled 2 955 08-19-2020, 10:36 PM
Last Post: ballerburg9005
Question [NEED HELP] Server uses 40% CPU whereas Nexuiz server runs with max 10% e-pig 6 2,448 08-19-2020, 10:17 PM
Last Post: ballerburg9005
  [SOLVED] I can't create my server. Kotangens 11 1,499 07-22-2020, 04:42 AM
Last Post: Kotangens
Information [SOLVED] Server stops when I close command prompt on my PC Jewel 2 692 06-01-2020, 07:11 AM
Last Post: Jewel

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-