Mini-mod tutorial: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{cleanup}}
{{cleanup}}
'''Making your own Mini-mod.''' {{HL2}}
={{HL2}} Making your own Mini-mod=


Ok so you don’t know C++ and have no idea what a [[cpp]] file is, but that doesn’t limit you to the normal HL2 style game play on you custom single player map.
Ok so you don’t know C++ and have no idea what a [[cpp]] file is, but that doesn’t limit you to the normal HL2 style game play on you custom single player map.
Line 10: Line 10:
For example, you can change the distance the gravity gun can pull from, the speed it throws objects, you can change the max ammo a weapon can carry, you could activate colliding rag dolls, the damage a weapon deals. Anything you can set in the console. So start looking through those commands.
For example, you can change the distance the gravity gun can pull from, the speed it throws objects, you can change the max ammo a weapon can carry, you could activate colliding rag dolls, the damage a weapon deals. Anything you can set in the console. So start looking through those commands.


==First off==


'''First things first. Open good old notepad.'''
Open notepad.


Now for anything you want to happen for your map, type as you would in the console.
Now for anything you want to happen for your map, type as you would in the console.
Line 43: Line 44:
\steam\SteamApps\[user name]\half-life 2\hl2\cfg
\steam\SteamApps\[user name]\half-life 2\hl2\cfg


 
==Create a map==
'''With that done lets open hammer and our 1st map for the Mini-mod.'''


Add a ''logic_auto'' into your map. (I like to keep it next to the player start to keep track of things.)
Add a ''logic_auto'' into your map. (I like to keep it next to the player start to keep track of things.)
Line 65: Line 65:
So your player knows about the new button changes.
So your player knows about the new button changes.


 
==Distribution==
'''Distribution'''


All you have to do is make sure you add the cfg file to your achieve folder containing your bsp files and stuff. And make sure you give instructions on moving it to the cfg folder.
All you have to do is make sure you add the cfg file to your achieve folder containing your bsp files and stuff. And make sure you give instructions on moving it to the cfg folder.


==Uninstall==


'''Uninstall'''
Because the bind command is actually binding commands to a key, even without the [[cfg]] file in your HL2 directory those commands will be kept.
 
Because the bind command is actually binding commands to a key, even without the cfg file in your HL2 directory those commands will be kept.


Make a new cfg file called uninstallyourmapname.cfg
Make a new cfg file called uninstallyourmapname.cfg
Line 83: Line 81:
Distribute this file with you map, and write instructions on performing the uninstall.
Distribute this file with you map, and write instructions on performing the uninstall.


 
==Downside==
'''Downside'''


The downside is, your commands will stay loaded even when the player stops playing your map and plays another one like an official HL2 maps. Or even quits HL2 (so use the uninstall method to clean things up.
The downside is, your commands will stay loaded even when the player stops playing your map and plays another one like an official HL2 maps. Or even quits HL2 (so use the uninstall method to clean things up.
And thirdly im only learning all this and there are some bugs to iron out but you guys can work around em.
And thirdly im only learning all this and there are some bugs to iron out but you guys can work around em.
And if any one knows a way to slow the audio down with console commands I’d love to make that bullet time effect cooler, so let me know.
And if any one knows a way to slow the audio down with console commands I’d love to make that bullet time effect cooler, so let me know.
Regards [[User:Treb | Treb]]
[[category:Tutorials]]
[[category:Tutorials]]
[[Category:Level Design]]
[[Category:Level Design]]

Revision as of 13:51, 24 December 2005

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

Half-Life 2 Making your own Mini-mod

Ok so you don’t know C++ and have no idea what a cpp file is, but that doesn’t limit you to the normal HL2 style game play on you custom single player map.

This tute is going to teach you how to make a CFG file and how to execute it from inside your map.

First thing to think about is that you are only limited by commands you can type in the console. With that said there are a lot of little things you can do to make your map different from others.

For example, you can change the distance the gravity gun can pull from, the speed it throws objects, you can change the max ammo a weapon can carry, you could activate colliding rag dolls, the damage a weapon deals. Anything you can set in the console. So start looking through those commands.

First off

Open notepad.

Now for anything you want to happen for your map, type as you would in the console. In my case the first two lines read:

sv_cheats 1

bind "tab" "incrementvar host_timescale 0.25 1 0.75; incrementvar mat_yuv 0 11"

That’s the command to bind that action to the “tab” key. It will act like bullet time and switch on/off. Try not to bind anything that is already used like “e” or “z” that would be a silly thing to do.

To string commands together use the ; character.

If there is any thing else particular to your map that you want to add do that too. Mine looks like this:

sv_cheats 1

bind "tab" "incrementvar host_timescale 0.25 1 0.75; incrementvar mat_yuv 0 1 1"

cl_ragdoll_collide 1

sk_max_ar2_altfire 10


(so I have a bullet time thing set to the tab key as well as a black and white shader for effect & sv_cheats on so the bullet time will work, my rag dolls will not clip each other, and the cool bouncy balls for the assault rifle now max out at 10)

When you go to save, make sure you have "all files" selected in the ‘save as type’ drop down, and save it as YOURMAPNAME.cfg In the following directory:

\steam\SteamApps\[user name]\half-life 2\hl2\cfg

Create a map

Add a logic_auto into your map. (I like to keep it next to the player start to keep track of things.) Now add a point_clientcommand next to that. And name it "console"

Then in the outputs for your logic_auto fill it out like this:

Output: OnMapSpawn

Target entites named: console

Via this input: Command

With a parameter override of: exec YOURMAPNAME

What this does is once your map loads the logic_auto tells the point_clientcommand to load the cfg file you chose, essentially typing in all the console commands you entered into that file.

That’s it.. All your changes should be loaded for your player. For added professionalism you could add some game_text entities with little messages like "’tab’ bullet time on/off" So your player knows about the new button changes.

Distribution

All you have to do is make sure you add the cfg file to your achieve folder containing your bsp files and stuff. And make sure you give instructions on moving it to the cfg folder.

Uninstall

Because the bind command is actually binding commands to a key, even without the cfg file in your HL2 directory those commands will be kept.

Make a new cfg file called uninstallyourmapname.cfg And make sure all the key you binded are removed i.e:

bind "tab" ""

That will remove that binding in my example. Distribute this file with you map, and write instructions on performing the uninstall.

Downside

The downside is, your commands will stay loaded even when the player stops playing your map and plays another one like an official HL2 maps. Or even quits HL2 (so use the uninstall method to clean things up. And thirdly im only learning all this and there are some bugs to iron out but you guys can work around em. And if any one knows a way to slow the audio down with console commands I’d love to make that bullet time effect cooler, so let me know.