Automatic Map Downloading Feature (How does it work)

Users who are viewing this thread

Kind of what the title says. How does it work?
How do you add custom maps into native and make them downloadable for people that don't have them?


I tried adding the maps like when you do when you add custom maps to a mod but that didn't work.
I tried to add just the map into the scnobj folder. No luck!


Ofcourse I have added them into the server ini file or what you call it, where you manage the mode of the server and maps etc.
So... Does anybody know how it works? Somebody does, cus I just played on helms deep with my Native module :grin:


Thanks in advance
Nagl


SOLUTIONS:
Stryker said:
SOLVED!

Creating your own maps and adding them to the server is actually remarkably easy--I was pleasantly surprised. There are four phases to the process:

[list type=decimal]
[*]Create the map
[*]Add the .sco to the Modules/<modulename>/SceneObj folder in the server
[*]Add the scene to the Modules/<modulename>/scenes.txt file in the server
[*]Add the scene to the server's startup list
[/list]

First off, create a map as normal. I named mine pom_castle, as I'm building a castle for my clan. There are plenty of tutorials about how to do go about creating a map, so I won't cover that here. I'd recommend creating a "playground" mod to build scenes in, as we'll be copying strings between .txt files later. Creating a copy also avoids contaminating your Native module.

When you're done creating your map, you'll have two parts: the .sco file and an entry in your scenes.txt file. First, copy the .sco from your playground module's SceneObj folder to <server folder>/Modules/<modulename>/SceneObj/. This .sco (in my case scn_pom_castle.sco) contains item placements for everything on the map, as well as terrain changes from the generator code.

Next, find the entry in your playground module's scenes.txt. The easiest way to find it is to hit ctrl-f to do a search, then enter the name of your map. Copy the map entry to the server module's scenes.txt file. The entry will look something like this:

Code:
scn_pom_castle pom_castle 256 none none 0.000000 0.000000 100.000000 100.000000 -100.000000 0x0000000033aaf74900025896000008370000659800000ab1 
  0 
  0 
 outer_terrain_snow

Your new map is now installed in the server's module. However, your server won't load it yet, or put it in the map rotation. Obviously, this is a problem. To put the map in the server's rotation, you'll need to modify the startup .txt. Put the map's title (pom_castle is the identifier, in my case) in the map load sequence. The code I used to add the POM castle to the test server's startup routine is below (in context).

Code:
set_max_players 32 32
set_num_bots_voteable 20
set_map pom_castle
add_map multi_scene_2
add_map multi_scene_4
add_map multi_scene_7
add_map multi_scene_9
add_map multi_scene_11
add_map multi_scene_12
add_map random_multi_plain_medium
add_map random_multi_plain_large
add_map random_multi_steppe_medium
add_map random_multi_steppe_large

IT WORKS!
When you attempt to join the server from another location using an unmodified copy of M&B, it downloads the scene's .sco and generator code automatically. I believe (though I haven't verified) that this should work equally well for any mod you can create scenes for.

Limitations
You can't poll for the newly-added map, and I doubt that you can select it from the remote administrator panel in-game (though I haven't verified this). The map is only available via the server's normal map rotation.

Enjoy! I hope we'll start seeing new maps popping up on the POM servers sometime this week. :smile:


Turanien said:
Listen Up!

I've just done some quick testing with the module system. In order to get a custom map in-game and working functionally, you need to do the following:

Edit:

module_scenes.py - Add your map entry with correct terrain code. Example:

Code:
  ("my_map_1",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000002002c8250004992700006e54000007fe00001fd2",
    [],[],"outer_terrain_steppe"),

module_scripts.py - Add your map entry to reflect the map name on your admin/poll panel. Example:

Code:
  ("my_map_1", "My Map 1"),
  ("my_map_2", "My Map 2"),

module_strings.py - Add your map entry to the correct gametypes. This must be done so that it appears under the various gametypes. Example:

Code:
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 8, "scn_my_map_1"),

Once I edited these three files, I ran the batch file and copied the new .txt files over my native 1866 ones. I placed the new scene in the SceneObj folder and then quickly hosted a server on my machine. Lo and behold! Several people joined and confirmed that they had downloaded my map. We played a few rounds bug-free. There is however one problem; the map is not available as a poll option for those without the updated .txt files (Presentations). It is however fully selectable as an admin in the poll panel and in the administration panel.

:smile:
 
Could someone elaborate that a little more. AFAIK if you're downloading a map, it saves the .sco and
the .txt file (with the terraincode) in the document&settings etc. folder (XP and non-steam version).
I'd like to know what has to be done on the server-side to enable players to download and play
custom maps.
 
Same question here, also in what way does the map need to be generated? Can you just create a map with a new scene file while modifying the scenes.txt and have that send it out, or do you need to create a new module called native with the extra scenes added in via the module system?
 
I see that this is a feature wanted by many and not just me :grin:


What I meant is; how do you add maps that you download ingame.

For example:

I played on the 22nd server it seems, on my native module, and the map switched from the current one to Helms Deep. I didn't have that map on Native, ofcourse, so the game downloaded that map for me automatically. Constant messages came up and told me how many KB's on that map I had downloaded until it was finished.

So...
Once again, my question is;
How do I add the maps to a native module so that other people can download it and play on it on a native module?

And please don't get me wrong here. I know how to add maps into native as a whole mod. And I know how to upload maps and I'm a wizard with the ingame editor.
It's just that I want to make them downloadable from In-game.
 
Soooo... is this like a stupid obvious question, or nobody knows? Obviously some servers have maps utilizing the auto download... Where can we find information about how this works? In the module system, from a random forum post, trial and error?
 
POM would also like to know.

We've figured out how to make use of maps that exist in SP on our MP server's map rotation, but we haven't yet discovered the key to the map downloader. I and a couple of others are decent with a map editor and have some good ideas, but we don't currently have the ability to use any of our created maps on the server. Don't new maps usually require module system edits?

It seems to me, however, that this downloader could be the reason we're seeing the HTTP request functionality in the 1.125 module system. Perhaps modules can define a method for downloading new maps by themselves?
 
I would also be interrested... i thought it was not possible and everybody had to dl the map out of the game before connecting to the server
 
COGlory said:
I'd like to know where they save the files, and do they edit the scenes.txt and parties.txt

If you look in My Documents/Mount&Blade Warband, there is a folder called SceneObj that seems to contain all downloaded maps.
 
The game downloads the files to:
C:\Users\NaglFaar\Documents\Mount&Blade Warband\SceneObj

Atleast on my comp. In there I have a folder called ScnObj and all the files included the txt is stored in here.

But I still have no idea how to make a map downloadable from ingame :grin:
 
Try just putting the new scene into your Native folder as you would for single player and adding the .sco file's name to the server info with the other maps.
 
The problem is that we're trying to add these maps to the 1866 mod that is running on the server. We have the scene files ready and we know the terrain codes (since they're exact replicas of the set of five that Highlander published in his scene builder kit)

 
Back
Top Bottom