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 - kingneo

Yeah sorry about incorrect placement, will do that in the future :D pretty new to the forums, mod tools and stuff like that, appreciate the help!
7 years ago
How do I go about this? I know what file the game looks at for gun prices but I have no idea how to make the custom map read from my own edited version of that file. Any help would be nice. Thanks guys!
7 years ago
Hi guys.

I have copied the zm_levelcommon_weapons.csv file into my custom map's scripts file. I have added this line of code to the map file's zone file (zm_tutorial.zone):
Code Snippet
Plaintext
scriptparsetree,scripts/zm/zm_levelcommon_weapons.csv
Now, when I try to link the map in the Mod Tools Launcher, it gives me this error:
Spoiler: click to open...
==================================================

^1
^1----------^
^1ERR(0) scripts/zm/zm_levelcommon_weapons.csv.csv (1,11)  : syntax error, unexpected TOKEN_IDENTIFIER, expecting $end : 
For reference sake, here is the entire log:
Spoiler: click to open...
E:\Steam\steamapps\common\Call of Duty Black Ops III\\gdtdb\gdtdb.exe /update

gdtDB: updating

processed (0 GDTs) (0 assets) in 1.292 sec

gdtDB: successfully updated database.

E:\Steam\steamapps\common\Call of Duty Black Ops III\\bin\linker_modtools.exe -language english -modsource zm_tutorial

Linking "zm_tutorial" (usermaps\zm_tutorial stable 2535893 v593):
processing...

^1ERROR: 'p7_debris_metal_scrap_02' is not a valid physpreset asset

  physpreset:p7_debris_metal_scrap_02
    xmodel:p7_debris_metal_scrap_02
      col_map:maps/zm/zm_tutorial.d3dbsp


********************************************************************************
UNRECOVERABLE ERROR:
  ^1SCRIPT ERROR: No generated data for 'scripts/zm/zm_levelcommon_weapons.csv'



Linker will now terminate.
********************************************************************************

==================================================
Linker summary:

There were 0 warnings and 1 error.

Errors:
  ^1ERROR: 'p7_debris_metal_scrap_02' is not a valid physpreset asset

Arguments passed to linker:
  -language english -modsource zm_tutorial

==================================================

^1
^1----------^
^1ERR(0) scripts/zm/zm_levelcommon_weapons.csv.csv (1,11)  : syntax error, unexpected TOKEN_IDENTIFIER, expecting $end : 

Any idea why this would be happening? Much appreciated!
7 years ago
Hi guys.

The lighting in my map seems to be doing some weird things, as you can see in the picture below. Not sure what is causing this. I've been trying to fix it for a while but nothing I do seems to be working. Any ideas on how to fix this?

8 years ago
No idea how to do this, just curious on how to replace the starting MR6 in the mod tools!

Also, if anyone knows how, how would I go about including the Marshal 16's in my map, maybe even replacing this starting pistol? Any help would be much appreciated, thanks!
8 years ago
Hi, just wondering how to replace the starting pistol with the Marshal 16's. I know they aren't in the beta, but is there some way to import them into the mod files so that I can replace the MR6? Also, no idea how I would replace the MR6, that might help too XD
8 years ago
I'm not sure you can currently give the player ragnarok dg4's in the beta.
Okay cool, but can you see what I'm doing wrong in my code? Thanks for the help again man, really appreciate it, just really new to scirpting/the mod tools XD
8 years ago
Do you have _zm_perks.gsc included at the top of the file like this?:
Code Snippet
Plaintext
#using scripts\zm\_zm_perks;

also change it from _zm_perks:: to zm_perks::
Here, could you take a look at my code? Not quite sure what's wrong. Also, what code would I need to do in order to have it say, give the player the Ragnarok DG4's instead? My map's name is zm_tutorial, and this is in the zm_tutorial.gsc file.

Code Snippet
Plaintext
#using scripts\codescripts\struct;

#using scripts\shared\array_shared;
#using scripts\shared\callbacks_shared;
#using scripts\shared\clientfield_shared;
#using scripts\shared\compass;
#using scripts\shared\exploder_shared;
#using scripts\shared\flag_shared;
#using scripts\shared\laststand_shared;
#using scripts\shared\math_shared;
#using scripts\shared\scene_shared;
#using scripts\shared\util_shared;

#insert scripts\shared\shared.gsh;
#insert scripts\shared\version.gsh;

#insert scripts\zm\_zm_utility.gsh;

#insert scripts\zm\_zm_perks.gsh;

#using scripts\zm\_load;
#using scripts\zm\_zm;
#using scripts\zm\_zm_audio;
#using scripts\zm\_zm_powerups;
#using scripts\zm\_zm_utility;
#using scripts\zm\_zm_weapons;
#using scripts\zm\_zm_zonemgr;

