Scene

From Mount&Blade Modding Wiki
Jump to: navigation, search

A scene is a game environment where a mission takes place. Scenes are composed of a terrain mesh, scene props (e.g., buildings), flora, and an AI mesh (which is invisible to the player). Terrain meshes can either be generated randomly or pre-determined and shaped before playing. Engine-wise, scenes have two parts: an entry in module_scenes.py and a scene object file. The scene entry contains the terrain code among other information, and the scene object file contains information such as how the terrain mesh is modified, where scene props are placed, and the shape of the AI mesh. Note that scenes with randomly generated terrain do not have scene object files.

[edit] Editing a Scene

Any pre-existing scene can be edited by activating Edit Mode in Warband Launcher > Configuration and pressing Control+E during a mission. Make sure you are in Windowed/Minimised mode. It's a good idea not to edit a scene that has active agents moving around, as they can cause problems or simply get in your way.

On the EDIT toolbar you see
1. Ground Texture Paint
2. Ground Color Paint
3. Edit AI Mesh
4. Ground Elevate
5. Edit Objects
6. Edit Weather

1. Painting the Ground Texture.
Select your texture in the slider, to get familiar with them try them all out. Now let's say you want to make a small curved path in a grassy environment. First select the "turf" texture, which is grass. Put radius to let's say 50 and make a nice circle somewhere in the scene. Now put the radius to 20 and hardness on 70, outline the circle. Lower the hardness to 50, outline again. Radius 10, hardness 25 outline one more time. Now this is called smooth texture transitioning. You should have a nice grassy texture, that slowly dissapears to the next texture(say an oasis in a desert). Now select the "path" texture. Radius: 2, Hardness: 70 and make your path. Try to practice, make textures softly transition into each other and such.


2. Ground Color Paint
This is for colouring the ground in anything you want. Useful for making blood effects, or any sort of training lines. Works the same as Ground Texture Painting(see above)

3. Edit AI Mesh
This is mostly used in SP scenes, for the AI agents (such as villagers, elders, merchants etc.), but can be used in MP for bot matches. It's basically a "path" AI walks on so they don't get stuck or just stagger somewhere. Read Mortus' comprehensive guide, link in the "References" section below.

4. Ground Elevate
This is one of the most important aspects of level design. You can shape the environment however you like it. Just like with terrain texturing, keep the hardness, weight and radius in relative, so you get smooth height transitions. Use smooth to smooth the hard edges of mountains, and generally make everything better. If you want water, it's usually around -10 or something, never was really sure. I always set the "Level" option to 0 or 1, and then level the whole scene accordingly. Then start off from a flat map, making mountains, hills and rivers.

5. Edit Objects
The tab you will most use during your scening adventures. Scene props are all the props, items, plants and entry points located in a scene. Scene props are the objects, like buildings, doors, chairs, and such. All the Objects have an X, Y and Z coordinate. Hold G to move the item left and right(X and Y) and hold T to move it up(Z axis). You can scale the objects(make them bigger or smaller) by any axis. Use the scale X,Y,Z in the toolbar. The initial value is 1.0000. I'll paste the full command list from the "Help" button later.

Plants are obviously...plants and vegetation. Use it to make your scene look more lively. Tip: When making a forest, or randomly generating some bushes and such, tick the "Randomize Scale" and "Randomize Rotation" buttons. It looks much better, not copy pasted.

Item kinds are all items used in a module. Use the items to detail your scene, but only use it within a specific module(you don't want put items from let's say MnG and port the scene to Native).

Entry Points are spawnpoints. Look down in the references for Arch3r's guide.

Passages are used in SP scenes or PW mods to quick enter somewhere. E.g. to enter a tavern from the street, put one passage on the outside door of the tavern, and then one inside (obviously, make the tavern interior), and put the same variables to them.

6. Edit Weather This is only for previewing of the weather. You can simulate any weather condition here, and see how it looks in-game. If you want the weather to work, you must code it in the map.(No idea on that, someone fill in.)

[edit] Commands & Tips


Common Keys


Left Mouse Button: While pressed, mouse movements rotate the camera.
H: Hides/unhides the highlights and user interface objects (Good for taking a screenshot).
CTRL + Any movement key: Speeds up the camera movements, slows down the object movements.

Edit Objects Mode


Right Mouse Button: Selects objects.
CTRL + Right Mouse Button: Selects multiple objects.
Double Click on Scene Objects list: Selects the clicked object and moves the camera towards it.
W,A,S,D: Moves the camera.
C,E: Increases/decreases the height of the camera.
G: While pressed, mouse movements move the selected object(s) parallel to the ground.
T: While pressed, mouse movements increase/decrease the height of the selected object(s).
X,Y,Z: While pressed, mouse movements rotate the selected object(s) with respect to the object's X, Y and Z axis.
U: While pressed, mouse movements rotate the selected object(s) with respect to the "Up" axis of the world.
R: Resets the selected object's rotation.
B: Scale selected object.
B + X: Scale selected object along X axis.
B + Y: Scale selected object along Y axis.
B + Z: Scale selected object along Z axis.
Alt + B: Resets the selected object's scale.
Delete: Deletes selected object(s).
Space: Enables add object mode.

Add Object Mode


Right Mouse Button: Adds current object to scene.
Space: Disables add object mode.
T, U, X, Y, Z, R and B can also be used in this mode.

Ground Elevate and Ground Paint Mode


Right Mouse Button: Elevates the ground up or down in "Ground Elevate" mode and paints the ground in "Ground Paint" mode.
Midle Mouse Button: Clears the elevation in "Ground Elevate" mode and clears the paints in "Ground Paint" mode.

Edit AI Mesh Mode


Right Mouse Button: Selects AI mesh objects.
CTRL + Right Mouse Button: Selects multiple AI mesh objects.
1: Activates Vertex Editing Mode
2: Activates Edge Editing Mode
3: Activates Face Editing Mode
G, T, X, Y, Z, B and Delete can also be used in this mode.

Additional Help


- You can only save your changes when you exit the edit, there is no option to save while editing.

- You can not undo your works, you can only discard changes while leaving the edit mode. So you should save your work occasionally by leaving the edit mode and re-entering it.

- Scene files are located under [Current Module]\SceneObj folder. When you save your changes, the related scene file under this folder will be updated.

- Create AI Mesh button works only on outdoor scenes.

[edit] References


Nordous' Sceners Guild: http://forums.taleworlds.com/index.php/topic,163368.0.html
Arch3r's Spawnpoints Tutorial: http://forums.taleworlds.com/index.php/topic,89831.0.html
Psychopigeon's Napoleonic Wars Tutorial: http://forums.taleworlds.com/index.php/topic,228008.0.html
White Snake's Tutorial(+Video): http://forums.taleworlds.com/index.php/topic,139214.0.html
Mortus' AI Mesh Tutorial: http://forums.taleworlds.com/index.php/topic,61126.0.html
Turanien's: http://forums.taleworlds.com/index.php/topic,112508.0.html
MadocComadrin's adding custom maps w/Auto-download: http://forums.taleworlds.com/index.php?topic=131475.0

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox