why can’t I include base game GSC files in my custom scripts?
-
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.gscbut then
_zombiemode_powerups.gscincludes other files (likemaps\_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? -
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.gscbut then
_zombiemode_powerups.gscincludes other files (likemaps\_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?callmejaf place zombies scripts in
scripts\sp\zomand preferably use thegetFunctionPlutonium built-in function:function_pointer = getFunction( "path/to/source", "function_name" ); if ( isdefined( function_pointer ) { <entity> [[ function_pointer ]]( <arguments> ); } -
callmejaf place zombies scripts in
scripts\sp\zomand preferably use thegetFunctionPlutonium built-in function:function_pointer = getFunction( "path/to/source", "function_name" ); if ( isdefined( function_pointer ) { <entity> [[ function_pointer ]]( <arguments> ); }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/zomandraw/scripts/sp?when I put any scripts in the
scripts/sp/zomfolder they just don't execute at all. They only work inraw/scripts/sp.inside
scripts/sp/zomthere is azm_spawn_fix.gscfile with a comment saying// this is intentionally blank as we moved the location of the fileThe populated file is in
raw/scripts/sp, so I assumedscripts/sp/zomwas depreciated?EDIT:
fn = getFunction("maps/_zombiemode_powerups", "specific_powerup_drop");This worked thank you. I am still inside raw/scripts though.
-
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/zomandraw/scripts/sp?when I put any scripts in the
scripts/sp/zomfolder they just don't execute at all. They only work inraw/scripts/sp.inside
scripts/sp/zomthere is azm_spawn_fix.gscfile with a comment saying// this is intentionally blank as we moved the location of the fileThe populated file is in
raw/scripts/sp, so I assumedscripts/sp/zomwas depreciated?EDIT:
fn = getFunction("maps/_zombiemode_powerups", "specific_powerup_drop");This worked thank you. I am still inside raw/scripts though.
callmejaf I don’t think there is much difference between
raw\scriptsand justscriptsin terms of loading custom scripts for BO1 on Plutonium. As for the difference betweenscripts\spandscripts\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 tozom.