Difference between revisions of "Create a Mod:zh-cn"

From Valve Developer Community
Jump to: navigation, search
Line 33: Line 33:
{{Warning|Your ''Engine Version'' in the [[Source_SDK|Source SDK]] must match the Engine branch of your mod! Failing to do this will result in Source SDK tools being unable to load required resources.}}
{{warning|你的 ''引擎版本'' 必须与 [[Source_SDK|Source SDK]] 的版本相匹配! 否则.}}
== The SDK wizard ==
== The SDK wizard ==

Revision as of 06:02, 12 January 2013

English Español Français Magyar Русский

本章“创建一个mod”将会引导你创建一个source mod. 你将了解:

  • steamapps\SourceMods\目录下建立一个mod
  • 通过Visual Studio项目文件安装一个拷贝的source代码
  • 创建一个游戏运行你的mod通过 Source SDK

Note.png Note: 你需要重新启动steam以便使你的mod出现在你的 库 中.


在这之前,你需要了解到你该使用什么版本的SDK去创建你的mod.请在这里选择一个适合你的Source SDK版本.

Source 2006
过时的版本 - 最原始的 Half Life 2: Episode One mod.仅仅只能支持最初的版本.
Source 2007
原始的 Orange Box mod. 这是最新的版本可以在HL2上使用的mod. 这就是为什么它这么受欢迎的原因!
Source 2009
升级后的 Orange Box mod. 这个版本的mod可以在mac上运行. 但是, 你不能制作一个 Source 2009 mod; 你 只能 制作一个 2009 游戏所支持的项目 具体请看 Creating a Mod manually.
Alien Swarm (via Alien Swarm SDK)
这个奇怪的玩意. 是为Alien Swarm这款游戏所制作的,它提供了SDK和源代码库 但是它始终还是自上而下的射击游戏(top-down是指 斜45°?还是第三人称?对不起我没有玩过这个游戏 希望玩过的人来改正一下). 它仍然缺乏很多HL2的工具 (包括 阴影 的支持) 并且制作的mod不能再HL2上运行.

Warning.png Warning: 你的 引擎版本 必须与 Source SDK 的版本相匹配! 否则.

The SDK wizard

Project type

Half-Life 2 This section only applies to Half Life 2 Mods!

When you start the wizard you will have to choose which Visual Studio projects you want it to give you.

Create mod step1.png

Half-Life 2 Single Player
Projects for Episode One (2006) or Two (2007). If you do not own Ep1/2 this option will be greyed out.
Half-Life 2 Multiplayer
Projects for Half-Life 2: Deathmatch. This option is only available if you own Half-Life 2: Deathmatch; otherwise it will be greyed out.
Multiplayer mod from template
A specially-created SDK project that allows you to configure settings such as if your mod is team based, or if you have abilities such as sprinting and prone. This option does not require Half-Life 2: Deathmatch.
Source code only
Dumps the code without creating an actual mod. This handy if you are only creating a server plugin.

Whichever option you choose, you get the same actual source code files (even if you didn't own one or another game). You also get an "everything" solution which includes a collection of development tools.

Mod Information

Create mod step2.png

The first option on this page is where you want the source code extracted to. The second is the name you want to use, which also defines the output folder for your compiled content (does not appear if you chose source code only).

Creating a mod manually

It's surprisingly simple:

  1. Create a folder under steamapps\SourceMods\ (A mod can actually reside anywhere, but placing it here allows Steam to detect and launch it.)
  2. Create a gameinfo.txt in the folder. You now have a mod!
  3. Open the SDK launcher and switch to the relevant engine branch.
  4. Choose "Edit Game Configurations" and click "Add". Enter your mod's name and folder.

To get the source code (or indeed any other files of Valve's that you want to modify) you will need to use GCFScape and access sourcesdk.gcf\src_mod\. Remember to change the custom build steps to point to your mod's folder.