ItsMods

Full Version: Custom loading screen hints
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I would like to add some hints to the hints section in the map loading screen and only make them show when a specific gametype is loaded. What file would I have to look into to get that done?
Thanks. Smile
There's a command that selects a random hint from a file, you could create a .csv file for each gametype and end them with the gametype name and then use:

( "hints_" + DvarString( "g_gametype" ) + ".csv" )

or something.

Looking for the command now, hang on

edit: forgot that I uninstalled blops and the tools, but the command is in the ui_mp\connect.menu
(03-07-2012, 15:58)iAegle Wrote: [ -> ]There's a command that selects a random hint from a file, you could create a .csv file for each gametype and end them with the gametype name and then use:

( "hints_" + DvarString( "g_gametype" ) + ".csv" )

or something.

Looking for the command now, hang on

edit: forgot that I uninstalled blops and the tools, but the command is in the ui_mp\connect.menu
All that I can see in connect.menu that could have something to do with it is this:
Code:
itemDef
        {
            rect            LOADBAR_X 140 LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            type            ITEM_TYPE_BUTTON
            dvar            "didyouknow"
            textalign         ITEM_ALIGN_LEFT
            textscale        TEXTSIZE_SMALL
            textfont        UI_FONT_SMALL
            forecolor        1 1 1 1
            backcolor        0 0 0 0
            textalignx         0
            textaligny         0  
            visible            1
            decoration
            autowrapped
            state
            {
                name "meet"
                rect LOADBAR_X (LOADBAR_Y+LOADBAR_HEIGHT+15) LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            }
        }
But I can't figure out where I can set the location of the file from that.
use my tutorial, editing didyouknowfile.csv
www.itsmods.com/forum/Thread-How-to-make-custom-didyouknow-messages.html
and add in menu file:
Code:
itemDef
        {
            rect            LOADBAR_X 140 LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            type            ITEM_TYPE_BUTTON
            dvar            "didyouknow"
            textalign         ITEM_ALIGN_LEFT
            textscale        TEXTSIZE_SMALL
            textfont        UI_FONT_SMALL
            forecolor        1 1 1 1
            backcolor        0 0 0 0
            textalignx         0
            textaligny         0  
            visible            dvarGet(g_gametype) !=  ur
            decoration
            autowrapped

            state
            {
                name "meet"
                rect LOADBAR_X (LOADBAR_Y+LOADBAR_HEIGHT+15) LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            }
        }
and
Code:
itemDef
        {
            rect            LOADBAR_X 140 LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            type            ITEM_TYPE_BUTTON
            TEXT           read thingy, i saw it
            textalign         ITEM_ALIGN_LEFT
            textscale        TEXTSIZE_SMALL
            textfont        UI_FONT_SMALL
            forecolor        1 1 1 1
            backcolor        0 0 0 0
            textalignx         0
            textaligny         0  
            visible            dvarGet(g_gametype) ==  ur
            decoration
            autowrapped

            state
            {
                name "meet"
                rect LOADBAR_X (LOADBAR_Y+LOADBAR_HEIGHT+15) LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            }
        }
replace "dvar" to text and read lines from csv
and replace vision
@iAegle i tried to edit hints_ thing, didnt worked
(03-07-2012, 17:17)Se7en Wrote: [ -> ]use my tutorial, editing didyouknowfile.csv
www.itsmods.com/forum/Thread-How-to-make-custom-didyouknow-messages.html
and add in menu file:
Code:
itemDef
        {
            rect            LOADBAR_X 140 LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            type            ITEM_TYPE_BUTTON
            dvar            "didyouknow"
            textalign         ITEM_ALIGN_LEFT
            textscale        TEXTSIZE_SMALL
            textfont        UI_FONT_SMALL
            forecolor        1 1 1 1
            backcolor        0 0 0 0
            textalignx         0
            textaligny         0  
            visible            dvarGet(g_gametype) !=  ur
            decoration
            autowrapped

            state
            {
                name "meet"
                rect LOADBAR_X (LOADBAR_Y+LOADBAR_HEIGHT+15) LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            }
        }
and
Code:
itemDef
        {
            rect            LOADBAR_X 140 LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            type            ITEM_TYPE_BUTTON
            TEXT           read thingy, i saw it
            textalign         ITEM_ALIGN_LEFT
            textscale        TEXTSIZE_SMALL
            textfont        UI_FONT_SMALL
            forecolor        1 1 1 1
            backcolor        0 0 0 0
            textalignx         0
            textaligny         0  
            visible            dvarGet(g_gametype) ==  ur
            decoration
            autowrapped

            state
            {
                name "meet"
                rect LOADBAR_X (LOADBAR_Y+LOADBAR_HEIGHT+15) LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            }
        }
replace "dvar" to text and read lines from csv
and replace vision
@iAegle i tried to edit hints_ thing, didnt worked
Thanks Se7en. Smile
I didn't know there was a tutorial for this, fail. Rolleyes
Alright, almost got it working.
The only thing I can't figure out is what you have to put after TEXT excactly.
This is what I have got so far..
Code:
itemDef
        {
            rect            LOADBAR_X 140 LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            type            ITEM_TYPE_BUTTON
            exp text          tableLookup( "mp/tips.csv",    0, 3, 1 );
            textalign         ITEM_ALIGN_LEFT
            textscale        TEXTSIZE_SMALL
            textfont        UI_FONT_SMALL
            forecolor        1 1 1 1
            backcolor        0 0 0 0
            textalignx         0
            textaligny         0  
            visible            when(dvar(g_gametype) ==  "aico")
            decoration
            autowrapped

            state
            {
                name "meet"
                rect LOADBAR_X (LOADBAR_Y+LOADBAR_HEIGHT+15) LOADBAR_W 60 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
            }
        }