#using scripts\shared\ai\zombie_utility;

//Perks
#using scripts\zm\_zm_pack_a_punch;
#using scripts\zm\_zm_pack_a_punch_util;
#using scripts\zm\_zm_perk_additionalprimaryweapon;
#using scripts\zm\_zm_perk_doubletap2;
#using scripts\zm\_zm_perk_deadshot;
#using scripts\zm\_zm_perk_juggernaut;
#using scripts\zm\_zm_perk_quick_revive;
#using scripts\zm\_zm_perk_sleight_of_hand;
#using scripts\zm\_zm_perk_staminup;
#using scripts\zm\_zm_perk_widows_wine;
#using scripts\zm\_zm_perk_electric_cherry;

//Powerups
#using scripts\zm\_zm_powerup_double_points;
#using scripts\zm\_zm_powerup_carpenter;
#using scripts\zm\_zm_powerup_fire_sale;
#using scripts\zm\_zm_powerup_free_perk;
#using scripts\zm\_zm_powerup_full_ammo;
#using scripts\zm\_zm_powerup_insta_kill;
#using scripts\zm\_zm_powerup_nuke;
//#using scripts\zm\_zm_powerup_weapon_minigun;

//Traps
#using scripts\zm\_zm_trap_electric;

#using scripts\zm\zm_usermap;

//*****************************************************************************
// MAIN
//*****************************************************************************
#using scripts\zm\_zm_perks;

function main()
{
zm_usermap::main();

level.perk_purchase_limit = 9;

level._zombie_custom_add_weapons = &custom_add_weapons;
level.zones = [];
level.zone_manager_init_func = &usermap_test_zone_init;
init_zones[0] = "start_zone";
level thread zm_zonemgr::manage_zones( init_zones );

    // Allows you to add your own code to execute when a player spawns, without having to directly edit the function in _globallogic_player
    callback::on_spawned( &on_player_spawned );

    // Searches the map for triggers and threads the logic function for them, assigning an id as well
    level.shootable_triggers = getEntArray( "ec_perk_trigger", "targetname" );
    if( isDefined( level.shootable_triggers ) )
    {
        id = 0;
        foreach( trigger in level.shootable_triggers )
        {
            trigger thread shootable_trigger_think(id);
            id++;
        }
    }
}

function usermap_test_zone_init()
{
level flag::init( "always_on" );
level flag::set( "always_on" );
    // Your code here, depends on if you have zones setup
    /*
    zm_zonemgr::add_adjacent_zone( "start_zone", "zone_2", "zone_1_to_2_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_2", "zone_4", "zone_2_to_4_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_2", "zone_6", "zone_2_to_6_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_2", "zone_3", "zone_2_to_3_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_3", "zone_6", "zone_3_to_6_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_2", "zone_5", "zone_2_to_5_trigger" );
    */
}

function custom_add_weapons()
{
zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
}


function on_player_spawned()
{
    self notify( "shootable_trigger_destroy" );
   
    self.shootable_triggers_shot = 0;
   
    // Used so multiple players can do the process, rather than tying progress to the teddies
    self.shootable_triggers_personal = [];
    for( i = 0; i < level.shootable_triggers_personal.size; i++ )
    {
        self.shootable_triggers_personal[i] = false;
    }
}

function shootable_trigger_think( id )
{
    while(1)
    {
        self waittill( "damage", amount, attacker, directionVec, point, type );
       
        if( !IsDefined( attacker ) || !IsPlayer( attacker ) )
{
WAIT_SERVER_FRAME;
continue;
}
       
        if( IsPlayer( attacker ) )
        {
            if( IsDefined( attacker.shootable_triggers_personal ) && attacker.shootable_triggers_personal[id] == false )
            {
                attacker.shootable_triggers_personal[id] = true;
                attacker thread checkProgress();
            }
        }
    }
}

function checkProgress()
{
    count = 0;
    foreach( entry in self.shootable_triggers_personal )
    {
        if( entry == true )
        {
            count++;
        }
    }
   
    // They have hit every teddy
    if( count >= level.shootable_triggers.size )
    {
        // Adds the perk, but doesn't handle the HUD part
        self zm_perks::give_perk( "marathon_perk" );
    }
}
8 years ago
Hi,

In my custom map I have three teddy bears that, when shot, give the player the electric cherry perk. I have the script mostly working for this thanks to Xylozi, but near the end of the script, I have the code
Code Snippet
Plaintext
self _zm_perks::give_perk( "electric_cherry_perk" );

