Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO1 Modding Releases & Resources
  3. [ZM][RELEASE] [PLUTO ONLY] First box patch for moon + timer + speed patch

[ZM][RELEASE] [PLUTO ONLY] First box patch for moon + timer + speed patch

Scheduled Pinned Locked Moved BO1 Modding Releases & Resources
6 Posts 4 Posters 2.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined Offline
    undefined Offline
    AlexInVr
    wrote on Aug 7, 2022, 10:44 PM last edited by AlexInVr Apr 7, 2024, 3:27 AM
    #1

    So I made a box patch for moon, but it only works on Plutonium due to the use of replacefunc, it will give you the wavegun, gersh and raygun for coop up until round 20, it also has a timer like my waw mods, and a speed patch to make your backspeed and strafe speed the same as on console,

    INSTALL INSTRUCTIONS:

    • REPLACE YOUR COMMON_ZOMBIE_PATCH.FF WITH THE ORIGINAL GAME FILE WHILE YOU PLAY THE MAP OR ELSE IT WILL NOT LOAD !! Please don't comment that the script is not working if you did not follow the instructions, I tested it before and it's working 100%

    • Create a folder named zombie_moon in your %localappdata%/Plutonium/Storage/t5/scripts/sp and place the file in it

    • Launch the map and enjoy 🙂

    • If you don't have the original common_zombie_patch.ff here it is, just unzip the file
      download

    if you find any issues in the gameplay please advise me, I am not a moon player so idk if it will do something to the gameplay, as far as I tested, everything works.

    #include maps\_utility; 
    #include common_scripts\utility;
    #include maps\_zombiemode_utility;
    
    
    init()
    {
            if ( GetDvar( #"zombiemode" ) == "1" )
            {
                level thread onPlayerConnect();
                replacefunc(maps\_zombiemode_weapons::treasure_chest_ChooseWeightedRandomWeapon, ::custom_treasure_chest_ChooseWeightedRandomWeapon);
            }
                
    }
    
    
    any_player_has_weapon(weap)
    {	
    	players = get_players();
    	has_weap = false;
    	for(i = 0; players.size > i; i++)
    	{
    		if(players[i] maps\_zombiemode_weapons::has_weapon_or_upgrade(weap))
    			has_weap = true;
    	}
    	return has_weap;
    }
    
    
    game_timer()
    {	
    	hud = create_simple_hud( self );
    	hud.foreground = true; 
    	hud.sort = 1; 
    	hud.hidewheninmenu = true; 
    	hud.alignX = "left"; 
    	hud.alignY = "top";
    	hud.horzAlign = "user_left"; 
    	hud.vertAlign = "user_top";
    	hud.x = hud.x - -820; 
    	hud.y = hud.y + 35; 
    	hud.alpha = 1;
    	time_text = string(GetTime() / 1000);
    	flag_wait("all_players_spawned");
    	while (1){
    		hud setTimerUp(1);
    		hud setTimer(time_text);
    	}
    	
    }
    
    patch_moon()
    {	
    	//WaveGun
    	if(!self maps\_zombiemode_weapons::has_weapon_or_upgrade("microwavegundw_zm") && !any_player_has_weapon("microwavegundw_zm"))
    				return "microwavegundw_zm";
    
    	//Gersh
    	if(!self maps\_zombiemode_weapons::has_weapon_or_upgrade("zombie_black_hole_bomb"))
    				return "zombie_black_hole_bomb";
    
    	//RayGun for coop
    	if(!self maps\_zombiemode_weapons::has_weapon_or_upgrade("ray_gun_zm"))
    				return "ray_gun_zm";
    }
    
    
    custom_treasure_chest_ChooseWeightedRandomWeapon( player )
    {
    	//First Box by Crybaby / AlexInVr
    
    	if(level.round_number < 20)
    	{
    		//Moon
    		if (level.script == "zombie_moon")
    			return player patch_moon();
    	}
    
    
    
    	keys = GetArrayKeys( level.zombie_weapons );
    
    	toggle_weapons_in_use = 0;
    	// Filter out any weapons the player already has
    	filtered = [];
    	for( i = 0; i < keys.size; i++ )
    	{
    		if( !maps\_zombiemode_weapons::get_is_in_box( keys[i] ) )
    		{
    			continue;
    		}
    		
    		if( isdefined( player ) && is_player_valid(player) && player maps\_zombiemode_weapons::has_weapon_or_upgrade( keys[i] ) )
    		{
    			if ( maps\_zombiemode_weapons::is_weapon_toggle( keys[i] ) )
    			{
    				toggle_weapons_in_use++;
    			}
    			continue;
    		}
    
    		if( !IsDefined( keys[i] ) )
    		{
    			continue;
    		}
    
    		num_entries = [[ level.weapon_weighting_funcs[keys[i]] ]]();
    		
    		for( j = 0; j < num_entries; j++ )
    		{
    			filtered[filtered.size] = keys[i];
    		}
    	}
    	
    	// Filter out the limited weapons
    	if( IsDefined( level.limited_weapons ) )
    	{
    		keys2 = GetArrayKeys( level.limited_weapons );
    		players = get_players();
    		pap_triggers = GetEntArray("zombie_vending_upgrade", "targetname");
    		for( q = 0; q < keys2.size; q++ )
    		{
    			count = 0;
    			for( i = 0; i < players.size; i++ )
    			{
    				if( players[i] maps\_zombiemode_weapons::has_weapon_or_upgrade( keys2[q] ) )
    				{
    					count++;
    				}
    			}
    
    			// Check the pack a punch machines to see if they are holding what we're looking for
    			for ( k=0; k<pap_triggers.size; k++ )
    			{
    				if ( IsDefined(pap_triggers[k].current_weapon) && pap_triggers[k].current_weapon == keys2[q] )
    				{
    					count++;
    				}
    			}
    
    			// Check the other boxes so we don't offer something currently being offered during a fire sale
    			for ( chestIndex = 0; chestIndex < level.chests.size; chestIndex++ )
    			{
    				if ( IsDefined( level.chests[chestIndex].chest_origin.weapon_string ) && level.chests[chestIndex].chest_origin.weapon_string == keys2[q] )
    				{
    					count++;
    				}
    			}
    			
    			if ( isdefined( level.random_weapon_powerups ) )
    			{
    				for ( powerupIndex = 0; powerupIndex < level.random_weapon_powerups.size; powerupIndex++ )
    				{
    					if ( IsDefined( level.random_weapon_powerups[powerupIndex] ) && level.random_weapon_powerups[powerupIndex].base_weapon == keys2[q] )
    					{
    						count++;
    					}
    				}
    			}
    
    			if ( maps\_zombiemode_weapons::is_weapon_toggle( keys2[q] ) )
    			{
    				toggle_weapons_in_use += count;
    			}
    
    			if( count >= level.limited_weapons[keys2[q]] )
    			{
    				filtered = array_remove( filtered, keys2[q] );
    			}
    		}
    	}
    	
    	// finally, filter based on toggle mechanic
    	if ( IsDefined( level.zombie_weapon_toggles ) )
    	{
    		keys2 = GetArrayKeys( level.zombie_weapon_toggles );
    		for( q = 0; q < keys2.size; q++ )
    		{
    			if ( level.zombie_weapon_toggles[keys2[q]].active )
    			{
    				if ( toggle_weapons_in_use < level.zombie_weapon_toggle_max_active_count )
    				{
    					continue;
    				}
    			}
    
    			filtered = array_remove( filtered, keys2[q] );
    		}
    	}
    
    	// try to "force" a little more "real randomness" by randomizing the array before randomly picking a slot in it
    	filtered = array_randomize( filtered );
    	return filtered[RandomInt( filtered.size )];
    }
    
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill ("connecting", player);
    
    		player thread onPlayerSpawned();
    	}
    }
    
    onPlayerSpawned()
    {
    	for(;;)
    	{
    		self waittill("spawned_player");
    		self thread game_timer();
    
    
    		self SetClientDvars( 
    			"player_backSpeedScale", "1", 
    			"player_strafeSpeedScale", "1");
    
    		
    		wait 3;
    
    		self IPrintLnBold("First box by ^1twitch.tv/^2AlexInVR");
    	}
    }
    
    

    PICS:

    0b0621bf-658f-4f15-a350-a647a36ac8fa-image.png

    1 Reply Last reply
    3
    • hindercanrunundefined Offline
      hindercanrunundefined Offline
      hindercanrun
      wrote on Aug 8, 2022, 11:20 AM last edited by
      #2

      nice!

      undefined 1 Reply Last reply Aug 8, 2022, 11:55 AM
      1
      • undefined Offline
        undefined Offline
        AlexInVr
        replied to hindercanrun on Aug 8, 2022, 11:55 AM last edited by
        #3

        hindercanrun thx man ! Appreciate it, been trying to find a way to patch this map for a while now

        1 Reply Last reply
        0
        • f0rbiddinundefined Offline
          f0rbiddinundefined Offline
          f0rbiddin
          wrote on Nov 13, 2022, 4:09 PM last edited by
          #4

          what file do i play zombie_moon in? i dont understand

          undefined 1 Reply Last reply Nov 14, 2022, 5:43 PM
          0
          • undefined Offline
            undefined Offline
            AlexInVr
            replied to f0rbiddin on Nov 14, 2022, 5:43 PM last edited by
            #5

            f0rbiddin press windows + r on your keyboard

            inside the window that pops up, type in %LOCALAPPDATA%

            go to the folder plutonium/Storage/t5/scripts/sp

            create a new folder name zombie_moon

            drop the script inside it,

            (Create a new text file, and name it whatever you want, copy the code in the thread, paste it inside, then rename the extension to .gsc)

            1 Reply Last reply
            0
            • bhfffundefined bhfff referenced this topic on Feb 2, 2024, 8:06 PM
            • Glitchy99undefined Offline
              Glitchy99undefined Offline
              Glitchy99
              wrote on Mar 8, 2024, 5:07 AM last edited by
              #6

              Please add the QED's in

              1 Reply Last reply
              0

              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Donate