Please or Register to create posts and topics.

On making a full Portal 2 mod

Hi.

Contrary to this tutorial that seems to be the only one out there at the moment, you do not need to copy anything from Portal 2 to get to the Main Menu. You still need to copy language files over if you want the correct menu text to show up though.

The tutorial has the game's SearchPaths wrong. If it is set correctly, there is no need to copy scripts/ and especially not bin/ over from Portal 2.

Simply placing this gameinfo.txt...

Code: Select all
"GameInfo"
{
    game    "Portal 3"
    title   "Portal 3"
    icon portal3 // See Valve wiki's gameinfo.txt article

    // I don't think any of this after this line is required (obviously FileSystem is)
    type    singleplayer_only
    nodifficulty 1
    nomodels 1
    SupportsDX8 0
    SupportsXbox360 0

    FileSystem
    {
        SteamAppId  620        // Portal 2 has ID 620
        ToolsAppId  629        // Portal 2 SDK

        SearchPaths
        {
            Game    |gameinfo_path|.
            Game    |all_source_engine_paths|portal2
        }
    }
}

...into a directory in sourcemods and launching it will get the mod to run. Portal 2's single player won't work if you simply do this though, as the "map" menu action is broken in mods.

And here's a screenshot of the icon:

Crappy icon done in 3 seconds

Spoiler
Image

The rest of the content in that tutorial (I think) should apply, basically those dealing with chapter images and loading/menu splashes.

Comments? Thanks!

EDIT: It appears Valve hardcoded the chapter count and maps, I'm not sure but that's what it seems like, after digging in client.dll. I'll do more research, but what can be changed is the chapter titles in the main menu: portal2_<lang>.txt SP_PRESENCE_TEXT_CH<chapter number>.

EDIT 2: I just realised that in my mod, the Play Single Player menu doesn't actually work. After selecting a chapter it doesn't load the map. If someone else could figure out how to get it working it'd be great.

The "map" command is somehow broken with mods, so I assume you have to use the Extras-menu for the chapters.

JakeeeD wrote:
The "map" command is somehow broken with mods, so I assume you have to use the Extras-menu for the chapters.

How does the game call a map from its Play Single Player menu anyway?

If it uses "map", then I guess that's why Play SP doesn't work.. :<

Using the Extras menu for chapters would mean that all chapters would be accessible whether the player has completed the previous chapters..

angelsl wrote:
JakeeeD wrote:
The "map" command is somehow broken with mods, so I assume you have to use the Extras-menu for the chapters.

How does the game call a map from its Play Single Player menu anyway?

If it uses "map", then I guess that's why Play SP doesn't work.. :<

You're right. It does use "map". That's why content mods do use the Extras-menu.

JakeeeD wrote:
angelsl wrote:
JakeeeD wrote:
The "map" command is somehow broken with mods, so I assume you have to use the Extras-menu for the chapters.

How does the game call a map from its Play Single Player menu anyway?

If it uses "map", then I guess that's why Play SP doesn't work.. :<

You're right. It does use "map". That's why content mods do use the Extras-menu.

Any idea how to change the map that the game sets for Play Single Player menu?

Because if somehow "map" is fixed, it'd still be useless if the chapter start maps were hardcoded. :<

Oh btw: you missed:

Code: Select all
   developer   ""
   developer_url   ""
   manual      "info.txt"

That's info you can view with steam ^_^

Thanks for the info on the error :) Save quite a few files :)

JakeeeD wrote:
The "map" command is somehow broken with mods, so I assume you have to use the Extras-menu for the chapters.

I've played like 50 custom maps in my mod with the "map" command? :lol:

lpfreaky90 wrote:
JakeeeD wrote:
The "map" command is somehow broken with mods, so I assume you have to use the Extras-menu for the chapters.

I've played like 50 custom maps in my mod with the "map" command? :lol:

We're referring to the "map" menu action as used in the game's menus (for Play SP & Extras), not the console command.