Custom Board Space: Difference between revisions

From Pummel Party Mod Documentation
Jump to navigation Jump to search
(Initial content)
 
m (Fixed spelling mistake in link)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Custom board spaces are board spaces that are created through the mod editor and stored as a [[Prefab Asset]].
Custom board spaces are board spaces that use a user-created [[Prefab Asset|prefab]] for the space's visuals and functionality.


== Overview ==
== Overview ==
[[File:ExampleCustomBoardSpacesUsedInMap.png|thumb|right|600px|Two custom board spaces in a board mod.]]
[[File:ExampleCustomBoardSpacesUsedInMap.png|thumb|right|600px|Two custom board spaces in a board mod.]]
[[Board Mod]]s can be built using the main board space types found in the base game. They also contain a special board type ''Custom''. By using this type you can then specifiy a custom prefab to use for that board space. You can assign your own [[:Category:Actions|Actions]] to this space using a [[Board Space Event Component]] to define what happens when a player lands on the custom space.
[[Board Mod]]s can be built entirely using the board space types found in the base game. To create more interesting board mods, the ''Custom'' board space type can be used. This type uses a custom prefab to define the board space's appearance and function.
 
Creating a custom board space is a four-step process:
# Create a prefab to use as the board space's visuals/appearance.
# Add any [[:Category:Actions|Actions]] to a [[Board Space Event Component]] on the root gameobject of the prefab.
# Add the prefab to the board mod's [[Mod Settings]] under the "Custom Board Space" section.
# Place or select a board space and change the ''Type'' to "Custom", and choose the prefab from the ''Custom Space Prefab'' dropdown.
 
<br clear="all">
<br clear="all">
== Creating Custom Board Spaces==
== Creating Custom Board Spaces==
This section describes the custom board space creation process in more detail, including how to use the custom board space prop and shader to create custom spaces in the style of those found in Pummel Party.
===Creating the prefab===
===Creating the prefab===
Custom board spaces need to be stored in a prefab to be used. Create a new prefab asset. This is all that is required but your board space would be invisible and do nothing. You are responsible for creating the visual component of the board space. If you want to use a board space that you can adjust that fits the style of the rest, a custom board space prop is provided.
Custom board spaces need to be stored in a prefab to be used.  
* Create a new prefab asset from the [[Asset Browser]] by right clicking and choosing ''Create > Prefab''.  
* Open the prefab and add visual components to build the appearance of the board space.  
** This is typically done by adding child gameobjects containing [[Prop Component]]s, but you can add [[Particle System Component]]s, [[Light Component]]s or really any other visual component.
 
