Credits: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Quick and dirty)
 
(Format of credits.txt)
Line 19: Line 19:
To change the actual text of the credits, edit <code>%modname%/scripts/credits.txt</code>.
To change the actual text of the credits, edit <code>%modname%/scripts/credits.txt</code>.


{{TODO|Detail the credits.txt syntax.}}
 
----
As far as I can tell, this is the syntax. I have not really tested this.
 
--[[User:Gman003|Gman003]] 17:00, 7 Aug 2006 (PDT)
 
 
 
 
Blocks are defined as <code>"name" { keys }</code>
 
Comments may be defined with //, as in C++.
 
The names used in HL2 are <code>"IntroCreditsNames"</code> and </code>"OutroCreditsNames"</code>, as well as <code>"CreditsParams"</code> (more on that later).
 
The keys are represented as <code>"text" "font" </code> (using quotes).
 
<font> is either CreditsText, CreditsOutroText, CreditsOutroLogos, or WeaponIcons. Others may work, this is untested.
 
<text> is simply whatever you want to appear.
 
Example:
 
 
<code>"IntroCreditsNames"</code>
 
<code>{</code>
 
<code> "Credits:" "CreditsText"</code>
 
<code> " " "CreditsText"</code>
 
<code> "Me!"    "CreditsText"</code>
 
<code>}</code>
 
 
 
== CreditsParams ==
 
Place a block named CreditsParams in the file. Below is the HL2 one, dissected line-by-line:
 
<code>"CreditsParams" {</code>
 
Open the block.
 
 
<code> "fadeintime" "2.5"</code>
 
Defines the time for the text to fade in.
 
 
<code> "fadeouttime" "1"</code>
 
Defines the time for the text to fade out.
 
 
<code> "fadeholdtime" "1.0"</code>
 
How long the text stays on screen.
 
 
<code> "nextfadetime" "1.0"</code>
 
No clue what this does.
 
 
<code> "pausebetweenwaves" "1.0"</code>
 
I think this defines how long between fading out and fading the next one in.
 
 
<code> "logotime" "1.0"</code>
 
How long the logo stays in.
 
 
<code> "posx" "96"</code>
 
<code> "posy" "360"</code>
 
The position of intro text (doesn't affect outro)
 
 
<code> "color" "255 255 255 128"</code>
 
The RGBA color of the text.
 
 
<code>//Outro Parameters</code>
 
<code> "scrolltime" "158"</code>
 
How fast the credits scroll on the outro.
 
 
<code> "separation"  "10"</code>
 
<code>}</code>
 
How much space between text on the outro.
 
== TRICKS ==
 
To display Half-Life 2 like it is on the main menu, use:
 
<code>"HALF-LIFE'" "CreditsOutroLogos"</code>
 
 
To display the Valve logo, use
 
<code>"V" "CreditsOutroLogos"</code>
 
 
To display the HL2 logo, use:
 
<code>"@" "CreditsOutroLogos"</code>


[[Category: Level Design Tutorials]]
[[Category: Level Design Tutorials]]

Revision as of 17:00, 7 August 2006

Stub

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

This article covers some details on creating (outro) credits for your 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.



As far as I can tell, this is the syntax. I have not really tested this.

--Gman003 17:00, 7 Aug 2006 (PDT)



Blocks are defined as "name" { keys }

Comments may be defined with //, as in C++.

The names used in HL2 are "IntroCreditsNames" and "OutroCreditsNames", as well as "CreditsParams" (more on that later).

The keys are represented as "text" "font" (using quotes).

is either CreditsText, CreditsOutroText, CreditsOutroLogos, or WeaponIcons. Others may work, this is untested.

<text> is simply whatever you want to appear.

Example:


"IntroCreditsNames"

{

"Credits:" "CreditsText"

" " "CreditsText"

"Me!" "CreditsText"

}


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.


//Outro Parameters

"scrolltime" "158"

How fast the credits scroll on the outro.


"separation" "10"

}

How much space between text on the outro.

TRICKS

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"