Shadowsource

From Valve Developer Community

Jump to: navigation, search

Contents

For those wishing to download the patch file, you can do so from one of the following mirror(s):

If you wish to test a pre-compiled version, then you can download it from these mirror(s):

You will need 7zip or an archive program capable of extracting .7z files.

Note:This software is released "As-Is".

Frequently Asked Questions

What is Shadow Source Base?
Shadow Source Base is a freely distributed patch file to allow mod development teams wishing to create co-operative multiplayer mods in the Half-Life 2 universe to do so without the trouble of having to do alot of work just to get multiplayer AI and other features working.
Is there a compiled version I can use?
The patch file also comes along with a fully compiled version of the modification. This is so developers can see the current state the modification is in, before they start editing it into however they wish.
So I can use this to make my own modification?
Absolutely, however it would be nice to mention the base mod in the credits.
Which games do I need to have installed to use this modification?
Half-Life 2, Episode One, Episode Two, Half-Life 2: Deathmatch and finally the Source SDK Base - Orange Box. You should also have run all these games (to their menu screen) at least once before running the compiled version of the Shadow Source Base mod.
Naturally since you're making your own mod from the base, you can remove the need for these games.
If you wish to remove these from the current compiled version for testing, then you will need to edit AddMount.txt in the scripts folder, and the gameinfo.txt.
How will I know what has already been edited from the original SDK?
Though the original AI patch removed large sections of code, since then all edits have been commented, so you can see where things differ. The following key was used in the code files:
// AI Patch Addition
Code altered by the AI patch.
// Modification
Code that we edited.
Can we play the original single player maps with this?
The goal of the modification was to allow mod teams to use single player resources online (such as AI). As a way of testing these, it was decided at the beginning of development that the best way to make sure the game would perform online as expected was to see how well the single player maps would run. Note, that we were never out to make singleplayer maps play flawlessly without any issues whatsoever. As such many maps crash, if you wish to play the singleplayer maps, I would reccomend Obsidian-Conflict or Synergy.
The current code base mounts additional content using an addmount.txt file in the compiled folders 'Scripts' directory. These allow for the mod to load the original HL2, Episode 1 and Episode 2 maps. Note however that some of these will crash the game at some point or other.
Why is it called Shadow Source 2008 when it was created using the 15th June 2009 SDK?
In development the 2008 stood for a working Visual Studio 2008 project with working debug mode.
Can I release patches for the patch including new add-ons etc?
Yes, it means you're giving back so that others can be helped along. The whole main point is that people with a good game in mind aren't given the set back of having to get the code to the point where such things as AI work.
When I play the compiled version with friends, none of the humanoid AI do anything. Combines will hit me back, but won't shoot me.
You've changed the MaxPlayer limit for the server. The AI seem to be controlled by that, if the number is 32, all AI work, but say you wanted only 2 players in the game, the two humans are fine, the AI however suffer.
Is there any workaround for the last Episode1 map to be playable without crashing in the compiled version?
In the ..\Steam\steamapps\SourceMods\ss_2008\maps\graphs folder delete "ep1_c17_06.ain", note that without fiddling the gameinfo.txt it will still crash as you cross over a train to another platform. This has to be done EACH time you want to play that map.
Remember though that Shadow Source Base was never designed to play the official maps, it was just a good means of testing the code to try out the maps and find out if NPCs etc had problems. As such for those wishing to play the Half-Life 2, Episode 1 and Episode 2 maps, I would reccomend such modifications as Synergy or Obsidian-Conflict.


Credits

Old AI Patch Credits.

I (Winston) claim no intellection credit for the construction of this patch file: I'm simply the one who actually took the time to follow the relevant wiki article. As such, the community are thoroughly encouraged to expand upon and improve it. Happy coding!
I have to thank Cornholio, who got me to update this, and to make it Scratch SDK compatible.

Shadow Source Base Mod Non-Team Member Credits: Mostly for advice on the Source SDK Coding Forums:

  • Winston - Alot of help and advice.
  • Sub-Zero - The HL2MP gravity gun fix.
  • iSn2n - Editing teams code for Co-Op Modifications.
  • z33ky - Viable Mod release methods and debug help.
  • JordanN - VS Project Vehicle advice.
  • DutchMega - Advice on Co-Op Modifications.
  • Skidz - Advice on Co-Op Modifications.

Anyone else who helped and hasn't been mention. And also those who take the time and trouble to put up wiki articles on the Official Source SDK wiki and forum threads in the official forums.

