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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Creating a GSC script to force LodBiasSkinned and LodBiasRigid to -1000

Creating a GSC script to force LodBiasSkinned and LodBiasRigid to -1000

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
7 Posts 2 Posters 275 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.
  • Katcher12undefined Offline
    Katcher12undefined Offline
    Katcher12
    wrote on last edited by
    #1

    So is it possible to create a script to force the values of LodBiasSkinned and Rigid to always be -1000 to eliminate pop in? It's kinda getting tedious having to always set those values every map. As an fyi I am running my own dedicated server with bots just for my own enjoyment.

    1 Reply Last reply
    0
    • Resxtundefined Offline
      Resxtundefined Offline
      Resxt Plutonium Staff
      wrote on last edited by
      #2

      You could probably do this but creating a GSC script that uses setClientDvar or setPlayerDvar something like that whenever a player connects

      Katcher12undefined 1 Reply Last reply
      0
      • Katcher12undefined Offline
        Katcher12undefined Offline
        Katcher12
        replied to Resxt on last edited by
        #3

        Resxt How would I go about that? I've never done GSC scripting before.

        Resxtundefined 1 Reply Last reply
        0
        • Resxtundefined Offline
          Resxtundefined Offline
          Resxt Plutonium Staff
          replied to Katcher12 on last edited by
          #4

          Katcher12 I did the script for you and included explanations too

          Download and install the script
          Download link for the compiled file
          You just drag and drop that file in %localappdata%\\Plutonium\storage\t6\scripts\mp as mentioned in our documentation


          How I created the script
          So basically you need to find/understand the code to do that, it can be done that way.
          Whenever the game loads I thread on the onPlayerConnect and thanks to the level waittill("connected", player); we only do stuff whenever a player connects.

          Then on that particular player, hence the player which in that context if you read carefully means the player that just connected we call the setClientDvar function with the dvar we want as first parameter and the value as second parameter.

          Once we wrote all of this and saved it in a .gsc file we simply drag the file on the compiler.exe file found in the documentation linked above which will spit the compiled file which is readable by the game.
          BO2/T6 cannot read GSC files that aren't compiled.
          That's it. It's nothing hard but it requires some knowledge, I hope this helps you understand

          init()
          {
              level thread onPlayerConnect();
          }
          
          onPlayerConnect()
          {
          	level endon("end_game");
              for(;;)
              {
                  level waittill("connected", player);
                  
                  player setclientdvar("r_lodBiasRigid", -1000);
          		player setclientdvar("r_lodBiasSkinned", -1000);
              }
          }
          
          Katcher12undefined 1 Reply Last reply
          0
          • Katcher12undefined Offline
            Katcher12undefined Offline
            Katcher12
            replied to Resxt on last edited by Katcher12
            #5

            Resxt Well slap my ass like a red-headed stepchild that did it and cleared things up for me. If it's alright to ask, say I wanted to do a similar script for t4m, t5m, and iw5m could I just used the decompiled scripts or would there be some variables I would have to change up?

            Resxtundefined 1 Reply Last reply
            0
            • Resxtundefined Offline
              Resxtundefined Offline
              Resxt Plutonium Staff
              replied to Katcher12 on last edited by
              #6

              Katcher12 the old CODs are mostly the same but some syntax/names could change like setPlayerDvar instead of setClientDvar but overall this structure should work for all 4 games

              Katcher12undefined 1 Reply Last reply
              0
              • Katcher12undefined Offline
                Katcher12undefined Offline
                Katcher12
                replied to Resxt on last edited by
                #7

                Resxt Thanks for the help

                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