Author Topic: How to code your own waw patches and iso's  (Read 35 times)

Offline Mods

  • Moderator
  • Newbie
  • *
  • Posts: 16
  • Rep +0/-1
  • Like a Pro
  • Location: Arizona
    • View Profile
How to code your own waw patches and iso's
« on: December 07, 2011, 11:18:51 pm »

  to learn to code go here http://www.thetechgame.com/Forums/t=2150030/cod-complete-scripting-tutorial.html
========================================================================================
 Menu Explanation.
 ========================================================================================
 ----------------------------------------------------------------------------------------
 level.topLevelMenuOptions = X;
  X = The Number Of Sub Menu's you have.
  Example: level.topLevelMenuOptions = 2;
   The layout provided has 2 submenu's, 0 through 1, totaling 2.
 ----------------------------------------------------------------------------------------
 level.topLevelMenuNames[X] = "Y";
  X = Sub Menu Number.
  Example: Sub Menu 1 = 0
   sub Menu 2 = 1
   Sub Menu 3 = 2
   Sub Menu 4 = 3
   Sub Menu 5 = 4
   Sub Menu 6 = 5
   And so on and so forth.
  Y = The Name Of Your Submenu
  Example: level.topLevelMenuNames[0] = "Test";
 ----------------------------------------------------------------------------------------
 level.subMenuNumOptions[X] = Y;
  X = Sub Menu Number.
  Example: Sub Menu 1 = 0
   sub Menu 2 = 1
   Sub Menu 3 = 2
   Sub Menu 4 = 3
   Sub Menu 5 = 4
   Sub Menu 6 = 5
   And so on and so forth.
  Y = Number of options in your submenu.
  Example: Basically, if you want 5 Menu options, Y = Desired Amount of Options + 1
   If you want 10 Options In your submenu, you would number them 0-10,
   totaling 11 (Include 0 when counting to 10). So Y = 11
    level.subMenuNumOptions[0] = 11;
   If you want 5 Options in your submenu, you would number them 0-6,
   totaling 5. So Y = 6
   level.subMenuNumOptions[0] = 6;
 ----------------------------------------------------------------------------------------
 level.subMenuNames[X][Y] = "Z";
  X = Sub Menu Number.
  Example: Sub Menu 1 = 0
   sub Menu 2 = 1
   Sub Menu 3 = 2
   Sub Menu 4 = 3
   Sub Menu 5 = 4
   Sub Menu 6 = 5
   And so on and so forth.
   level.subMenuNames[0][X] = "Z";
  Y = Sub Menu Option Number
  Example: Sub Menu Option 1 = 0
   sub Menu Option 2 = 1
   Sub Menu Option 3 = 2
   Sub Menu Option 4 = 3
   Sub Menu Option 5 = 4
   Sub Menu Option 6 = 5
   And so on and so forth.
   level.subMenuNames[0][0] = "Z";
  Z = Sub Menu Option Name
  Example: Set Prestige to 11
   level.subMenuNames[0][0] = "Prestige 11";
 ----------------------------------------------------------------------------------------
 level.subMenuFunctions[X][Y] = :: Z;
  X = Sub Menu Number.
  Example: Sub Menu 1 = 0
   sub Menu 2 = 1
   Sub Menu 3 = 2
   Sub Menu 4 = 3
   Sub Menu 5 = 4
   Sub Menu 6 = 5
   And so on and so forth.
   level.subMenuFunctions[0][Y] = :: Z;
  Y = Sub Menu Option Number
  Example: Sub Menu Option 1 = 0
   sub Menu Option 2 = 1
   Sub Menu Option 3 = 2
   Sub Menu Option 4 = 3
   Sub Menu Option 5 = 4
   Sub Menu Option 6 = 5
   And so on and so forth.
   level.subMenuFunctions[0][0] = :: Z;
  Z = Sub Menu Option Thread
  Example: So this is where you would thread your mod. Say you want to thread a
   code to activate flame vision. We will call it FlameVision(). So in
   the .gsc, do this.
   FlameVision()
   {
   Code here.
   }
   Then go back up to the menu functions, and for Z, put FlameVision; and
   Bam! It's threaded.
   level.subMenuFunctions[0][0] = :: FlameVision;
 ----------------------------------------------------------------------------------------
 level.subMenuInputs[X][Y] = "Z";
  Inputs (or Arrays) can be a bit tricky. Basically, it saves alot of room for repetitive threading.
  Would you rather thread a code for each prestige, or thread one code that does all the prestiges?
  So the only time that you would replace Z with something is when you want an array.
  Most of the time: level.subMenuInputs[0][0] = "";
  Arrays Only (Must be used with Array Code): level.subMenuInputs[0][0] = "Z";
  So lets break this down and use the function Prestige as an example.
  An array Prestige code:
 Prestige( num )
 {
  self maps\_challenges_coop::statSet( "plevel", num );
  self maps\_challenges_coop::statSet( "rank", 65 );
  self iPrintln( "You're ^2First ^7Prestige" );
 }
 
  Notice the num in (). You would thread Prestige( num ) as Prestige. But with num, you
  now add a number in place of Z.
  So Prestige 1
  level.subMenuNames[0][0] = "First Prestige";
  level.subMenuFunctions[0][0] = :: Prestige;
  level.subMenuInputs[0][0] = "1";
  Prestige 2
  level.subMenuNames[0][1] = "First Prestige";
  level.subMenuFunctions[0][1] = :: Prestige;
  level.subMenuInputs[0][1] = "2";
 And so on and so forth.
 
 Stay away from arrays if they confuse you.
 ----------------------------------------------------------------------------------------
 ========================================================================================

I Adapt to the unknown.

Share on Bluesky Share on Facebook


Offline BlaZe

  • Junior
  • **
  • Posts: 59
  • Rep +500/-0
  • UmadBro? | Need any help PM me.
    • View Profile
Re: How to code your own waw patches and iso's
« Reply #1 on: December 08, 2011, 01:43:33 am »
Hmmm very informative post keep it up.