Mostrando entradas con la etiqueta Tutoriales (ING). Mostrar todas las entradas
Mostrando entradas con la etiqueta Tutoriales (ING). Mostrar todas las entradas

Spawning Zombies With Info_zombie_spawn

This tutorial will show you how to spawn zombies WITHOUT using sv_cheats 1 at any place of your choice.

1. create an info_zombie_spawn entity where you want your zombie to spawn. Give it a name of your choice. I used z_spawn.

2. create a trigger brush where you want the player to trigger the zombie to spawn and press ctrl-t then make it a trigger_once.

3. go to the outputs tab of your trigger_once and click add. Then type in:
My output named -- OnStartTouch
Target entities named -- z_spawn (the name of your info_zombie_spawn)
Via this input -- SpawnZombie

4. now run your map and when your player walks into the trigger the zombie should spawn.

This next part will tell you how to spawn special infected.
Basically follow the above steps but for your info_zombie_spawn change population to the name of the zombie type you want to spawn. E.G. Hunter, Smoker, Boomer, etc.
However to do this you need to add this bit into your population folder located in Program Files/Steam/SteamApps/common/left 4 dead/left4dead/scripts

Open up the population file with notepad and paste this into the bottom. [Screenshot 4]

//------------------------------------------------
//Specific Special Infected
Smoker
{
Smoker 100
}

Hunter
{
Hunter 100
}

Boomer
{
Boomer 100
}

Tank
{
Tank 100
}

Witch
{
Witch 100
}


Once that is in you can spawn special infected through the same means as before.



To create a random zombie timer which will spawn zombies at random times.
First create you info_zombie_spawn with your desired population.
Second create a logic_time entity in your map somewhere and set its Use Random Time flag to Yes. Then set your desired max and min intervals.
Next go to its outputs tab. Click add and enter in.

My output named -- OnTimer
Target entities named -- z_spawn2 (the name of your info_zombie_spawn)
Via this input -- SpawnZombie

Now when you run your map a zombie should spawn at random intervals at your info_zombie_spawn.

Tutorial - Car Alarms

This is a brief tutorial on how to create car alarms which attract hoards!





Tutorial - Fog

This is a basic tutorial on how to create fog to your levels.








Tutorial - Soundscapes

This is a brief tutorial on how to create soundscapes

List of Sound Scapes : Lista de soundscapes





Making a material

This tutorial covers making a texture by dragging and dropping a TGA image onto VTEX. This method is extremely tedious, and as such, many have taken the liberty of creating GUI alternatives to the command prompt VTEX, such as VTEXGUI, vmtCREATE, and even a Photoshop plugin.

Who or what is a vtex and what does he/she/it have to do with textures?

VTEX is the only program Valve gave us for making textures for HL2 (or the mods thereof). VTEX will convert a standard TGA image to a VTF (Valve Texture Format) file, which can then be used in HL2 or its mods.

Paint can't save files as TGAs. If you have an image that you'd like to use as a texture, you'll need an image editor such as Photoshop or Paint Shop Pro, or an image converter such as Advanced Batch Converter.

Also, the image you use must have powers of two for dimensions. That means its width and height can be 2, 4, 8, 16, 32, etc., but not 80, 48, 160, etc.

So, if you have your powers-of-two TGA, we'll begin!

How do I convert my TGA to a VTF?

Ensure that Steam is open before continuing.

First, you'll need to set the SDK tools to the appropriate game... Navigate to your Steam folder, then SteamApps/account/sourcesdk/bin. For instance, I would be in C:\Steam\SteamApps\Raeven0\sourcesdk\bin. Run the program vconfig.exe; just choose the game you're working on in the drop-down menu and click Okay. [NOTICE: vconfig is somehow screwed up right now (surprise?), and the problem isn't going away. See this thread.]

After that, open a new Explorer window (you'll need two) and navigate to the game's directory. For HL2 it'd be steam/steamapps/account/half-life 2/hl2; for CS:S it'd be steam/steamapps/account/counter-strike source/cstrike; for HL2DM it's steam/steamapps/account/half-life 2 deathmatch/hl2mp.

Once there, create a materialsrc folder if it does not already exist. Also, create a materials folder if it does not already exist.

Still with me? We're almost done!

Take your TGA and place it in the materialsrc folder. Now, make a TXT file with the same name as the TGA--for instance, if your TGA is named yellow.tga, then you'll make an empty file named yellow.txt. The TXT file is used in special cases to modify the texture in special ways.

Open the materialsrc folder if it's not already open, and click and drag the TGA from that folder onto the VTEX program in the OTHER Explorer window. (You wondered why we left it open? It's so that you can drag the TGA onto VTEX. It's the fastest way to get VTEX to convert the TGA.) If all went well, a VTEX prompt should appear with the directory of the TGA, the directory in which the VTF will be placed, and a "Hit any key to continue" confirmation. If you hit any key, the VTEX program will place a VTF in the materials

But...

Now you have to make another file so that you can actually use the texture.

(First, you'll notice that all of Valve's textures are separated into folders. Water and grass and dirt are in nature/, decals are in decals/... You can make another folder for your texture, if you like. Just make a new folder in materials and put the VTF in it. You cannot use a VTF if it's not in a folder.)

Make a new empty text file in some subdirectory of materials (in the same folder as the VTF is always good, for organization). Change its extension from TXT to VMT. This file will be the one actually referenced by Hammer and the game, so you can technically name it whatever you want. Keeping with my examples, I'll call mine yellow--that is, yellow.vmt.

Wait. What is a VMT?

Well, think of it this way. The way HL2's texture system works is that you have a lot of pictures (the VTFs), and you can do anything you want to those pictures by making a VMT (information file) for them. With a single VTF image, you can have a VMT to make the texture scroll in-game, and another VMT to make the texture reflect like water... Essentially, VTFs are pictures, and VMTs combine the pictures with special properties to give you a material.

At this point, you have your picture (yellow.vtf) and you need to make a VMT for it. The VMT will take the picture and tell the game what to do with it.

Open the VMT with Notepad or some other plaintext editor and write the following into it:

folder you made. That's your texture!
"LightmappedGeneric"
{
"$BaseTexture" "path to VTF"
}

For the path to VTF, you have to write the path a special way. If the path to the VTF were materials\somefolder\yellow.vtf, you'd write somefolder/yellow; if the path were materials\somefolder\blue.vtf, you would write somefolder/blue. Note that quotation marks are present around every string; for my yellow.vtf, that line would read "$BaseTexture" "somefolder/yellow".

If your VTF and VMT were both made properly, you should now have a texture that'll show up in Hammer, ready to be used... congratulations!

This new texture--both the VTF and the VMT--will have to be distributed with your map, though. Valve recently released a BSPZIP tool, which can be used to embed your texture into your BSP file such that the files themselves don't need to be sent, because they're already inside the BSP.

Make a Sprite For Left 4 Dead

Making a sprite involves making a material. The ideal tool to use to compile a sprite is VTEX, or Nem's VTF Plug-In for Photoshop.

A sprite is always a flat, nonsolid image floating somewhere in the world. Most grass as seen in Source games consists of sprites. The glows around light sources are also sprites. Most explosions and fires are sprites.

Sprites are very easy to create and implement, as they are only images (VTFs) modified to appear in a certain position, with a certain orientation.


If you're using Nem's Photoshop plugin, just save a VTF with No level of detail, Clamp S, and Clamp T. If you use VTEX, however, see Paragraph 13 of Tutorial: Making a Custom Texture:

Take your TGA and place it in the materialsrc folder. Now, make a TXT file with the same name as the TGA--for instance, if your TGA is named yellow.tga, then you'll make an empty file named yellow.txt. The TXT file is used in special cases to modify the texture in special ways.


This TXT file will now become important for VTEX. Write the following contents to this file:

"nolod" "1"
"clamps" "1"
"clampt" "1"


You may now compile the texture normally (drag and drop either the TGA or the TXT onto vtex.exe).

Explanation: No level of detail ensures that the sprite looks the same for all users--it is not garbled and fuzzy for users with old video cards. Clamp S and Clamp T

ensure that the image does not "leak" over the sprite's edges--without them, the top pixels of the sprite would appear to have come from the bottom, and so on for each side.
The Sprite's VMT

Now we have a VTF, somewhere in the ./materials/

Sprites need a special VMT. Somewhere in ./materials/, we'll have a raesprite.vmt, whose contents are formatted like this:

folder of our mod, but recall that the Source engine cannot use raw VTFs. Instead, an information file called a VMT is invoked.
"Sprite"
{
"$spriteorientation" "vp_parallel"
"$spriteorigin" "[ 0.50 0.50 ]"
"$basetexture" "rae/raesprite"
}


This looks very much like a normal VMT. The first difference is the shader (found on line 1): we use "Sprite" for sprites, instead of "LightmappedGeneric"

The second difference is the inclusion of $spriteorigin. The value of this property is always [ S T ], where S and T are real numbers between 0.00 and 1.00 which denote where the center of the sprite is. A value of [ 0.2 0.8 ] would place the sprite's center 20% from the left side and 80% from the top. When a sprite is created at a point, it is translated so that its center appears at the point where it was created.

A major difference is the presence of $spriteorientation. This key controls how the sprite will orient itself to viewers.

- The value vp_parallel always orients the sprite to face its viewer, rotated counterclockwise by the entity's Roll (the third value of the Angles (Pitch/Yaw/Roll) property). Explosions are typically oriented this way.

- The value vp_facing_upright always orients the sprite to face its viewer, but the sprite never rotates or tilts. Grass is typically oriented this way--it rotates around the Z axis only, so standing on top of it does not flatten it against the ground as would occur with vp_parallel.

- The value oriented requires that the sprite be given a direction to face. It will always face this way. This can be useful for cheating the engine, by forcing a sprite to be displayed where a more expensive object would normally be used.

- The value facing_upright orients the sprite toward the origin, (0, 0, 0), but will not allow the sprite to rotate or tilt, like vp_facing_upright. This orientation will revert to vp_parallel if the sprite is too close to (0, 0, n) for all n.

$basetexture, as usual, is the path to the VTF, relative to ./materials/.

Having this VMT, you can use the sprite however you want.
or some other.

Env_sprite

A popular use for sprites is the env_sprite entity. This versatile entity can be placed around light sources as a halo, requiring transparency and translucency. Sprites are also used for flames, explosions, and other simple effects; this involves multiple frames. Generally, sprites should use the Additive rendermode.

How to import custom models in Hammer L4D

If you want to make custom models, I suggest using Softimage XSI Mod Tool.

http://usa.autodesk.com/adsk/servlet/pc/item?id=13571257&siteID=123112

You might be able to find a version of this localised to your language if you start from the main page and change it to your location. http://www.autodesk.com/
If you want to learn how to create custom models using that tool for Source games such as Left 4 Dead, I highly suggest looking into the Noesis DVDs. http://www.noesisinteractive.com/
I used 3 specific DVD's from Noesis to learn how to do everything needed to create a custom fully animated model in Source.
Noesis 3D Content Creation (XSI) - Use this to learn the basics of the XSI interface, the workflow, and all the various techniques and terms.
Noesis - Custom Props & Animation (XSI) - Use this to learn how to model props, and apply simple animations, and how to import them into the game. (Also includes some level scripting tutorials)
Noesis HL2 Character Design (XSI) - This will fill in all the gaps that the other 2 DVDs do not elaborate on, especially rigging, and weightmaps.
Unfortunately everything you need to know to make a new boss infected fully modeled, textured, rigged, animated, and scripted, requires information from all 3 of those DVD's. There isn't just one that will explain it all, so you are going to need to spend about $150 for those 3 DVD's I recommended.

I also suggest you join the L4D Mappers Mailing List. It is filled with really smart mappers who are very helpful.

Thanks To Adam Sierra, All producer of Silent Fear campaign with Dolagius Monster.

L4D Campaign Add-on Tutorial

There are five basic steps to creating your own custom campaign Add-ons for Left 4 Dead:

  1. Make an Add-on folder and content sub-folders.
  2. Create game assets and place them in the proper sub-folder.
  3. Create metadata files and place them in the proper sub-folder.
  4. Pack the contents of the Add-on folder into a .VPK file.
  5. Create a homepage for the add-on where it can be downloaded by players.

Install the Authoring Tools

In order to author content for Left 4 Dead, you will need to install the Left 4 Dead Authoring Tools. This provides you with the applications and utilities you will need to create game content. Mainly, you will be using the Hammer application to create levels, and the other utilities to create custom textures and models.

A description of how to create these assets is beyond the scope of this tutorial, but you can find useful information in the L4D Level Design Basics Tutorial. Because the focus of this article is how to assemble the assets into a campaign Add-on, we will assume that you have already learned how to successfully create these assets from this point forward.

The Authoring Tools provides an example Add-on campaign called Dead Line that has source examples.

Create an Add-on folder

To begin, navigate to the "addons" folder of your Left 4 Dead game install location. For most users, this will be similar to:

C:\Program Files\Steam\steamapps\common\left 4 dead\left4dead\addons

Make a new folder inside the addons directory, and give it an appropriate name. This new folder will be the name of the .VPK file you'll ultimately create and distribute, so it's good practice to avoid spaces and use all lowercase letters. You may also include the game in the title, to differentiate it from add-ons for other titles. We'll use "deadline" instead of "l4d_deadline" for our example for the sake of readability.

...\left4dead\addons\deadline

Conceptually, this add-on folder will serve as the base “game” folder for your assets, and will mirror the layout in the shipped .VPK files as we shall see below.

Create primary game assets

The assets you create will essentially append those shipped with the game. For a campaign, the primary assets are the .BSP and .NAV files for your map levels.

Make a folder called 'maps' inside your add-on project folder:

...\left4dead\addons\deadline\maps

Into this maps folder, copy the .BSP and .NAV files you're using for your maps. For this Dead Line tutorial example, there are three map file bsp.nav pairs:

File Description
l4d_deadline01 Minimal starting map for co-op
l4d_deadline02 Final map for co-op, survival
l4d_deadline02_vs A variation of the above map that includes modifications designed for with versus mode

The advantage of having a single map function for multiple game modes is size reduction, which can be worth the additional authoring complexity.

You may also optionally create custom .VTF texture images, custom .VMT material description files, and custom .MDL models which your maps can utilize. In order to keep the size of your add-on small, it's advisable to use as many textures and models from the game as possible.

Additional .VMT and .VTF materials should go under this folder:

...\left4dead\addons\deadline\materials

.MDL and related model files should go under here:

...\left4dead\addons\deadline\models

And materials for your models should go under here:

...\left4dead\addons\deadline\materials\models

It should be noted that L4D treats the /deadline folder much the same way as the /left4dead folder, so any folders you use inside the /materials and /models that you employ must also be present in your campaign's folder.

Create secondary game assets

Secondary assets such as poster and thumbnail images are not strictly required, but they can give your campaigns an extra level of polish. (Besides, the poster/concept art was likely the first thing you created, wasn't it?) If you haven't already, go ahead and make a materials folder and a vgui folder inside of it:

...\left4dead\addons\deadline\materials\vgui

Campaign Poster

Inside the vgui folder you'll want to place at least two .VTF files, along with .VMTs that reference them:

LoadingScreen_DeadLine.vtf
This is a poster image that is displayed while your campaign loads. Standard size is 1024 x 1024 pixels with an alpha channel for transparency.
OutroTitle_DeadLine.vtf
This is a title image that appears behind the end credits/stats. Standard size is 1024 x 256 pixels. Your design should look good against a black background and also allow white text in the foreground to be readable.

Map Thumbnail Previews

In addition to these two, you'll also want to make thumbnail images for each map in your campaign. These serve to provide a visual reinforcement indication for users while they're selecting map "chapters" in the UI.

To do so, create a new folder named 'maps' under the vgui folder:

...\left4dead\addons\deadline\materials\vgui\maps

In this folder, you'll want to create a .VTF/.VMT pair for each map you wish to create. They should each be 256 by 128 pixels. If appropriate, you may use a single thumbnail image to represent multiple .BSP maps, such as when you have a versus or survival variant of the same level.

.VMT files which are used for interface elements such as posters, thumbnails, etc., (I.e. Those typically found in the materials/vgui folder,) often need to specify an UnlitGeneric material. See Deadline vgui .VMT File for an example.

Create metadata files

There are a few more files that you will make in order to allow your add-on content to function in game.

addoninfo.txt

The first is the addoninfo.txt file. This should go inside your add-on root folder, which was the first one we created way back at the top:

...\left4dead\addons\deadline

This file is used by the game in the Extras->Add-ons screen. It describes your add-on in general and what it provides. The example Deadline AddonInfo File includes full comments and instructions for using it as a template for your own add-on.

addonimage.jpg

Another file you can create in the root folder is an image named addonimage.jpg. This serves as an icon to help differentiate your add-on and is displayed when an add-on is selected in the UI along with add-on details listed in the addoninfo.txt. Some JPG files may not work, depending on which application they are saved from. If you're having trouble getting you JPG to work, try exporting it from VTFEdit.

Mission File

The second required file is the mission file. This describes the structure and content of your campaign and is used by the campaign selection UI, matchmaking, and the game server. This can be a .TXT file of any name in the 'missions' folder, which you will need to make:

...\left4dead\addons\deadline\missions

The example Deadline Mission File includes full comments and instructions for using it as a template for your own mission.

Test it out

At this point, your add-on should be fully functional. You should be able to launch the game, go to Extras->Add-ons, and enable your add-on. If you type path into the console, you should see the root directory of your add-on near the bottom. This means that the game will search your add-on folder for files that it cannot find in the standard game .VPK files. You can continue tweaking your content in folder form until you're ready for that magical moment: Release into the wild.

Packaging and shipping

The final remaining step is to package your add-on into a .VPK for distribution.

The .VPK serves as a convenient, one file method for others to install your add-on folder. They need simply put the .VPK in their own add-on folder. Or, assuming they, like most non-authoring players, haven't associated the .VPK extension with something else, they can double click on it and it will install itself in the correct place.

Every .VPK file contains a unique ID that allows the game to ensure everyone is running the same content. If you've put in meta-data properly, the game will also prompt users to download a newer version if it is required to play.

Navigate to this folder:

C:\Program Files\Steam\steamapps\common\left 4 dead\bin\

Locate the vpk.exe packaging utility and make a shortcut to it on your desktop. Drag your add-on root folder and drop it onto the shortcut. The utility should make a new .VPK next to your original folder. By default it will not include source files such as .VMF, .TGA, .SMD, .QC etc., and it will always strip out executable binaries. Remove the folder version of the add-on (or move it to a safe location) so that the .VPK is alone and test it out. The .VPK should function exactly as the add-on folder does. If it works, you're ready to upload it to a location you specified in the metadata files and from which it is available.

Ideally, you'll want an add-on "homepage" that includes ratings, screenshots, and player comments. A simple example can be found here.

Compression

Since full Left 4 Dead campaigns can be very large it is advisable to compress them before uploading to file sharing sites for distribution. The open source Windows utility 7-zip supports compressing files in the 7z format/LZMA algorithm, which provide a very high compression ratio. The bulk of a campaigns size comes from the .bsp map files, which are highly compressible, so a vpk can be reduced to 25% or less of its original size. For example an unofficial version of Death Aboard was packaged up by a fan; the vpk was 267MB uncompressed, 92MB zipped, and 55MB with 7z.

Final testing

At this point, you should test out the download prompt. Start a lobby with a local server, and invite a friend to join. When they accept, they should be prompted to download the necessary add-on, after which a browser window will opened to your add-on homepage. They should be able to download and install the add-on without having to restart the game, and then join your lobby.

Clip Brushes

Looking around the tutorial_standards.vmf level in Hammer, you may have noticed that some of the brushes placed do not actually render in the game version of the level.

Similar to the trigger_changelevel brush that you created in the checkpoint tutorial, all trigger brush entities are invisible in the game.

There are also clip brushes that can block survivors and infected.

Using a clip brush.

You can use these to cover geometry that players can get stuck on. The railings for the stairs in tutorial_standards.vmf are a good example of this.

To make a clip brush, simply create a brush and attach the tools/toolsclip texture to it.

The tools/toolsclip texture.

Brushes with this texture applied to them will block all players, npc's, and physics objects. They will not block bullets.

You can also just block players by using the tools/toolsplayerclip texture.

The tools/toolsplayerclip texture.

This is handy for above walls and fences that you want infected to climb over but you don't want players to accidentally get knocked over.

Using a player clip brush.

The exterior area shown here from tutorial_standards.vmf is a good example of this.

Nav Blockers

Sometimes, you may want to block the nav mesh without adding a clip brush. You might even want to block the nav for just survivor bots or just infected. You can use a brush entity called a func_nav_blocker to block the nav.

In the tutorial_standards map, a func_nav_blocker brush entity has been used to keep the survivor bots from trying to use the ladder nav before the ladder has been raised.

An example of a func_nav_blocker in the tutorial_standards map.

To create a func_nav_blocker:

  1. Use the Block Tool to create a brush along the area of the floor that you want to block the nav.
    Note:
    If you choose to rotate a brush at an angle between 0 and 90 degrees, the nav will be blocked along the bounding box of the func_nav_blocker.
  2. Apply the "tools/toolstrigger" texture to the brush.
  3. Use Tools > Tie to Entity to turn the brush into a brush entity and open the brush properties.
  4. Change the Class to "func_nav_blocker".
  5. Change the Name to something unique. In this case, I've used "ladder_nav_blocker".
  6. Change the Team(s) to block to "Survivor". If you want to block infected only, then change it to "Infected".
The func_nav_blocker properties.

You can also unblock the nav that a func_nav_blocker is blocking by sending an input to it.

The outputs tab to tell the func_nav_blocker to unblock.

Add an output with the following:

  • My output named: "OnFullyClosed" (This is set up for the ladder that gets raised.)
  • Target entities named: "ladder_nav_blocker"
  • Via this input: "UnblockNav"

World Scale and Dimensions

Player's scale are important to keep your levels in proper dimensions.

Here are the key dimensions:

Player Scale

Architecture Scale

Width/Depth: 32 units

1 foot = 16 units

Height: 72 units

Door Width: 48 units

Height Crouching: 36 units

Door Height: 108 units

Eye Level Crouching: 32

Hallway Height: 128 units

Eye Level Standing: 64

Hallway Width: 64 units

Slope to Climb: 45 degrees

Stairs Height: 8 units

Stairs Depth: 16 units

Max Step Height: 18 units

L4D: World Scale and Dimensions

L4D: World Scale and Dimensions

Hammer Interface Overview

This is an overview of the interface. The best way to learn is per need basis. So we go more into depth in later tutorials.

L4D: Hammer Interface Overview

1. Side Tools

All of your main brush, texturing and entity functions are found here. You will be using these tools alot. It is good to learn shortcuts to them.

L4D: Hammer Interface Overview

2. Top Shelf

L4D: Hammer Interface Overview

1 - Grid Options.

2 - Load/Save Window State

3 - Undo/Redo

4 - Group/Ungrouping Objects

5 - VisGroups

6 - Cut/Paste

7 - Allows to compile only selected areas

8 - Various Texture Tools, such as lock textures and face alignment on/off

9 - Displacement Terrain Tools

10 - Compile Options. Pressing F9 gives you compile option window.

3. View Ports

L4D: Hammer Interface Overview

4. Selection Tools and Texture Browser

Groups/Objects/Solids allows you toggle on/off what you see in the viewports.

Texture Browser allows to browse, select, apply textures onto your brush geometry.

L4D: Hammer Interface Overview

L4D: Hammer Interface Overview

5. VisGroups

VisGroups allow you to create layers and group objects and turn them off/on in order for you to clear up your viewports for easier workflow.

L4D: Hammer Interface Overview

6. Entity Tools

Entities include props, lights, gameplay elements such as player starts and weapons.

L4D: Hammer Interface Overview