Author Topic: Scene creating and server hosting guides  (Read 53022 times)

0 Members and 1 Guest are viewing this topic.

Vornne

  • Moderator
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: Vornne
  • M&BWBNW
Scene creating and server hosting guides
« on: April 26, 2011, 09:11:18 AM »
Basic scene creation guide
  • Setting up the terrain code should only be done before starting work on the scene; if you change it for a scene that already has terrain modifications, things might look messed up.
  • Start native single player with edit mode enabled, load a game to the world map, and then click the terrain button in the bottom left of the screen.
  • Leave the four buttons at the top all disabled: Place river, Deep water, Shade occlude (don't know what this does), and Disable grass (you can remove grass by texture painting).
  • Set polygon size to 5 meters unless you are making a very small (for PW) scene.
  • Choose the terrain type from the list.
  • Set the vegetation slider to 0 (far left) since the auto generated trees and rocks can have collision problems, can't be removed when you want to place a castle somewhere, can cause plants you place to randomly disappear when loading the scene, and they won't work with the cutting down for resources system in PW.
  • Set size x and size y as big as you want: most PW scenes are near the maximum size. To get the absolute maximum size (larger than possible with the generator), you need to click the button to copy your terrain code, switch to a text editor and paste, change the hexadecimal digits at the positions marked in red to fffff, also making sure the digit marked in blue is 3 (for 5 meter polygon size):
    (click to show/hide)
    You can then copy and paste the code back into the terrain generator to see what it will look like and fine tune other settings.
  • Click Generate Terrain to see what the current values look like; left click and drag on the preview to zoom, right click and drag to pan.
  • Adjust ruggedness, valley, and hill height to your liking, and regenerate the scene; this will only modify the same basic shape unless you randomize the terrain seed.
  • Once the terrain looks close to what you want for your scene, click copy, press alt-tab to switch out of warband, open scenes.txt, and paste it into the terrain code part of the scene you want to edit, for example, the red part is the terrain code:
    (click to show/hide)
  • The green part in scenes.txt is the outer terrain mesh; you can choose from this list (they can be previewed with OpenBrf):
    (click to show/hide)
  • With "X" representing the scene number you changed: delete or move away any existing SceneObj/scn_scene_X.sco file from your PW module directory, also making sure your user account can write to that directory - changing the permissions if not. You can back up your scenes after saving in edit mode by copying this file to another location; if you mess things up, copy the backup back.
  • Start PW 4 with edit mode enabled, choose "Edit a scene" in the multiplayer menu, and start editing; read the information by pressing F1 or F2 while in walk around mode.
  • Use the dedicated server package from the download section to test your scene, since active scene props (starting with pw_) don't work in edit scene mode. Make sure there are no linking errors in the server console; in edit scene mode you can press the F8 key to iterate through all unlinked scene props, your character being moved to their position.
  • When you are finished and want to get your scene hosted on a public server: send the SceneObj/scn_scene_X.sco file with the terrain code and outer terrain mesh name to the server admin, and they can add the scene to whatever slot is available, renaming the .sco, changing the terrain code and mesh, and setting the scene name for in the server list.
  • If your scene is completed and any bugs fixed well enough to be used on a populated server, you can request that your scene name, terrain code, and outer terrain mesh be added to the next official PW release, so all players see the name of your scene in the server list and so server hosters don't have to edit scenes.txt as above.
  • New castle names can also be requested for use in completed scenes, but try to limit the amount to about 5 per scene, since there are only 127 possible name identification numbers in total for all scenes made.
My personal scene making recommendations
  • Save very often by exiting edit mode and going back into it again, and periodically make backups of your scene file (PW_4_version/SceneObj/scn_scene_number.sco).
  • Design your scene and place the most important larger scene props in a rough layout first, then go back to each area later adding more things in order of importance; leave pure "eye candy" props to the last, dependant on the frame rate.
  • If you are making your own terrain shapes not based on the generator accessed from native single player mode, smooth sharp points and most sharp edges into curves (using a low weight), without making the hills too rounded and fake looking - the balance to achieve realistic looking terrain can be quite delicate.
  • When painting different textures in adjacent terrain triangles, ensure they blend correctly without leaving a sharp edge or transparent area - generally the rock textures need have something like earth or forest at the edges to smoothly blend into grass and certain other types. If you see transparent areas, set the texture to something like "earth" that works next to all other types, set the weight to something low like 0.20 and the radius to 3, then tap the mouse button at the corners of the triangle until the transparency disappears. Learn to use lower values for the weight slider when necessary to blend smoothly, for all types of painting - terrain shaping, texture, and color.
  • Don't paint turf for large grassy areas, but instead clear the texture painting using middle click so the game engine will automatically place grass meshes only visible from a limited range (after the scene is reloaded). Obviously, to clear the grass meshes just paint a texture there - this is sometimes necessary underneath props with flat areas just above ground, or if an interior mesh is close underneath with the inaccessible parts near the ceiling actually above ground. This way, the players who don't want grass can turn it off in the options, but players with good computers can see a better looking scene.
  • Color painting can be useful to blend the overall color of terrain areas with scene props placed next to them, or add extra shadows to areas supposed to be dark; middle click works to remove it, as with texture painting.
  • To move the camera quickly around the scene in edit mode, alternately tap the left and right keys while holding the forward one; to slow down again just release the forwards key and press again. The control key doesn't seem to work for this as specified in the native edit mode help, but it does work to slow down movements and rotations of scene props.
  • When placing invisible barriers, try to make sure there is some visible reason for the player's character to stop (like a steep cliff, rock, or sharp drop) rather than placing them arbitrarily on a slope, or worse, in a flat area. When placing them where they are accessible from both sides, be sure to place duplicate barriers with the red sides facing both ways, otherwise players might get trapped after passing though the green side - unless you want to make a "one way invisible shield" for a specific reason, but remember to have the red sides on the outside of the small enclosed area, so people get trapped out rather than in.
  • Try to design your scene so the edges are visually obvious in some way, and generally don't place castle walls right up against the edge, which breaks immersion and can make large amounts of scene props functionally useless.
  • When placing usable scene props (starting with "pw_") check that the collision mesh is not masked by another prop by attempting to select it in edit mode from the likely position of the using player: if it can't be selected players won't be able to use it, so move it outwards gradually until the collision mesh is in front. This is especially important to test with invisible teleport doors, as the interior meshes they are used with often have simplified collision meshes that don't follow the visible shape exactly.
  • Try to line up paired teleport doors to be aligned in opposite directions, so players using them will be facing away from the other door after using (character aim can't be controlled by the module system, as the player's client controls that directly to appear smooth, with periodic checks and updates by the "hard coded" part of the game engine).
  • Before using your scene on a public server, make sure to check that no scene prop linking errors are reported on the dedicated server console, otherwise some usable props like doors or bridges won't work properly.
  • Disconnected interior meshes used with teleport doors should ideally be placed inside the associated exterior mesh above ground, if possible to fit without poking through; or they can be placed below the terrain directly underneath if the building is on a hill, so the sounds from the area are played with the correct volume; but if you want players to be able to shoot ranged weapons inside your interior, you must place it above the terrain level - maybe in a far away area behind an inaccessible hill. Interiors can sometimes be placed outside the scene boundaries, but some areas will cause strange teleporting or disappearing problems - test to find out.
  • Up to ten light props can be used in a scene, so use them wisely in places where they will have the best effect - probably inside different interiors that are used often by many players, to make them look more dynamic.
  • When placing large scene props like walls, check from all angles to make sure there are no gaps revealing the missing back or underside faces of the mesh, which looks amateurish and can ruin immersion; it can be helpful to walk through areas controlling a character at ground level to spot this type of mistake.
  • When placing ships, check the hull mesh is actually immersed in the water to a realistic level - not all types look correct when placed at height 0.
  • It is probably best to make gold rare by only placing a few of that type of mine with low hit points far away from processing or exporting stations - across most of the scene with water, castles, or other obstacles in between; otherwise, other forms of earning money might be made relatively pointless, meaning that resources necessary for crafting might be hard to get.
  • When placing capture points for castles, there should probably be multiple different routes so that the castle isn't too easy to defend; though you could make it very hard or impossible to reach if capturing should happen rarely or not at all.
  • Castles should generally be the only places to get the best training and equipment, so new players can't simply burst in to the server and start disruptively killing lots of people, instead having to gain control or access of a castle first, probably with other players; and so castles are worthwhile to defend. I also think it is better to have different advantages for each castle on the scene, so players have reasons to fight over the ones they think are best, and to make the scene more interesting.
  • Target stock counts (value 2 of the stockpile scene prop) for top tier things like plate armor, great swords, long axes, siege crossbows, war bows, and armoured horses should be set at low values such as 1 or 2, then the next tier down of weapons and armor at about 5 - 10, the mid tier stuff about 10 - 20, then clothes and peasant tools something like 20 - 50 (values might need to be adjusted, but the relative structure should remain). This is so players don't have as many problems getting necessary tools and changing their clothing style when starting out, and when stocks are low there will be a steady reward for craftsmen to bring a load of resources to restock; mid tier items should have a medium target count so that some will generally be in stock when a fighter wants equipment, but to equip an army requires engineers to produce more stock; but so troops heavily armed with valuable weapons need to work with factions or serfs and engineers to get their desired equipment made, with a large reward only if the stock is actually being bought and used, not encouraging the crafters to just make great swords for the gold reward. The more the current stock count is below the target count set by the scene maker, the higher the crafting reward: 0 stock always gives the highest possible reward for that item - a combination of 100 for each skill level required to make the weapon and 20% of the item price, the same as the amount lost when selling - and stock counts in between 0 and the target give a proportional amount of the reward; the refunding of the default resource costs remains unaffected by stack count.
  • You can also start with an existing scene you made for native: just remember to use the same terrain code and outer terrain mesh in PW. Scenes made for another mod might partially load, but any added scene props that don't exist in native will either show up as a question mark named "invalid_object", or maybe another scene prop, so they might need a lot of cleaning up.
Unofficial guides
  • These guides written by players might be outdated, incomplete, or partially incorrect; ensure you follow at least the first part of this official guide to set up the terrain code before creating a scene and following other guides.
Mapper tutorial by Eskalior: this covers some basics to general M&B scene editing that are skipped in the main PW guide; probably most useful to beginners.
« Last Edit: August 06, 2013, 11:34:15 AM by Vornne »

Vornne

  • Moderator
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: Vornne
  • M&BWBNW
Scene creating and server hosting guides
« Reply #1 on: April 26, 2011, 10:23:16 AM »
Server hosting guide (the parts specific to this mod)
  • First set up a native warband server and make sure everything works; you can follow another guide like this one, stickied in the main warband board.
  • Copy the latest PW module to your server - the same one as used to play the game - and put it in the "Modules" directory.
  • Create a server configuration txt file, refering to the readme and examples provided with the dedicated server for more options:
    (click to show/hide)
  • Presuming you named your configuration file "PW_4_cfg.txt", make another text file named "PW_4_start.bat" containing (replace "PW_4_X" with the actual name of the module directory):
    (click to show/hide)
  • To add more scenes to your server, there are two ways: the first is to download the scene file (ends with .sco) from the scene maker's thread, putting it into the dedicated server's "Modules/PW_4_X/SceneObj/" directory, and change the corresponding line of "Modules/PW_4_version/scenes.txt" to have the same terrain code and outer terrain mesh as the scene maker specifies, as explained in the previous post about scene making.
  • The other option is to connect to a PW server running the scene you want and wait for it to autodownload: the scene file will be saved to "Documents/Mount&Blade Warband/SceneObj/", named like scn_scene_X.sco (where X is a number from 1 to 9); so you might either need to sort by time to detect which was the most recent file downloaded, or else move everything out of that directory, then connect and autodownload, to make obvious which scene number is the one you want. Copy the .sco file to "Modules/PW_4_X/SceneObj/" as with the other method, and set the correct terrain code and mesh in scenes.txt - the values are saved in a scn_scene_X.txt file in the same directory as the auto downloaded scene file.
  • To set descriptive names for the warband server list, open "Modules/PW_4_X/strings.txt" in a text editor, scroll to the near the bottom, and rename the second parts of the lines starting with "str_scene_name_X" to whatever name you want, replacing all spaces with an underscore ('_'). Any other strings you change in that file won't affect player clients, since scene names are special in that the warband server uploads it to the main server list for players to see; the scene names in the client poll list (if you have "map" polls enabled) will be the default "Blank Scene X", as well as in the admin panel if you don't set the names to your client.
  • To host a server with a maximum player limit of more than 64, either start it with the WSELoader after changing the setting in wse_settings.ini, or use a hex editor to change some numbers in the dedicated server executable, as explained in this old but still relevant post.
« Last Edit: April 13, 2013, 01:41:59 PM by Vornne »

Citizen_Kane

  • Sergeant at Arms
  • *
  • I mustache you a question
    • View Profile
  • Faction: Neutral
Re: Scene creating and server hosting guides
« Reply #2 on: April 27, 2011, 12:34:09 AM »
Thanks!
Quote
Welcome to the randomers den

NOVICIUS

  • Master Knight
  • *
  • "In Dark Ages nobody would listen to your cries"
    • View Profile
  • Faction: Swadian
  • MP nick: sir/Lord Red de Mon
Re: Scene creating and server hosting guides
« Reply #3 on: April 27, 2011, 02:59:28 PM »
Great guide. It took me 5 min to get started :D
Thanks for clooper..it really helps.
- Lion of Red Nation, Cross of St.Laszlo, Red Dragon of House de Mon and Upside Down Crown as symbol of vassalage to the King/Queen
NOVICUS THREAD and links

Citizen_Kane

  • Sergeant at Arms
  • *
  • I mustache you a question
    • View Profile
  • Faction: Neutral
Re: Scene creating and server hosting guides
« Reply #4 on: April 27, 2011, 09:06:22 PM »
 But how do you get to scene.txt.? Is it o the desktop?
Quote
Welcome to the randomers den

CalenLoki

  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: Calen Loki
  • WB
Re: Scene creating and server hosting guides
« Reply #5 on: April 27, 2011, 09:10:03 PM »
in module folder
In pace forum leones, in bello warband cervi...
Patrick Tamir O'Shawarashtahan. Leader of the Irish Republican Mujahedin.
:D :lol:

Citizen_Kane

  • Sergeant at Arms
  • *
  • I mustache you a question
    • View Profile
  • Faction: Neutral
Re: Scene creating and server hosting guides
« Reply #6 on: April 27, 2011, 11:09:25 PM »
Cool.  :D
Quote
Welcome to the randomers den

Citizen_Kane

  • Sergeant at Arms
  • *
  • I mustache you a question
    • View Profile
  • Faction: Neutral
Re: Scene creating and server hosting guides
« Reply #7 on: April 29, 2011, 11:10:33 PM »
 I only have, Module Data, and Module System....

 Which one is it?
Quote
Welcome to the randomers den

CalenLoki

  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: Calen Loki
  • WB
Re: Scene creating and server hosting guides
« Reply #8 on: April 30, 2011, 01:18:38 PM »
(click to show/hide)
In pace forum leones, in bello warband cervi...
Patrick Tamir O'Shawarashtahan. Leader of the Irish Republican Mujahedin.
:D :lol:

Citizen_Kane

  • Sergeant at Arms
  • *
  • I mustache you a question
    • View Profile
  • Faction: Neutral
Re: Scene creating and server hosting guides
« Reply #9 on: May 01, 2011, 07:51:04 PM »
I only have "Scenes" Not scenes.txt. And when  I open that theres a bunch of codes that I think belongs to native.
Quote
Welcome to the randomers den

AS_King_Tetris

  • Veteran
  • *
  • - Aegis means Protection or Shield. Not AIDS..
    • View Profile
  • Faction: Swadian
  • MP nick: SoA_King_Tetris
  • WF&S
Re: Scene creating and server hosting guides
« Reply #10 on: May 11, 2011, 08:17:49 AM »
I keep getting an RGL error when i go to click "Play" in the mod after doing exactly whats written here. It says something about

"number of passages for site scn_scene exceeds 16"

:/

Vornne

  • Moderator
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: Vornne
  • M&BWBNW
Re: Scene creating and server hosting guides
« Reply #11 on: May 11, 2011, 08:55:32 AM »
"number of passages for site scn_scene exceeds 16"
Probably you need to edit your scene to remove all the passages - they are a feature for single player only, nothing to do with PW.

MaverickG

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: Scene creating and server hosting guides
« Reply #12 on: May 23, 2011, 04:31:12 PM »
I was able to follow the instructions and create a new scene and test it on my computer with the dedicated server info. So good job with the instructions because I am a "computard".  My question is: what do I do with the scene I created, how do I "package" it for upload to the forums?

Desert_Weapon

  • Recruit
  • *
    • View Profile
  • Faction: Nord
  • M&B
Re: Scene creating and server hosting guides
« Reply #13 on: May 23, 2011, 09:15:03 PM »
Help! I have a problem: to create a scene, I castles and everything but I can not put the 4 factions ... ie all sticks say ("lazbourg castle"). As I think the factions?

Sorry is the google traductor  :twisted:

Vornne

  • Moderator
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: Vornne
  • M&BWBNW
Re: Scene creating and server hosting guides
« Reply #14 on: May 24, 2011, 10:44:31 AM »
I was able to follow the instructions and create a new scene and test it on my computer with the dedicated server info. So good job with the instructions because I am a "computard".  My question is: what do I do with the scene I created, how do I "package" it for upload to the forums?
From the first post here:
  • When you are finished and want to get your scene hosted on a public server: send the SceneObj/scn_scene_X.sco file with the terrain code and outer terrain mesh name to the server admin, and they can add the scene to whatever slot is available, renaming the .sco, changing the terrain code and mesh.
You could also check some other scene maker's threads for examples: they are linked from the "knowledge database" thread. There are various file hosting sites around, and I don't have any specific preferences: for myself I either host files on my local webserver if only a few people will download, or host on something like mbrepository for more widely released things; you could request an account there, but other sites might be faster or easier for just hosting a scene.

Help! I have a problem: to create a scene, I castles and everything but I can not put the 4 factions ... ie all sticks say ("lazbourg castle"). As I think the factions?
If you check the "F2" information in edit scene mode, you will find how to set up the castle sign var1 and var2 values correctly: you must set the sign to the correct castle number and choose the name from the list at the end of strings.txt. All signs associated with a castle should use the same name, otherwise I'm not sure which the script would select.