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
Rainbow How do you add a CTF capture speed leaderboard? dagelf 5 196 11-13-2024, 05:59 PM
Last Post: lister
  I can't see my listen server on server list fnmain 1 1,168 10-07-2023, 07:28 AM
Last Post: Grimnack
  New CA only Server ".broccoli | Clan Arena" - EU Based aeh 1 1,305 03-07-2023, 03:53 AM
Last Post: FAF
  Server not visible on the server browser for others or me DankoLord 1 2,150 02-21-2023, 08:02 PM
Last Post: ballerburg9005
  BaI server | South American Xonotic server (located in Chile) z411 0 3,171 01-02-2022, 11:36 PM
Last Post: z411
  Lost server key, can't hold new key FlufyBuny 0 2,384 09-09-2021, 07:05 PM
Last Post: FlufyBuny
  Full server tutorial start-2-finish with maps & config from live server xonotic.us.to ballerburg9005 0 10,066 09-03-2021, 10:21 AM
Last Post: ballerburg9005
Question [NEED HELP] Server uses 40% CPU whereas Nexuiz server runs with max 10% e-pig 6 5,503 08-19-2020, 10:17 PM
Last Post: ballerburg9005
  [NEED HELP] Server dont appear in server browser abslimit 0 2,815 03-15-2020, 04:13 AM
Last Post: abslimit
  How to change server cfg on modified server veecho 4 4,919 04-24-2019, 08:15 PM
Last Post: BuddyFriendGuy

Forum Jump:


Users browsing this thread:
1 Guest(s)

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