Credits: Difference between revisions
mNo edit summary |
|||
(24 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
{{LanguageBar}} | |||
{{stub}} | {{stub}} | ||
This article covers some details on creating (outro) credits for a single-player [[mod]]. | |||
This article covers some details on creating (outro) credits for | |||
== Entities required == | == Entities required == | ||
These are the [[entity|entities]] needed for a credit sequence. This is certainly not the only way of doing a credit sequence: the list is by no means definitive and some of these entities are optional. | |||
* {{ent|env_fade}} - to fade the screen out | |||
* {{ent|player_weaponstrip}} - to remove the player's suit and weapons | |||
* | * {{ent|point_teleport}}/{{ent|trigger_teleport}} - now you've faded the player's screen to black, why not put them into a nice dark room to avoid any glitches with the fade | ||
* | * {{ent|env_soundscape}} - to set the soundscape to be silent | ||
* | * {{ent|ambient_generic}} - to play music during the credits | ||
* | * {{ent|env_credits}} - to display the actual credit roll | ||
* | * {{ent|point_clientcommand}} - use the command {{Code|startupmenu force}} to force the game to quit to the menu | ||
* | |||
* | |||
== Credits.txt == | == Credits.txt == | ||
To change the actual text of the credits, edit {{Code|%modname%/scripts/credits.txt}}. | |||
The names used in {{Hl2|1}} are {{Code|"IntroCreditsNames"}} and {{Code|"OutroCreditsNames"}}, as well as {{Code|"CreditsParams"}} (more on that later). | |||
=== Keys and fonts === | |||
The keys are represented as {{Code|"text"}} or {{Code|"font"}} (using quotes) where {{Code|font}} is either ''{{Code|CreditsText}}, {{Code|CreditsOutroText}}, {{Code|CreditsOutroLogos}}'', or ''{{Code|WeaponIcons}}''; ''other fonts work also'' (basically every font that you define in {{File|[[Authoring and Using TrueType Fonts#The "Scheme"|resource/ClientScheme.res]]}} works!). {{Code|text}} is simply whatever you want to appear. | |||
The keys are represented as | |||
Example: | Example: | ||
<pre> | |||
"IntroCreditsNames" | |||
< | { | ||
"My cool Modname" "ClientTitleFont" | |||
"Credits:" "CreditsText" | |||
" " "CreditsText" | |||
"Me!" "CreditsText" | |||
" " "CreditsText" | |||
</ | "@" "CreditsOutroLogos" | ||
} | |||
</pre> | |||
== CreditsParams == | == CreditsParams == | ||
Place a block named CreditsParams in the file. Below is the HL2 one, dissected line-by-line: | Place a block named CreditsParams in the file. Below is the HL2 one, dissected line-by-line: | ||
<!-- Assuming its like a json--> | |||
<syntaxhighlight lang=cpp> | |||
"CreditsParams" | |||
{ | |||
"logo" "HALF-LIFE'" // Name of the game | |||
"fadeintime" "2.5" // Defines the time for the text to fade in. | |||
Defines the time for the text to fade in. | "fadeouttime" "1" // Defines the time for the text to fade out. | ||
"fadeholdtime" "1.0" // How long the text stays on screen. | |||
"nextfadetime" "1.0" // TODO: find out what this does. | |||
Defines the time for the text to fade out. | |||
"pausebetweenwaves" "1.0" // This defines how long between fading out and fading the next one in. | |||
"logotime" "1.0" // How long the logo stays in. | |||
How long the text stays on screen. | // The position of intro text (doesn't affect outro) | ||
"posx" "96" | |||
"posy" "360" | |||
How long the logo stays in. | |||
"color" "255 255 255 128" // The RGBA color of the text. | |||
//Outro Parameters | |||
"scrolltime" "158" // How fast the credits scroll on the outro. | |||
"separation" "10" // How much space between text on the outro. | |||
} | |||
</syntaxhighlight> | |||
== Special == | |||
{{Note|The last line of the {{Code|"OutroCreditsNames"}} will stay on screen and fade out. If you would like to know more about the fading out part, look into {{GitHub|ValveSoftware/source-sdk-2013/blob/master/src/game/client/hl2/hud_credits.cpp#L301-L337|hud_credits.cpp}}, starting at line 301 underneath {{Code|1=if ( i == m_CreditsList.Count()-1 )}} is the code for that. If you do not want the last line to fade out, simply make it an empty line.}} | |||
The | |||
= | |||
To display Half-Life 2 like it is on the main menu, use: | To display Half-Life 2 like it is on the main menu, use: | ||
{{Code|"HALF-LIFE'" "CreditsOutroLogos"}} - For displaying the game name. | |||
{{Note|[[Valve]] uses [[Authoring and Using TrueType Fonts|TrueType Fonts]] to display special characters, for example:{{Code|'}} is being used as {{Code|<sup>2</sup>}}}} | |||
{{Code|""V" "CreditsOutroLogos"}} - For displaying the [[Valve]] logo. | |||
{{Code|"@" "CreditsOutroLogos"}} - For displaying the {{Hl2|1}}. | |||
[[Category:Modding]]<!--Why?--> | |||
[[Category: | [[Category:Entities by topic]] |
Latest revision as of 08:39, 28 June 2025
This article covers some details on creating (outro) credits for a single-player mod.
Entities required
These are the entities needed for a credit sequence. This is certainly not the only way of doing a credit sequence: the list is by no means definitive and some of these entities are optional.
- env_fade - to fade the screen out
- player_weaponstrip - to remove the player's suit and weapons
- point_teleport/trigger_teleport - now you've faded the player's screen to black, why not put them into a nice dark room to avoid any glitches with the fade
- env_soundscape - to set the soundscape to be silent
- ambient_generic - to play music during the credits
- env_credits - to display the actual credit roll
- point_clientcommand - use the command startupmenu force to force the game to quit to the menu
Credits.txt
To change the actual text of the credits, edit %modname%/scripts/credits.txt.
The names used in Half-Life 2 are "IntroCreditsNames" and "OutroCreditsNames", as well as "CreditsParams" (more on that later).
Keys and fonts
The keys are represented as "text" or "font" (using quotes) where font is either CreditsText, CreditsOutroText, CreditsOutroLogos, or WeaponIcons; other fonts work also (basically every font that you define in resource/ClientScheme.res
works!). text is simply whatever you want to appear.
Example:
"IntroCreditsNames" { "My cool Modname" "ClientTitleFont" "Credits:" "CreditsText" " " "CreditsText" "Me!" "CreditsText" " " "CreditsText" "@" "CreditsOutroLogos" }
CreditsParams
Place a block named CreditsParams in the file. Below is the HL2 one, dissected line-by-line:
"CreditsParams"
{
"logo" "HALF-LIFE'" // Name of the game
"fadeintime" "2.5" // Defines the time for the text to fade in.
"fadeouttime" "1" // Defines the time for the text to fade out.
"fadeholdtime" "1.0" // How long the text stays on screen.
"nextfadetime" "1.0" // TODO: find out what this does.
"pausebetweenwaves" "1.0" // This defines how long between fading out and fading the next one in.
"logotime" "1.0" // How long the logo stays in.
// The position of intro text (doesn't affect outro)
"posx" "96"
"posy" "360"
"color" "255 255 255 128" // The RGBA color of the text.
//Outro Parameters
"scrolltime" "158" // How fast the credits scroll on the outro.
"separation" "10" // How much space between text on the outro.
}
Special


To display Half-Life 2 like it is on the main menu, use:
"HALF-LIFE'" "CreditsOutroLogos" - For displaying the game name.

""V" "CreditsOutroLogos" - For displaying the Valve logo.
"@" "CreditsOutroLogos" - For displaying the Half-Life 2.