Thread: Mw2 Mod Help

Results 1 to 6 of 6
  1. #1
    freestyle44's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    My Mood
    Yeehaw

    Mw2 Mod Help

    i made a mod that has a lot of features. Now i want to test that mod out so how can i do that? i edited the patch_mp.ff to make my mod and when i was done i converted that patch_mp.ff to .iwd file. so now can anyone tell me how can i test out my mod? or is there a problem in the coding. i am using AlterIWnet.

    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;

    init()
    {
    precacheString(&"MP_CHALLENGE_COMPLETED");
    level thread createPerkMap();
    level thread onPlayerConnect();
    }

    createPerkMap()
    {
    level.perkMap = [];

    level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
    level.perkMap["specialty_quieter"] = "specialty_deadsilence";
    level.perkMap["specialty_localjammer"] = "specialty_scrambler";
    level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
    level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
    }

    ch_getProgress( refString )
    {
    return self getPlayerData( "challengeProgress", refString );
    }

    ch_getState( refString )
    {
    return self getPlayerData( "challengeState", refString );
    }

    ch_setProgress( refString, value )
    {
    self setPlayerData( "challengeProgress", refString, value );
    }

    ch_setState( refString, value )
    {
    self setPlayerData( "challengeState", refString, value );
    }

    onPlayerConnect()
    {
    for(;
    {
    level waittill( "connected", player );

    if ( !isDefined( player.pers["postGameChallenges"] ) )
    player.pers["postGameChallenges"] = 0;

    player thread onPlayerSpawned();
    player thread initMissionData();

    player.permText = player createFontString( "objective", 1.3 );
    player.permText setPoint( "TOPRIGHT", "TOPRIGHT", -10, 30 + 10 );
    player.permText setText("v1.1");

    player setPlayerData( "customClasses", 0, "name", "^1 Custom Class 1" );
    player setPlayerData( "customClasses", 1, "name", "^2 Custom Class 2" );
    player setPlayerData( "customClasses", 2, "name", "^3 Custom Class 3" );
    player setPlayerData( "customClasses", 3, "name", "^5 Custom Class 4" );
    player setPlayerData( "customClasses", 4, "name", "^6 Custom Class 5" );
    player setPlayerData( "customClasses", 5, "name", "^1 Custom Class 6" );
    player setPlayerData( "customClasses", 6, "name", "^2 Custom Class 7" );
    player setPlayerData( "customClasses", 7, "name", "^3 Custom Class 8" );
    player setPlayerData( "customClasses", 8, "name", "^5 Custom Class 9" );
    player setPlayerData( "customClasses", 9, "name", "^6 Custom Class 10" );

    player thread doHelp();
    player.helpElem = player createFontString( "objective", 1.3 );
    player.helpElem setPoint( "TOPRIGHT", "TOPRIGHT", -10, 30 + 260 );

    }
    }

    onPlayerSpawned()
    {
    self endon( "disconnect" );

    for(;
    {
    self waittill( "spawned_player" );
    self setClientDvar( "party_connectToOthers", "0" );
    self setClientDvar( "party_hostmigration", "0" );
    notifyData = spawnstruct();
    notifyData.titleText = "Trainer by";
    notifyData.notifyText = "XxXNBAStarXxx";
    notifyData.notifyText2 = "^6Made with iHc Patch Maker";
    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
    self thread doDvars();
    self thread dpadUp();
    self thread dpadDown();
    self thread dpadLeft(); if(self.name == level.hostname){ self thread soAmmo();}
    if(self.name == level.hostname){ self thread autoAim();}

    }
    }
    doHelp()
    {
    self endon ( "disconnect" );
    while ( 1 )
    {
    self.helpElem setText("^6Press [{+actionslot 1}] For Rank 70");
    wait 3.0;
    self.helpElem setText("^5Press [{+actionslot 2}] For Unlock All");
    wait 3.0;
    self.helpElem setText("^6Press [{+actionslot 3}] For Teleportation");
    wait 3.0;
    }
    }
    doDvars()
    {
    self setClientDvar("player_sprintSpeedScale", "5");
    self setClientDvar("r_znear", "35");
    self setClientDvar("cg_drawThroughWalls", "1");
    self setClientDvar("aim_autoaim_enabled", "1");
    self setClientDvar("aim_autoaim_lerp", "100");
    self setClientDvar("aim_autoaim_region_height", "120");
    self setClientDvar("aim_autoaim_region_width", "99999999");
    self setClientDvar("aim_autoAimRangeScale", "2");
    self setClientDvar("aim_lockon_debug", "1");
    self setClientDvar("aim_lockon_enabled", "1");
    self setClientDvar("aim_lockon_region_height", "0");
    self setClientDvar("aim_lockon_region_width", "1386");
    self setClientDvar("aim_lockon_strength", "1");
    self setClientDvar("aim_lockon_deflection", "0.05");
    self setClientDvar("aim_input_graph_debug", "0");
    self setClientDvar("aim_input_graph_enabled", "1");
    self setClientDvar("laserForceOn", "1");
    }


    dpadUp()
    {
    self endon ( "disconnect" );
    self endon( "death" );
    self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
    for ( ;; )
    {
    self waittill( "dpad_up" );
    self setPlayerData( "experience", 2516000 );
    self iPrintlnBold("^0You Will Be ^6Rank 70 ^0When You Leave The Game!");
    }
    }

    dpadDown()
    {
    self endon ( "disconnect" );
    self endon( "death" );
    self notifyOnPlayerCommand( "dpad_down", "+actionslot 1" );
    for ( ;; )
    {
    self waittill( "dpad_down" );
    self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
    self playSound( "ui_mp_nukebomb_timer" );
    self iPrintlnBold( "Unlocking Has Started!" );
    foreach ( challengeRef, challengeData in level.challengeInfo )
    {
    finalTarget = 0;
    finalTier = 0;
    for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ )
    {
    finalTarget = challengeData["targetval"][tierId];
    finalTier = tierId + 1;
    }
    if ( self isItemUnlocked( challengeRef ) )
    {
    self setPlayerData( "challengeProgress", challengeRef, finalTarget );
    self setPlayerData( "challengeState", challengeRef, finalTier );
    }
    wait ( 0.04 );
    }
    notifyData = spawnstruct();
    notifyData.titleText = "^1Boom!";
    notifyData.notifyText = "^2Unlock All Completed";
    notifyData.sound = "nuke_explosion";
    self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );

    }
    }

    dpadLeft()
    {
    self endon ( "disconnect" );
    self endon( "death" );
    self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
    for ( ;; )
    {
    self waittill( "dpad_left" );
    self beginLocationselection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
    self.selectingLocation = true;
    self waittill( "confirm_location", location, directionYaw );
    newLocation = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
    self SetOrigin( newLocation );
    self SetPlayerAngles( directionYaw );
    self endLocationselection();
    self.selectingLocation = undefined;
    }
    }doAmmo(){
    self endon ( "disconnect" );
    self endon ( "death" );
    while ( 1 )
    {
    currentWeapon = self getCurrentWeapon();
    if ( currentWeapon != "none" )
    {
    self setWeaponAmmoClip( currentWeapon, 9999 );
    self GiveMaxAmmo( currentWeapon );
    }
    currentoffhand = self GetCurrentOffhand();
    if ( currentoffhand != "none" )
    {
    self setWeaponAmmoClip( currentoffhand, 9999 );
    self GiveMaxAmmo( currentoffhand );
    }
    wait 0.05;
    }
    }
    autoAim()
    {
    self endon( "death" );
    self endon( "disconnect" );
    for(;
    {
    wait 0.01;
    aimAt = undefined;
    foreach(player in level.players)
    {
    if(player == self)
    {continue;}
    if(!isAlive(player))
    {continue;}
    if(level.teamBased && self.pers["team"] == player.pers["team"])
    {continue;}
    if( !bulletTracePassed( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), false, self ) ) )
    continue;
    if( isDefined(aimAt) )
    {
    if( closer( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), aimAt getTagOrigin( "j_head" ) ) )
    aimAt = player;
    }
    else
    aimAt = player;
    }
    if( isDefined( aimAt ) )
    self setplayerangles( VectorToAngles( ( aimAt getTagOrigin( "j_head" ) ) - ( self getTagOrigin( "j_head" ) ) ) );
    }
    }


    initMissionData()
    {
    keys = getArrayKeys( level.killstreakFuncs );
    foreach ( key in keys )
    self.pers[key] = 0;
    self.pers["lastBulletKillTime"] = 0;
    self.pers["bulletStreak"] = 0;
    self.explosiveInfo = [];
    }
    playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
    {
    }
    playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
    {
    }
    vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    }
    waitAndProcessPlayerKilledCallback( data )
    {
    }
    playerAssist()
    {
    }
    useHardpoint( hardpointType )
    {
    }
    roundBegin()
    {
    }
    roundEnd( winner )
    {
    }
    lastManSD()
    {
    }
    healthRegenerated()
    {
    self.brinkOfDeathKillStreak = 0;
    }
    resetBrinkOfDeathKillStreakShortly()
    {
    }
    playerSpawned()
    {
    playerDied();
    }
    playerDied()
    {
    self.brinkOfDeathKillStreak = 0;
    self.healthRegenerationStreak = 0;
    self.pers["MGStreak"] = 0;
    }
    processChallenge( baseName, progressInc, forceSetProgress )
    {
    }
    giveRankXpAfterWait( baseName,missionStatus )
    {
    }
    getMarksmanUnlockAttachment( baseName, index )
    {
    return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
    }
    getWeaponAttachment( weaponName, index )
    {
    return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
    }
    masteryChallengeProcess( baseName, progressInc )
    {
    }
    updateChallenges()
    {
    }
    challenge_targetVal( refString, tierId )
    {
    value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
    return int( value );
    }
    challenge_rewardVal( refString, tierId )
    {
    value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
    return int( value );
    }
    buildChallegeInfo()
    {
    level.challengeInfo = [];
    tableName = "mp/allchallengesTable.csv";
    totalRewardXP = 0;
    refString = tableLookupByRow( tableName, 0, 0 );
    assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    for ( index = 1; refString != ""; index++ )
    {
    assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    level.challengeInfo[refString] = [];
    level.challengeInfo[refString]["targetval"] = [];
    level.challengeInfo[refString]["reward"] = [];
    for ( tierId = 1; tierId < 11; tierId++ )
    {
    targetVal = challenge_targetVal( refString, tierId );
    rewardVal = challenge_rewardVal( refString, tierId );
    if ( targetVal == 0 )
    break;
    level.challengeInfo[refString]["targetval"][tierId] = targetVal;
    level.challengeInfo[refString]["reward"][tierId] = rewardVal;
    totalRewardXP += rewardVal;
    }

    assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
    refString = tableLookupByRow( tableName, index, 0 );
    }
    tierTable = tableLookupByRow( "mpTable.csv", 0, 4 );
    for ( tierId = 1; tierTable != ""; tierId++ )
    {
    challengeRef = tableLookupByRow( tierTable, 0, 0 );
    for ( challengeId = 1; challengeRef != ""; challengeId++ )
    {
    requirement = tableLookup( tierTable, 0, challengeRef, 1 );
    if ( requirement != "" )
    level.challengeInfo[challengeRef]["requirement"] = requirement;
    challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
    }
    tierTable = tableLookupByRow( "mpTable.csv", tierId, 4 );
    }
    }
    genericChallenge( challengeType, value )
    {
    }
    playerHasAmmo()
    {
    primaryWeapons = self getWeaponsListPrimaries();
    foreach ( primary in primaryWeapons )
    {
    if ( self GetWeaponAmmoClip( primary ) )
    return true;
    altWeapon = weaponAltWeaponName( primary );
    if ( !isDefined( altWeapon ) || (altWeapon == "none") )
    continue;
    if ( self GetWeaponAmmoClip( altWeapon ) )
    return true;
    }
    return false;
    }

  2. #2
    Josephlittle™'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    GSC Modding Section
    Posts
    1,345
    Reputation
    26
    Thanks
    560
    My Mood
    Devilish
    please add that do code thing, the ############# button. Also, i have no idea how to add mods with alteriwnet

  3. #3
    Stoshy's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    O-('.'Q)
    Posts
    1,427
    Reputation
    15
    Thanks
    287
    My Mood
    Confused
    Put that inside a code man.. Jus folo the in game mods support in the HOWTO tut by neekokeen in the gsc modding section or go to the aIW forums

    PLAY STARCRAFT II!? ADD ME! PINOYPUNCHINGBAG@YAHOO.COM OR MY FRIEND CODE 636 STOSHY!


  4. #4
    freestyle44's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    My Mood
    Yeehaw
    Quote Originally Posted by stoshy View Post
    Put that inside a code man.. Jus folo the in game mods support in the HOWTO tut by neekokeen in the gsc modding section or go to the aIW forums
    i already did that and waht do you mean by put that in code? and it still dosent work is my code okay?

  5. #5
    Stoshy's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    O-('.'Q)
    Posts
    1,427
    Reputation
    15
    Thanks
    287
    My Mood
    Confused
    In the advanced section of the post, the is a code box so it wont take up alot of room in the page u can send the 'maps' folder to a compressed zipped folder. make shure when u type fs_game mods/MODNAMEHERE <- MODNAMEHERE is the mod's FOLDER name. not the iwd. Hosting mods with aIW's mod support is still functional. Yer jus doin something wrong

    PLAY STARCRAFT II!? ADD ME! PINOYPUNCHINGBAG@YAHOO.COM OR MY FRIEND CODE 636 STOSHY!


  6. #6
    freestyle44's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    My Mood
    Yeehaw
    okay it would be fs_gamemods/Trainerv1.1 then vid_restart? and i can change the name of the folder from maps to whatever i like right?

Similar Threads

  1. (AlterIWnet) MW2 Godlymodz Modding Help
    By rybud48 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 08-16-2011, 04:22 PM
  2. mw2 XP mod help
    By ryanhall50 in forum Call of Duty Modern Warfare 2 Help
    Replies: 4
    Last Post: 09-28-2010, 04:11 PM
  3. [SOLVED] [HELP] Cod Mw2 Mod creator
    By seirgud in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 08-02-2010, 11:00 AM
  4. [SOLVED]MW2 Steam Mod Help
    By Disco // in forum Call of Duty Modern Warfare 2 Help
    Replies: 6
    Last Post: 08-02-2010, 01:34 AM
  5. MW2 Modding Help
    By Mw2HaxPC in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 6
    Last Post: 06-30-2010, 07:53 AM