Gamemode Maps - Lakatrazz/BONELAB-Fusion GitHub Wiki

Using the Fusion SDK, you are able to add Gamemode integration into your Marrow levels. This includes features such as custom spawn points, music, logos, team names, events, and more.

Gamemode Markers

In PVP Gamemodes, it is necessary for your level to have multiple spawn points. Gamemode Markers provide this functionality.

Markers

Adding a Gamemode Marker

To add a Gamemode Marker, simply add the component to an empty GameObject. You will then be greeted with the following prompt:

Marker Warning

If you would like to set a specific team for the marker, click "Add LifeCycleEvents". Then, your marker should look like this:

Marker Setup

In order to add a team to a marker, add an item to the Tags field, and select the team's BoneTag. The main BoneTags are:

  • Team LavaGang/Sabrelake - Main teams for a Gamemode.
  • Spectator - A spawn point when a player is no longer active in a Gamemode.

If you do not have these tags, make sure that you add the Fusion Content as a pallet dependency to your pallet. Then, Marrow will load the tags into your project.

Note that when setting a specific team, that marker will only function for that team, and not for any teamless gamemodes such as Deathmatch.

For teamless markers, just leave the team setting empty, and it will only work for teamless gamemodes.

If making a custom Gamemode with the code SDK, you can also copy your own BoneTag into a Team Tag field.

Gamemode Team Settings

If you want to change the name or logo of a team, you can use Gamemode Team Settings.

Adding Gamemode Team Settings

Similar to a Gamemode Marker, add the Gamemode Team Settings to an empty GameObject, then click "Add LifeCycleEvents". Once done, the script should look like this:

Team Setup

Once you add a new override, the script should look like this:

Team Overrides

To modify overrides, you can change the following fields:

  • Team Tag
    • This is the team that the override will apply to. Similar to above, make sure that you add the Fusion Content as a pallet dependency so that the tags are loaded into your project.
  • Override Name
    • This changes the display name of the team.
  • Override Logo
    • This changes the head logo of the team.

Once setup, as long as Gamemode Team Settings is in your map, your overrides should apply.

Gamemode Music Settings

Most Gamemodes have music playing through their duration. If you would like to change the music, you can use Gamemode Music Settings.

Adding Gamemode Music Settings

Similar to the other settings scripts, add the Gamemode Music Settings to an empty GameObject, then click "Add LifeCycleEvents". Once done, the script should look like this:

Music Setup

You may notice that each song override is a Mono Disc reference. This is how you will reference different songs for your map.

If you do not know what a MonoDisc is, check out the MarrowSDK Wiki.

After being setup, as long as the Gamemode Music Settings is in your map, your overrides should apply.

Gamemode Player Settings

You may want to force a specific avatar or health on the players in your map. For this, you can use Gamemode Player Settings.

Adding Gamemode Player Settings

First, add the Gamemode Player Settings script to an empty GameObject. Next, click "Add LifeCycleEvents". Once done, the script should look like this:

Player Setup

To add overrides, you can change the following fields:

  • Avatar Override
    • This is an avatar Barcode that every player will be forced into when a Gamemode is running.
  • Vitality Override
    • This is the vitality (health) that every player will have when a Gamemode is running.

Gamemode Crate Spawners

You may want weapons, items, or other props to spawn and despawn upon Gamemode start/stop. To achieve this functionality, you can use Gamemode Crate Spawners.

Weapons

Adding a Gamemode Crate Spawner

In order to add a Gamemode Crate Spawner, simply add the Gamemode Crate Spawner component to an existing Crate Spawner, as shown:

Gamemode Crate Spawner

Once done, this will automatically handle the Crate Spawner being spawned and despawned upon Gamemode start/stop. Also, the script should turn the Crate Spawner into Manual Mode, but if it doesn't, make sure that Manual Mode is on.

Gamemode Droppers

Some gamemodes, such as Smash Bones, randomly drop items from the sky for use in combat. To setup these items, you need to add Gamemode Droppers.

Sledgehammer

Adding a Gamemode Dropper

In order to add a Gamemode Dropper, simply add the Gamemode Dropper component to a GameObject, as shown:

Gamemode Dropper

If you can see a spawnable preview cycling through different items, then the dropper is successfully added! But what if you want to configure custom dropped items?

Adding Gamemode Dropper Settings

In order to customize Gamemode Dropper settings, simply add the Gamemode Dropper Settings component to a GameObject in your level, as shown:

Gamemode Dropper Settings

  • Item Drops
    • Item Crate Reference
      • This is the spawnable that will be dropped from a dropper.
    • Probability
      • This is the chance that this item will be chosen for a dropper. It is relative to all other item drops, so don't worry about making it add up to 100!
  • Normalize Probabilities
    • This makes all probabilities add up to 100. It does not affect functionality at all, but can help visualize the actual percent change of an item.
  • Max Items
    • This is the maximum amount of items that can be dropped at once. Once this limit has been reached, no more can be spawned until existing items are despawned!

Death Triggers

Although the SDK does not provide this functionality, Fusion has a script that allows you to create triggers that kill the player. This can be useful for areas you do not want players entering or killing the player when they fall out of bounds.

To create a death trigger, just add the Death Trigger script to an object with a trigger collider, like so:

Death Trigger

Now when the player enters the trigger, the player will die. This only works while in a server, so it is not a suitable replacement for maps that don't require Fusion.

Additionally, death triggers will despawn items, so any items dropped into them will be cleaned up as well!

For gamemodes such as Smash Bones, these function as the bounds for a level, so it is important to add them!