This repository has been archived as legacy, any future update goes here : MetaHookSv -> CaptionMod
该代码库已经归档,任何与CaptionMod相关的后续更新都在此处:MetaHookSv -> CaptionMod
This is a caption/subtitle plugin designed for displaying captions/subtitles in GoldSRC engine & VGUI2 based singleplayer games.
It could display captions/subtitles when:
-
Sound (wav only, not mp3) is played.
-
Sentence is played.
-
HudText or HudTextPro (Counter Strike 1.6 or Condition Zero) is displayed.
-
Counter Strike 1.6 or Condition Zero SendAudio (radio) message
MetaHook (https://github.com/Nagist/metahook)
Visual Studio 2017
Open CaptionMod.sln with MSVC and build it with Release config.
If no error occurs, output binary will be at MetaHook\Plugins\CaptionMod\Release\CaptionMod.dll
and Binary\CaptionMod.dll
-
Download zip or git clone https://github.com/hzqst/CaptionMod
-
Run CaptionMod3.3_installer.exe and install.
-
Copy
Binary\CaptionMod.dll
tosteamapps\common\Half-Life\(your_game_name)\metahook\plugins\
and overwrite it. -
Launch game from
steamapps\common\Half-Life\metahook.exe -game (your_game_name)
When set to 0, captions will be disabled. Otherwise, captions will be enabled.
When set to 1, debug message will be displayed in the console.
When set to 1, NETMESSAGE will be translated.
When set to non-zero, sound or sentences playing far away from this distance will be ignored.
To check current version of this plugin.
Reload the dictionary file
Color settings, font settings, loading custom font files(.ttf only)...
Subtitle panel settings and some detail settings for subtitle text.
Put custom font files in it.
Then add font files in CaptionScheme.res->CustomFontFiles
Then add font tag in CaptionScheme.res->Fonts, or just mofify "SubtitleFont".
Textures of panel's round cornor.
Localization files, for multi-language support.
Dictionary file, encoded in ANSI or local system encoding.
It is not recommended to put any non-ANSI characters in dictionary file.
Once the game plays a .wav file, it will scan the dictionary with the sound path (without sound/ prefix),
The subtitle will display if an entry was found in the dictionary.
see gamedir\sound\sentences.txt
for example, HG_GREN0 is a SENTENCE, the subtitle will display once a SENTENCE is played and the name of it was found in the dictionary.
Triggered by some other subtitle from the "Next Subtitle" section. it's very useful when making subtitles for long sentences.
(do not try to trigger itself or make a circular trigger, it might cause infinite loop)
The title of this subtitle, used to identify a subtitle sentence.
file name with extension ".wav" means it's triggered by a .wav sound. notice that do not add "sound/" prefix!
or it's the message name in gamedir/titles.txt?
or it's the sentence name in gamedir/sentence.txt?
or it's just triggered by another subtitle?
Subtitle text that displayed in the subtitle panel.
Support line-break(Alt+Enter in Office Excel) ,quote,comma for XLS/XLSX format dictionary ...
Support Valve's language file ("#" + String Name in dictionary_english/language.txt). for example: "#CaptionMod_ForExample"
Must be declared in CaptionScheme.res!
You can use two color for HudMessage, one for $color and another for $color2. empty means no changes.
How long this sentence stays alive for? 0/empty means the life of subtitle depends on the length of sound (.wav only!).
For HudMessage, it's will modify the $holdtime param.
Add prefix such as "[Hologram]" at the begin of the subtitle sentence.
Support Valve's language file. For example #HalfLife_Scientist will add [Scientist] at the begin.
Which subtitle to trigger after "Delay to Next Subtitle" second(s) ?
See "Next Subtitle", unit: second
Text alignment for subtitle text and the way how this sentence fade in?
available value: L / C / R (Case-Insensitive)
available value: alphafade / leftscan (Case-Insensitive)
2021-01-03
fix issue #7
2020-05-01
fix : Blue Shift crash.
fix issue #4
2020-04-30
fix : engine 8383 crash.
2015-11-28
fix : subtitle panel don't scale in high resolution.