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-24-2011, 11:55 PM #11
Chrome Playa
Chrome Gaming Reloaded
Originally posted by yukuku View Post
mines 14 Happy


So when you +rep someone, their rep will go up +14. That's the answer to pcfreak's question.
03-24-2011, 11:56 PM #12
pcfreak30
>> PCFreak30.com Happy<<
Mines 31, but i am still confused on how I give 500 rep from that. Anyone care to explain, as that page is half-way broken.
03-24-2011, 11:58 PM #13
Okami
Known As Yukuku
Originally posted by pcfreak30 View Post
Mines 31, but i am still confused on how I give 500 rep from that. Anyone care to explain, as that page is half-way broken.


i think the less you +rep your rep builds up then you can +rep lots
03-24-2011, 11:59 PM #14
IVThaKiller
Gym leader
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..


You can code Zombies and etc on it.. It would be very, very, veeeeery simple; but it can be done. It has been done in COD 4 before. Obviously every one needs the same codes for it to work 100%...
03-25-2011, 12:09 AM #15
pcfreak30
>> PCFreak30.com Happy<<
[quote='[GzP] Engine;2876634']You can code Zombies and etc on it.. It would be very, very, veeeeery simple; but it can be done. It has been done in COD 4 before. Obviously every one needs the same codes for it to work 100%...[/quote]

When I said that, I was comparing GSC to CFG. Only things you can do is run game commands and alter DVAR's.

How does that allow zombies?
03-25-2011, 12:32 AM #16
Choco
Respect my authoritah!!
Originally posted by pcfreak30 View Post
When I said that, I was comparing GSC to CFG. Only things you can do is run game commands and alter DVAR's.

How does that allow zombies?


I decompressed your patch and released your unlock codes; I gave you full credit. If you would like me to remove them I will.
03-25-2011, 12:41 AM #17
Chrome Playa
Chrome Gaming Reloaded
Originally posted by pcfreak30 View Post
Mines 31, but i am still confused on how I give 500 rep from that. Anyone care to explain, as that page is half-way broken.


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.
03-25-2011, 12:42 AM #18
Okami
Known As Yukuku
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.


oh i thought it builds up my bad :n00b:
03-25-2011, 12:44 AM #19
Chrome Playa
Chrome Gaming Reloaded
Originally posted by yukuku View Post
oh i thought it builds up my bad :n00b:


If it did, all the leechers would have a ton of rep power, lol. :p

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo