Credits

From Valve Developer Community
Jump to navigation Jump to search
English (en)Русский (ru)Translate (Translate)

Stub

This article or section is a stub. You can help by expanding it.

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.

Credits.txt

To change the actual text of the credits, edit %modname%/scripts/credits.txt.

The names used in HL2 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"
{

Open the block.


	"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"

No clue what this does.


	"pausebetweenwaves" "1.0"

I think this defines how long between fading out and fading the next one in.


	"logotime" "1.0"

How long the logo stays in.


	"posx"	"96"
	"posy"	"360"

The position of intro text (doesn't affect outro)


	"color" "255 255 255 128"

The RGBA color of the text.

	"scrolltime" "158"

How fast the credits scroll on the outro.


	"separation"  "10"
}

How much space between text on the outro.

Special

Note that the last line of the "OutroCreditsNames" will stay on screen and fade out. If you would like to know more about the fading out part, look into hud_credits.cpp, starting at line 288 underneath 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.

To display Half-Life 2 like it is on the main menu, use:

"HALF-LIFE'"	"CreditsOutroLogos"


To display the Valve logo, use

"V"	"CreditsOutroLogos"


To display the HL2 logo, use:

"@"	"CreditsOutroLogos"