Dark Messiah: Breakable Shelves: Difference between revisions
m (moved Breakable Shelves to Breakable Shelves in Dark Messiah: remove ambiguity from title) |
Thunder4ik (talk | contribs) m (Unicodifying, replaced: [[Image: → [[File: (20)) |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[[ | [[File:DMMaMBreakableShelf.jpg|thumb|300px|right]] | ||
{{Dm}} An excellent gameplay tool in [[Dark Messiah]], breakable shelves add a lot of immersion to any level. Though they are not necessarily difficult to produce, it does take many steps. | {{Dm}} An excellent gameplay tool in [[Dark Messiah]], breakable shelves add a lot of immersion to any level. Though they are not necessarily difficult to produce, it does take many steps. | ||
== Creating your shelf == | == Creating your shelf == | ||
=== Setting up === | === Setting up === | ||
[[ | [[File:DMMaMBreakShelfA.jpg|thumb|250px|right| A 320x320x256 room.]] | ||
Start off with a good size room, preferably with a floor size of 320 by 320, and a ceiling with a height of 256. Textures and aesthetics are not the pivotal to this tutorial, feel free to use whatever textures or design variations you would like. | Start off with a good size room, preferably with a floor size of 320 by 320, and a ceiling with a height of 256. Textures and aesthetics are not the pivotal to this tutorial, feel free to use whatever textures or design variations you would like. | ||
{{clr}} | {{clr}} | ||
=== Making supports === | === Making supports === | ||
[[ | [[File:DMMAMBreakShelfC.jpg|thumb|250px|right| The func_breakable's values.]] | ||
The support beams (the ones the player will kick to break) are a good place to start. Make one support, 16 by 16 in length and width, then 122 in height. Afterwards, select the beam and press {{key|Ctrl|T}}, then select "[[func_breakable]]" as the class. | The support beams (the ones the player will kick to break) are a good place to start. Make one support, 16 by 16 in length and width, then 122 in height. Afterwards, select the beam and press {{key|Ctrl|T}}, then select "[[func_breakable]]" as the class. | ||
Line 19: | Line 19: | ||
Also, make sure nothing is check under the "Flags" tab. These changes will allow the player to break the support using only one hit in game. | Also, make sure nothing is check under the "Flags" tab. These changes will allow the player to break the support using only one hit in game. | ||
{{clr}} | {{clr}} | ||
[[ | [[File:DMMaMBreakShelfB.jpg|thumb|250px|right| Two 16x16x112 func_breakable beams.]] | ||
{{key|Shift}}+click and drag the support to another spot to create a duplicate. For now, place the two pillars 144 units apart, and 104 units away from the wall, and make sure they both have the same name value. | {{key|Shift}}+click and drag the support to another spot to create a duplicate. For now, place the two pillars 144 units apart, and 104 units away from the wall, and make sure they both have the same name value. | ||
{{clr}} | {{clr}} | ||
=== Starting the shelf === | === Starting the shelf === | ||
[[ | [[File:DMMaMBreakShelfD.jpg|thumb|250px|right| Two 16x128x8 beams.]] | ||
Create two new beams, 8 units tall, 16 units wide, and 128 units long, then {{key|Shift}}+click and create a second. | Create two new beams, 8 units tall, 16 units wide, and 128 units long, then {{key|Shift}}+click and create a second. | ||
{{note|Do not make these beams func_breakables!}} | {{note|Do not make these beams func_breakables!}} | ||
{{clr}} | {{clr}} | ||
[[ | [[File:DMMaMBreakShelfE.jpg|thumb|250px|right| Both upper planks clipped.]] | ||
Next up, use the [[Clipping tool]] to clip the two upper boards exactly as shown. | Next up, use the [[Clipping tool]] to clip the two upper boards exactly as shown. | ||
{{clr}} | {{clr}} | ||
[[ | [[File:DMMaMBreakShelfF.jpg|thumb|250px|right| Both upper planks clipped.]] | ||
Finally, select the two small pieces closest to the wall, and press {{key|Ctrl|T}} to make them func_details. | Finally, select the two small pieces closest to the wall, and press {{key|Ctrl|T}} to make them func_details. | ||
{{clr}} | {{clr}} | ||
=== Creating the platform === | === Creating the platform === | ||
[[ | [[File:DMMaMBreakShelfG.jpg|thumb|250px|right| The 4 planks which make up the platform.]] | ||
Now, create/duplicate four new planks, each 4 units tall, 24 units wide, and 244 units long. Spread these planks out along the top of the shelf, as shown. | Now, create/duplicate four new planks, each 4 units tall, 24 units wide, and 244 units long. Spread these planks out along the top of the shelf, as shown. | ||
{{clr}} | {{clr}} | ||
[[ | [[File:DMMaMBreakShelfH.jpg|thumb|250px|right| The NPCClip.]] | ||
Make 2 brushes the same height and length as the previous planks, with the texture "tools/toolsnpcclip," and adjust their positions and widths so that they each cover half the total surface area of the platform. | Make 2 brushes the same height and length as the previous planks, with the texture "tools/toolsnpcclip," and adjust their positions and widths so that they each cover half the total surface area of the platform. | ||
{{clr}} | {{clr}} | ||
[[ | [[File:DMMaMBreakShelfI.jpg|thumb|250px|right| The two func_physboxes.]] | ||
Once the NPCClip is in place, select the two planks and NPCClip piece closest to the wall, as well as the middle two sections of the upper beam, then press {{key|Ctrl|T}}. Change the entity's class to "[[func_physbox]]". | Once the NPCClip is in place, select the two planks and NPCClip piece closest to the wall, as well as the middle two sections of the upper beam, then press {{key|Ctrl|T}}. Change the entity's class to "[[func_physbox]]". | ||
{{clr}} | {{clr}} | ||
[[ | [[File:DMMaMBreakShelfJ.jpg|thumb|250px|right| Func_physbox flags.]] | ||
Change the following flags and values: | Change the following flags and values: | ||
:*Change the name of the physbox closest to the wall "platform_rear" | :*Change the name of the physbox closest to the wall "platform_rear" | ||
Line 51: | Line 51: | ||
{{clr}} | {{clr}} | ||
=== Adding hinges === | === Adding hinges === | ||
[[ | [[File:DMMaMBreakShelfK.jpg|thumb|250px|right| Phys_hinges.]] | ||
Create two [[phys_hinge]]s, and name them "platform_hinge_a" and "platform_hinge_b." Align them on opposite sides, bottom center on the func_details. | Create two [[phys_hinge]]s, and name them "platform_hinge_a" and "platform_hinge_b." Align them on opposite sides, bottom center on the func_details. | ||
:*Set the "Entity 1" value on both hinges to "platform_rear" | :*Set the "Entity 1" value on both hinges to "platform_rear" | ||
Line 58: | Line 58: | ||
== Physics Objects == | == Physics Objects == | ||
=== Add some objects! === | === Add some objects! === | ||
[[ | [[File:DMMaMBreakShelfL.jpg|thumb|250px|right| Some prop_physics on the shelf.]] | ||
This tutorial does not cover the creation of physics props. Once you have created some, place them around the edges of the shelf. Make sure the objects are in a position where they will not fall once affected by gravity. | This tutorial does not cover the creation of physics props. Once you have created some, place them around the edges of the shelf. Make sure the objects are in a position where they will not fall once affected by gravity. | ||
{{clr}} | {{clr}} | ||
=== Adding env_physexplosions === | === Adding env_physexplosions === | ||
[[ | [[File:DMMaMBreakShelfM.jpg|thumb|250px|right| The env_physexplosions.]] | ||
{{note|Even if you do not need props on your shelf, these env_physexplosions are necessary in order for the shelves to fall properly!}} | {{note|Even if you do not need props on your shelf, these env_physexplosions are necessary in order for the shelves to fall properly!}} | ||
Create an "[[env_physexplosion]]" entity and name it "platform_explosion" | Create an "[[env_physexplosion]]" entity and name it "platform_explosion" | ||
Line 70: | Line 70: | ||
== NPC compatibility == | == NPC compatibility == | ||
=== Link controllers === | === Link controllers === | ||
[[ | [[File:DMMaMBreakShelfN.jpg|thumb|250px|right| The link_controllers.]] | ||
In order to keep NPC's away from the sides of the shelf before it collapses, two link controllers are needed. Start by placing an "[[info_node_mm_link_controller]]" [[entity]]. Name it "platform_link_controller" | In order to keep NPC's away from the sides of the shelf before it collapses, two link controllers are needed. Start by placing an "[[info_node_mm_link_controller]]" [[entity]]. Name it "platform_link_controller" | ||
:*Change the "Mins" value to -16 -64 -64 | :*Change the "Mins" value to -16 -64 -64 | ||
Line 77: | Line 77: | ||
{{clr}} | {{clr}} | ||
=== Ragdoll trigger === | === Ragdoll trigger === | ||
[[ | [[File:DMMaMBreakShelfO.jpg|thumb|250px|right| Ragdoll trigger.]] | ||
To make sure NPCs underneath the falling shelf become ragdoll, a trigger is needed. Create a brush with the "tools/toolstrigger" roughly covers the area beneath the "platform_front" physbox. Select this brush and press {{key|Ctrl|T}}, then change its class to "[[trigger_multiple]]" | To make sure NPCs underneath the falling shelf become ragdoll, a trigger is needed. Create a brush with the "tools/toolstrigger" roughly covers the area beneath the "platform_front" physbox. Select this brush and press {{key|Ctrl|T}}, then change its class to "[[trigger_multiple]]" | ||
:*Name the trigger "platform_ragdoll" | :*Name the trigger "platform_ragdoll" | ||
:*Set "Start Disabled" to yes | :*Set "Start Disabled" to yes | ||
[[ | [[File:DMMaMBreakShelfP.jpg|thumb|250px|right| Output for "platform_ragdoll"]] | ||
:*In the outputs tab, add a new output named "OnTrigger", that targets entities name "!activator", via the input "FallInRagdoll", with a parameter override of 2 | :*In the outputs tab, add a new output named "OnTrigger", that targets entities name "!activator", via the input "FallInRagdoll", with a parameter override of 2 | ||
{{clr}} | {{clr}} | ||
Line 96: | Line 96: | ||
{{clr}} | {{clr}} | ||
=== Add outputs to the support beams === | === Add outputs to the support beams === | ||
[[ | [[File:DMMaMBreakShelfQ.jpg|thumb|250px|right| Output for both "platform_support" beams]] | ||
For both of the two "func_brekable" beams: | For both of the two "func_brekable" beams: | ||
*:In the outputs tab, add a new [[output]] named "OnBreak", that targets entities name "platform_relay", via the input "Trigger" | *:In the outputs tab, add a new [[output]] named "OnBreak", that targets entities name "platform_relay", via the input "Trigger" | ||
{{clr}} | {{clr}} | ||
=== Big step: Outputs for the relay === | === Big step: Outputs for the relay === | ||
[[ | [[File:DMMaMBreakShelfR.jpg|thumb|250px|right| "platform_relay" outputs]] | ||
Go back to "platform_relay" and add all of these outputs: | Go back to "platform_relay" and add all of these outputs: | ||
:*Output named "OnTrigger", that targets entities named "platform_support", via the input "Break" | :*Output named "OnTrigger", that targets entities named "platform_support", via the input "Break" | ||
Line 121: | Line 121: | ||
{{clr}} | {{clr}} | ||
== In conclusion! == | == In conclusion! == | ||
[[ | [[File:DMMaMBreakShelfS.jpg|thumb|350px|right| Finished result!]] | ||
Now just add an [[info_player_start]] and test it out! | Now just add an [[info_player_start]] and test it out! | ||
{{note|Remember to change all the entity names if you duplicate the shelf!}} | {{note|Remember to change all the entity names if you duplicate the shelf!}} | ||
{{note|Feel free to make changes to all measurements and brushwork, as well as adding more supports or anything you please}} | {{note|Feel free to make changes to all measurements and brushwork, as well as adding more supports or anything you please}} | ||
== External | == External links == | ||
[http://www.filefactory.com/file/caeb90d/n/breakshelftut.vmf Download of Tutorial VMF] | [http://www.filefactory.com/file/caeb90d/n/breakshelftut.vmf Download of Tutorial VMF] | ||
[[Category:Level Design]] | == See also == | ||
* [[Dark Messiah: Level Creation]] | |||
* [[:Category:Level Design|Level Design Category]] | |||
* [[Introduction to Editing]] | |||
* [[Level Design Video Tutorials]] | |||
[[Category:Dark Messiah]] |
Latest revision as of 07:13, 8 January 2024
An excellent gameplay tool in Dark Messiah, breakable shelves add a lot of immersion to any level. Though they are not necessarily difficult to produce, it does take many steps.
Creating your shelf
Setting up
Start off with a good size room, preferably with a floor size of 320 by 320, and a ceiling with a height of 256. Textures and aesthetics are not the pivotal to this tutorial, feel free to use whatever textures or design variations you would like.
Making supports
The support beams (the ones the player will kick to break) are a good place to start. Make one support, 16 by 16 in length and width, then 122 in height. Afterwards, select the beam and press Ctrl+T, then select "func_breakable" as the class.
Change these values:
- "Name" should be set as "platform_support"
- "Disable Shadows" should be set to "Yes"
- "Strength" should be set to 1
- "Material Type" should be set to "Wood"
Also, make sure nothing is check under the "Flags" tab. These changes will allow the player to break the support using only one hit in game.
⇧ Shift+click and drag the support to another spot to create a duplicate. For now, place the two pillars 144 units apart, and 104 units away from the wall, and make sure they both have the same name value.
Starting the shelf
Create two new beams, 8 units tall, 16 units wide, and 128 units long, then ⇧ Shift+click and create a second.

Next up, use the Clipping tool to clip the two upper boards exactly as shown.
Finally, select the two small pieces closest to the wall, and press Ctrl+T to make them func_details.
Creating the platform
Now, create/duplicate four new planks, each 4 units tall, 24 units wide, and 244 units long. Spread these planks out along the top of the shelf, as shown.
Make 2 brushes the same height and length as the previous planks, with the texture "tools/toolsnpcclip," and adjust their positions and widths so that they each cover half the total surface area of the platform.
Once the NPCClip is in place, select the two planks and NPCClip piece closest to the wall, as well as the middle two sections of the upper beam, then press Ctrl+T. Change the entity's class to "func_physbox".
Change the following flags and values:
- Change the name of the physbox closest to the wall "platform_rear"
- Change the name of the physbox closest to the supports "platform_front"
- Change "Material Type" to "Wood", and "Disable Shadows" to "Yes" in both entities
- Check "NPC Collision" and "Motion Disabled" in both entities flag tabs
Adding hinges
Create two phys_hinges, and name them "platform_hinge_a" and "platform_hinge_b." Align them on opposite sides, bottom center on the func_details.
- Set the "Entity 1" value on both hinges to "platform_rear"
This will keep the back part of the shelf attached to the wall. The basic shelf is now complete, but we still need objects on top, NPC compatibility, and the logic to make it work.
Physics Objects
Add some objects!
This tutorial does not cover the creation of physics props. Once you have created some, place them around the edges of the shelf. Make sure the objects are in a position where they will not fall once affected by gravity.
Adding env_physexplosions

Create an "env_physexplosion" entity and name it "platform_explosion"
- Change the magnitude value to 40.
Now ⇧ Shift+click and create as many duplicates as needed, then place them in locations relevant to your props (or just above the shelf).
NPC compatibility
Link controllers
In order to keep NPC's away from the sides of the shelf before it collapses, two link controllers are needed. Start by placing an "info_node_mm_link_controller" entity. Name it "platform_link_controller"
- Change the "Mins" value to -16 -64 -64
- Change the "Maxs" value to 16 64 64
Now place them at the sides of the shelf such that they block off any pathway through.
Ragdoll trigger
To make sure NPCs underneath the falling shelf become ragdoll, a trigger is needed. Create a brush with the "tools/toolstrigger" roughly covers the area beneath the "platform_front" physbox. Select this brush and press Ctrl+T, then change its class to "trigger_multiple"
- Name the trigger "platform_ragdoll"
- Set "Start Disabled" to yes
- In the outputs tab, add a new output named "OnTrigger", that targets entities name "!activator", via the input "FallInRagdoll", with a parameter override of 2
Filter
Pick any spot nearby and create a "filter_activator_name"
- Name it "platform_filtername"
- Set the "Filter Name" value as "platform_rear"
Bringing it all together
Setup the logic_relay
Once again, pick any nearby spot and create a "logic_relay" entity.
- Name the entity "platform_relay"
- Check the flag "Only trigger once"
Add outputs to the support beams
For both of the two "func_brekable" beams:
- In the outputs tab, add a new output named "OnBreak", that targets entities name "platform_relay", via the input "Trigger"
Big step: Outputs for the relay
Go back to "platform_relay" and add all of these outputs:
- Output named "OnTrigger", that targets entities named "platform_support", via the input "Break"
- Output named "OnTrigger", that targets entities named "platform_front", via the input "EnableMotion" with a delay of 0.25
- Output named "OnTrigger", that targets entities named "platform_rear", via the input "EnableMotion" with a delay of 0.25
- Output named "OnTrigger", that targets entities named "platform_explosion", via the input "Explode" with a delay of 0.25
- Output named "OnTrigger", that targets entities named "platform_ragdoll", via the input "Enable" with a delay of 0.40
- Output named "OnTrigger", that targets entities named "platform_front", via the input "Break" with a delay of 1.00
- Output named "OnTrigger", that targets entities named "platform_ragdoll", via the input "Kill" with a delay of 1.00
- Output named "OnTrigger", that targets entities named "platform_link_controller", via the input "TurnOn" with a delay of 1.00
- Output named "OnTrigger", that targets entities named "platform_rear", via the input "DisableMotion" with a delay of 1.75
Optional: Add sound
Create an "ambient_generic" entity near the front of the shelf and name it "platform_sound"
- Set the "Sound Name" value to "Wood.Crash"
- Check the flags "Start Silent" and "Is NOT Looped"
Quickly add this output to the logic_relay:
- Output named "OnTrigger, that targets entities named "platform_sound", via the input "PlaySound with a delay of 0.50
In conclusion!
Now just add an info_player_start and test it out!

