Post: [TUTORIAL] How to create CFG Mods
03-24-2011, 11:34 PM #1
pcfreak30
>> PCFreak30.com Happy<<
(adsbygoogle = window.adsbygoogle || []).push({}); Ok, so I am bored so I am going to tell you how to write mods in CFG files. This is mostly from COD4/COD5, but everyone is creating mod menus in mw2 update 1.12.

The easiest way to create a mod menu IMHO, is my generator, but I won't talk about that.

First to know is CFG mods ARE NOT PROGRAMMING. There is no logic in it. That means, no special stuff, no zombie mods, no custom game modes (unless they are already in the game).

CFG files merely contain game commands

List of commonly used commands:


  • say
  • set
  • bind
  • unbind
  • unbindall
  • vstr
  • map_restart
  • fast_restart
  • kick
  • clientkick
  • toggle
  • setplayerdata (can NOT be ran in game)
  • exec


Now for the most basic mods, which use the bind command

If you want to have dpad left do a quick restart, the code looks like this:

    bind dpad_left "fast_restart"


I do believe the double-quotes are optional, but its good practice to use them.

You can bind any control you want you want to any command or set of commands as many times as you want.

You also separate commands with a ";".

You can group a set of command together to be called at any time via the command "set"

set can set DVAR values as well as create a variable string. A variable string is simple a set of commands as previously stated.

Example:

    set TEST "code; code; code"


You can then run a variable string with the command "vstr"

Example:

    vstr TEST


Any command can be in a variable string, so you of course can run a vstr command in a variable string itself.That is how mod menus in CFG actually work.

A random example of binding doad down to a variable string is:

    bind DPAD_DOWN "vstr TEST"


On the topic of dvars, you can set a dvar value with set. You can also toggle a dvar value as well. When toggling, you can switch between upto 3 values.

Example:
    toggle bg_maxjumpheight 999 500 0


Sorry if thats not the correct dvar :P, but hopefully you get the point.

Well that about all I can think of. Only advanced part is creativity and knowing how to use the game commands properly.

I realize this tutorial is badly written, but I am not a great writer.

I hope this helped SOME people.

Peace and Good Luck..
(adsbygoogle = window.adsbygoogle || []).push({});

The following 9 users say thank you to pcfreak30 for this useful post:

baremo, chickensamw1993, Chrome Playa, emsp, FrozN, ilikecl, Joshhyyy-, PunjabiBoii, shotkillah55
03-25-2011, 12:47 AM #20
Okami
Known As Yukuku
Originally posted by Chrome
If it did, all the leechers would have a ton of rep power, lol. :p


lol true that :carling:
03-25-2011, 01:58 AM #21
TheFallen
Former Dark Night
Originally posted by pcfreak30 View Post
Ok, so I am bored so I am going to tell you how to write mods in CFG files. This is mostly from COD4/COD5, but everyone is creating mod menus in mw2 update 1.12.

The easiest way to create a mod menu IMHO, is my generator, but I won't talk about that.

First to know is CFG mods ARE NOT PROGRAMMING. There is no logic in it. That means, no special stuff, no zombie mods, no custom game modes (unless they are already in the game).

CFG files merely contain game commands

List of commonly used commands:


  • say
  • set
  • bind
  • unbind
  • unbindall
  • vstr
  • map_restart
  • fast_restart
  • kick
  • clientkick
  • toggle
  • setplayerdata (can NOT be ran in game)
  • exec


Now for the most basic mods, which use the bind command

If you want to have dpad left do a quick restart, the code looks like this:

    bind dpad_left "fast_restart"


I do believe the double-quotes are optional, but its good practice to use them.

You can bind any control you want you want to any command or set of commands as many times as you want.

You also separate commands with a ";".

You can group a set of command together to be called at any time via the command "set"

set can set DVAR values as well as create a variable string. A variable string is simple a set of commands as previously stated.

Example:

    set TEST "code; code; code"


You can then run a variable string with the command "vstr"

Example:

    vstr TEST


Any command can be in a variable string, so you of course can run a vstr command in a variable string itself.That is how mod menus in CFG actually work.

A random example of binding doad down to a variable string is:

    bind DPAD_DOWN "vstr TEST"


On the topic of dvars, you can set a dvar value with set. You can also toggle a dvar value as well. When toggling, you can switch between upto 3 values.

Example:
    toggle bg_maxjumpheight 999 500 0


Sorry if thats not the correct dvar :P, but hopefully you get the point.

Well that about all I can think of. Only advanced part is creativity and knowing how to use the game commands properly.

I realize this tutorial is badly written, but I am not a great writer.

I hope this helped SOME people.

Peace and Good Luck..


So you did end up posting this. I thought you said you hate documentation :p
03-25-2011, 02:05 AM #22
Blackstorm
Veni. Vidi. Vici.
Originally posted by pcfreak30 View Post
Ok, so I am bored so I am going to tell you how to write mods in CFG files. This is mostly from COD4/COD5, but everyone is creating mod menus in mw2 update 1.12.

The easiest way to create a mod menu IMHO, is my generator, but I won't talk about that.

First to know is CFG mods ARE NOT PROGRAMMING. There is no logic in it. That means, no special stuff, no zombie mods, no custom game modes (unless they are already in the game).

CFG files merely contain game commands

List of commonly used commands:


  • say
  • set
  • bind
  • unbind
  • unbindall
  • vstr
  • map_restart
  • fast_restart
  • kick
  • clientkick
  • toggle
  • setplayerdata (can NOT be ran in game)
  • exec


Now for the most basic mods, which use the bind command

If you want to have dpad left do a quick restart, the code looks like this:

    bind dpad_left "fast_restart"
I do believe the double-quotes are optional, but its good practice to use them.

You can bind any control you want you want to any command or set of commands as many times as you want.

You also separate commands with a ";".

You can group a set of command together to be called at any time via the command "set"

set can set DVAR values as well as create a variable string. A variable string is simple a set of commands as previously stated.

Example:

    set TEST "code; code; code"
You can then run a variable string with the command "vstr"

Example:

    vstr TEST
Any command can be in a variable string, so you of course can run a vstr command in a variable string itself.That is how mod menus in CFG actually work.

A random example of binding doad down to a variable string is:

    bind DPAD_DOWN "vstr TEST"
On the topic of dvars, you can set a dvar value with set. You can also toggle a dvar value as well. When toggling, you can switch between upto 3 values.

Example:
    toggle bg_maxjumpheight 999 500 0
Sorry if thats not the correct dvar :P, but hopefully you get the point.

Well that about all I can think of. Only advanced part is creativity and knowing how to use the game commands properly.

I realize this tutorial is badly written, but I am not a great writer.

I hope this helped SOME people.

Peace and Good Luck..


There is already a similar tutorial posted by Tons in the CoD4 section.. But good job, his is just way more in depth.
03-25-2011, 04:33 AM #23
ThisIsBio
LiquiDΔx
Thanks for teaching me about player data. That is why thermal as a four perk would never work. I was binding with setplayerdata in game. Not Happy or Sad
03-25-2011, 09:09 PM #24
Blackstorm
Veni. Vidi. Vici.
Originally posted by Chrome
It may have been a glitch. Considering you only have one-star, you should not be able to give +500 rep. Rep power doesn't build up, it remains constant. My rep power is 60.


Yeah, the more rep you get, the higher the power.
03-29-2011, 11:24 PM #25
Originally posted by julianportman View Post
Good for the noobs (me). I need to figure out how to get my convertor to work now /facepalm.


Converter? use bucn's .ff viewer.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo