UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - SparkyMcSparks

Back on topic, Sparky this was me:

I'm using a custom _loadout.gsc and I never touched the coop characters setup. What could be the fix?

There is a couple checks if level.script equals various zombie maps to use the coop characters. The easiest things to do is a sub-string check like this so it works for all zombie maps:



10 years ago


Video: https://www.youtube.com/watch?v=0H1y28GgjOs

RED = Zone offline.
BLUE = Zone active (adjacent to occupied, so zombies will spawn from here too).
GREEN = Zone occupied.
WHITE = Zone online but not active or occupied.

Download Files Here: www.alexromo.com/files/ZombieZoneDebugging.zip
10 years ago
Would this be useful?

https://www.youtube.com/watch?v=0H1y28GgjOs

I got rid of all the strings except the zone name and just change color.

RED = Zone offline.
BLUE = Zone active (adjacent to occupied, so zombies will spawn from here too).
GREEN = Zone occupied.
WHITE = Zone online but not active or occupied.
10 years ago
And whats the magic line to make the console actually useable?

You know... get rid of the **** spam in the log file.
What do you mean, certain console information you don't want to see like audio errors?

You can hide/show console channels using the CMDs con_showchannel, con_hidechannel, con_visiblechannellist, and con_channellist

It's pretty intuitive but if you think that would be helpful to have a tutorial mention on I can quickly write it up.

I also wish there would have been a better dev mode introduced with more info ( especially zones ) - but seems like it's up to a scripter again to make it right :(
There is, at least introduced in Black Ops 1 I believe (definitely in Black Ops 2). You can just get a hold of the BO1 or BO2 scripts and port the functionality over, search for zombiemode_debug_zones. I started porting BO2 scripts into WaW but gave up since it was more of a headache despite all the new useful features such as zone debug or only using one zombie spawner for the whole map, working on another zombie mod with less stress.

When you enable it, on top left it should list all the zones and their states. It takes up too many HUD elements though and they all won't show (it uses NewDebugHudElem() which is unlimited but not available in public EXE, can switch it to normal hud element). I suppose someone can just think of a smart way to merge the hud elements but still somehow convey the info.

10 years ago
Hello SparkyMcSparks,
I don't have this issue anymore thanks to Trem and DualVII, but Im curious to know if there's a way to locate were a potential infinite loop is in the script...or even say way script?
There's a @13275 after the SRE but I am unsure if this is even related to the error.
(Image removed from quote.)

No, at least not with the public EXEs of the game. Just have to hope that it's a result of SREs that you can trace back, or that you remember any for / while loops you made that might be missing a wait.

Someone had similar infinite loop at the beginning of the map and every time he threw a grenade, ended up being he didn't have the special coop characters setup so the voice overs were bugging out creating an infinite loop.
10 years ago
Looking at the WaW Scripting Support forum section, it seems like a lot of problems can be solved quite easily without much help if doing some debugging. This tutorial is easy enough that you don't need much scripting knowledge, if anything, it'll let you post valuable information when seeking help for people to better assist you.

I'll try to keep this thing updated over time (and cross-posted between UGX and ZM forums) if I see more common issues arise in the support section or someone has a specific debugging question or technique they want to know about.

Running The Game In Developer Mode

First off, you want to run some dvars when working on your map / mod. These are the ones I recommend ALWAYS using when developing your content:

set developer 2  set developer_script 1  set thereisacow "1337"  set logfile 2  devmap <mapname>

Zombies Debugging

In addition to running the game in developer mode, you can use for zombie related development tools:

set zombie_cheat <1-5>

1     Start all players with 100000 points
2     Start all players with 100000 points   don’t spawn any zombies
3     Start all players with 100000 points   turn on the power after 5 seconds
4     Points   no zombies   power after 5 seconds
5     Same as 4   the ability to re-buy the same perk over and over. Useful for testing animations, sounds, etc.

Checking Logfile

Everything that is printed to the console is printed to the console.log file which goes in the main folder by default. If you're running a mod, the console.log will be in your mod folder within the installation directory.

If you're posting an error on the forum or for someone to fix, it's generally a good idea to attach this file since it'll contain all the console information of what went wrong like a callstack.

