Random backgrounds

A Tutorial for Counter-Strike: Source

Attention Gamer! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending |Bacardi| points.
  • Post: Give |Bacardi| your thoughts on this Tutorial.
  • Vote: Help |Bacardi| win the Monthly Awards.
  • Rate: Give this Tutorial a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Tutorial.
  • Watch: Get notified when this Tutorial is updated.
Mascot

Join the community!

Sign up

Already a Bananite? Login


example pack here http://gamebanana.com/css/guis/27896
https://developer.valvesoftware.com/wiki/Menu\_Background\_Map
If you're wondering how to get a different background-wallpaper (and/or background map)
for (almost) each game start. Like in HL2 game.

Cvar

The game has a cvar that remembers where you left off the last chapter.
"sv\_unlockedchapters" = "1"
 archive
 - Highest unlocked game chapter.
This cvar will not change in any phase of the (Cs:s) game.
  • So, you can open the game with the console and write this, sv\_unlockedchapters 99.
  • Then exit the game.
  • This is now stored in your ...cstrike/cfg/config.cfg

    Chapters

  • You need to create the file ChapterBackgrounds.txt in ...cstrike/scripts/ (If it does not exist)
    "chapters"
    {
    	"1"	"background01"
    	"2" "background02"
    	"3"	"background03"
    	"4"	"byanyothername"
    }
    
    The first parameter is the chapter number. The second parameter is the name of the background.
  • You can add more "chapters" as much as you want.
  • And have whole different background names instead backgroundxx
  • It's important that the background name match with background texture (*.vmt).
    Or you end up in this, missing texture

    Background texture

    The game is loading the background texture from here, ...cstrike/materials/console/
  • For each "chapter" have to do two *.vmt files. Example
    background01.vmt
    background01_widescreen.vmt
    background02.vmt
    background02_widescreen.vmt
    background03.vmt
    background03_widescreen.vmt
    byanyothername.vmt
    byanyothername_widescreen.vmt
  • Which contains the path of your desired *.vtf picture.
    (Which may be located somewhere else other than here in the same folder)
    "UnlitGeneric"
    {
    	// Original shader: BaseTimesVertexColorAlphaBlendNoOverbright
    // Uncomment this if you add an alpha channel to the base texture
    //	"$translucent" 1
    	"$basetexture" "dev/dev_signflammable01a" // Example
    	"$vertexcolor" 1
    	"$no_fullbright" 1
    	"$ignorez" 1
    }
    

    This far, different background images should be in action.

    Background maps

  • Edit the file ...cstrike/cfg/valve.rc
  • and add command startupmenu
  • // load the base configuration
    //exec default.cfg
    r\_decal_cullsize 1
    // Setup custom controller exec joystick.cfg
    // run a user script file if present exec autoexec.cfg
    // // stuff command line statements // stuffcmds
    // display the startup level startupmenu

    There are a few things that prevent the background maps working.

  • You have -console or -dev in game launch options
  • You don't have map named by "chapter" background name (obviously)
  • Also, some background maps will not work as desired when the game starts in multiplayer mode.
    Adding this cvar in launch options change the game in singleplayer mode.
    +maxplayers 1
    Finally, what I have already mentioned a moment ago. You need the background maps that is named after the "chapters".
    The maps must be located at this path ...cstrike/maps/
    example maps to above "chapters"
    background01.bsp
    background02.bsp
    background03.bsp
    byanyothername.bsp

    Posts

    None found

    Share

    Shareable Image:
    Share banner
    HTML embed code:
    BB embed code:
    Markdown embed code:

    More embeddable images

    Bookmark and Share

    Credits

    Key Authors
    |Bacardi|
    Original Authors
    Valve
    Source Wiki Dev

    Submitter

    |Bacardi| avatar
    |Bacardi| Offline
    Member Joined 7y
    1,294 points Ranked 3635th

    |Bacardi|
    Creator
    Sign up to access this!
    Sign up to access this!
    Sign up to access this!
    Sign up to access this!

    Category

    Details

    Difficulty Level
    Advanced Difficulty

    Attributes

    Stats

    Posts
    0
    Views
    4,108
    Date Added
    5y
    Date Modified
    4y
    bcp.crwdcntrl.net tracking pixel