Automatic Map Downloading Feature (How does it work)

Users who are viewing this thread

NaglFaar said:
As far as I know only the 22nd knows how to do this. I've also heard rumors about nK knowing about it as well.
I sort of semi-know, but its not working totally right.  I managed to get 2 custom maps on the duel server but haven't had any luck with 1866 mod.  I honestly don't know much about M&B modding so I'm looking for help myself.


edit: I suppose I could elaborate a little.  I can put a map on the server, but it takes the place of another map on the list for some reason when you try to poll or get on the admin panel.  All the maps are still there, it just uses the name and slot of one on the menu.  For example, on the nK duel server, I made a dueling map, but its listed as Random Plains on the screen.  How do I create a new entry for a map so it shows up on the menu properly?  I suppose some mod makers might also know this, since they have to put maps for their mods.  I am pretty new to M&B modding, since I just started with Warband really and haven't done much more than mapping.  But if someone could tell me all the files I need to edit I should be able to figure it out.
 
Somebody here should ask Taleworlds for some support on this.  Map downloads are a basic part of an online FPS game these days, and if the feature's part of the engine / server, there should be instructions on how to get that done.
 
I'm going to take some time today to putz around with this. I have a good system set up for it: a laptop to run the server, sitting next to my main desktop. I'm going to put the dedicated server files on the laptop, slap together a basic custom map with a building or two, and see if I can get this system working.

How hard can it be? :grin:
 
Anyone having problems with the taleworlds download servers this weekend? Been trying since friday to get the module system and the dl servers all time out, even for regular m&b.

Ctrl for getting the correct name on the custom map I believe you need the module system to add a new one. If you want to just rename it, open the strings.txt file in /Native and find the corresponding map name, for example:

str_multi_scene_1 Ruins

and change it to

str_multi_scene1 My_awesome_dueling_map

But this just overwrites the ruins string. If you try to add a new one in it'll mess everything up, and I believe you need the module system for a brand new one.  I haven't changed the strings.txt but I believe this is how you do it, give it a try to see if you get the new name.

Also, I am willing to bet there is an entry in the 1.125 module system for auto downloading maps somewhere, but I don't have it and can't get it to look. For those trying that might be a good place to start.
 
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:
 
This is great news. I'll try it out as soon as possible (I hate work).
And don't get me wrong here. I trust you but when I get it confirmed by a few others I'll add it to the OP.


Thanks a lot for your generosity.
 
Reapy said:
Anyone having problems with the taleworlds download servers this weekend? Been trying since friday to get the module system and the dl servers all time out, even for regular m&b.

Ctrl for getting the correct name on the custom map I believe you need the module system to add a new one. If you want to just rename it, open the strings.txt file in /Native and find the corresponding map name, for example:

str_multi_scene_1 Ruins

and change it to

str_multi_scene1 My_awesome_dueling_map

But this just overwrites the ruins string. If you try to add a new one in it'll mess everything up, and I believe you need the module system for a brand new one.  I haven't changed the strings.txt but I believe this is how you do it, give it a try to see if you get the new name.

Also, I am willing to bet there is an entry in the 1.125 module system for auto downloading maps somewhere, but I don't have it and can't get it to look. For those trying that might be a good place to start.
Yes that is my problem.  I can overwrite an existing map no problem, it's just adding a brand new one in.  And I'm having issues getting Python to work on this comp, so I can't check it atm.  If someone wants to test this, go ahead and tell me what happens.  I think these are the files you need to change:
module_strings.py: localization info
module_scenes.py: scene info.
Module_presentations: admin panel map list.


The first two can be edited from their text files, but presentations can't.  So maybe that's what's messed up.  I don't know if you need to edit anything else or not.  I'll try to test this out in a day or two if noone else does.



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:
ehhh, that still only half fixes the problem.  Now you are in the same boat I am :razz:  BTW, on my server admin stuff (TCAdmin), startup.txt is called Sample.txt.  So I hope noone get's hung up on that :smile:  But we need to find out how to make maps selectable from the poll and admin list.


