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

Plutonium

  1. Home
  2. BO1 Modding Support & Discussion
  3. why can’t I include base game GSC files in my custom scripts?

why can’t I include base game GSC files in my custom scripts?

Scheduled Pinned Locked Moved BO1 Modding Support & Discussion
4 Posts 2 Posters 72 Views 2 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.
  • callmejafundefined Offline
    callmejafundefined Offline
    callmejaf
    wrote last edited by
    #1

    Hello, I'm new to GSC and I’m trying to write a simple script that lets me drop zombies power ups with keybinds, but I’m struggling with including existing Treyarch GSC files.

    For example:

    #include maps\_zombiemode_powerups;
    

    or

    level thread maps\_zombiemode_powerups::specific_powerup_drop("nuke", org);
    

    throws:

    Could not find script 'maps/_zombiemode_powerups'
    

    I can copy all the base scripts from the T5 modding GitHub so that I have:

    %localappdata%\Plutonium\storage\t5\raw\maps\_zombiemode_powerups.gsc
    

    but then _zombiemode_powerups.gsc includes other files (like maps\_zombiemode_utility, animscripts\zombie_utility, etc.), and those eventually depend on assets from fastfiles.
    Once the chain reaches animtrees and FX, the game just crashes with missing asset errors.

    So I’m probably missing something obvious here. Am I writing my scripts in the wrong place? raw/scripts/sp
    Is there a way to reference Treyarch’s stock scripts that are already loaded in the game, without having to manually copy every dependency into raw?

    Basically: why do the base GSCs seem to be out of scope when referenced from inside raw/scripts?
    Is there a proper way to include or call those existing methods?

    Hadi77KSAundefined 1 Reply Last reply
    0
    • callmejafundefined callmejaf

      Hello, I'm new to GSC and I’m trying to write a simple script that lets me drop zombies power ups with keybinds, but I’m struggling with including existing Treyarch GSC files.

      For example:

      #include maps\_zombiemode_powerups;
      

      or

      level thread maps\_zombiemode_powerups::specific_powerup_drop("nuke", org);
      

      throws:

      Could not find script 'maps/_zombiemode_powerups'
      

      I can copy all the base scripts from the T5 modding GitHub so that I have:

      %localappdata%\Plutonium\storage\t5\raw\maps\_zombiemode_powerups.gsc
      

      but then _zombiemode_powerups.gsc includes other files (like maps\_zombiemode_utility, animscripts\zombie_utility, etc.), and those eventually depend on assets from fastfiles.
      Once the chain reaches animtrees and FX, the game just crashes with missing asset errors.

      So I’m probably missing something obvious here. Am I writing my scripts in the wrong place? raw/scripts/sp
      Is there a way to reference Treyarch’s stock scripts that are already loaded in the game, without having to manually copy every dependency into raw?

      Basically: why do the base GSCs seem to be out of scope when referenced from inside raw/scripts?
      Is there a proper way to include or call those existing methods?

      Hadi77KSAundefined Online
      Hadi77KSAundefined Online
      Hadi77KSA
      Contributor
      wrote last edited by
      #2

      callmejaf place zombies scripts in scripts\sp\zom and preferably use the getFunction Plutonium built-in function:

      function_pointer = getFunction( "path/to/source", "function_name" );
      
      if ( isdefined( function_pointer )
      {
          <entity> [[ function_pointer ]]( <arguments> );
      }
      
      callmejafundefined 1 Reply Last reply
      0
      • Hadi77KSAundefined Hadi77KSA

        callmejaf place zombies scripts in scripts\sp\zom and preferably use the getFunction Plutonium built-in function:

        function_pointer = getFunction( "path/to/source", "function_name" );
        
        if ( isdefined( function_pointer )
        {
            <entity> [[ function_pointer ]]( <arguments> );
        }
        
        callmejafundefined Offline
        callmejafundefined Offline
        callmejaf
        wrote last edited by callmejaf
        #3

        Hadi77KSA Thanks for the reply! I will try getFunction and we'll see if it works 🙂

        I do want to ask, what's the difference between scripts/sp/zom and raw/scripts/sp?

        when I put any scripts in the scripts/sp/zom folder they just don't execute at all. They only work in raw/scripts/sp.

        inside scripts/sp/zom there is a zm_spawn_fix.gsc file with a comment saying

        // this is intentionally blank as we moved the location of the file
        

        The populated file is in raw/scripts/sp , so I assumed scripts/sp/zom was depreciated?

        EDIT:

        fn = getFunction("maps/_zombiemode_powerups", "specific_powerup_drop");
        

        This worked thank you. I am still inside raw/scripts though.

        Hadi77KSAundefined 1 Reply Last reply
        0
        • callmejafundefined callmejaf

          Hadi77KSA Thanks for the reply! I will try getFunction and we'll see if it works 🙂

          I do want to ask, what's the difference between scripts/sp/zom and raw/scripts/sp?

          when I put any scripts in the scripts/sp/zom folder they just don't execute at all. They only work in raw/scripts/sp.

          inside scripts/sp/zom there is a zm_spawn_fix.gsc file with a comment saying

          // this is intentionally blank as we moved the location of the file
          

          The populated file is in raw/scripts/sp , so I assumed scripts/sp/zom was depreciated?

          EDIT:

          fn = getFunction("maps/_zombiemode_powerups", "specific_powerup_drop");
          

          This worked thank you. I am still inside raw/scripts though.

          Hadi77KSAundefined Online
          Hadi77KSAundefined Online
          Hadi77KSA
          Contributor
          wrote last edited by
          #4

          callmejaf I don’t think there is much difference between raw\scripts and just scripts in terms of loading custom scripts for BO1 on Plutonium. As for the difference between scripts\sp and scripts\sp\zom, the first loads scripts on any map on the SP app including main menu and campaign maps, while the second only loads scripts when the gametype is set to zom.

          1 Reply Last reply
          0
          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