However, I get an error when building/linking that says this: "^1ERR(6E) scripts/zm/zm_tutorial.gsc (155,1)  : Compiler Internal Error :  Unresolved external '_zm_perks::give_perk'"

Anyone know what's going on here? Thanks!
8 years ago
Not sure amount the first error, but for the one that occurs during linking, you need to add
Code Snippet
Plaintext
#using scripts\zm\_zm_perks;
above the main function.

Here is a full script that you should be able to use more easily:
Code Snippet
Plaintext
#using scripts\zm\_zm_perks;

function main()
{
zm_usermap::main();

level._zombie_custom_add_weapons = &custom_add_weapons;
level.zones = [];
level.zone_manager_init_func = &usermap_test_zone_init;
init_zones[0] = "start_zone";
level thread zm_zonemgr::manage_zones( init_zones );

    // Allows you to add your own code to execute when a player spawns, without having to directly edit the function in _globallogic_player
    callback::on_spawned( &on_player_spawned );

    // Searches the map for triggers and threads the logic function for them, assigning an id as well
    level.shootable_triggers = getEntArray( "shootable_trigger", "targetname" );
    if( isDefined( level.shootable_triggers ) )
    {
        id = 0;
        foreach( trigger in level.shootable_triggers )
        {
            trigger thread shootable_trigger_think(id);
            id++;
        }
    }
}

function usermap_test_zone_init()
{
    // Your code here, depends on if you have zones setup
    /*
    zm_zonemgr::add_adjacent_zone( "start_zone", "zone_2", "zone_1_to_2_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_2", "zone_4", "zone_2_to_4_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_2", "zone_6", "zone_2_to_6_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_2", "zone_3", "zone_2_to_3_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_3", "zone_6", "zone_3_to_6_trigger" );
    zm_zonemgr::add_adjacent_zone( "zone_2", "zone_5", "zone_2_to_5_trigger" );
    */
}

function custom_add_weapons()
{
zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
}


function on_player_spawned()
{
    self notify( "shootable_trigger_destroy" );
   
    self.shootable_triggers_shot = 0;
   
    // Used so multiple players can do the process, rather than tying progress to the teddies
    self.shootable_triggers_personal = [];
    for( i = 0; i < level.shootable_triggers_personal.size; i++ )
    {
        self.shootable_triggers_personal[i] = false;
    }
}

function shootable_trigger_think( id )
{
    while(1)
    {
        self waittill( "damage", amount, attacker, directionVec, point, type );
       
        if( !IsDefined( attacker ) || !IsPlayer( attacker ) )
{
WAIT_SERVER_FRAME;
continue;
}
       
        if( IsPlayer( attacker ) )
        {
            if( IsDefined( attacker.shootable_triggers_personal ) && attacker.shootable_triggers_personal[id] == false )
            {
                attacker.shootable_triggers_personal[id] = true;
                attacker thread checkProgress();
            }
        }
    }
}

function checkProgress()
{
    count = 0;
    foreach( entry in self.shootable_triggers_personal )
    {
        if( entry == true )
        {
            count++;
        }
    }
   
    // They have hit every teddy
    if( count >= level.shootable_triggers.size )
    {
        // Adds the perk, but doesn't handle the HUD part
        self _zm_perks::give_perk( "marathon_perk" );
    }
}

Okay cool, thanks again for the help!

However, when I ad the #using command for the _zm_perks script, it still gives me that same error when linking. It says that unresolved external thing for the command "_zm_perks::give_perk"
8 years ago
EDIT:
When implementing this into the the mapname.gsc file, I get two errors: one that happens when I load the map, the map crashes and this error is given: "Error during initialization: attempting to PMem_Free 'PerLocalClient' but it is not at the top of the stack".

I also get an error when building/linking that says this: "^1ERR(6E) scripts/zm/zm_tutorial.gsc (155,1)  : Compiler Internal Error :  Unresolved external '_zm_perks::give_perk'"
8 years ago
1. Would need to export the machine from BO2 and make the prefab yourself
2. BO3 doesnt have machine for EC, so there is no hintstring setup for it, cos its only in Wunderfizz. Just replace &"ZOMBIE_PERK_WIDOWSWINE" with "Hold ^3[{+activate}]^7 to Buy Electric Cherry [Cost: 2000]"

Becuase I'm kind of a newb here, would you be able to explain to me or send me a link of how to export the machine from BO2 and make the prefab? Also, is there a way that I could make the hintstring for EC? I just would like to see the EC code in as close to the same format as the rest of the perks, but thanks again so much! That actually really helped!
8 years ago
This should be pretty simple for you to implement. What you'll need to do is setup some trigger_damage brushes around the teddy bear models and monitor when players shoot them.