edit: I just thought, maybe warband_compatibility.ini has something to do with it?  Maybe someone with more modding experience than I can see if that needs to be edited.
 
I guess it's best added with the module system in module_scenes and added to all possible gamemodes in module_scripts. Than make the .sco and put it on the server. Anyone not having that scene will have it downloaded (didn't test it, but I suppose this is how it works).
 
Again I'm a newb moder here, I have spent some time thinking about moding which meant I read through the module documentation and examining the module files, but I never actually built anything.

In terms of the name of the sample.txt file for the server, it is literally just a text file of commands that are sent to the server.  First of all the best way to play with the server is just download the files, put it on your machine, and run a local server with a password up for yourself to test out. This way you can figure stuff out without messing up your 'production' one that people play on.

But when you run the dedicated server, you get a command panel up that you can type commands into (typing help brings them all up). So when you create this text file, you just are piping each line of text to the server as though you sat down and typed them in. So for example when I was running my small server, I had a text file called "reapy_map_duel.txt" and another one called "reapy_normal_dm.txt" and it was really just which set of commands I sent to the server to configure it the way I wanted.

For adding a map 'correctly' I still have no clue, I haven't tried though in the module system to do so. From what I remember looking at all the files it seems like you have the right ones to add an entry too.

I just wonder how warband reacts to having a moded Native folder on the server and a 'correct' one on the client? I guess we know now that it will download scenes.txt and .scn files that it does not have. I wonder how heavily you could work over your /Native folder on the server and have it still work on the client side. Maybe some wonkey results. But I guess we are safe using standard resources and just adding new maps... Again though I wonder if the presentations.py mod has to be on the client side to see all the menu options as well as on the server side.

Eh, I guess I should stop worrying about it since I'm not running a server and let you guys deal with the headaches :razz:P
 
Reapy said:
Again I'm a newb moder here, I have spent some time thinking about moding which meant I read through the module documentation and examining the module files, but I never actually built anything.

In terms of the name of the sample.txt file for the server, it is literally just a text file of commands that are sent to the server.  First of all the best way to play with the server is just download the files, put it on your machine, and run a local server with a password up for yourself to test out. This way you can figure stuff out without messing up your 'production' one that people play on.

But when you run the dedicated server, you get a command panel up that you can type commands into (typing help brings them all up). So when you create this text file, you just are piping each line of text to the server as though you sat down and typed them in. So for example when I was running my small server, I had a text file called "reapy_map_duel.txt" and another one called "reapy_normal_dm.txt" and it was really just which set of commands I sent to the server to configure it the way I wanted.

For adding a map 'correctly' I still have no clue, I haven't tried though in the module system to do so. From what I remember looking at all the files it seems like you have the right ones to add an entry too.

I just wonder how warband reacts to having a moded Native folder on the server and a 'correct' one on the client? I guess we know now that it will download scenes.txt and .scn files that it does not have. I wonder how heavily you could work over your /Native folder on the server and have it still work on the client side. Maybe some wonkey results. But I guess we are safe using standard resources and just adding new maps... Again though I wonder if the presentations.py mod has to be on the client side to see all the menu options as well as on the server side.

Eh, I guess I should stop worrying about it since I'm not running a server and let you guys deal with the headaches :razz:P
You can edit the scenes.txt file with a new map's entry and it still works.
 
Just a quick, slightly related question; I've noticed that on Ndition's Duel Server, they're using a modified version of Ruins. Did they just edit that map and upload it? Because I had to download it and yet it didn't corrupt my Native's version of Ruins (which I think is a pretty cool feature of TaleWorlds to have added, I haven't seen that in other games.)

EDIT; Duh, stupid me. I simply tried it and got the answer to my own question. It works like that, yeah, so I'll just leave this post here for others who might have the same question.
 
Reapy said:
Again I'm a newb moder here, I have spent some time thinking about moding which meant I read through the module documentation and examining the module files, but I never actually built anything.