If you want to use a board space that you can adjust that fits the style of the rest, a custom board space prop is provided.
====Using the custom space prop====
====Using the custom space prop====
[[File:ExampleCustomBoardSpaceDogSpace.png|thumb|right|600px|Using a custom material on the custom board space prop to create a new board space.]]
[[File:ExampleCustomBoardSpaceDogSpace.png|thumb|right|600px|Using a custom material on the custom board space prop to create a new board space in the style of those found in other Pummel Party boards.]]
Open the prefab and add a new child containing a prop. For the prop model, search for the prop named "CustomBoardSpace". This space is black with a green pummel character on it. You can use this, or you can modify the color and icon on the space. To do this, create a new [[Material Asset]] using the [[Asset Browser]]. Select the new material and in the [[Inspector Window]] change the ''Shader'' to "Custom Board Space Shader". You can see what each of the available options do [[Material Asset#Custom Board Space Shader|here]]
Open the prefab and add a new child gameobject containing a prop component (''Right Click > 3D Object > Prop''). For the prop's ''Prop'' field, search for the prop named "CustomBoardSpace". This space is black with a green pummel character on it.  
 
To modify the color and icon on the space, create a new [[Material Asset]] using the [[Asset Browser]]. Select the new material and in the [[Inspector Window]] change the ''Shader'' to "Custom Board Space Shader". You can see what each of the available options do [[Material Asset#Custom Board Space Shader|here]]. The image on the right shows a custom space using a custom material.
<br clear="all">
<br clear="all">
====Using other props====
====Using other props====
[[File:ExampleCustomBoardSpacesUsingProps.png|thumb|600px|right|Custom board spaces made without using the provided custom space prop.]]
[[File:ExampleCustomBoardSpacesUsingProps.png|thumb|600px|right|Custom board spaces made without using the provided custom space prop.]]
There is nothing stopping you from making a custom board space that uses entirely different props or visuals to the existing board spaces. You could even build a board mod entirely from custom spaces by recreating many of the provided spaces logic using [[:Category:Actions|Actions]] (excluding the start space and graveyard space, those are required).
There is nothing stopping you from making a custom board space that uses entirely different props or visuals from the existing board spaces. You could even build a board mod entirely from custom spaces by recreating many of the provided spaces logic using [[:Category:Actions|Actions]] (excluding the start space and graveyard space, those are required).
 
If you're unable to re-create the logic of a space, such as with the Recruit space, you can use the original version of the space but cover the default visuals with non-solid props to make it visually match the custom spaces you have created.
<br clear="all">
<br clear="all">
===Adding Actions to the board space===
===Adding Actions to the board space===
To make the board space do something when the user lands on it, it needs a set of actions. Without this the board space will do nothing and act as a free space. Open the prefab containing the board space and select the root gameobject. This is the gameobject at the top of the prefab hierarchy. Add a [[Board Space Event Component]] to this gameobject; if added to any other gameobject this component won't work. This component will fire events whenever the space is landed on by a player. Using the inspector you can add Actions to this component.
To make the board space do something when the user lands on it, it needs a set of actions. Without this, the board space will do nothing and act as a free space. Open the prefab containing the board space and select the root gameobject. This is the gameobject at the top of the prefab hierarchy. Add a [[Board Space Event Component]] to this gameobject; if added to any other gameobject this component won't work. This component will fire an event and trigger the actions whenever the space is landed on by a player. Using the inspector you can add Actions to this component.
 
===Adding the prefab to the mod settings===
===Adding the prefab to the mod settings===
The final step before you can start adding the board space to the board is to add it to the [[Mod Settings]]. This will make it appear as a selectable custom type when using a [[Board Space Component]] set to the type ''Custom''. Open the mod settings by clicking the yellow/orange "⚙️ Board Settings" object at the top of the object hierarchy in the [[Hierarchy Window]]. This opens the mod settings in the inspector. Expand the section titled "Custom Board Spaces" and add a new entry to the list. Fill the new entry with a reference to the prefab you created for the board space.
The final step before you can start adding the board space to the board is to add it to the [[Mod Settings]]. This will make it appear as a selectable custom space prefab when using a [[Board Space Component]] with the ''Type'' of "Custom". Open the mod settings by clicking the yellow/orange "⚙️ Board Settings" object at the top of the object hierarchy in the [[Hierarchy Window]]. This opens the mod settings in the inspector. Expand the section titled "Custom Board Spaces" and add a new entry to the list. Fill the new entry with a reference to the prefab you created for the board space.


===Using a custom board space===
===Using a custom board space===
Place a new board space gameobject/component or find an existing one you wish to change. in the inspector for the component set the ''Type'' to ''Custom''. From the ''Custom Node Type'' dropdown below this, set the Prefab to that of the custom board space you wish to use. The board space is now your custom board space.
Place a new board space in the scene or find an existing one you wish to change. In the board space component, set the ''Type'' to "Custom". From the ''Custom Space Prefab'' dropdown below this, set the Prefab to that of the custom board space you wish to use. The board space is now an instance of your custom board space.
 
From here the board space exists in the scene just like any other. You can have any number of board spaces using a single custom board space prefab. Each custom space prefab you create can be thought of as a new "type" of board space you can use throughout the board.

Latest revision as of 20:26, 29 January 2023

Custom board spaces are board spaces that use a user-created prefab for the space's visuals and functionality.

Overview

Two custom board spaces in a board mod.

Board Mods can be built entirely using the board space types found in the base game. To create more interesting board mods, the Custom board space type can be used. This type uses a custom prefab to define the board space's appearance and function.

Creating a custom board space is a four-step process:

  1. Create a prefab to use as the board space's visuals/appearance.
  2. Add any Actions to a Board Space Event Component on the root gameobject of the prefab.
  3. Add the prefab to the board mod's Mod Settings under the "Custom Board Space" section.
  4. Place or select a board space and change the Type to "Custom", and choose the prefab from the Custom Space Prefab dropdown.


Creating Custom Board Spaces

This section describes the custom board space creation process in more detail, including how to use the custom board space prop and shader to create custom spaces in the style of those found in Pummel Party.

Creating the prefab

Custom board spaces need to be stored in a prefab to be used.

  • Create a new prefab asset from the Asset Browser by right clicking and choosing Create > Prefab.
  • Open the prefab and add visual components to build the appearance of the board space.

If you want to use a board space that you can adjust that fits the style of the rest, a custom board space prop is provided.

Using the custom space prop

Using a custom material on the custom board space prop to create a new board space in the style of those found in other Pummel Party boards.

Open the prefab and add a new child gameobject containing a prop component (Right Click > 3D Object > Prop). For the prop's Prop field, search for the prop named "CustomBoardSpace". This space is black with a green pummel character on it.

To modify the color and icon on the space, create a new Material Asset using the Asset Browser. Select the new material and in the Inspector Window change the Shader to "Custom Board Space Shader". You can see what each of the available options do here. The image on the right shows a custom space using a custom material.

Using other props

Custom board spaces made without using the provided custom space prop.

There is nothing stopping you from making a custom board space that uses entirely different props or visuals from the existing board spaces. You could even build a board mod entirely from custom spaces by recreating many of the provided spaces logic using Actions (excluding the start space and graveyard space, those are required).

If you're unable to re-create the logic of a space, such as with the Recruit space, you can use the original version of the space but cover the default visuals with non-solid props to make it visually match the custom spaces you have created.

Adding Actions to the board space

To make the board space do something when the user lands on it, it needs a set of actions. Without this, the board space will do nothing and act as a free space. Open the prefab containing the board space and select the root gameobject. This is the gameobject at the top of the prefab hierarchy. Add a Board Space Event Component to this gameobject; if added to any other gameobject this component won't work. This component will fire an event and trigger the actions whenever the space is landed on by a player. Using the inspector you can add Actions to this component.

Adding the prefab to the mod settings

The final step before you can start adding the board space to the board is to add it to the Mod Settings. This will make it appear as a selectable custom space prefab when using a Board Space Component with the Type of "Custom". Open the mod settings by clicking the yellow/orange "⚙️ Board Settings" object at the top of the object hierarchy in the Hierarchy Window. This opens the mod settings in the inspector. Expand the section titled "Custom Board Spaces" and add a new entry to the list. Fill the new entry with a reference to the prefab you created for the board space.

Using a custom board space

Place a new board space in the scene or find an existing one you wish to change. In the board space component, set the Type to "Custom". From the Custom Space Prefab dropdown below this, set the Prefab to that of the custom board space you wish to use. The board space is now an instance of your custom board space.

From here the board space exists in the scene just like any other. You can have any number of board spaces using a single custom board space prefab. Each custom space prefab you create can be thought of as a new "type" of board space you can use throughout the board.