Shadow Source Base Mod Team Member Credits:

  • The Shadow Source Team.

User Guide

Setting up the folder structure

After downloading the source code for the June 15th 2009 HL2MP from the Source SDK through steam, there are some files which need to be moved in order for the base modification to compile successfully.

Therefore once the files are extracted by the game, you will need to move (cut and paste) the following files:

  • Move 'ai_behavior_passenger_companion.h' to .\src\game\server\hl2
  • Move 'vehicle_jeep_episodic.h' to .\src\game\server
  • Move 'npc_advisor_shared.h' to .\src\game\shared

Patching the code

Before you compile, you'll want to actually patch the source code. To do this you'll require Tortoise SVN. Instructions on how to apply the patch file using Tortoise SVN can be found here:

Setting up Tortoise SVN to apply a Patch

You should note that Anti-Malware and some Anti-Virus products conflict with Tortoise SVN when you run SVN Commit. You will have to _temporarily_ disable such things _IF_ you have problems where SVN Commit doesn't succeed.

Modifying the Visual Studio Project File

Once that is done, it is time to edit the Visual Studio file to include all the required files for compiling.

Here is a list of files _NOT_ included in the Shadow Source Base, anything not listed here needs to be added to the Project file.

Note: This is only a list of items required to get the Shadow Source base to compile correctly. Naturally, once you started modifying the base modification, it is up to you whether you add any of these files to your project.

Client

Each underlined title represents the folder name within the source code ..\Src\Game\Client folder.

Episodic
c_weapon_hopwire.cpp
hl2
c_energy_wave.cpp
c_extinguisher.cpp
c_npc_hydra.cpp
c_weapon_gravitygun.cpp
c_weapon_physcannon.cpp
c_weapon_stunstick.cpp
clientmode_hlnormal.cpp
clientmode_hlnormal.h
hud_bonusprogress.cpp
hud_locator.cpp
sdk
EVERYTHING DISABLED.
Client Folder Root (../Game/Client)
baseprescence_xbox.cpp
bonetoworldarray.h
c_env_projected_texture.h
c_forcefeedback.cpp
c_team_objectiveresource.cpp
c_team_objectiveresource.h
c_team_train_watcher.cpp
c_team_train_watcher.h
clientmode_normal.cpp
clientmode_normal.h
death.cpp
hud_base_account.cpp
hud_base_account.h
hud_basedeathnotice.cpp
hud_basedeathnotice.h
hud_chat.cpp
hud_controlpointicons.cpp
hud_controlpointicons.h
hud_controlpointpanel.cpp
hud_posture.cpp
hud_vguiscreencursor.cpp
in_forcefeedback.cpp
monitormaterialproxy.cpp
particle_prototype.cpp
particles_new.h
thermalmaterialproxy.cpp
vgui_entityimagepanel.cpp
vgui_entitypanel.cpp
vgui_game_viewport.h
vgui_imagehealthpanel.cpp
vgui_textmessagepanel.cpp
voice_menu.cpp

Server

Each underlined title represents the folder name within the source code ..\Src\Game\Server folder.