In terms of the name of the sample.txt file for the server, it is literally just a text file of commands that are sent to the server.  First of all the best way to play with the server is just download the files, put it on your machine, and run a local server with a password up for yourself to test out. This way you can figure stuff out without messing up your 'production' one that people play on.

But when you run the dedicated server, you get a command panel up that you can type commands into (typing help brings them all up). So when you create this text file, you just are piping each line of text to the server as though you sat down and typed them in. So for example when I was running my small server, I had a text file called "reapy_map_duel.txt" and another one called "reapy_normal_dm.txt" and it was really just which set of commands I sent to the server to configure it the way I wanted.

For adding a map 'correctly' I still have no clue, I haven't tried though in the module system to do so. From what I remember looking at all the files it seems like you have the right ones to add an entry too.

I just wonder how warband reacts to having a moded Native folder on the server and a 'correct' one on the client? I guess we know now that it will download scenes.txt and .scn files that it does not have. I wonder how heavily you could work over your /Native folder on the server and have it still work on the client side. Maybe some wonkey results. But I guess we are safe using standard resources and just adding new maps... Again though I wonder if the presentations.py mod has to be on the client side to see all the menu options as well as on the server side.

Eh, I guess I should stop worrying about it since I'm not running a server and let you guys deal with the headaches :razz:P
Well the way I understand it, if you were to try to create a server running a custom map with, say, custom textures on the armor and weapons, any client who did not already have those textures would get a CTD and an error saying that those specific textures could not be loaded (as they do not exist, client-side). That's how it would work in theory. However, maybe TW added a texture autodownloader as well?(unlikely though) If that were true, it should work just as the autodownloader does for the maps.

In other news- Today I got my server to run a custom map of my own making. It worked great except for a few problems, of which I was hoping someone here could enlighten me.

1. The maps would load correctly and the clients had downloaded the maps before joining, but the maps weren't listed correctly in the games list, client side. I've seen the 22nd servers, which do this just fine, so I know it's possible.
Extra info- I was running one of my siege maps, Minas Tirith, but the server listing said that it was a siege map on Random Plains(lol)

2. In the administrator panel, the new maps wouldn't show up, and trying to switch to a different map left everyone stuck at the score screen(as if the map was about to change but never did). It also did this when It came time for the next map in the rotation. All maps in the rotation were custom...

Could really use some help if anyone can solve these problems...
 
The 22nd administrators have to download a separate native module with the maps installed for us to be able to select them in the administrator panel. Hope that stops some confusion.
 