Script Runtime Errors

When running your map in developer mode, if you encounter a Script Runtime Error (SRE) the game will end the map if it's fatal or bring up a pop-up window if it's non-fatal.

If you have a SRE you should ALWAYS address them to get a proper fix in -- don't assume since people playing your map won't be running developer mode the issue goes away. It is still happening in the background and can cause really bad issues like hitching, unexpected script results, or even crashing your map.

They usually look like this:
Quote
******* script runtime error *******
undefined is not an array, string, or vector: (file 'maps/mp/_load.gsc', line 113)
if (!isdefined(level._effect["lantern_light"]))
*
called from:
(file 'maps/mp/_load.gsc', line 12)
lanterns thread lanterns();
*
called from:
(file 'maps/mp/mp_houses22.gsc', line 2)
mapsmp\_load::main();
*
started from:
(file 'maps/mp/mp_houses22.gsc', line 1)
main() {
*
************************************

The way it's displayed is the bottom is the origin of the script routine, and the very top is where the SRE was encountered.

In the above example, the map main() function calls the _load.gsc main() function which calls the _load.gsc lanterns() function which has an error on line 113 with the lantern FX.

Note: The formatting is off in how the forum shows this, but the asterisk (*) will always be under the variable / function with the error. It'll display properly in-game to give you a better idea what part of the line is problematic.

Assertions

Asserts are a development feature that check if a condition is true and if not, stops the game. This is useful for when you as a designer want to validate your assumptions about what the state of the game should be whenever possible.

Example:
Code Snippet
Plaintext
AssertEx( IsDefined( ai_maxis), "Maxis AI did not spawn." );

These have no impact in non-developer mode, so people playing your map will never trigger them... but they may run into a SRE. In that case, you should avoid defensive coding to get around the issue and instead fix the issue; if something shouldn't happen, then an assertion is the right thing to use.

Here are the various Assert API you have at your disposal:
Assert( <value> );     Assert that the given statement is correct. The function will throw a script error if this is false.
AssertEx( <value>, <message> );     Assert that the given statement is correct. The function will throw a script error if this is false, with the given message.
AssertMsg( <message> );     Throws a script error with the given message.

Dev Blocks

If you want certain script snippets to only execute when in developer mode, you can wrap in /#    #/

This is useful if you want to kick off developer functions or do prints to the screen of information you want to see from script. People playing your map won't see these.

Example:
Code Snippet
Plaintext
	while ( true )
{
trig waittill( "trigger", who );
{
/#
IPrintLnBold( "Player who purchased perk: "   who.playername );
#/
}
}

Common SREs

Quote
could not find script <script_name_here>
You don't have the script in a FastFile or IWD that is being loaded by the map.

Quote
   must be applied to an int (applied to undefined)
You'tr trying to do a mathematical operation on a variable that isn't defined before the operation. You can't initiate a variable while doing the mathematical operation, you need to define it earlier even if it's just a zero.

Quote
undefined is not an array, string, or vector
Variable you're trying to reference is empty.

Quote
cannot set field of removed entity
Entity has left / deleted from the game or the entity variable it was stored in has been reset / undefined.

Quote
cannot cast undefined to <variable_type_here>
You're trying to reference a variable that is empty.

Quote
potential infinite loop in script
Your while or for loop doesn't have a wait in it. Every loop needs a wait, whether it be a timed wait of 0.05 seconds or waiting for a notify.
10 years ago
Finally got around to signing up here!

I'm Alex, or go by SparkyMcSparks online. Originally from Chicago (land of deep dish pizza and really good hot dogs, Google 'em up to know what you've been missing out on). I moved to Los Angeles three years ago to work at Treyarch originally doing Wii ports and Mod Tools for CoD, eventually shifted over to working on Zombie maps for BO2.

In my spare time I still love to play mods and work on some, as well as learning other tools like Source engine and Unity3D stuff. I enjoy riding my bike on the beach year round and eating tacos around LA.

If you ever want to game or chat about nerdy things, or even have quesitons about modding or applying at Treyarch feel free to add me on Steam:   SparkyMcSparks
10 years ago
Loading ...