Here is code that will do that for you:

In the main function add:
Code Snippet
Plaintext
callback::on_spawned( &on_player_spawned );
This will allow you to use on_player_spawned within your file.

And this, which checks your map for any triggers with the "teddy_trigger" targetname and sets up the logic for them:
Code Snippet
Plaintext
level.teddy_triggers = getEntArray( "teddy_trigger", "targetname" );
    if( isDefined( level.teddy_triggers ) )
    {
        id = 0;
        foreach( trigger in level.teddy_triggers )
        {
            trigger thread teddy_think(id);
            id++;
        }
    }

Add the on_player_spawned function. This sets a variable to monitor how many teddies the player has shot, and ties the not shot/shot state to the player, meaning progress towards the perk is personal for each player.
Code Snippet
Plaintext
function on_player_spawned()
{
    self notify( "teddy_check" );
   
    self.teddy_triggered_count = 0;
   
    // Used so multiple players can do the process, rather than tying progress to the teddies
    self.teddy_states = [];
    for( i = 0; i < level.teddy_triggers.size; i++ )
    {
        self.teddy_states[i] = false;
    }
}

Add the logic for the teddy triggers:
Code Snippet
Plaintext
function teddy_think( id )
{
    while(1)
    {
        self waittill( "damage", amount, attacker, directionVec, point, type );
       
        if( !IsDefined( attacker ) || !IsPlayer( attacker ) )
{
WAIT_SERVER_FRAME;
continue;
}
       
        if( IsPlayer( attacker ) )
        {
            if( IsDefined( attacker.teddy_states ) && attacker.teddy_states[id] == false )
            {
                attacker.teddy_states[id] = true;
                attacker thread checkTeddyProgress();
            }
        }
    }
}
This monitors the trigger for any damage events, and once one happens, checks that it comes from player. If the player hasn't shot the teddy before, it will set that teddy to true for the player, and check the player's progress.

Add the checkTeddyProgress function:
Code Snippet
Plaintext
function checkTeddyProgress()
{
    count = 0;
    foreach( entry in self.teddy_states )
    {
        if( entry == true )
        {
            count++;
        }
    }
   
    // They have hit every teddy
    if( count >= level.teddy_triggers.size )
    {
        self _zm_perks::give_perk( "marathon_perk" );
    }
}
This is called when the player hits any of the teddies, so once they've hit all of them they will be granted the perk.

Thanks so much man! This is really detailed and I understand it very well. Just two questions for ya though:
1) Do I put this code in it's own script file? As in it's own .gsc, .csc or .gsh file? Or do I just put it in the mapname.gsc script inside of the map's script folder?
2) Would there be any way to make it check for a specific type of damage, for example, splash damage from a Widow's Wine grenade? If not that's cool, I'm happy with how it works already!
8 years ago
Hi guys,

I'm very new to scripting and the mod tools in general. I have gotten a map somewhat developed and I think I want to start adding some Easter Egg stuff. What I am trying to do right now is have it so that when the player shoots the three teddy bears that I have around the map, they are given the Electric Cherry perk. I could have this just be another buyable perk, which is what I currently have, but I kind of want it to be an easter egg type thing.

Any ideas on how I would go about achieving this? Again, very new to scripting and the mod tools, so please try to be as specific as possible and try to talk like you would to a child :D
8 years ago
To change the perk limit check my tutorial Here

As for widows wine this should work: Link

I'm not sure about electric cherry, will probably be similar to how you add widows wine.

EDIT:
Adding electric cherry should be the exact same as adding widows wine just change the name for the scripts you are including and referencing.

However you may need to port a model from somewhere else since they might not have included the models for it.

Cool, thanks so much man! I got Widow's Wine working and Electric Cherry is buyable and I have made that work, but there are some things about it that don't quite work.

1) Where might I be able to find a model or prefab to port from black ops 2 into 3?
2) In the code for Widow's Wine, for Example, on line 63 of the GSC file, where is says &"ZOMBIE_PERK_WIDOWSWINE", this seems to be where the code is located to be able to make the perk machine in game have the "Hold (X/F) to Buy Widow's Wine [Cost: 4000]". There is code for this in the Electric Cherry GSC file, but in the same line of code (line 52 in the EC GSC), it says the same as Widow's Wine instead of for Electric Cherry.

So in my map, the model for EC is Stamin-Up, and the text that appears says "Hold (X/F) to Buy Widow's Wine" for 2,00 points (I changed this value in the EC GSC file). I would like to change that text to say "Hold (X/F) to Buy Electric Cherry [Cost: 2000]", but I don't know how to do that.

Again, appreciate the support!
8 years ago
Loading ...