MP Tutorial Scenes Creating a Multiplayer Map - (From Script to Hosting) ((Updated!))

Users who are viewing this thread

Gah! I'm really sorry chaps... I keep meaning to finish off this guide. I will do it this afternoon.
 
Dlk2k2 said:
Actually, the SF_generate is on all scenes, regardless of random generation, and had nothing to do with it? the tags after that on random_plains_large etc. would enable the random generation. the problem was the hardcoded positions of the random maps in the maps list. trying to put mine before this location in the code was causing it to load random_plains_large when i selected my map, and if i selected the last of the random maps it would load mine.

Code that works fine:
##originally had it HERE. Didn't work.
##bit in blue is the random generation
  ("random_multi_plain_medium",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x00000001394018dd000649920004406900002920000056d7",
    [],[], "outer_terrain_plain"),
  ("random_multi_plain_large",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x000000013a001853000aa6a40004406900002920001e4f81",
    [],[], "outer_terrain_plain"),
  ("random_multi_steppe_medium", sf_generate|sf_randomize|sf_auto_entry_points, "none", "none", (0,0),(100, 100), -0.5, "0x0000000128601ae300063d8f0004406900002920001e4f81",
    [],[], "outer_terrain_steppe"),
  ("random_multi_steppe_large", sf_generate|sf_randomize|sf_auto_entry_points, "none", "none", (0,0),(100, 100), -0.5, "0x000000012a00d8630009fe7f0004406900002920001e4f81",
    [],[], "outer_terrain_steppe"),

##moved it here, works fine.
  ("multi_scene_20",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000013000050000025896000008e00000633e00000d06",
    [],[],"outer_terrain_plain"),

Not trying to steal your thunder or anything  :oops:

Ah, very true. My bad!!
 
Can I safely cut (or comment out) the unused scenes in the scene file when I create my custom map reference, or will I need to modify other code to do so?

I won't be using any of the original scenes, so it will be cleaner and more efficient to scrap them.
 
Yes, theoretically. Just make sure that everything is in the same order throughout the three scene files and that you've correctly numbered the scenes in module_strings.
 
When I followed the last of your tutorial I ran into a problem with module_scripts. My map is simply called alpha_valley do I need to make the map .scn first then try to compile it?

An example of your exact code for module_script entry for your map would help I think.

Code:
.
Exporting scripts...
Error: Unable to find object:scn_alpha valley
ERROR: Illegal Identifier:scn_alpha valley

thanks for this great tutorial!!
 
You cannot use spaces in the name scn_alpha valley. It must always be underscored...
 
I feel dumb now, guess sometimes you just need someone to point out the obvious to you. :smile:

I have a secondary question related to map creation via multiplayer server:

Whenever I edit the map and save it I can exit to main menu, go back in, and see my changes as long as I stay in the same session. However, if I exit the game and rerun it, my map is reset to its default parameters. I know I am once again missing something trivial.

Thank you
 
A member of the group that I belong to had this problem. I'll check with him later as to how he fixed it.
 
I have a feeling it may have something to do with the location of the mod folder that is modified by the python files. I had to put it in my /users area or python could never find it under Win7. I just copy paste this folder into my modules directory after its compiled.

However, I can't find a .sco file of my map name anywhere on my system which tells me its not creating one at all.

Edit: I went into multiplayer, set up a server game using ruins and made noticeable changes. I then saved the scene and exited.
Same problem as before with no new .sco file (in sceneobj folder) and when I went back it was back to stock.

Its like the editor isn't saving at all, but I have searched ad nauseam on this and other M&B mod forums and no one else seems to be having problems saving scenes. I did find a thread where file permission in Win7 were a problem but all my .sco files already have admin permission and I can't even get a new file created anyways.

UPDATE
I figured out what I was doing wrong. I got confused and changed my map name to scn_ in the module_strings file as well and that borked things up in the editor but allowed it to compile.
Once I changed that it works fine now.


 
I've been having a pain trying to get my first map hosted. I went through this morning and fixed some general syntax errors, when I ran my compiler, this is what I got:

Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Error: Unrecognized tag:blankin object:blank_map_5
ERROR: Illegal Identifier:blank_map_5
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

So the first thing I did was have a look through the module_scene, scripts and strings files to see if there's anything unusual there:

(troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 6, "scn_multi_scene_12"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 7, "scn_multi_scene_14"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 8, "blank_map_5"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 9, "scn_random_multi_plain_medium"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 10, "scn_random_multi_plain_large"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 11, "scn_random_multi_steppe_medium"),
        (troop_set_slot, "trp_multiplayer_data", multi_data_maps_for_game_type_begin + 12, "scn_random_multi_steppe_large"),
        (assign, ":num_maps", 13),

  ("multi_scene_18", "Battle on Ice"),
  ("blank_map_5", "Viking Village"),
  ("multi_scene_12", "Random Plains (Medium)"),
  ("multi_scene_13", "Random Plains (Large)"),
  ("multi_scene_14", "Random Steppe (Medium)"),
  ("multi_scene_15", "Random Steppe (Large)"),
  ("multi_scene_end", "multi_scene_end"),

  ("multi_scene_13",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000001300389800003a4ea000058340000637a0000399b",
    [],[],"outer_terrain_plain"),
  ("multi_scene_14",sf_generate,"none", "none", (0,0),(100,100),-100,"0x0000000040000c910003e8fa0000538900003e9e00005301",
    [],[],"outer_terrain_snow"),
  ("blank_map_5",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000033003d11180053d4500004f1e80002733000069ef",
    [],[],"outer_terrain_plain"),

  ("random_multi_plain_medium",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x00000001394018dd000649920004406900002920000056d7",
    [],[], "outer_terrain_plain"),
  ("random_multi_plain_large",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x000000013a001853000aa6a40004406900002920001e4f81",
    [],[], "outer_terrain_plain"),

There isn't anything popping out at me to explain why that error shows up. Everything is compiling smoothly so far and I even extracted another copy of the module system to compare it against.



 
Add a scn_ to the beginning of your map name in the module_scripts.py: scn_blank_map_5.

You only have to add it there, leave map name same elsewhere. This tells it this map is a scene and will allow it to save (and load) correctly to your screenObj folder when you use edit mode.

 
omg i am getting a lot of things when I compile the scripts, I have the last module system and I follow all steps to have Quick Scene Chooser.
Code:
Initializing...
variables.txt not found. Creating new variables.txt file
Compiling all global variables...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3_troop
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3
WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
_max_renown_3_troop
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: tutorial_1_finished
WARNING: Global variable never used: tutorial_2_finished
WARNING: Global variable never used: tutorial_3_finished
WARNING: Global variable never used: tutorial_4_finished
WARNING: Global variable never used: tutorial_5_finished
WARNING: Global variable never used: g_election_date
WARNING: Global variable never used: g_presentation_lines_to_display_begin
WARNING: Global variable never used: g_presentation_lines_to_display_end
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3_troop
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3
WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
wn_3_troop
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .

Please help me!
 
Turanien said:
They are fine. Just extraneous code...
Thanks, and now what I must do? I select in the tutorial section Scene chooser and the first map, I enter to the map and I can't do nothing , only walk around the map,  I don't see nothing more.

 
Nope. Gets really annoying though when you are editing a big map and you have to run around with your character. I wish they added a horse or something.
 
Back
Top Bottom