Making GLaDOS speak: Difference between revisions
(Added more Information for Portal 2, added to Portal 2 Category.) |
(Started working on a tutorial for creating your own vcd scenes) |
||
(11 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Underlinked|date=January 2024}} | ||
| | {{LanguageBar}} | ||
}} | {{Back|Category:Portal_level_design|Portal Level Design}} | ||
== Using preset sounds == | == Using preset sounds == | ||
It's actually very easy to make GLaDOS talk, but which method to use may not be immediately obvious. You can play one of her lines using an {{ent|ambient_generic}}, but this has an unfortunate downside: <code>ambient_generic</code> entities continue to play even when the game is paused (hence the "ambient" part of the entity name). | It's actually very easy to make GLaDOS talk, but which method to use may not be immediately obvious. You can play one of her lines using an {{ent|ambient_generic}}, but this has an unfortunate downside: <code>ambient_generic</code> entities continue to play even when the game is paused, as they are usually only used for background/unimportant noises (hence the "ambient" part of the entity name). | ||
In Valve's maps, a {{ent|logic_choreographed_scene}} is used instead. Here's how to make GLaDOS speak in your own maps with a <code>logic_choreographed_scene</code> entity: | In Valve's maps, a {{ent|logic_choreographed_scene}} is used instead. Here's how to make GLaDOS speak in your own maps with a <code>logic_choreographed_scene</code> entity: | ||
#Create a small room outside of your regular play area. Cover the walls with the "nodraw" texture. | #Create a small room outside of your regular play area. Cover the walls with the "nodraw" texture. {{Note|For better performance, instead of creating an empty room (thus increasing file size, compilation size and creating more visleafs), place the entity in an inaccessible place like an observation room.}} | ||
{{Note|For better performance, instead of creating an empty room (thus increasing file size, compilation size and creating more visleafs), place the entity in an inaccessible place like an observation room.}} | |||
#Inside the room, create a {{ent|generic_actor}} entity. Set the entity's model to '''models/props/metal_box.mdl''' or something similar. Set its [[Render Modes|render mode]] to "Don't Render". ''The model doesn't really matter, but Valve uses metal_box in their maps because the map already uses that model in most cases (thus saving memory).'' | #Inside the room, create a {{ent|generic_actor}} entity. Set the entity's model to '''models/props/metal_box.mdl''' or something similar. Set its [[Render Modes|render mode]] to "Don't Render". ''The model doesn't really matter, but Valve uses metal_box in their maps because the map already uses that model in most cases (thus saving memory).'' | ||
#Set the <code>generic_actor</code>'s Name property to '''Aperture_AI''' (the name cannot be anything other than Aperture_AI, otherwise the scenes will not function). | #Set the <code>generic_actor</code>'s Name property to '''Aperture_AI''' (the name cannot be anything other than Aperture_AI, otherwise the scenes will not function). {{Note|In Portal 2, the name property will need to be '''@glados''' to properly function.}} | ||
{{Note|In Portal 2, the name property will need to be '''@glados''' to properly function.}} | #Create a <code>logic_choreographed_scene</code> in your play area and set the Scene property to whatever scene you want to play. {{Note|If you are making a scene for cameras, you might want to try the following scenes out.}} | ||
#Create a <code>logic_choreographed_scene</code> in your play area and set the Scene property to whatever scene you want to play. | |||
{{Note|If you are making a scene for cameras, you might want to try the following scenes out.}} | |||
There are also many scenes that can be made for special use, including things like weighted storage cubes, and cameras. | There are also many scenes that can be made for special use, including things like weighted storage cubes, and cameras. | ||
Line 32: | Line 29: | ||
* '''general\ai_box_lost.vcd''' | * '''general\ai_box_lost.vcd''' | ||
Now, | Now, trigger the <code>logic_choreographed_scene</code> entity and listen to GLaDOS speak! | ||
== Custom sounds == | == Custom sounds using an ambient_generic == | ||
{{Note|The Tutorials in this section are only known to work for Portal 1. They may however also work in Portal 2.}} | {{Note|The Tutorials in this section are only known to work for Portal 1. They may however also work in Portal 2.}} | ||
You can put in your own sounds for GLaDOS's voice if you like - just follow these steps: | You can put in your own sounds for GLaDOS's voice if you like - just follow these steps: | ||
{{Note|This method uses {{ent|ambient_generic}} instead of {{ent|logic_choreographed_scene}}, which has some downsides, including having to time the voice lines manually, using the delay feature on the outputs, which can be a tedious process. Additionally, if the player pauses their game during a voice line, the voice line will continue to play, but the delay will not be timed, which may cause the voice lines to desynchronize.}} | |||
{{Note|You should know about making triggers, inputs and outputs already before trying this!}} | {{Note|You should know about making triggers, inputs and outputs already before trying this!}} | ||
Line 46: | Line 43: | ||
# Open the "Sound Name" field in the <code>ambient_generic</code>'s properties and browse for your sound name. | # Open the "Sound Name" field in the <code>ambient_generic</code>'s properties and browse for your sound name. | ||
# Make a name for your <code>ambient_generic</code>, trigger it with a PlaySound input from somewhere, and it should work. | # Make a name for your <code>ambient_generic</code>, trigger it with a PlaySound input from somewhere, and it should work. | ||
== Custom sounds using a logic_choreographed_scene == | |||
{{warning|This tutorial is a work in progress and is currently not finished}} | |||
This method is more difficult and takes more time than using an <code>ambient_generic</code>, but is overall better for making your Portal maps, as if the player pauses the game, the dialogue will stop, meaning there is almost no way to unsynchronize the dialogue, and timing the delay between voice lines is much easier, requiring less trial and error. | |||
* To start, navigate to your Portal installation, it is usually at <code>C:\Program Files (x86)\Steam\steamapps\common\Portal</code> | |||
* Then navigate to the bin folder, here is where programs like Hammer and HLMV are. You will find a file called <code>hlfaceposer.exe</code>, also called [[Faceposer]], this is the program used to [[Choreography creation|create choreographed scenes]]. | |||
** You may also open the program using <code>Faceposer.bat</code>, but this does not work for everyone, and <code>hlfaceposer.exe</code> should always work. | |||
[[File:Blank hlfaceposer.png|thumb|right|alt=A photo of hlfaceposer.exe opened, showcasing it's interface.|hlfaceposer.exe interface]] | |||
*Then, at the top, click "Choreography", then click "New". | |||
*Choose a good name and find a good place to store your [[.vcd]] file, then click Save. | |||
*When it prompts you to add an actor, I recommend you type <code>Aperture_AI</code>, as most Portal maps use that as the actor name. | |||
*Now right-click on Aperture_AI in the timeline editor and go to '''New''' then '''Channel''' Most people use the name "Speech", but the name does not matter. | |||
*Now, when you right-click on Speech (or whatever you named your channel) you should see an option named "WAV File", when you select this, you will get a list of every game sound that is listed in a game_sounds_*.txt file. If your sounds are not listed in one of them, you will '''not''' be able to use them in your choreography file. | |||
=== Important notes === | === Important notes === | ||
* Your audio file needs to be a .wav file, preferably | * Your audio file needs to be a [[.wav]] file, preferably 16-bit PCM 44100 Hz Sample Rate and Playback Rate, which is highest quality audio supported in Source. However, using 8-bit PCM may be preferable, as it produces much smaller [[.wav]] files. Using a sample rate that is not 11025 Hz, 22050 Hz or 44100 Hz will cause the audio to not play. | ||
* When distributing the map, you will need to either package the sound with the map or use bspzip to add the files to your .bsp if you want the sounds to be heard by recipients of your map. | * When distributing the map, you will need to either package the sound with the map or use [[bspzip]] to add the files to your .bsp if you want the sounds to be heard by recipients of your map. | ||
** If you use bspzip, make sure to use all lowercase letters on everything and to use the .bsp internal sound folder of "/sound/MAPNAME/sound.wav" | ** If you use [[bspzip]], make sure to use all lowercase letters on everything and to use the [[.bsp]] internal sound folder of "/sound/MAPNAME/sound.wav" | ||
* If things don't work correctly, try to trigger the sound in-game, then look at the developer's console and see if it gives you an error; this can be a valuable troubleshooting tool. | * If things don't work correctly, try to trigger the sound in-game, then look at the developer's console and see if it gives you an error; this can be a valuable troubleshooting tool. | ||
* | * escape_02 (and possibly other maps) use a <code>generic_actor</code> named tim_larkin. It is presumed to be an inside joke from the developers, but if you want to use escape_02 scenes, you will have to create a <code>generic_actor</code> named tim_larkin instead of Aperture_AI to play escape_02 scenes. If you want to play both escape_02 scenes and other scenes, you can put two <code>generic_actor</codes>s in your maps. | ||
[[Category:Portal]] | [[Category:Portal]] | ||
[[Category:Portal 2]] | [[Category:Portal 2]] | ||
[[Category:Level Design]] | |||
[[Category:Tutorials]] |
Latest revision as of 09:38, 2 July 2025




January 2024
Using preset sounds
It's actually very easy to make GLaDOS talk, but which method to use may not be immediately obvious. You can play one of her lines using an ambient_generic, but this has an unfortunate downside: ambient_generic
entities continue to play even when the game is paused, as they are usually only used for background/unimportant noises (hence the "ambient" part of the entity name).
In Valve's maps, a logic_choreographed_scene is used instead. Here's how to make GLaDOS speak in your own maps with a logic_choreographed_scene
entity:
- Create a small room outside of your regular play area. Cover the walls with the "nodraw" texture.
Note:For better performance, instead of creating an empty room (thus increasing file size, compilation size and creating more visleafs), place the entity in an inaccessible place like an observation room.
- Inside the room, create a generic_actor entity. Set the entity's model to models/props/metal_box.mdl or something similar. Set its render mode to "Don't Render". The model doesn't really matter, but Valve uses metal_box in their maps because the map already uses that model in most cases (thus saving memory).
- Set the
generic_actor
's Name property to Aperture_AI (the name cannot be anything other than Aperture_AI, otherwise the scenes will not function).Note:In Portal 2, the name property will need to be @glados to properly function.
- Create a
logic_choreographed_scene
in your play area and set the Scene property to whatever scene you want to play.Note:If you are making a scene for cameras, you might want to try the following scenes out.
There are also many scenes that can be made for special use, including things like weighted storage cubes, and cameras.
Cameras


* scenes\general\generic_security_camera_destroyed-1.vcd * scenes\general\generic_security_camera_destroyed-2.vcd * scenes\general\generic_security_camera_destroyed-3.vcd * scenes\general\generic_security_camera_destroyed-4.vcd * scenes\general\generic_security_camera_destroyed-5.vcd
Storage Cubes
* general\ai_box_fried.vcd * general\ai_box_lost.vcd
Now, trigger the logic_choreographed_scene
entity and listen to GLaDOS speak!
Custom sounds using an ambient_generic

You can put in your own sounds for GLaDOS's voice if you like - just follow these steps:


- Create your sound and place it in "~/USERNAME/portal/portal/sound/MAPNAME/"
- Place an
ambient_generic
anywhere in your map - preferably near the trigger that will activate it. - Open the "Sound Name" field in the
ambient_generic
's properties and browse for your sound name. - Make a name for your
ambient_generic
, trigger it with a PlaySound input from somewhere, and it should work.
Custom sounds using a logic_choreographed_scene

This method is more difficult and takes more time than using an ambient_generic
, but is overall better for making your Portal maps, as if the player pauses the game, the dialogue will stop, meaning there is almost no way to unsynchronize the dialogue, and timing the delay between voice lines is much easier, requiring less trial and error.
- To start, navigate to your Portal installation, it is usually at
C:\Program Files (x86)\Steam\steamapps\common\Portal
- Then navigate to the bin folder, here is where programs like Hammer and HLMV are. You will find a file called
hlfaceposer.exe
, also called Faceposer, this is the program used to create choreographed scenes.- You may also open the program using
Faceposer.bat
, but this does not work for everyone, andhlfaceposer.exe
should always work.
- You may also open the program using
- Then, at the top, click "Choreography", then click "New".
- Choose a good name and find a good place to store your .vcd file, then click Save.
- When it prompts you to add an actor, I recommend you type
Aperture_AI
, as most Portal maps use that as the actor name. - Now right-click on Aperture_AI in the timeline editor and go to New then Channel Most people use the name "Speech", but the name does not matter.
- Now, when you right-click on Speech (or whatever you named your channel) you should see an option named "WAV File", when you select this, you will get a list of every game sound that is listed in a game_sounds_*.txt file. If your sounds are not listed in one of them, you will not be able to use them in your choreography file.
Important notes
- Your audio file needs to be a .wav file, preferably 16-bit PCM 44100 Hz Sample Rate and Playback Rate, which is highest quality audio supported in Source. However, using 8-bit PCM may be preferable, as it produces much smaller .wav files. Using a sample rate that is not 11025 Hz, 22050 Hz or 44100 Hz will cause the audio to not play.
- When distributing the map, you will need to either package the sound with the map or use bspzip to add the files to your .bsp if you want the sounds to be heard by recipients of your map.
- If things don't work correctly, try to trigger the sound in-game, then look at the developer's console and see if it gives you an error; this can be a valuable troubleshooting tool.
- escape_02 (and possibly other maps) use a
generic_actor
named tim_larkin. It is presumed to be an inside joke from the developers, but if you want to use escape_02 scenes, you will have to create ageneric_actor
named tim_larkin instead of Aperture_AI to play escape_02 scenes. If you want to play both escape_02 scenes and other scenes, you can put twogeneric_actor</codes>s in your maps.