Co-Operative Base (Mod): Difference between revisions
Line 1: | Line 1: | ||
= Description = | = Description = | ||
Source Engine Co-Operative Base Modification (SecobMod)is a modification containing useful code fixes for co-operative games. Please see the Features list for more details. | Source Engine Co-Operative Base Modification (SecobMod)is a modification containing useful code fixes for co-operative games. Please see the Features list for more details. | ||
There are currently two versions of this modification available, the older one for Source Engine 2007/2009 can be found | There are currently two versions of this modification available, the older one for Source Engine 2007/2009 can be found | ||
[https://developer.valvesoftware.com/w/index.php?title=Co-Operative_Base_%28Mod%29&oldid=177223 Secobmod (Seco7) for Source SDK 2007 here.] This page deals with the current version, which is currently based on the Source SDK 2013 multiplayer version. | [https://developer.valvesoftware.com/w/index.php?title=Co-Operative_Base_%28Mod%29&oldid=177223 Secobmod (Seco7) for Source SDK 2007 here.] This page deals with the current version, which is currently based on the Source SDK 2013 multiplayer version. | ||
**Please be aware that no support is given with this modification. Occasionally I check the steam forums and reply to threads I see as I can, but in most cases you are on your own - this is why this wiki page has been so heavily detailed | **Please be aware that no support is given with this modification. Occasionally I check the steam forums and reply to threads I see as I can, but in most cases you are on your own - this is why this wiki page has been so heavily detailed | ||
Line 10: | Line 13: | ||
If you release a modification which uses SecobMod or code from it, please remember to add those listed in the Credits section of this page to your own credits. | If you release a modification which uses SecobMod or code from it, please remember to add those listed in the Credits section of this page to your own credits. | ||
Currently the minimum requirements are solely that you have the Source SDK Base 2013 Multiplayer installed, though you may find the content restrictive is what you have available to you, as a result of this you may wish to mount other Valve games so that you can use their content (maps, models, sounds, materials etc) but please note that coded items from games that are not Half-Life 2 based will not work. | Currently the minimum requirements are solely that you have the Source SDK Base 2013 Multiplayer installed, though you may find the content restrictive is what you have available to you, as a result of this you may wish to mount other Valve games so that you can use their content (maps, models, sounds, materials etc) but please note that coded items from games that are not Half-Life 2 based will not work. | ||
These must use the new .vpk file format to work, at the time of writing the following have been tested and are found to work with various degrees of success: | These must use the new .vpk file format to work, at the time of writing the following have been tested and are found to work with various degrees of success: | ||
* Half-Life 2. | * Half-Life 2. | ||
Line 22: | Line 28: | ||
* Team Fortress 2 | * Team Fortress 2 | ||
* Counter Strike Source | * Counter Strike Source | ||
To keep this wiki page easily viewed, many items are now implemented into scroll boxes, so that the more important aspects of the page can be kept whole. | To keep this wiki page easily viewed, many items are now implemented into scroll boxes, so that the more important aspects of the page can be kept whole. |
Revision as of 08:50, 23 September 2013
Description
Source Engine Co-Operative Base Modification (SecobMod)is a modification containing useful code fixes for co-operative games. Please see the Features list for more details.
There are currently two versions of this modification available, the older one for Source Engine 2007/2009 can be found
Secobmod (Seco7) for Source SDK 2007 here. This page deals with the current version, which is currently based on the Source SDK 2013 multiplayer version.
- Please be aware that no support is given with this modification. Occasionally I check the steam forums and reply to threads I see as I can, but in most cases you are on your own - this is why this wiki page has been so heavily detailed
If you release a modification which uses SecobMod or code from it, please remember to add those listed in the Credits section of this page to your own credits.
Currently the minimum requirements are solely that you have the Source SDK Base 2013 Multiplayer installed, though you may find the content restrictive is what you have available to you, as a result of this you may wish to mount other Valve games so that you can use their content (maps, models, sounds, materials etc) but please note that coded items from games that are not Half-Life 2 based will not work.
These must use the new .vpk file format to work, at the time of writing the following have been tested and are found to work with various degrees of success:
- Half-Life 2.
- Half-Life 2: Episode 1.
- Half-Life 2: Episode 2.
- Portal 1
- Portal 2
- Team Fortress 2
- Counter Strike Source
To keep this wiki page easily viewed, many items are now implemented into scroll boxes, so that the more important aspects of the page can be kept whole.
Installation.
With the switchover of Valves' Source SDK hosting onto a GitHub repository it is now much easier to get hold of the code for SecobMod than it was with the previous Seco7 version.
Firstly you should follow the instructions for the Source SDK as found on here.
However where it would have you going to the official Valve SDK repository you will want to point your browser or GitHub client to this repository instead.
As you can see in Valves' instructions you have the choice of using github for your project and forking off the code (creating your own unique copy of the SecobMod code to edit as you see fit and with the added bonus of being able to merge updates to the base SecobMod and Source SDK code as they are released should you want them, or by downloading a zip file containing all the SecobMod files at the latest commit to the GitHub repository.
If you have already started on your project and wish to combine it into a SecobMod base then I would recommend getting a copy/forking a copy of SecobMod and using a program such as winmerge to merge in your changes due to the amount of changes SecobMod has made to many of the base Source SDK files.
Setting up the compiled game folder.
Now that you have your source code one way or an other, you will want to copy (from your github folder) the Secobmod's MP>Game>mod_HL2MP folder to your Steam>steamapps>sourcemods folder.
At this point you may if you would like rename the mod_hl2mp folder in your sourcemodes folder to that of your game name.
Setting up the Project files.
...To Do... client_hl2mp-2005.vcxproj and client_hl2mp-2005.vcxproj.user to the Src>Game>Client folder.
server_hl2mp-2005.vcxproj and server_hl2mp-2005.vcxproj.user to the Src>Game>Server folder.
Setting up the Source Code.
If you did decide to change the name of the mod_hl2mp folder in your sourcemods folder then you will have to tell the mounting code the new name of your mod.
You can search for anything important that requires being changed in such a situation by searching all code files (either in Visual Studio or some other compilter or in a decent text editor such as notepad++) for:
\\SecobMod__ChangeME!
Save all the files you've modified. Note that unless you added extra or(||) lines to the map mounting code then any maps that are released with secbomod will run in a failsafe mode and may not display correctly (or run at all!).
Make sure that you now compile the code in your chosen compiler, and then copy the server and client .dll's (or whichever files osX and Linux use) from your local github game>mod_hl2mp>bin folder to your sourcemods mod_hl2mp (or whatever name you gave it) folder.
Adding and Removing Game Features
Secob was designed so that you can easily disable and enable its features, so that you can customise it in whatever which way you want it.
As such all features are stored with a file in the Src>Game>Shared>Secobmod folder, called secobmod_shareddefs.h
On opening this file you will find every feature clearly defined, and information concerning what each feature does.
To enable a feature, remove the // from the beginning of the word define, to disable a feature add the // in front of its define.
As an aside if you'd like to try out nightvision in game, it is binded to the 'N' key and as it stands it is currently only enabled for the heavy class (but you have the power to change this if you'd like!).
The file has one last important role, and that is that by defining all changes, this makes searching for all references to a specific feature in the entire codebase very easy. This allows easier transition of code between engine releases or should you wish to use code from Secobmod you can easily find it to implement in other hl2mp games.

