-
Notifications
You must be signed in to change notification settings - Fork 3
Getting Started
This guide will walk you through creating a brand new custom map.
- Setup
- Editor Layout
- Importing
- Editing
- Exporting
Please refer to the Setup Guide for how to get Forge installed on your machine.
Now that you have a map imported it is important to learn the basic layout of the Unity Editor, and how Forge is organized.
The Scene View is the editor view of the level. It renders various objects, lighting, and special gizmos (editor specific controls). From within the Scene View you can select objects, interact with them, and move the view through the map.
The bar at the top lets you configure what the view renders, the appearance of some objects, which gizmos are active, the appearance of gizmos, and how some gizmos function.
From left to right, a brief breakdown of the important toolbar items.
- Tool Handle Position (Pivot/Center)
- For the position/rotation/scale gizmos, configures the center point of the selected object(s) between the objects origin and the center of all selected objects.
- Tool Handle Rotation (Local/Global)
- For the position/rotation/scale gizmos, switches between the selected object(s) local space coordinates or the world space coordinates.
- Grid Visibility and Snapping
- Toggle the visibility of a grid in the Scene View for reference when placing objects.
- Toggle grid snapping, forcing the placement of objects to be aligned by some grid increment.
- Miscellaneous Gizmos Settings
-
Configure other gizmos related settings. We recommend you turn
Fade Gizmos
off.
-
You may navigate around the map by holding Right Click
over the Scene View and then using WASD
, E
, Q
, Shift
, and Mouse
to move the camera around the scene. You may configure navigation speed and easing, as well as camera clipping distances inside the Camera toolbar item.
To select an object with the Scene View, simply Left Click
on an object in the scene. You may also choose to Left Click
and Drag
to select many objects within an area.
You may use Shift
and Left Click
to select multiple objects one at a time.
Left Click
on an already selected object will deselect it.
With one or more objects selected, you may use the Move
, Rotate
, and Scale
tools to place the object(s) in your scene.
The Hierarchy window displays a tree view of each object in the scene. You can also use the hierarchy to select, delete, and create new objects.
NOTE: It is important to keep the Hierarchy organized.
The Hierarchy allows you to toggle both the visibility and the selectability of individual and hierarchies of objects.
The Inspector window displays configurable components of the selected object(s). Almost all properties assigned to an object, including its position, rotation, scale, exist within a component that is attached to the object. This structure lets us design custom Forge components that can be added to objects to give them different properties and behaviors.
The Project window is a File Explorer that lets you navigate the various assets/files within Forge. You can use this window to navigate into your newly created map's directory.
You may also navigate to your global assets folder (Assets/Resources/
) and filter by Model
to browse the various assets you have available.
The Console window displays various messages, errors, and warnings from the Unity Editor and Forge tools. If you are experiencing any issues always check here first for an error.
Importing is the first step in making a new map. Forge does not support creating custom maps from "scratch". All custom maps are modifications of vanilla Multiplayer maps.
The first step when creating a new map is to import a Multiplayer level from your Deadlocked ISO. You should choose a map that already has the assets/vehicles that you plan on using for your new map. For example, if you wanted to make a snowy map you'd probably want to choose Shaar because you can reuse many of its ice, water, and stone objects. If you aren't sure what you want yet, no worries, you can always choose a base map now and import any missing assets later.
Use the top menubar to open a new Level Importer window.
Forge > Tools > Importers > Level Importer
Inside the Level Importer
window:
- Select
DL ISO
as the source. - Leave
Import into Current Map
unchecked. - Enter the name of your new map. This name will only be used in Forge.
- Select your base Multiplayer level.
- Select
Core Level
for chunk unless you are importing a map that useschunk1
(ieMP_Battledome
).
Click Import
and let the importer finish. After it is done, your editor should look a bit like the image below.
If you wish to import a Singleplayer level, or even parts of a Singleplayer level, you may use the Level Importer
window to do so.
Forge > Tools > Importers > Level Importer
Inside the Level Importer
window:
-
Select your desired source.
-
Check the
Import into Current Map
toggle. -
Select the level you wish to import.
-
Select
Core Level
orChunk1
(if level uses chunk1). -
Select which assets you wish to import into the scene.
- Importing the
Sky
and/orStatic Collision
will overwrite the current map'sSky
/Static Collision
. - Importing the other assets will merge with the rest of the map.
- Importing the
Click Import
and let the importer finish. After it is done, your hierarchy will have a new object added with the configured assets imported. If you imported the Static Collision
and/or Sky
, you'll want to delete your old Static Collision
and/or Sky
.
If you followed the Setup Guide, you've imported assets from at least one Ratchet and Clank game. These assets have been placed inside Assets/Resources/Moby
, Assets/Resources/Shrub
, and Assets/Resources/Tie
.
For more information on Mobys
, Shrubs
, and Ties
, please refer to the Assets Guide.
NOTE:
Mobys
are not cross-compatible between games. They are also the most prone to crash PCSX2/PS2s. When importing new mobys into a map, be sure to test them immediately.
To browse the global assets, enter Assets/Resources/
in the Project window.
Select the filter Model
and the label Tie
(search query t:Model l:Tie
). You may also filter by label Shrub
or Moby
if you wish to browse those assets.
Once you find an asset you want to use, simply click and drag it into the scene view. If it hasn't already been imported, it will prompt you to import the asset into your map. Then simply place the object where desired.
globalassets-import.mp4
Thanks to chaoticgd's work on wrench, we are able to convert arbitrary models into shrubs.
NOTE: Remember that this is a PS2 game, so try and keep triangle count low on models. Always test your map on real PS2 hardware to evaluate performance.
The best way to work with custom models is to use the ConvertToShrub
component.
- Import your custom model into your map folder.
- Drag the model from the Project window into your scene.
- Select the object in the scene.
- Add the
ConvertToShrub
component in the Inspector. - Click the
Fix
button if it appears. - Configure the render distance and color of the shrub instance.
NOTE: The online servers have a "Level of Detail" setting that will force far away shrubs to not render. If this is affecting your custom models, you can configure a
Minimum Shrub Render Distance
in theMapConfig
component.
custommodel.mp4
Editing is the process of using the imported assets at your disposal to flesh out your world. What is editable is very limited. When making custom maps you will have to work within these limitations.
Asset | Editable | Transform | Geometry | Texture | Color | Notes |
---|---|---|---|---|---|---|
Tfrag | πΆ | πΆ | β | β | N/A | Move/scale/rotate supported. Scaling up may break in game. Recommend to stay at or below a scale of 1. |
Tie | πΆ | β | β | β | πΆ | Instance vertex colors are supported but limited to a single color for all vertices. Non-uniform vertex colors are supported when importing an instance from an existing level. |
Shrub | β | β | β | β | β | |
Moby | πΆ | β | β | β | β | |
Sky | πΆ | N/A | β | β | N/A | |
Cuboid | β | β | N/A | N/A | N/A | |
Spline | β | β | N/A | N/A | N/A | |
Area | β | β | N/A | N/A | N/A | |
World Light | β | β | N/A | N/A | β | |
Collision | β | β | β | N/A | N/A | |
Occlusion | β | N/A | N/A | N/A | N/A |
Key | Transform | Geometry | Texture | Color |
---|---|---|---|---|
β | Cannot move/rotate/scale | Cannot edit vertices/faces | Cannot edit textures | Cannot edit instance/vertex colors |
πΆ | Limited move/rotate/scale | Limited editing of textures | Limited editing of vertices/faces | Limited editing of instance/vertex colors |
β | Can move/rotate/scale | Can edit vertices/faces | Can edit textures | Can edit instance/vertex colors |
N/A | Not Applicable | Not Applicable | Not Applicable | Not Applicable |
If you wish to tweak the textures on any model in your map all you have to do is open the texture you wish to edit in your favorite image editing software, make changes, and then save back to the same file. Updates will appear in Forge on save.
NOTE: Ratchet and Clank textures store bloom information in the alpha channel. The in game opacity is always double the texture's opacity. What this means is that an opacity of 50% is fully opaque in game, an opacity of 25% is 50% transparent, and an opacity of 100% is opaque + bloom in game.
We recommend you use an image editing software that supports working with the alpha channel.
textureedit.mp4
World Config parameters are stored inside your map's MapConfig
component inside of the Map
GameObject. These fields configure various world properties of your custom map.
Deadlocked and UYA have support for linear fog. You can configure the fog inside the MapConfig
component in the Map
object.
Fog doesn't affect the distant skymesh, so it is recommended (generally) for the fog to match the color of the distant horizon.
fog.mp4
Deadlocked and UYA use directional lights to apply lighting to all static geometry and Mobys
. All static geometry use the first World Light
. Mobys
can be configured to use any World Light
NOTE: Appearance of world lighting in the scene is an approximation. Always test on PCSX2/PS2 before finalizing any part of your map.
worldlight.mp4
The death plane denotes the point along the vertical axis where any player or vehicle will fall to their death. Many levels leave this value at 0 and use lethal collision for water or lava. Maps that do not have lethal water or lava tend to use the death plane to save the player from falling for 20 seconds before they inevitably die.
When the game is loading a level, a background image of the map is rendered. To create one with Forge you simply need to point the MapConfig
component's DL Loading Screen
field to your custom image. By default, the base map's loading screen is used. You may also use the screenshot tool inside Forge to generate a new image from the scene view.
loadingscreen-screenshot.mp4
You may create Unity terrains and have them be converted automatically into tfrags. The output will never look quite the same as the original Unity terrain so it is good to regularly check the generated tfrags.
Follow this tutorial on how to create a new Terrain in Unity:
Make sure that you select your map folder as the TerrainData folder in the Terrain Toolbox window.
Then add a Unity Terrain To Tfrags
component to the newly added Terrain object in the Hierarchy.
NOTE: There is a hard limit of only 4 terrain layers per terrain. Anything more will be ignored by the converter.
Forge supports a combination of "Instanced" collision and "Static" collision. Ultimately, when building, these two types of collision are baked into a single file. However their distinction in Forge is particularly useful for mapmaking.
Ratchet and Clank has support for different kinds of surfaces. These surfaces affect how the character/objects interact with the surface.
Each surface type is represented by a single hexadecimal byte. The byte consists of a sound ID (first digit) and a collision type (second digit). Together they form a single collision ID. The first sound ID is always stone, the subsequent sound IDs are map dependent.
Collision Id | Sound Id | Collision Type | Color |
---|---|---|---|
00 | Stone | Swimmable Water | |
01 | Stone | Acid | |
02 | Stone | Magnet Wall | |
03 | Stone | Water | |
04 | Stone | DreadZone Out-Of-Bounds | |
05 | Stone | Electricity | |
06 | Stone | Non-walkable Magnet Wall | |
07 | Stone | Walkable Surface 1 | |
08 | Stone | Non-walkable | |
09 | Stone | Walkable Surface 2 | |
0A | Stone | Walkable Surface 3 | |
0B | Stone | Lethal Water | |
0C | Stone | Non-walkable | |
0D | Stone | Lethal Water (Ice Cube) | |
0E | Stone | Walkable Surface (Water Trail) | |
0F | Stone | Walkable Surface 4 | |
10-1F | Stone | Not Solid | |
20 | Level Sound 1 | Swimmable Water | |
21 | Level Sound 1 | Acid | |
22 | Level Sound 1 | Magnet Wall | |
23 | Level Sound 1 | Water | |
24 | Level Sound 1 | DreadZone Out-Of-Bounds | |
25 | Level Sound 1 | Electricity | |
26 | Level Sound 1 | Non-walkable Magnet Wall | |
27 | Level Sound 1 | Walkable Surface 1 | |
28 | Level Sound 1 | Non-walkable | |
29 | Level Sound 1 | Walkable Surface 2 | |
2A | Level Sound 1 | Walkable Surface 3 | |
2B | Level Sound 1 | Lethal Water | |
2C | Level Sound 1 | Non-walkable | |
2D | Level Sound 1 | Lethal Water (Ice Cube) | |
2E | Level Sound 1 | Walkable Surface (Water Trail) | |
2F | Level Sound 1 | Walkable Surface 4 | |
30-3F | Level Sound 1 | Not Solid | |
... | |||
E0 | Level Sound 7 | Swimmable Water | |
E1 | Level Sound 7 | Acid | |
E2 | Level Sound 7 | Magnet Wall | |
E3 | Level Sound 7 | Water | |
E4 | Level Sound 7 | DreadZone Out-Of-Bounds | |
E5 | Level Sound 7 | Electricity | |
E6 | Level Sound 7 | Non-walkable Magnet Wall | |
E7 | Level Sound 7 | Walkable Surface 1 | |
E8 | Level Sound 7 | Non-walkable | |
E9 | Level Sound 7 | Walkable Surface 2 | |
EA | Level Sound 7 | Walkable Surface 3 | |
EB | Level Sound 7 | Lethal Water | |
EC | Level Sound 7 | Non-walkable | |
ED | Level Sound 7 | Lethal Water (Ice Cube) | |
EE | Level Sound 7 | Walkable Surface (Water Trail) | |
EF | Level Sound 7 | Walkable Surface 4 | |
F0-FF | Level Sound 7 | Not Solid |
Static collision is contained within a single Blender file in the root of your map folder. When you first import your base map, all collision is placed within this Blender file. This is because the game only contains the "baked" collision, and there is no perfect way to map the baked collision back to the instances that it primarily represents.
You may edit the static collision directly inside of Blender. To assign a collision ID inside of Blender, assign the selected face(s) to a material with the name col_XX
where XX
is the collision ID in hexadecimal.
Instanced collision is a way to create collision that is "attached" to instances of objects in Forge.
For example, if we just placed a new static object in our world we can see that it doesn't have any collision. Players, vehicles, projectiles, and the like will phase through it in game. What we want is for the object to be solid.
NOTE:
Mobys
have their own colliders that aren't shown in Forge. We recommend you test the map in game to get an idea of aMoby
's collider(s).
We could open the static collision inside of Blender and manually add this object, assign its collision IDs via materials, and save. But that would be a lot of work. Instead what we can do is select the object and toggle on Instanced Collider
in the inspector. This will add a collider to the instance with a default collision ID. Now we can move the object around and the collider will automatically move with it.
NOTE: Be mindful of how many triangles exist in a 4x4x4 cube. If there are too many triangles the collision will either fail to build or there will be holes in game.
By default all auto-generated colliders will have the collision ID 2F
(walkable surface w/ levelsound0). You may wish to make some instances unwalkable, or maybe magnet walls. To do this, you may change the Collider ID Overrides
per material to a new collision ID of your choice:
There may be times where you want to use primitive shapes to create invisible walls or less dense collision in otherwise triangle-dense areas.
collision-instanced-primitive.mp4
Occlusion is a rendering optimization where objects in the scene are omitted from rendering if they are not in view. Ratchet and Clank uses an octree to store which objects are visible in given set of 4x4x4 cubes (octants).
occlusion-view.mp4
Visualizing which octants can "see" the selected object.
If the player's camera is in one of those blue cubes, the selected object will be rendered (or at least considered for rendering). If the player's camera is in any other octant, the selected object will not be rendered.
Occlusion is critical for performance. The less objects that are rendered without negatively affecting the player's perception of the world (ie objects popping in and out of view), the better.
There are two parts to building good occlusion. The first is to define where these octants exist. Not every point in space is a valid occlusion octant. You must explicitly define which octants will be used to store occlusion data.
By default when you import a level, it imports the entire level's occlusion into the project. You can select the Occlusion Octants
object to view all the octants that were imported into the scene.
Taking a look at these white cubes can help you get an idea of what parts of your map have octants. A general rule to follow is that any place a player can get to in your map should have octants.
If you want to add your own octants to an area that is missing some you can do so with Occlusion Volumes
.
- Create a new GameObject. We recommend you group it in the hierarchy with other volumes/octants.
- Select the new GameObject. Add a
OcclusionVolume
component. - Position and scale up the GameObject such that the green squares inside it fill the target area.
occlusion-newvolume.mp4
While volumes are great at filling an area with octants quickly, they are highly inefficient. While performance is very important when building custom maps for a PS2 game, file size is also very important. Occlusion is one of a few parts of a level that can balloon in size. As such we want to be able to use volumes to define an area with octants, but we don't want to include octants that the player's camera wouldn't be in.
- Position/scale the volume such that octants that are well above the ground or below the object are not included.
- Ensure that collision is enabled for the objects in the area that will be solid.
- Toggle
Sticky
in theOcclusionVolume
component of the selected volume. This will only add octants to places that are within range of walkable collision.
occlusion-sticky.mp4
Sometimes volumes will encompass the insides of objects, creating octants where the camera will never be. Using Sticky
volumes won't fix this because the insides are near collision. The solution is to use an Occlusion Graph
to build a network of nodes that an given octant must "see" for it to be valid.
- Create a new GameObject. We recommend you group it in the hierarchy with other volumes/octants.
- Add a
OcclusionGraph
component to the newly created GameObject. - Create a new child GameObject.
- Add a
OcclusionNode
component to the child GameObject. - Place the child GameObject in an open space in the volume where the player's camera may be.
- Duplicate the child and move the new node to another space.
- Keep adding nodes until all the accessible areas in the volume have at least one node in view.
- Select the volume and refresh the octants.
- Check to see if the negative spaces are omitted and there aren't any positive spaces omitted. If necessary, add/remove nodes until true.
NOTE: Octants encompass a 4x4x4 cube, so they will bleed into negative spaces but this is okay. What matters is that no octant is fully inside a negative space.
occlusion-graph.mp4
The next step after you have your new octants configured is to Bake the Occlusion
. This process iterates every configured octant, renders the entire scene in a 360 degree view, and determines which objects are/not visible and stores the information inside each respective object.
NOTE: Only
Ties
,Tfrags
, andMobys
use occlusion.
- Select the objects you wish to recompute occlusion for. You may select only the root level objects in the hierarchy, their children will be included in the bake.
- Navigate the top menubar and select
Forge > Tools > Occlusion > Bake Occlusion For Selected
. - Wait for the Occlusion to finish baking. This will take awhile.
- Select any object you just recomputed occlusion for and make sure
Render Octants
is toggled in the inspector before checking if the computed octants are correct.
occlusion-bake.mp4
Exporting will pack your custom map into a set of binary files for use on our online servers. Optionally, you may opt to have Forge generate an ISO where the base map is replaced with your custom map. While the binary files can be distributed for other to use, the modded ISO is for you to quickly test the map.
Inspecting the Map
GameObject's MapConfig
component, you will see a few configuration options for the built map.
Setting | Description |
---|---|
Map Version | This is the version associated with the build. Not important when testing but after a map is released you will want to increment this for every release so that people will know when their map is out-of-date. |
Map Name | This is the name of the map as it appears in game. |
Map Filename | This is the filename of the built map files. |
DL Force Custom Mode | When set, the map will only appear when the give custom mode is selected. If the custom mode is hidden, then the map will be selectable and, when selected, the custom gamemode override will be hidden. Useful if creating a map for a specific custom mode. |
DL Loading Screen | The image to use for the loading screen background, when the game is loading the map. |
DL Minimap | The image to use for the minimap radar background image. |
DL Mobys Included in Export | Set of moby classes that will always be build with the map, even if there are no instances of the moby in the Forge hierarchy. Don't delete any elements unless you know what you are doing. |
Shrub Min Render Distance | Forces the Level of Detail patch to render shrubs at the given render distance, regardless of LOD setting. Useful for maps that use custom shrubs. |
To build, simple use the top menubar and navigate to Forge > Builder > Rebuild
. This will rebuild the entire level and place the generated map files in the map's build folder. You can open the map's build folder by selecting the Map
GameObject and clicking the Open Build Folder
at the bottom of the MapConfig
component in the inspector.
In many cases, you won't need to rebuild the entire map. Some rebuild stages take awhile and can slow you down. The Build Window allows you to choose what is rebuilt, speeding up the iteration process.
Below outlines what each toggle in the Rebuild section does. The cost is the relative amount of time to rebuild, where π’ is low cost, π‘ is medium cost, and π΄ is high cost.
The Pack column represents the Pack toggle(s) that must be checked for the rebuilt data to be packed into the final map files.
Option | Description | Cost | Pack |
---|---|---|---|
Collision | Exports the DZO collision and packs it into the game's static collision file format. | π‘ | Assets, Level WAD |
Cuboids/Splines/Areas/Cameras/Ambient Sounds | Exports the miscellaneous gameplay data. | π’ | Gameplay WAD |
DZO | Exports the DZO version of the map to the output build folder. | π’ | |
Mobys | Rebuilds the moby assets and moby instances. | π‘ | Assets, Gameplay WAD, Level WAD |
Shrubs | Rebuilds the shrub assets and shrub instances. | π‘ | Assets, World Instances, Gameplay WAD, Level WAD |
Tfrags | Rebuilds the tfrag assets. | π‘ | Assets, Level WAD |
Ties | Rebuilds the tie assets and tie instances. | π‘ | Assets, World Instances, Gameplay WAD, Level WAD |
World Lighting | Rebuilds the world lighting data. | π’ | Gameplay WAD |
Below outlines what each toggle in the Pack section does. The cost is the relative amount of time to pack, where π’ is low cost, π‘ is medium cost, and π΄ is high cost.
Option | Description | Cost | Pack |
---|---|---|---|
Assets | Packs the built assets (moby, tie, shrub, tfrag, more). | π‘ | Level WAD |
World Instances | Packs the built world instance (tie + occlusion, shrub + occlusion, more). | π‘ | Level WAD (DL), Gameplay WAD (UYA) |
Occlusion | Compresses and packs the built occlusion. | π΄ | Assets, World Instances, Level WAD, Gameplay WAD |
Level WAD | Packs all relevant data into the final level wad. | π‘ | |
Gameplay WAD | UYA/R&3 Only. Packs gameplay and world instance data into final world wad. | π‘ | |
Sound WAD | Packs all sounds into final sound wad. | π‘ |
To test your map online, you must copy the contents of the build folder into your custom maps installation folder next to your ISO (PCSX2). If you get tired of manually copying the files each time, you may add your custom maps installation folder to the DL Build Folders
inside of Assets/ForgeSettings.asset
. Now every time you build, Forge will automatically copy the map files into your custom maps installation.
If you're making a Deadlocked map you'll want to also build your map for DZO. This is thankfully super easy.
Inside your map is DZO
object that contains a default camera position
object and a sun
object.
- The default camera position is the position and starting rotation of where the DZO loading screen camera is placed. This is required.
- The sun object is the directional light that DZO will use for realtime shadows. This can be deleted if you don't need it.
The DZO
object itself has a DzoConfig
component that houses a few more settings.
Setting | Description |
---|---|
Export Static Geometry | Configure what objects are exported into the DZO map. This is useful if you want to export a high-res version of the map. |
Include in Export | Exports any additional objects that aren't already included by the previous toggles. This is where you'd put your high-res version. If using ConvertToShrub , the high-res version will automatically be included with Shrubs (if enabled). |
Export Misc (Lights) | Exports lights such as the sun or other realtime lights (point/spot). |
Post Exposure | Increases/decreases the exposure of the rendered map in DZO. |
Post Color Filter | Applies the given color filter over the rendered map in DZO. |
To build, simply navigate to the top menubar and select Forge > Builder > Build DZO Files
. The output will be placed into the map's build folder. You can open the map's build folder by selecting the Map
GameObject and clicking the Open Build Folder
at the bottom of the MapConfig
component in the inspector.
To install in DZO, find your DZO installation and navigate inside DreadZone Online_Data/emuqt/hostfs/dl/
and copy all the map files from the build folder. Alternatively, you can add that folder to your DL Build Folders
in Assets/ForgeSettings.asset
(inside of Forge) to automatically copy the build files to your DZO installation.
The built files are only useful when testing on our online servers. During most of the mapmaking process, testing is best done inside of PCSX2 with Local Play. Patching will create an ISO at the configured Output ISO
for the target game. Inside this new ISO, the base map will be replaced with your custom map.
All you need to do to test is run the ISO in PCSX2, go to Local Play, select the base map, and start the game.