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

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. The only Custom PHD mod you will ever need

The only Custom PHD mod you will ever need

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
10 Posts 5 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • chicken emojiundefined Offline
    chicken emojiundefined Offline
    chicken emoji
    wrote on last edited by chicken emoji
    #1

    This mod allows you to give/take the effect of the PHD perk of any player on every map by changing a variable for the respective player.

    Sources + Download: https://github.com/2-Millimeter-Nahkampfwachter/CustomPHD

    Follow this guide if you are not aware of how to load custom gsc scripts: https://forum.plutonium.pw/topic/6966/how-to-use-a-mod-menu-without-injecting-loading-gsc-scripts-client-sided

    A Former User? AdrX003undefined 2 Replies Last reply
    2
    • chicken emojiundefined chicken emoji

      This mod allows you to give/take the effect of the PHD perk of any player on every map by changing a variable for the respective player.

      Sources + Download: https://github.com/2-Millimeter-Nahkampfwachter/CustomPHD

      Follow this guide if you are not aware of how to load custom gsc scripts: https://forum.plutonium.pw/topic/6966/how-to-use-a-mod-menu-without-injecting-loading-gsc-scripts-client-sided

      A Former User? Offline
      A Former User? Offline
      A Former User
      wrote on last edited by
      #2

      @IMGAYOwO Nice

      1 Reply Last reply
      0
      • chicken emojiundefined chicken emoji

        This mod allows you to give/take the effect of the PHD perk of any player on every map by changing a variable for the respective player.

        Sources + Download: https://github.com/2-Millimeter-Nahkampfwachter/CustomPHD

        Follow this guide if you are not aware of how to load custom gsc scripts: https://forum.plutonium.pw/topic/6966/how-to-use-a-mod-menu-without-injecting-loading-gsc-scripts-client-sided

        AdrX003undefined Offline
        AdrX003undefined Offline
        AdrX003
        wrote on last edited by
        #3

        @IMGAYOwO yop, can you help me a bit here?

        863ed85c-0a78-43ce-94bd-08752de4e729-image.png

        i was trying to put your source with another mod and the compiler says the error is pretty much in the same line as PHD code starts

        ive tried to add a thread for it even if your precompiled version work fine (and im assuming the code is the same)

        what could be happening here ? tnx in advance

        AdrX003undefined 1 Reply Last reply
        0
        • AdrX003undefined AdrX003

          @IMGAYOwO yop, can you help me a bit here?

          863ed85c-0a78-43ce-94bd-08752de4e729-image.png

          i was trying to put your source with another mod and the compiler says the error is pretty much in the same line as PHD code starts

          ive tried to add a thread for it even if your precompiled version work fine (and im assuming the code is the same)

          what could be happening here ? tnx in advance

          AdrX003undefined Offline
          AdrX003undefined Offline
          AdrX003
          wrote on last edited by AdrX003
          #4

          AdrX003 oh wait, i think it was just a missing "}" actually.... it compiled, gonna test it now.

          aa still nothing

          Cahzundefined 1 Reply Last reply
          0
          • AdrX003undefined AdrX003

            AdrX003 oh wait, i think it was just a missing "}" actually.... it compiled, gonna test it now.

            aa still nothing

            Cahzundefined Offline
            Cahzundefined Offline
            Cahz
            VIP
            wrote on last edited by
            #5

            AdrX003 In the new plutonium update the order of execution for certain scripts have been adjusted causing certain level pointer variables to not overwrite how they would before.

            It's a simple fix of adding some sort of wait. In this case I will only add 1 line.

            init()
            {
                    thread init_phd();
            }
            
            init_phd()
            {
                    level waittill( "start_of_round" ); //added this wait, which can't be in the init() func
                    if(isdefined(level.player_damage_callbacks[0])){
            		level.first_player_damage_callback = level.player_damage_callbacks[0];
            		level.player_damage_callbacks[0] = ::playerdamagelastcheck;
            	} else {
            		maps/mp/zombies/_zm::register_player_damage_callback( ::playerdamagelastcheck );
            	}
            	if(isDefined(level._effect[ "divetonuke_groundhit" ])){
            		level.phd_fx = level._effect[ "divetonuke_groundhit" ];
            	} else {
            		if(!isDefined(level._effect[ "def_explosion" ])){
            			level.phd_fx = loadfx( "explosions/fx_default_explosion" );
            		} else {
            			level.phd_fx = level._effect[ "def_explosion" ];
            		}
            	}
            }
            
            AdrX003undefined 2 Replies Last reply
            0
            • Cahzundefined Cahz

              AdrX003 In the new plutonium update the order of execution for certain scripts have been adjusted causing certain level pointer variables to not overwrite how they would before.

              It's a simple fix of adding some sort of wait. In this case I will only add 1 line.

              init()
              {
                      thread init_phd();
              }
              
              init_phd()
              {
                      level waittill( "start_of_round" ); //added this wait, which can't be in the init() func
                      if(isdefined(level.player_damage_callbacks[0])){
              		level.first_player_damage_callback = level.player_damage_callbacks[0];
              		level.player_damage_callbacks[0] = ::playerdamagelastcheck;
              	} else {
              		maps/mp/zombies/_zm::register_player_damage_callback( ::playerdamagelastcheck );
              	}
              	if(isDefined(level._effect[ "divetonuke_groundhit" ])){
              		level.phd_fx = level._effect[ "divetonuke_groundhit" ];
              	} else {
              		if(!isDefined(level._effect[ "def_explosion" ])){
              			level.phd_fx = loadfx( "explosions/fx_default_explosion" );
              		} else {
              			level.phd_fx = level._effect[ "def_explosion" ];
              		}
              	}
              }
              
              AdrX003undefined Offline
              AdrX003undefined Offline
              AdrX003
              wrote on last edited by AdrX003
              #6

              Cahz Ohhhhhhhhhhh i think i got it
              thanks alot

              1 Reply Last reply
              0
              • Cahzundefined Cahz

                AdrX003 In the new plutonium update the order of execution for certain scripts have been adjusted causing certain level pointer variables to not overwrite how they would before.

                It's a simple fix of adding some sort of wait. In this case I will only add 1 line.

                init()
                {
                        thread init_phd();
                }
                
                init_phd()
                {
                        level waittill( "start_of_round" ); //added this wait, which can't be in the init() func
                        if(isdefined(level.player_damage_callbacks[0])){
                		level.first_player_damage_callback = level.player_damage_callbacks[0];
                		level.player_damage_callbacks[0] = ::playerdamagelastcheck;
                	} else {
                		maps/mp/zombies/_zm::register_player_damage_callback( ::playerdamagelastcheck );
                	}
                	if(isDefined(level._effect[ "divetonuke_groundhit" ])){
                		level.phd_fx = level._effect[ "divetonuke_groundhit" ];
                	} else {
                		if(!isDefined(level._effect[ "def_explosion" ])){
                			level.phd_fx = loadfx( "explosions/fx_default_explosion" );
                		} else {
                			level.phd_fx = level._effect[ "def_explosion" ];
                		}
                	}
                }
                
                AdrX003undefined Offline
                AdrX003undefined Offline
                AdrX003
                wrote on last edited by AdrX003
                #7

                Cahz wait a bit, if the wait is set to start of round does it means the game would reload this every round, and not wile the player is alive

                if im thinking correctly

                might test it later

                Cahzundefined 1 Reply Last reply
                0
                • AdrX003undefined AdrX003

                  Cahz wait a bit, if the wait is set to start of round does it means the game would reload this every round, and not wile the player is alive

                  if im thinking correctly

                  might test it later

                  Cahzundefined Offline
                  Cahzundefined Offline
                  Cahz
                  VIP
                  wrote on last edited by
                  #8

                  AdrX003 the init_phd() function doesn't have a loop, so it will only run 1 time, and will run at the start of round 1.
                  Long enough after everything is loaded to overwrite the level variables.

                  The main issue before was that the custom script would run first, then the level variables would be overwritten by the original game files, causing no actual changes to the game.

                  chicken emojiundefined 1 Reply Last reply
                  2
                  • Cahzundefined Cahz

                    AdrX003 the init_phd() function doesn't have a loop, so it will only run 1 time, and will run at the start of round 1.
                    Long enough after everything is loaded to overwrite the level variables.

                    The main issue before was that the custom script would run first, then the level variables would be overwritten by the original game files, causing no actual changes to the game.

                    chicken emojiundefined Offline
                    chicken emojiundefined Offline
                    chicken emoji
                    wrote on last edited by
                    #9

                    Cahz Does this happen because of an update or something?

                    INSANEMODEundefined 1 Reply Last reply
                    0
                    • chicken emojiundefined chicken emoji

                      Cahz Does this happen because of an update or something?

                      INSANEMODEundefined Offline
                      INSANEMODEundefined Offline
                      INSANEMODE
                      Contributor
                      wrote on last edited by
                      #10

                      @IMGAYOwO yes, but it should be fixed when the fixes on staging make their way to production.

                      1 Reply Last reply
                      1
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

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