Wonderland Adventures Editor Manual: Difference between revisions

Copied 40% of the document
(Copied 25% of the document)
(Copied 40% of the document)
Line 186: Line 186:




== Level Making: General Settings ==
The level editor screen is the most important part of the editor. The next 4 sections about about this screen. This section is about the general settings on the right and bottom, the next section is about controls for navigating the world, the section after that is about tiles you can place, and the last section is about objects you can place and their adjusters. TODO: section links
=== Adjusting the Level Boundaries ===
In the top-right corner it shows the current level size. Left click an arrow to add space in that direction, right click to bring the edge closer in.
=== Current and Duplicate Borders ===
The Border button affects which tiles will get placed when you expand the level. If it is set to Current, all new tiles will be whatever tile you currently have selected. If it is set to Duplicate, new tiles along one edge will be duplicates of their neighboring tile.
To change this in MNIKEditor, use the scroll wheel while hovering the level boundaries.
=== Weather ===
These options are available:
* Clear Sky
* Light Snow, Heavy Snow, BlizzardRightLeft, BlizzardLeftRight
* Rain
* Weird (changes light colour every few seconds)
* Thunderstorm
* Alarm (blinks light colour between dark and red, plays sound effect)
* Light Rise, Light Fall (moving yellow particles)
* Rainbow Rise, Rainbow Fall (moving ringed rainbow particles)
* Foggy, FoggyGreen (flat fog texture seeps through the floor)
* Leaves
* SandStorm
* Abstract (the triangle one)
=== Music ===
Left or right click to change which track plays during the adventure.
MNIKEditor exclusive: Use Simulation Level 4 to hear the selected music. You can also Ctrl+Click to enter a custom music slot number.
=== Level Textures ===
By left-clicking on LevelTex, you can choose between the available level textures: Abstract, Beach, Castle, Cave, Cave2, Cellar, Desert, Forest, Hills, Jaava (actually Uo), JTemple (Jungle Temple), Jungle, Lava, Snow, Spooky, Stars, Sundog, Techno, Temple, Town, and “””Uo””” (actually a bizarre rainbow cave texture). You can also right-click to select your own custom texture.
TODO: screenshots of sample levels built in each texture? maybe the same level in each texture? this should be fair use of game content
=== Custom Level and Water Textures ===
Custom textures must be placed in User Data\Custom\LevelTextures, and have three files: “backgroundtex [NAME]1”, “backgroundtex [NAME]2”, and “leveltex [NAME]” (where [NAME] is the texture name). Water textures must be divided into four columns and be named “watertex [NAME]”. For further information, see the readme in that folder.
=== Flow, Transparency, and Glow ===
Underneath WaterTex you’ll see three values: Fl, Tr, and Gl (short for Flow, Transparency, and Glow, respectively). These three values affect all the water in the area.
If Flow is set to 0, then the water is still. If it is set to 1 or higher, it moves (the further from 0 the number, the faster it moves). If it is -1 or lower, it rocks back and forth (the futher from 0 the number, the more violently it rocks.
If Transparency is set to 1, the water is transparent, i.e. you can see through it, just like regular water. If it is set to 0, it is opaque and cannot be seen through.
If Glow is set to 1, the water appears fullbright in the player. If it is set to 0, it does not.
=== Lighting ===
Under the word “Light”, you’ll see two sets of three numbers. The first set represents directional light, which brightens only certain sides of objects. The second set is ambient light, which brightens all parts of objects equally. The first number of each set is red light, the second is green light, and the third is blue light. You can also adjust lighting mid-game using Command 6 (see section 8.6).
The value of ambient red will also affect the shade of the pause menu.
=== Play-Test Adventure ===
OpenWA exclusive: From the adventure summary screen, clicking “Save+Test” will compile the adventure files, close the editor and start the player which will immediately load up the adventure for testing. When you close the player, the editor will bring you back to the adventure you were editing.
MNIKEditor+OpenWA exclusive: While editing a level, click Save Level, then a Test Level button will appear in its place. Click Test Level to turn your cursor rainbow (shortcut: Ctrl+T). Clicking anywhere will close the editor and start the player which will immediately load up the adventure for testing. After starting the adventure, you will immediately be warped to the tile you clicked on. When you close the player, the editor will bring you back to the same spot in the level you were editing.
If you do not have OpenWA or MNIKEditor, you can only test your adventure by clicking Compile+Exit, then opening the player and picking your adventure from the list. You can keep the player and editor open at the same time to make this slightly faster.
== Level Making: World Controls ==
=== Camera Controls ===
* WASD, arrow keys, 2468 on numpad: travel around the world
* CE, 39 on numpad: move the camera vertically up or down (similar to zooming in and out)
* ZQ, 17 on numpad: tilt the camera towards the sky or towards the floor
* */ on numpad: rotate the camera to face left or right
* 5 on numpad: reset view
=== Editing the World ===
The currently “held” object and tile are shown on the right side of the screen and can be placed using the left mouse button. The right mouse button will copy the highlighted tile from the level back to the “held” area, allowing you to change its attributes and place it again.
The “block” button will place down a rectangle of tiles.
MNIKEditor exclusive:
The “block” button is blue and can now be used for a rectangle of objects, not just tiles. In addition, these advanced placement settings are all available:
* Fill (yellow, Ctrl+F): Like the bucket in MSPaint. Places the held tile/object on the highlighted tile and all connected tiles of the same appearance.
* Inline soft (orange, Ctrl+U): Like the fill tool, but instead of filling the area, just fills the outside edge of it (no diagonals).
* Inline hard (red, Ctrl+I): Fills in the diagonals also.
* Outline soft (pale indigo, Ctrl+J): Like the fill tool, but instead of filling the area, fills all tiles adjacent to that area outside it (no diagonals).
* Outline hard (indigo, Ctrl+K): Fills in the diagonals also.
* TODO: Which ones am I forgetting?
When the brush is in normal mode, you can change its size using the size adjusters at the bottom of the screen (shortcut: shift+scroll/ctrl+scroll to change X and Y size). These larger brushes will place tiles/objects onto all highlighted tiles at the same time.
When using an enlarged brush, pressing Enter copies all highlighted tiles into a “custom brush” (purple). Clicking will place down a copy of everything in the custom brush, similar to the GIMP clone stamp tool. One use for this is to act like a bulk copy and paste tool. Another use is to easily tile larger floor patterns.
[https://github.com/ByteNybbler/MNIKEditor Here is a complete list of MNIKEditor hotkeys, including several exclusive MNIKEditor features that can only be activated with their keys.]
== Tiles and Objects ==
Tiles make up the "grid" of the level. If an Adventure is a play, then Tiles are the stage, and Objects are the actors. This section will cover Tiles briefly.
The level editor can be in either “tiles” or “objects” mode, which controls whether you will place tiles or objects when you click in the camera area. If tiles mode is active, then the tiles section will be highlighted in a brighter color.
To change to tiles mode, click in the space next to the tile preview. To change to objects mode, click on the text “ADJUSTMENTS”. MNIKEditor exclusive: Swap between tiles and objects mode by pressing Tab.
MNIKEditor exclusive: All tile attributes are visible in the world. If you are not using MNIKEditor, the level preview will not show which tiles have smooth or jagged walls or which ones have sloped height.
=== Tile Presets ===
Helpful tiles are already arranged into presets, and the preset selection of tiles should cover most of the things you need to do in the adventure. Using presets will help to keep the appearance and functionality of tiles consistent.
If you click the “Category” button in tile mode, you’ll see that there are four basic categories: floor, ice, walls, and water. This subsection covers each of them.
Floors have 3 different top textures.
Ice comes in three varieties: Corner, Straight, and Wall. Corner is the only tile where the orientation of the top makes a difference in gameplay.
Wall comes 3 different styles which have different side and top textures. Each style comes in 4 heights.
Water comes in three depths.
=== Other Tile Edits ===
If you wish to stray from the presets and customize your own tiles, you can click each of the following attributes to adjust it separately. You’ll probably use this a lot to change floor textures to something cooler looking. Be warned that each attribute is controlled separately: changing “logic” without changing “xtrude” will create a tile that acts like floor but looks like a wall.
==== Painting and Rotating Tiles ====
Click on the side or top of the tile preview to change it.
Left-click on a face to choose from 64 textures to paint that face.
Right-clicking a face will rotate it through 8 positions (four 90 degree rotations, then the same rotations but mirror-imaged).
=== Water Height and Turbulence ===
Each tile has a certain amount of water in it, even if you can’t see it. The default water height (noted as WHeight) is -0.2, that is, water begins one-fifth of a unit under the floor. The water height and Xtrude (see section 5.4) should always be at least 0.2 apart, otherwise you might get some very unusual appearances in-game. For your first adventure, I’d recommend just keeping the water height as -0.2.
Water Turbulence (noted as WTurb) is the height of the waves in the water. For calm lakes, put the WTurb low; for stormy seas, put it high.
=== Extrusion and Height ===
Extrusion (noted as Xtrude) is how tall, short, or deep the tile is. Xtrudes range between 5.0 and -10.0, where 5.0 is a wall of height 5 and -10.0 is a water tile/chasm of depth 10. Height raises the tops of the tiles without raising the sides, which can give the level a hilly, natural look.
=== Corners, Edges, and Random ===
Corners of tiles can be set to Round or Square. Edges can be set to Jagged (better used in outdoor scenes) or Smooth (better used in indoor scenes). You’ll also notice a feature noted as Random, which creates a random small hump on the top of the tile. The value you put in is the maximum height of the hump.
=== Tile Logic ===
In semi-rare circumstances, you may want to make tiles behave like other tiles. If you ever have one of these cases, click the Logic button near the top of the field. Here, you can make the tile behave like a Floor, Wall, Water, Ice, Ice Corner, or Ice Wall. Be careful not to overuse this, as it can lead to severe confusion if done incorrectly. Logic comes in handy with large objects, as you may need to make the tiles they occupy act like walls or floors. (This is also the only way you can make a lava tile.)
=== Crossing Out Attributes ===
By pressing Enter while your cursor is over an attribute, a dashed line will appear above the field and the parameter will be “crossed out” (you can even do this with textures). Once this happens, the tile you place will simply ignore that part and leave it as it was with the previous tile. This can be incredibly helpful if you need to convert large sections of a level to having different corner or edge textures (which is pretty much all I use it for).
MNIKEditor exclusive: Press Shift+Enter to cross out all attributes except for the one your cursor is over. Press it again to uncross all attributes.
== Objects ==
Alongside tiles, objects are the other half of the Wonderland world. The way objects are coded in the game engine may be surprising:
From your experience playing the game series, there may appear to be a distinct set of objects, such as fireflowers, turtles, duckies, bookshelves, and void particles. However, all objects are not distinct, but are actually ''the same base object.'' All objects share the same set of fields and the values of these fields are interpreted by the player to determine how they function in-game. The vanilla editor exposes some of these fields to you for editing (for example NPC outfits, button colour), but there are many more that are used internally (such as type, model, movement, whether an object is frozen).
The MNIKEditor exposes all of these fields for you to play with if you want to, but since this can be quite a challenging/tedious affair, the normal objects from the original game series are all available as presets for you to scroll through, which you can then edit as much or as little as you want to.
The presets are also called WOPs and are stored in .wop files, which stands for Wonderland Object Preset. If you are so inclined, you may edit and create your own object presets and save them as .wop files to use in the editor. TODO: how?
=== Object Editing Controls ===
See also World Controls for moving around the world, and Number Editing Controls for adjusting object parameters. TODO: link
Terminology: The ''brush'' is the zone of the level that is highlighted due to the mouse cursor. The ''selected objects'' are the ones with the green wireframe outline. The ''object under the cursor'' is the single object directly under your mouse pointer, at the center of the brush.
When in objects mode, these additional controls are available in MNIKEditor:
* Right-click just selects the single object under the cursor.
* R (or click on "Update"): Replace the selected object(s) in the world with the held object. This is most commonly used after picking an object and changing a parameter on the held object, to update your changes into the world.
* Shift+Right click: Multiselect all objects under the brush.
* Ctrl+Right click: Select or deselect the object under the cursor.
* Ctrl+Shift+Right click: Add all objects under the brush to the selection.
* Tilde+Right click: Select all objects that have the same Type and ModelName as the clicked object.
More keybinds are available in the MNIKEditor readme: https://github.com/ByteNybbler/MNIKEditor
=== Object Fields ===
Here is a listing of all fields that exist on all objects. TODO: make sure all of them are here. Group by pages?
The fields that typically dictate what an object ''is'' are the Type and SubType fields.
* ID<p>An integer to refer to an object with. You often feed commands IDs as an argument to determine what objects they operate on. Multiple objects are allowed to have the same ID.</p>
* Active<p>Whether an object is active (1001) or inactive (0). Most objects become un-interactable when inactive. Some objects will continue to function depending on their Type! Values between 0 and 1001 represent an object mid-activation and mid-deactivation if the value is odd or even respectively.</p>
* ActivationType<p>Used to determine how an object behaves/animates while inactive and transitioning between states.</p>
* ActivationSpeed<p>Controls how quickly the object transitions between active/inactive. Internally, the game increments/decrements Active by this amount per frame until it hits 0 (inactive) or 1001 (active).<p>The game decides whether to increase or decrease based on whether Active is odd or even. Therefore, ActivationSpeed must be even to avoid strange results.</p>
* Type<p>The type of the object. This essentially decides the main behavior of the object, whether it’s a barrel or a chomper or star or what-have-you. For example, this affects how an object animates, how it responds to commands, how it affects tile logic, how it interacts with other objects, whether it is deadly, and more.</p>
* SubType<p>The subtype of the object. Represents variations of an object. For instance, buttons all share the same type, but different varieties of buttons (e.g. square, diamond, round) have different subtypes.</p>
* Model<p>The model of the object. Typically has a leading ! character (e.g. !Coin). Some models have special behaviors that are modified by the Data fields, such as !Gem using Data0 to determine shape and Data1 to determine color.</p>
* Texture<p>The texture of the object. You can give a file path pointing to an image to supply a different texture for an  object.<p>This can be done in a few ways. !(Texture) can be used for certain vanilla textures, such as !Fence or !GloveTex. ?(Texture) is used to read custom texture files from Userdata/Custom/Objecttextures (?Default gives the “default” texture used for the custommodel object). Lastly, you may enter a file string directly for any texture, custom or vanilla. Be sure to add .wdf to the end of the file string if you’re using vanilla textures. Examples include Data/Models/Coin/dpjo.wdf, or even stranger locations such as Data/Graphics/Logos/q.wdf.</p>
* Transformations<p>These are all fairly standard position/scale/orientation parameters.</p>
** Scale Adjust
** X, Y, & Z Adjust
** Yaw, Pitch, & Roll
** X, Y, & Z Scale
* Data Fields: 0-9<p>These are generic fields that are used in combination with Type to customize the object’s behavior. For instance, some of a LevelExit’s Data fields determine which level it leads to, the coordinates to place you in the level, etc.</p>
* Text Data Fields
** TextData0
*** Used by the !CustomModel model to load in a custom model and its texture from the UserData/Custom/Models directory.
*** Used by custom items as the regular text.
** TextData1
*** Used by custom items as the hover text.
* Dialog<p>Used by NPC and Sign types to determine what # dialog to use. Wow!<p>Values greater than 10000 determine whether the talkable object talks like an NPC or a sign. Talking like a sign will display a question mark and use the player's voice. Talking like an NPC will display a speech bubble and use the NPC's voice. A Dialog field set to 10001 displays the text from dialog #1.</p>
* Exclamation<p>Used by some NPC types to determine what ID particle to occasionally emit.</p>
* Timer Fields<p>Used by types that have timed functionality, like Fireflowers.</p>
** Timer
*** The initial delay/offset of this object’s timer.
** TimerMax1
*** The length of this object’s timer.
** TimerMax2
*** The length of this object’s second timer, I guess.
* Greeting<p>Used by some NPC types to determine what sound effect to play when engaging their dialog.</p>
* DX and DY<p>Spellball velocity vectors. I haven't found a way to adjust them properly in-editor though.</p>
* Frozen<p>Whether this object is frozen by Brr. 0 is unfrozen, 1 is temporarily frozen, -1 is permanently frozen.</p>
* Teleportable<p>Whether this object can be teleported by Teleporters.</p>
* ButtonPush<p>Whether this object can press buttons and interact with springs. ''Part of TrueMovement.''</p>
* Movement Fields<p>Fields that sophisticatedly control how this object moves. ''Part of TrueMovement.''</p>
* MovementSpeed<p>How fast the object moves, roughly. The units are confusing, but larger is faster. ''Part of TrueMovement.''</p>
* MovementType<p>Dictates how this object moves. Has many options! ''Part of TrueMovement.'' Note that some movement types depend on the object’s Type to maintain necessary data to function, such as pathfinding movement types.</p>
* TileTypeCollision (TTC)<p>A bit field dictating what types of tile logic this object can move onto. e.g. a Rainbow Bubble can have its Water bit set to 0, and it will be unable to float over water. ''Part of TrueMovement.''</p>
* ObjectTypeCollision (OTC)<p>A bit field dictating what types of objects this object can move onto. e.g. a Chomper can have its Player bit set to 0, and it will be unable to move onto the tile you’re on and kill you. ''Part of TrueMovement.''</p>
* Linked & LinkBack
** Linked<p>The object index this object is linked to. Typically only used by Transporters to move the object that rides them, but can be applied to any object with interesting results. See detailed section on Linked.</p>
** LinkBack<p>The index of the object whose Linked is this object’s index. Used to properly clear that object’s Linked field if linking is interrupted (e.g. by this object’s destruction). See detailed section on Linked.</p>
** -1 means not linked, -2 means linked to the player character.
* MoveXGoal & MoveYGoal<p>When a pathfinding movement type is used, this describes the destination it's trying to reach. These will only be updated while playing the adventure if the object Type says so. Otherwise the object will just try to pathfind to this one spot forever.</p>
* Dead<p>If the object is dead/dying. Higher values may be used for certain objects, such as StinkerNPCs, which will make the object appear to still be alive, but unable to die.</p>
* Caged<p>If the object is caged. - i.e. whether or not the game thinks the object is in a cage trap or not. TODO: what does this actually affect?</p>
* Indigo<p>If the object is currently Flashed. You probably don’t want to be touching this, but it rarely has some interesting interactions (e.g. with Wraiths).</p>
* DestructionType<p>Determines the visual used when the object is destroyed.</p>
* Status<p>Status reads whether or not a magic spell was cast by the player or not. If a spell’s set to 1, it will be cast by the player; upon the spell breaking, the player will perform an animation, while brr will only temporarily freeze things. If set to 0, the spell will act like it was not cast by a player; using CMD 4 to adjust this setting allows the player to perma-freeze things. It may carry other functions not discovered yet.<p>There are other fields that are managed by the game not detailed here, and there are several unused fields as well. The unused fields are likely space reserved by MS for future expansion.</p>


== Appendices ==
== Appendices ==
Line 197: Line 471:


== Content to be written ==
== Content to be written ==
=== Lingo ===
* TrueMovement
* Spellball (e.g. fire and ice from NPCs count as spells)
=== Custom Content ===
=== Custom Content ===
???
???
6

edits