ここのページは以下のサイトを翻訳&実験して日本語訳のページを作成中です。
http://developer.valvesoftware.com/wiki/Compiling_under_VS2008
開発環境をインストール。
使っている開発環境を選んでインストールしてください。
- Visual Studio をインストールする [#k3235489]
- Visual C++ Express(無料)をインストールする (vcsetup.exeを選んでください。) [#sfeba600]
MODのベースを作成する。
source sdkを開きcreate a modを実行する。
[Modify Half-Life 2 Multiplayer]を選んで[Next >]をクリック
modフォルダは好きな名前を付ければよい
今回はc:\Mymodとする。 mod名はTestMODにした。
実行するとフォルダに必要なファイルが作られる。
ソリューションを開く
fileから開くを選び
先ほど作ったMODフォルダのsrcにある
Game_HL2MP-2005.sln
を開く。
設定を変更
ソリューションエクスプローラにあるClient HL2MPかServer HL2MPの上で右クリックしてプロパティをクリック。
図のように構成マネージャーをクリックして
DebagからReleaseに変更
ソリューションエクスプローラのServer HL2MPからSource Filesにあるbasegrenade_shared.hを開く。
//Tony; Compromise! in episodic single player, inherit CBaseCombatCharacter for the barnacle interaction, otherwise this will never get called. class CBaseGrenade : #if defined( HL2_EPISODIC ) public CBaseCombatCharacter #else public CBaseAnimating #endif #if defined( GAME_DLL ) , public CDefaultPlayerPickupVPhysics #endif { //Tony; the ugliest class definition ever, but it saves characters, or something. Should I be shot for this? DECLARE_CLASS( CBaseGrenade, CBaseAnimating );
を下のように変更する。
//Tony; Compromise! in episodic single player, inherit CBaseCombatCharacter for the barnacle interaction, otherwise this will never get called. class CBaseGrenade : #if defined( HL2_EPISODIC ) || defined ( HL2MP ) public CBaseCombatCharacter #else public CBaseAnimating #endif #if defined( GAME_DLL ) , public CDefaultPlayerPickupVPhysics #endif { //Tony; the ugliest class definition ever, but it saves characters, or something. Should I be shot for this? #if defined( HL2_EPISODIC ) || defined ( HL2MP ) DECLARE_CLASS( CBaseGrenade, CBaseCombatCharacter); #else DECLARE_CLASS( CBaseGrenade, CBaseAnimating ); #endif
これでClient HL2MPとServer HL2MPをビルドする。2回目以降はリビルド