OOOOOOOOOOH DUUUUUUUUUH! That makes sense to me. I would assume then, that to get it in polls you would need a different presentations file as well (or do you, I've never put up a poll on the 22nd servers?)
 
I've been tinkering some more, and have come to the conclusion that in order to get the map added to the list of pollable maps, you actually need to modify module_scripts.py or the resultant text file, scripts.txt. The presentations actually generate a list based on the data in the scripts file. I have no idea why this is, honestly, other than the maps being divided up for selection according to which game mode is selected. Further tinkering has led to a bunch of server crashes, but nothing productive. :razz:

If we could somehow get the scripts.txt file (or at least its modifications) to be auto-downloaded, it would solve many or all of our problems--however, therein lies the issue. When autodownloading a map, it downloads the .sco file (obviously) and creates a new text file (in your C:\Users\<user>\Documents\Mount&Blade Warband\SceneObj\ folder, on Vista/7) with the same name as your .sco. This text file contains the data that was updated in the scenes.txt file. However, based on the name of that file, I don't believe that the facilities are in place for any other files or text file modifications being downloaded--including entries from scripts.txt.

My guess is that TaleWorlds has at least one more major patch set coming out for Warband that will fix up the auto-download functionality and allow us to create maps for auto-download that will be added to the poll and administrator lists automatically. My reasoning behind this is simply that they went to the extra effort to create a script to return the list of available maps. This would probably only be the case if they were going to make said script retrieve a list of available maps from the server in a future version (in which case, this would absolutely rock--wouldn't even need to reboot the server to add new maps!). Why they haven't completed this already is a matter for speculation, but it might just be due to rushing out 1.125 as a MP balance/SP fixes patch.

Edit: If anyone wants to poke around at this more, here's the string to search for in module_scripts or scripts.txt: "multiplayer_fill_map_game_types". Another thing that makes me think TaleWorlds is still working on autodownloading: when you try to enter a game server running a module you don't have, it asks if you want to download it (or something like that), then opens this page: http://www.taleworlds.com/main.aspx?dir=modules.aspx
 
My opinion is this:

I do not think it is fair that one group of people should have something meant for everyone, to themselves.
I DO think its fair that once they work hard and figure it out, are reluctant to immediately tell people, especially people who treated them unfairly in the past.
I didnt tell you how to do it, I just helped those of you along who were clearly doing what we and Vince wanted you to do, put the effort in and work it out for yourselves.

However, im seriously worrying about the community splitting now, large player filled servers are really fun, I really hope these dont die.

People like large battles, if you liked the community, you would help keep those large battles, so giving the 22nd a map is actually doing a good thing, giving your map to anyone! is a good thing. Us 22nd could EASILY fill our servers with maps, but we wanted to involve the public. Another nice thing thats been publicly dissed, we are getting tired of doing things for the community, only to have it slammed back into our faces.

The only reason other clans want this, is so OTHER clans can have their servers fill up, thats not about the community, thats about you doing exactly what you are accusing us of doing! We have a siege server, a battle server, a TDM and a DM server, 1866 mod server and a couple more, people COULD spread out if they wanted, but no, the community wants to play large 200 men battles on our siege server. You will not be helping the community if you tried to take that away, no matter how you say it.


(sorry to the genuine modders here trying to help the community, dont bother reading it, wasnt aimed at you)
 
The community likes to play large 200 man siege games. Whether or not it is your server matters on the options available and the competition. The 22nd second has outdone the competition before this feature and will continue to do so.

As it stands, basically it's only the clans who are providing servers. In my personal experience I'm going to do my best to attract people, since I sacrifice a large chunk of my personal finances, as also did the 22nd. For me, I rented this server for two reasons: to provide GK a haven for matches, training, etc., and provide a place for the public to play.  It is my baby and I want it to grow up well. I think its the same for everyone who rents/owns a server, and I respect that. That is why I'm adamant about this.

I would like to be able to use a feature PLANNED AND IMPLEMENTED BY THE DEV's, not a popular mod made by the 22nd. Unfortunately, they have dropped the ball with the documentation, and the person who picked it up won't return it to it's proper court.  I don't want to take away from you, but I don't want servers empty either. I'm aiming to fill as many servers as possible...GKs, ATSs, NKs, DOFs POMs, 22nds, the offical servers, oceanic servers, the whole spiel. We all can do this by attracting as many people as possible and giving them a good time, so they spread the word and come back with even more people. So then, TW profits and can make the game even better.


22nd is in the EU, GK is in NA. If you think for any reason that we, or anyone really, are targeting your server specifically, then you need to calm down. People do like your server and they will play continue on it. Ignore the OP sob in that other topic.
 
Bite Me said:
The only reason other clans want this, is so OTHER clans can have their servers fill up, thats not about the community, thats about you doing exactly what you are accusing us of doing! We have a siege server, a battle server, a TDM and a DM server, 1866 mod server and a couple more, people COULD spread out if they wanted, but no, the community wants to play large 200 men battles on our siege server. You will not be helping the community if you tried to take that away, no matter how you say it.


(sorry to the genuine modders here trying to help the community, dont bother reading it, wasnt aimed at you)

We'd like it so that we can put custom maps on the server, that is all.  :smile: S'alright though, we should have it cracked tonight for 1866.
 
Back
Top Bottom