Important information about all the code can be found in the same folder, but in the file titled secbo_information.h- }}
Besides the important role of this file, it also has an information section containing valuable search words, which to get a better grasp of the secobmod code, and how features work.
Setting up the Hammer Map Editor
.....To Do......
Important Map Settings.
If you are using the player class system, then there are a few changes you will have to make to the map so that it doesn't crash on trying to spawn the player.
Make a hollow room/cube large enough to fit several players in outside of the main map area, and texture it in a purely black colour. Add in some standard player starts into it, and then put the real (per-class) player starts where you want them inside the playable space of the map.
This will now mean your game won't crash on your player trying to spawn, usually you can get away with just one standard player start and a room large enough for one person as people will spawn inside one another till they pick their class and spawn at their correct class location, but for safety it may be best to make it a large cube with several player starts as stated above.
Also, there is a custom actor you can allow mappers to use called setmodel, this if placed in a game will allow players to set the model for all players, you can see how this works by opening the defector example map. In this maps case it spawns all players as metrocops.
Important Settings Files.
These are all used in the compiled folder of your modification.
GameInfo.txt
GameInfo.txt is also where you define such things as your developers team name, website and the icon to display in Steam, as well as the game's title.
The most important section are the 'Search Paths'.
Search paths are the modifications way of mounting the VPKs which come with each Half-Life 2 game. In the current compiled version the search paths in our gameinfo.txt looks like this:
Notice how we do not have Portal in the search paths. This is because Portal should never be defined here (Unless you use Static Mounting, in which case it should be put BELOW hl2).
InstalledSourceGames.txt
... Currently not used....
resource/mod_hl2mp_english.txt
This is the modification's language definition file. Here you can find settings such as the titles for Chapters, the messages displayed on a vital ally being killed (for example) and other things such as server connection messages etc. It's found in the resource folder. You should name this file to that of your own modifications title, (modification_english.txt).
cfg/skill.cfg
The skill.cfg file is important as it allows you to define such things as NPC health, NPC damage (to others such as the player), number of rockets a Strider may withstand and even how much charge a Vortigaunt can give to the players suit. It is worth reading through the file and editing it to suit your needs as it does define a lot of features of modifications. It can be found in the cfg folder.
scripts/ChapterBackgrounds.txt
This file defines which of your modifications maps are background maps to display on the main menu. If you choose to use background maps with your modification, be sure to enable the secobmod__BG_MOTD_FIX
definition in the secobmod_shareddefs.h
so as not to display the motd on the main menu.
cfg/valve.rc
This file defines whether background maps are displayed on the main menu. It's found in the cfg folder.
resource/ClientScheme.res
This is the HUD colour file. Seperate versions can be used per player class as needed (the code is implemented). Currently all classes are set to use the same file.
maps/map_briefings
This is a folder inside the maps
folder. Each map that requires a briefing has a text file for that specific map. This loads in a similar fashion to the MOTD panel. It allows a quick map storyline for people loading the map. See our example maps in-game to see this concept in action.
Dedicated Server Guide
......To Do.......
Features
Developers can easily enable and disable individual features to suit their needs.
This is a cut down list, for full information as to the features please see the seco7_shareddefs.h file).
** Portal Gun, enable testing in the seco7 shared defs file to enable its useage. give weapon_portalgun and companioncube.
** Super Gravity Gun (some graphic effects missing - most of the code done by .Kave).
** Restart level on critical ally/object/time limit failing.
** View Cameras now take control of all players on a server (Gordon's KO Wakeup scene, etc).
** Save/Restore transitions now work even if you disable playerclasses from the code.
** Each player class player now has their own unique filter name, meaning only a certain playerclass
can trigger an event (for example). Thanks Alters for the fix!
** Called it a day on development. It's all in the hands of the community now.
* AI Patch Modifications:
** Enable/Disable an enhanced version of Winston's AI Multiplayer patch.
** Valve Game Mounting:
** Dynamically mount various official Valve games to get the most for your mod.
** or use Static Mounts when you're sure you don't need Dynamic mounting.
* Episode 2 Support:
** Including support for Alyx Darkness Mode
* Player Abilities:
** Non-HEV wearers can still be allowed to sprint, have the geiger counter, etc. This is on a
per-item basis, so players could have the geiger, but no sprint if you wanted.
** Players can pick up objects with their hands.
** NightVision (currently only enabled for the Heavy class, use the 'N' key to enable it).
* Player Class System With:
** Four (or more, or less) Player Classes.
** Per Player Class Object Pickup Strengths.
** Customise Class Health/Maximum Health Values.
** Customise Class Armour/Maximum Armour Values.
** Customise Class Walk/Sprint/Normal movement speeds.
** Customise Class Jump Heights.
** Each Class Can Have Its Own HUD Layout/Colour scheme.
** Define how many players can be in each Player Class.
* Teamplay Support:
** Fixes for enemy NPCs and teamplay games.
* Weapon Enhancements:
** Development teams can now enable Iron Sight.
** A known HL2DM shotgun fast-switch bug - fixed thanks to Community input!.
* NPC Abilities:
** Striders can be set to always impale players who get too close.
** Barnacles can now be set to swallow players.
* Vehicles:
** The multiplayer camera judder is no more!
** Thirdperson model in-vehicle animations can now be used.
** Old-Style passenger seats can now be used to provide extra seats in vehicles.
** Jeeps and Jalopys' can now have their headlights switched on.
* Cool Stuff:
** Firstperson ragdoll views on player deaths.
** Camera bob on player movement (incl. strafe).
** Use Counter-Strike: Sources' ladders code instead of the Half-Life 2 ladders.
* Game Settings:
** Friendly Fire (Replaces players can collide from v1.5).
** Dynamic Respawn Code. Don't spawn back at the start of the map anymore, respawn back
where you left off in your killing spree.
** Multiplayer Level Transitions. On ALL players entering the transition area the server
is forced to changelevel to the next map (percentage can be changed).
** Save/Restore. A basic working transition system which saves/restores your loadouts.
** Valve approved cheating. Now even if sv_cheats 1 is enabled, players can't cheat unless
you define it as acceptable in the code.
** Map briefings. Provide storylines on a per-map basis.
** Map specific model overrides. Changes all players to a specified player model on a
particular map (set by the mapper). Check out our defector map for an in-game example!
Credits
- ChiefWhosm/Whoozzem
- Spamslayer
- MontyPython
- Sneaky
- Everyone else who used to be in 4WH.
- - and -
- Winston
- Tony Sergi
- Biohazard_90
- Sub-Zero
- DutchMega
- The Last 7 Hours Spanish Mod
- Skidz
- Alters
- .Kave
- KuRouZu
- Jorg
- z33ky
- JordanN
- TheRJMan
- SilverPower
- Vektorx4
- HalfWit2
- Anyone else forgotten
</source>
Known Bugs
*Armour not working on non-playerclass save/restore transitions.
*Weapon strip/dissolve zones (as used to make the Super Gravity Gun in HL2/EP1) don't work.
The above is Caused by the game not recognizing the hl2mp gravity gun and just deleting it,
then the test zone (d3_citadel_03) sticks waiting on the script to finish.
*Super Gravity Gun - Some particle effects are missing, but the gun itself works as in singleplayer.
*Leaving tilted vehicles causes players to appear tilted as well. This affects only their player
model, their actual views are normal.
*Blood splashes being emitted when shooting other players despite no damage actually being dealt
(only applicable when "seco7_FRIENDLY_FIRE_ENABLED" is disabled).
*Chat bubbles angle towards the player's view, so they can appear embedded in walls etc. Currently they're disabled due to compiler problems.
*AI bend their legs when going up in lifts (elevators), but are fine going down.
Bug Fixes.
- Feel free to fork the github code and push back changes to the base code for all to enjoy, or post them here to be added to the code once spotted.