Episodic
grenade_hopwire.cpp
grenade_hopwire.h
weapon_hopewire.cpp
weapon_oldmanharpoon.cpp
hl2
assassin_smoke.cpp
assassin_smoke.h
env_speaker.h
extinguisherjet.cpp
extinguisherjet.h
grenade_brickbat.cpp
grenade_brickbat.h
grenade_energy.cpp
grenade_energy.h
grenade_molotov.cpp
grenade_molotov.h
grenade_satchel.cpp
grenade_satchel.h
grenade_tripmine.cpp
grenade_tripmine.h
grenade_tripwire.cpp
grenade_tripwire.h
hl2_client.cpp
hl2_gamestats.cpp
hl2_gamestats.h
item_antidote.cpp
item_longjump.cpp
item_security.cpp
npc_alyx.cpp
npc_alyx.h
npc_assassin.cpp
npc_assassin.h
npc_bullsquid.cpp
npc_bullsquid.h
npc_houndeye.cpp
npc_houndeye.h
npc_hydra.cpp
npc_hydra.h
npc_spotlight.cpp
npc_turret.cpp
npc_turret_floor.h
npc_turret_ground.h
trigger_super_armor.cpp
vehicle_jetski.cpp
weapon_357.cpp
weapon_ar1.cpp
weapon_ar2.cpp
weapon_ar2.h
weapon_brickbat.cpp
weapon_brickbat.h
weapon_crossbow.cpp
weapon_crowbar.cpp
weapon_extinguisher.cpp
weapon_frag.cpp
weapon_gauss.h
weapon_immolator.cpp
weapon_irifle.cpp
weapon_manhack.cpp
weapon_molotov.cpp
weapon_molotov.h
weapon_physcannon.cpp
weapon_physcannon.h
weapon_pistol.cpp
weapon_rpg.cpp
weapon_rpg.h
weapon_shotgun.cpp
weapon_slam.cpp
weapon_slam.h
weapon_smg1.cpp
weapon_smg2.cpp
weapon_sniperrigle.cpp
weapon_stunstick.cpp
weapon_stunstick.h
weapon_thumper.cpp
weapon_tripwire.cpp
weapon_tripwire.h:
sdk
EVERYTHING DISABLED.
Server Folder Root (../Game/Server)
actanimating.cpp
actanimating.h
base_gameinterface.cpp
base_projectile.cpp
baseprojectile.h
data_collector.cpp
data_collector.h
ep1_gamestats.h
ep2_gamestats.h
forcefeedback.cpp
hl1_CBaseHelicopter.h
iscorer.h
physconstraint_sounds.h
physgun.cpp
pushentity.h
serverbenchmark_base.h
team_control_point.cpp
team_control_point.h
team_control_point_master.cpp
team_control_point_master.h
team_control_point_round.cpp
team_control_point_round.h
team_objectiveresource.cpp
team_objectiveresource.h
team_train_watcher.cpp
team_train_watcher.h
trigger_area_capture.cpp
trigger_area_capture.h
trigger_portal.cpp
worker_scientist.h

Change/Bug/Required Fixes Log

Though the patch files //Modification lines can be easily read through to see changes that are made, here is a run-down of most changes that have been made to the source code.

Version: Pre-September 2009.

Bug Log:

  • Barnacles were modified to swallow players, but it only works with god mode on.
  • NPCs can crash hl2.exe in baseentity.h at line 1970. This appears to be connected to the NPC trying the commands GetAbsOrigin and GetAbsVector. In troubleshooting all I could successfully determine was that a main cause was putting an AI through a teleporter. The crash therefore makes some official maps not load (as though AI are being made to do something as the map is just ready to display to you) or mid-map. I don't think it's something that will affect mod teams, but it's still a bug that needs sorting.

Required Fixes:

  • These are no longer listed as the current in-house version is making leaps and bounds in fixing the ones previously listed.


Change Log:

  • Removed all IfDefs and episodic boolean checks related to Episode 2. This makes the code always use the Episode2 options available to it.
  • Edited c_prop_sclable.cpp's scae options to avoid conflicts with c_prop_corebal.cpp
  • Changed players to be killed in First Person Ragdoll mode, with a red screen fade.
  • Removed Alyx's Darkness Mode ability due to crashes in the code (alyx would no longer work).
  • Enabled various console commands that had been disabled in HL2MP (god mode, notarget etc).
  • Enabled Jalopy spawning.
  • Modified the HEV suit so that even if a player already has a suit they can pick another one up. This was enabled for anyone wanting to play the original missions and can easily be removed again.
  • Modified the Strider to always stomp human players.
  • Added Sub-Zeros HL2MP gravity gun fix (does have issues when carrying turrets though).
  • Edited monstermaker.cpp's GetLocalPlayer to GetNearestPlayer to fix hl2.exe crashes when the game spawns AI from monstermakers.
  • Also removed an AI patch addition line which seemed to cause the crash in monstermaker.cpp
  • Removed player models invisibility when entering a vehicle so other players can still see you. Due to the lack of a sitting_down_in_vehicle animation, it looks a little silly.
  • Removed the hopwire from impulse 101 command since it isn't in the Shadow Source project.
  • Removed the TakeDamage=Old_Damage line from triggers.cpp due to it crashing some official maps.
  • Enabled bDoServerEffects to try and fix the lack of tracers from some weapons. Noticed that weapon files I was sent actually fixed the problem, but not added to -THIS- release.
  • Added very slight camera bob to players walking/running. Hardly noticable so as not to give players motion sickness.
  • Edited the HL2MP teams so that human players are all one on team. Note that AI are controlled by the AI relationships as to whether they're your allies, neutrals or enemies.
  • Fixed various animation codes to fix glitches reccomended on the source sdk coding forums.
  • Attempted (but no guarantees) to have footsteps etc enabled all the time. This didn't work for the flashlight (sadly).
Personal tools