Talk:Subtitles (Portal 2): Difference between revisions
(→No .DAT file: response) |
(→No .DAT file: .) |
||
Line 85: | Line 85: | ||
:Your captions have to be split by language. Rename it to closecaption_english.txt. | :Your captions have to be split by language. Rename it to closecaption_english.txt. | ||
:Also in your bat, change <code>-Portal 2</code> to <code>-game</code>. | :Also in your bat, change <code>-Portal 2</code> to <code>-game</code>. | ||
:The second file path is off. It should go to the ''folder'' containing the gameinfo.txt instead of the file itself, so for Portal 2 you would want <code>"C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2"</code>. If you're making a mod, put the path to the folder for that mod. [[User:Pinsplash|Pinsplash]] ''([[User talk:Pinsplash|talk]])'' 19:00, 30 August 2018 (UTC) | :The second file path is off. It should go to the ''folder'' containing the gameinfo.txt instead of the file itself, so for Portal 2 you would want <code>"C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2"</code> (of course change the <code>C:\Program Files (x86)</code> for whatever your system uses). If you're making a mod, put the path to the folder for that mod. [[User:Pinsplash|Pinsplash]] ''([[User talk:Pinsplash|talk]])'' 19:00, 30 August 2018 (UTC) |
Revision as of 12:02, 30 August 2018
Example
I wanted GLaDOS to speak when I pressed a button
I have my captions inside a file called closecaption_mymod_English.txt which is in the format:
lang
{
Language "English"
Tokens
{
GLaDOS.ramble1 "Sorry about the mess. I've really let the place go since you killed me."
GLaDOS.ramble2 "By the way, thanks for that."
}
}
I open up the cmd prompt and put in:
"U:/Program Files/Steam/steamapps/common/Portal 2/bin/captioncompiler.exe" -v "closecaption_mymod_English.txt"
In Hammer I create an ambient_generic which points towards my custom GLaDOS sound and named it: glados_ramble1. I also add a point_servercommand and name it @servercommand. Inside a newly created logic_auto I put:
My Output | Target | Target Input | Parameter |
---|---|---|---|
OnMapSpawn | @servercommand | Command | cc_lang mymod_English |
I create a prop_button and add another output:
My Output | Target | Target Input | Parameter |
---|---|---|---|
OnPressed | @servercommand | Command | cc_emit GLaDOS.ramble1 |
Also in the prop_button I add another output to activate the sound:
My Output | Target | Target Input | Parameter |
---|---|---|---|
OnPressed | glados_ramble1 | PlaySound |
Tada! The captions appear with the sound.
--Chickenmobile 00:20, 1 March 2012 (PST)
No .DAT file
It doesn't create the .DAT file. I have the captioncompiler.exe in my Steam\SteamApps\Portal 2\bin folder like the article said. I created a text file called: closecaption_aperture_ai and within it:
lang
{
Language "english"
Tokens
{
portal.00_part1_entry-1 "<clr:219,112,147><I>Hello and, again, welcome to the Aperture Science computer-aided enrichment center."
}
}
I have saved it with notepad++ in the required format and dragged it over to the captioncompiler.exe. It did something in a fraction of a second, closed itself then nothing happened. I have also tried to create the .bat file but I'm not the best in programming. This is what it looks like:
"D:\Steam\SteamApps\common\Portal 2\bin\captioncompiler.exe" %1 -Portal 2 "D:\Steam\SteamApps\common\Portal 2\portal2\gameinfo.txt"
pause
—Unsigned comment added by FIRE-Buzzard (talk • contribs) Always sign your posts with four tildes (~~~~)
- Your captions have to be split by language. Rename it to closecaption_english.txt.
- Also in your bat, change
-Portal 2
to-game
. - The second file path is off. It should go to the folder containing the gameinfo.txt instead of the file itself, so for Portal 2 you would want
"C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2"
(of course change theC:\Program Files (x86)
for whatever your system uses). If you're making a mod, put the path to the folder for that mod. Pinsplash (talk) 19:00, 30 August 2018 (UTC)