UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: josemassacre on March 01, 2017, 12:23:38 am

Title: edit stock scripts?
Post by: josemassacre on March 01, 2017, 12:23:38 am
Are you able to edit stock scripts?
i added the zombiemode and dog scripts into my map scripts folder and entered them in my zone file
but any changes i make arent made.
you can take usermaps from the same folder as zm and dogs and changes you make in it work.
i just started messing with bo3 so i dont know if im doing something wrong or if you just have to make a work around like when it comes to setting your points
Title: Re: edit stock scripts?
Post by: MakeCents on March 02, 2017, 05:52:27 pm
Some require a mod to overwrite, not sure if that list is changing or not. I think a few since the beginning have been added to the list of being able to edit in your map folder.

Edit:
Try and find pointer functions you can create to modify those scripts that you can't edit in map folders. They have a lot in there. For example:

Code Snippet
Plaintext
level._game_module_game_end_check

Defining this as
Code Snippet
Plaintext
level._game_module_game_end_check = &GameEndCheck;

will run your GameEndCheck function when it checks this in _zm.gsc like this:
Code Snippet
Plaintext
if( count < players.size || (isDefined(level._game_module_game_end_check) && ![[level._game_module_game_end_check]]()) )


When you assign pointers, or look for them, make sure you look at the arguments passed so you don't get errors in dev:

Code Snippet
Plaintext
[[level._game_module_game_end_check]]()
This one passes none so its not an issue.



But this one passes player.
Code Snippet
Plaintext
	if ( IsDefined(level.func_override_wallbuy_prompt) )
{
if ( !self [[level.func_override_wallbuy_prompt]]( player ) ) //can set hint text, disallows use of trigger if returns false
{
return false;
}
}

So you would set it up like this:
Code Snippet
Plaintext
//place this inside you main function of your mapname.gsc
level.func_override_wallbuy_prompt = &NoWallGuns;

//place this at the end of your mapname.gsc
function NoWallGuns(player)
{
self.stub.hint_string = "";
self.stub.cursor_hint = "HINT_NOICON";
return false;
}
Title: Re: edit stock scripts?
Post by: josemassacre on March 02, 2017, 07:44:22 pm
Some require a mod to overwrite, not sure if that list is changing or not. I think a few since the beginning have been added to the list of being able to edit in your map folder.

Edit:
Try and find pointer functions you can create to modify those scripts that you can't edit in map folders. They have a lot in there. For example:

Code Snippet
Plaintext
level._game_module_game_end_check

Defining this as
Code Snippet
Plaintext
level._game_module_game_end_check = &GameEndCheck;

will run your GameEndCheck function when it checks this in _zm.gsc like this:
Code Snippet
Plaintext
if( count < players.size || (isDefined(level._game_module_game_end_check) && ![[level._game_module_game_end_check]]()) )


When you assign pointers, or look for them, make sure you look at the arguments passed so you don't get errors in dev:

Code Snippet
Plaintext
[[level._game_module_game_end_check]]()
This one passes none so its not an issue.



But this one passes player.
Code Snippet
Plaintext
	if ( IsDefined(level.func_override_wallbuy_prompt) )
{
if ( !self [[level.func_override_wallbuy_prompt]]( player ) ) //can set hint text, disallows use of trigger if returns false
{
return false;
}
}

So you would set it up like this:
Code Snippet
Plaintext
//place this inside you main function of your mapname.gsc
level.func_override_wallbuy_prompt = &NoWallGuns;

//place this at the end of your mapname.gsc
function NoWallGuns(player)
{
self.stub.hint_string = "";
self.stub.cursor_hint = "HINT_NOICON";
return false;
}
Thanks for the info man! That will help out a lot I appreciate it.
Is there a list that has what scripts you can edit available somewhere in the tools? I found a lot of their documents they gave us to help us learn but I haven't seen anything in them that says what scripts you can and can't edit without a mod. I'll take a look again though. Thanks again
Title: Re: edit stock scripts?
Post by: MakeCents on March 02, 2017, 07:45:41 pm
NP. I'm not aware of a list.
Title: Re: edit stock scripts?
Post by: josemassacre on March 02, 2017, 07:47:22 pm
NP. I'm not aware of a list.
Alright man thanks anyway!