Ox_ I checked the corresponding .csc to _zm_afterlife.gsc and it has that line too. Wouldn't it cause exe_client_field_mismatch error if the .gsc had a different value than the .csc?
JezuzLizard
Posts
-
[Release] Mob of the Dead Mod: "A cat has 9 lives" -
[Release] [Zombies] Map Restart Clientside Issues Workaroundluigistyle I approved the pull request from Xerxes the mod shouldn't have any problems loading on nuketown and die rise. Download the latest version off the github.
-
[Release] [Zombies] Map Restart Clientside Issues Workaroundluigistyle I hadn't known about that bug at the time I had posted the mod but currently the best fix I have is commenting out give_team_characters() when running die rise. The same goes for give_personality_characters() when running nuketown.
I'm working on a fix so it won't be necessary to have to comment out code each time for these 2 maps. I'll update the post when I have it working.The reason this happens is die rise doesn't have its own give_team_characters(), not even a blank one. Same thing goes for nuketown there isn't a give_personality_characters() built in to the map.
-
[Support] More than one custom GSC script?If zombies use _zm_bot.gsc place it in maps/mp/zombies. If you don't have a copy of it the contents are very limited anyway:
#include maps/mp/zombies/_zm_utility; #include maps/mp/_utility; #include common_scripts/utility; init() { /# println( "ZM >> Zombiemode Server Scripts Init (_zm_bot.gsc)" ); #/ }For multiplayer I would use _shellshock.gsc since its fairly small and its contents look like this:
#include common_scripts/utility; #include maps/mp/_utility; init() { precacheshellshock( "frag_grenade_mp" ); precacheshellshock( "damage_mp" ); precacherumble( "artillery_rumble" ); precacherumble( "grenade_rumble" ); } shellshockondamage( cause, damage ) { if ( self maps/mp/_utility::isflashbanged() ) { return; } if ( cause != "MOD_EXPLOSIVE" && cause != "MOD_GRENADE" && cause != "MOD_GRENADE_SPLASH" || cause == "MOD_PROJECTILE" && cause == "MOD_PROJECTILE_SPLASH" ) { time = 0; if ( damage >= 90 ) { time = 4; } else if ( damage >= 50 ) { time = 3; } else if ( damage >= 25 ) { time = 2; } else { if ( damage > 10 ) { time = 2; } } if ( time ) { if ( self mayapplyscreeneffect() ) { self shellshock( "frag_grenade_mp", 0.5 ); } } } } endondeath() { self waittill( "death" ); waittillframeend; self notify( "end_explode" ); } endontimer( timer ) { self endon( "disconnect" ); wait timer; self notify( "end_on_timer" ); } rcbomb_earthquake( position ) { playrumbleonposition( "grenade_rumble", position ); earthquake( 0.5, 0.5, self.origin, 512 ); }Alternatively, if you have access to the source of the scripts you can attempt to merge them into one mod.
-
[Release] [Zombies] Map Restart Clientside Issues WorkaroundWhen the map restarts in zombies after a game ends, clients experience several different bugs that are only clientside. An example is the no sound bug, which is where clients have no sound except music. These are fixed by leaving and rejoining the server. I always found leaving and rejoining after a server ends being a pain which is why I spent some time making a workaround for server owners:
https://github.com/JezuzLizard/Public-BO2-Mods/tree/master/MapRestartWorkaroundThis mod also fixes doing a map_restart or fast_restart from the server console.
Basically, the mod calls a map_restart() when the game ends instead of the normal map_rotate and this fixes all the clientside only bugs for all clients every time. Doing this caused some bugs which I also had to fix.
The bug where the game hangs at the blackscreen when there is more than 1 client in game is fixed, and the invisible players who can't sprint should be fixed as well.
If you experience any bugs using this mod tell me I will try my best to fix them as quickly as possible. -
[Resource] [Zombies] Game Start Delay/Quota ScriptLuqyAF I removed the || condition from the line:
if ( timer <= 0 || )
thats why it was throwing a syntax error sorry my bad.Theres another bug in the meantime I'm working on fixing on Nuketown where quick revive doesn't get powered on after the game starts.
-
[Resource] [GSC] Working Tombstone Fix - Works on Tranzit and TownH3X1C In Plutonium when a dedicated server launches the game thinks its a solo game. Tombstone is removed because of this since tombstone is useless in solo( you have to bleedout to take advantage of tombstone ).
-
[Resource] [GSC] Working Tombstone Fix - Works on Tranzit and TownLuqyAF Anything after a for loop with no end condition will not be read put the isTown() above the level.perk_purchase_limit = 9; so it will run it.
A while loop or for loop tells a computer to do something indefinitely until told otherwise, this means in your current code isTown() is never read since the current for loop you are using has no end condition which means everything after it won't be run.
-
[Resource] GSC Resources and Helpful LinksI've spent a fair amount of time on the internet looking for GSC related materials, and here I will share all the resources I reference when I get stuck on something.
Most WaW and BO1 era scripts are compatible with BO2 since GSC wasn't altered much between WaW and BO2.
BO3 however is much different from earlier games scripting and it requires more effort to backport scripts to BO2CabConModding doesn't require an account to view scripts:
https://cabconmodding.com/threads/black-ops-2-gsc-managed-code-list.158/
https://cabconmodding.com/threads/bo2-gsc-all-in-one-place.1027/
CabConModding also has many open source mod menus that can be useful as examples.UGX for more generic COD related scripting but still useful:
https://confluence.ugx-mods.com/display/UGXMODS/Scripting+GuideThe main site for UGX requires an account to view links and scripts:
https://www.ugx-mods.com/forum/indexthe Zeroy wiki containing a lot of information for different CODs I recommend looking at WaW and BO1 scripting sections for BO2 related scripting:
https://wiki.zeroy.com/index.php?title=Main_PageZombieModding requires an account to access but many scripts are available to study and utilize:
https://zombiemodding.com/index.php?board=83.0There may be more sites that I am not aware of but if anyone else has any please do share and I will edit the post with them.
-
[Support] Bots in ZombiesAndreasOmeir I have a bot script that lets you spawn in bots in zombies. They have no AI so all they do is stand around doing nothing but maybe you can port over the mp bot script. For some reason they will instantly bleed out on MoTD, but all other maps work.
#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\zombies\_zm; #include maps\mp\zombies\_zm_utility; init() { level.bots_to_add = 1; //change this to add up to 7 bots to the game SetDvar( "scr_zm_enable_bots", "1" ); level thread onPlayerConnect(); thread add_bots(); } onPlayerConnect() { for(;;) { level waittill("connected", player); player thread onPlayerSpawned(); } } onPlayerSpawned() { self endon("disconnect"); level endon("game_ended"); for(;;) { self waittill("spawned_player"); } } add_bots() { setdvar( "bot_AllowMovement", "1" ); setdvar( "bot_PressAttackBtn", "1" ); setdvar( "bot_PressMeleeBtn", "1" ); num_bots = 0; wait 20; while ( num_bots < level.bots_to_add ) { wait 1; zbot_spawn(); level.numberbotsadded++; num_bots++; } players = get_players(); i = 0; while ( i < players.size ) { players[ i ] freezecontrols( 0 ); i++; } while ( players.size < 2 ) { wait 1; players = get_players(); } flag_set( "start_zombie_round_logic" ); } zbot_spawn() { spawnpoints = getstructarray( "initial_spawn_points", "targetname" ); spawnpoint = getfreespawnpoint( spawnpoints ); bot = addtestclient(); if ( !isDefined( bot ) ) { return; } bot.pers[ "isBot" ] = 1; bot.equipment_enabled = 0; yaw = spawnpoint.angles[ 1 ]; bot thread zbot_spawn_think( spawnpoint.origin, yaw ); return bot; } zbot_spawn_think( origin, yaw ) { self endon( "disconnect" ); for ( ;; ) { self waittill( "spawned_player" ); //self setorigin( (2170.5, 4660.37, -299.875) ); // change to set their spawn location //angles = ( 0, yaw, 0 ); //self setplayerangles( angles ); } }I guess this could also be used to test things since they functionally simulate an actual player joining/spawning.
-
[Resource] [Zombies] Game Start Delay/Quota ScriptOx_ It doesn't break MoTD to be exact it just starts the game when the player quota is met or the timer counts down instead of waiting for players to revive themselves. You still get your afterlife if you're alive when the round actually begins though. I tried to see if I could add an exception to MoTD where it waits for players to revive themselves then the game starts but I couldn't wait the add_bots() with a condition that it would actually use.
-
[Resource] [Zombies] Game Start Delay/Quota ScriptInclude these:
#include maps/mp/_utility; #include common_scripts/utility; #include maps/mp/gametypes_zm/_hud_util; #include maps/mp/gametypes_zm/_hud_message; #include maps/mp/zombies/_zm; #include maps/mp/zombies/_zm_utility;Put this in the init():
level.player_invulernability_active = 1; //set to 0 to disable invulnerability during pregame level.wait_time = 30; //change this to adjust the start time level.player_quota = 2; //change this value to change the player quota I don't recommend values higher than 2 level.player_quota_active = 1; //set this to 0 disable player quotas recommended 1 for grief level.waiting = 0; level.countdown_start = 0; level.round_prestart_func =::round_prestart_func; //delays the rounds from starting SetDvar( "scr_zm_enable_bots", "1" ); //this is required for the mod to work thread add_bots(); //this overrides the typical start game logicand then put these functions somewhere in your script:
round_prestart_func() //this function is necessary for certain maps with custom round logic { players = get_players(); while ( players.size < level.player_quota && level.player_quota_active == 1 || players.size < 1 ) { wait 0.5; players = get_players(); } wait level.wait_time; } pregameInvulnerability() //call this in onPlayerSpawned() { while ( level.player_invulernability_active == 1 ) //gives all players invulnerability { i = 0; while ( i < players.size ) { players = get_players(); wait 0.05; player = players[ i ]; player enableinvulnerability(); i++; } } while ( level.player_invulernability_active == 0 ) //removes all invulnerability from players { i2 = 0; while ( i2 < players.size ) { players = get_players(); wait 0.05; player = players[ i2 ]; player disableinvulnerability(); i2++; } break; } } add_bots() { flag_clear( "solo_game" ); //this fixes nuketown by causing the perks to drop like coop and not during the delay flag_clear( "start_zombie_round_logic" ); //clears the flag if its up from a map_restart players = get_players(); level.waiting = 1; //set this to 0 to disable the wait message thread waitMessage(); while ( players.size < level.player_quota && level.player_quota_active == 1 || players.size < 1 ) // the OR is there to prevent the timer from starting when the server starts when quotas are disabled { wait 0.5; players = get_players(); } level.waiting = 0; level.countdown_start = 1; //set this to 0 to disable the countdown message thread countdownTimer(); wait level.wait_time; level.player_invulernability_active = 0; flag_set( "start_zombie_round_logic" ); } waitMessage() { level endon("game_ended"); self endon("disconnect"); if ( level.player_quota_active == 0 ) { return; } Waiting = create_simple_hud(); Waiting.horzAlign = "center"; //valid inputs: center, top, bottom, left, right, top_right, top_left, topcenter, bottom_right, bottom_left Waiting.vertAlign = "middle"; Waiting.alignX = "center"; Waiting.alignY = "middle"; Waiting.y = 0; //- is top 0 is middle + is bottom Waiting.x = -1; Waiting.foreground = 1; Waiting.fontscale = 3.0; Waiting.alpha = 1; //transparency Waiting.color = ( 1.000, 1.000, 1.000 ); //RGB Waiting SetText( "Waiting for 1 more player" ); //definitely adjust this text if you do change quota value while ( 1 ) { if ( level.waiting == 0 ) { Waiting destroy(); break; } wait 1; } } countdownTimer() { level endon("game_ended"); self endon("disconnect"); if ( level.wait_time == 0 ) { return; } Remaining = create_simple_hud(); Remaining.horzAlign = "center"; Remaining.vertAlign = "middle"; Remaining.alignX = "Left"; Remaining.alignY = "middle"; Remaining.y = 0; Remaining.x = 135; Remaining.foreground = 1; Remaining.fontscale = 3.0; Remaining.alpha = 1; Remaining.color = ( 1.000, 1.000, 1.000 ); Countdown = create_simple_hud(); Countdown.horzAlign = "center"; Countdown.vertAlign = "middle"; Countdown.alignX = "center"; Countdown.alignY = "middle"; Countdown.y = 0; Countdown.x = -1; Countdown.foreground = 1; Countdown.fontscale = 3.0; Countdown.alpha = 1; Countdown.color = ( 1.000, 1.000, 1.000 ); Countdown SetText( "Time until game starts:" ); timer = level.wait_time; while ( level.countdown_start == 1 ) { Remaining SetValue( timer ); wait 1; timer--; if ( timer <= 0 ) { Countdown destroy(); Remaining destroy(); break; } } }Ok so how does this work you ask? Basically there is a function in _zm.gsc called onallplayersready(), and this function is what starts the zombie logic. That function contains an if statement checking if bots are enabled before the standard logic, therefore allowing me to override the typical logic using the add_bots() function.
This mod may be useful if you want to delay the start of a game allowing players to spawn in at round 1 in your servers.
I recommend not changing the quota value for public servers since its less likely people will wait for more than 2 players to join a game.Please report any bugs you find with this mod on the forum or on my discord JezuzLizard#7864. I will try to fix any bugs as quickly as I can.
edit: it would appear the mod doesn't work on map_restart since the "zombie_start_round_logic" flag is set from the previous game.
edit: the above bug is fixed
edit: updated with pregame invulnerability
edit: fixed pregame invulnerability now no players will be invulnerable after the game starts
edit: removed an || condition that was unused in the timer if statement
edit: added flag_clear( "solo_game" ); to the add_bots() to fix nuketown
edit: added if statements checking if waitMessage() and countdownTimer() should end immediately if they shouldn't be active -
[Release] [GSC] Zombies Custom Powerup | Unlimited AmmoOx_ I got around to making a simple waw style timer:
#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\gametypes_zm\_hud_util; #include maps\mp\gametypes_zm\_hud_message; #include maps\mp\zombies\_zm_powerups; #include maps\mp\zombies\_zm_utility; //credit goes to _Ox for the original code init() { level thread onPlayerConnect(); //include and init the powerup include_zombie_powerup("unlimited_ammo"); add_zombie_powerup("unlimited_ammo", "T6_WPN_AR_GALIL_WORLD", &"ZOMBIE_POWERUP_UNLIMITED_AMMO", ::func_should_always_drop, 0, 0, 0); powerup_set_can_pick_up_in_last_stand("unlimited_ammo", 1); initializeUnlimitedAmmo(); } onPlayerConnect() { for(;;) { level waittill("connected", player); player thread onPlayerSpawned(); } } onPlayerSpawned() { self endon("disconnect"); level endon("game_ended"); for(;;) { self waittill("spawned_player"); if(!isDefined(level.unlimited_ammo_first_spawn)) { wait 2; //delayed defining of the custom function so we're sure to //override the function Origins defines for this level._zombiemode_powerup_grab = ::custom_powerup_grab; //message for the host to indicate that it should be all good self iprintln("^6Unlimited Ammo Custom Powerup Loaded"); //spawns the unlimited ammo powerup in front of the host at the very start of the game //can be used to make sure it's actually working and all good //remove the line directly below to disable //level specific_powerup_drop("unlimited_ammo", self.origin + VectorScale(AnglesToForward(self.angles), 70)); level.unlimited_ammo_first_spawn = "fortnite!fortnite!!"; } } } initializeUnlimitedAmmo() { level.unlimited_ammo_active = false; //initializes that the powerup is off for the timer level.unlimited_ammo_duration = 20; //initializes the timer duration var change this to affect the duration } //fires when we grab any custom powerup custom_powerup_grab(s_powerup, e_player) { if (s_powerup.powerup_name == "unlimited_ammo") level thread unlimited_ammo_powerup(s_powerup, e_player); } unlimited_ammo_powerup(m_powerup, e_player) { foreach(player in level.players) { //if powerup is already on, turn it off player notify("end_unlimited_ammo"); //small cha ching sound for each player when someone picks up the powerup //cba'd to come up with anything better and don't have a list of sounds, //change to w/e if you want. player playsound("zmb_cha_ching"); player thread notify_unlimited_ammo_end(); player thread turn_on_unlimited_ammo(); player thread unlimited_ammo_timer(); } } turn_on_unlimited_ammo() { level endon("game_ended"); self endon("disconnect"); self endon("end_unlimited_ammo"); for(;;) { //simply set the current mag to be full on a loop self setWeaponAmmoClip(self GetCurrentWeapon(), 150); wait .02; } } notify_unlimited_ammo_end() { level endon("game_ended"); self endon("disconnect"); self endon("end_unlimited_ammo"); level.unlimited_ammo_duration = 20; //this sets the duration for the unlimited_ammo_timer() modify this when modifying the wait wait 20; //directly changes the duration of the powerup self notify("end_unlimited_ammo"); } unlimited_ammo_timer() { level endon("game_ended"); self endon("disconnect"); if ( level.unlimited_ammo_active == true )//checks whether the powerup is already active and returns so no dupe countdown { return; } level.unlimited_ammo_active = true; //sets that the powerup is active Remaining = create_simple_hud(); Remaining.horzAlign = "center"; Remaining.vertAlign = "middle"; Remaining.alignX = "Left"; Remaining.alignY = "middle"; Remaining.y = 180; //- is top 0 is middle + is bottom Remaining.x = 85; //- is left 0 is middle + is right Remaining.foreground = 1; Remaining.fontscale = 3.0; Remaining.alpha = 1; Remaining.color = ( 0.423, 0.004, 0 ); UnlimitedAmmo = create_simple_hud(); UnlimitedAmmo.horzAlign = "center"; //valid inputs: center, top, bottom, left, right, top_right, top_left, topcenter, bottom_right, bottom_left UnlimitedAmmo.vertAlign = "middle"; UnlimitedAmmo.alignX = "center"; UnlimitedAmmo.alignY = "middle"; UnlimitedAmmo.y = 180; //- is top 0 is middle + is bottom UnlimitedAmmo.x = -1; //- is left 0 is middle + is right UnlimitedAmmo.foreground = 1; UnlimitedAmmo.fontscale = 3.0; UnlimitedAmmo.alpha = 1; //transparency UnlimitedAmmo.color = ( 0.423, 0.004, 0 ); UnlimitedAmmo SetText("Unlimited Ammo: "); while( 1 ) { Remaining SetValue( level.unlimited_ammo_duration ); //this is necessary so the timer will reset on the chance that 2 unlimited ammo drops drop at once wait 1; level.unlimited_ammo_duration--; if ( level.unlimited_ammo_duration <= 0 ) { UnlimitedAmmo.alpha = 0; //these 2 variables make the text invisible instead of destroying it to avoid the string overflow Remaining.alpha = 0; level.unlimited_ammo_active = false; //sets this to false in order to allow the timer to start again break; } } }Basically instead of destroy() I just turn it transparent so it avoids creating too many strings over time or any for that matter beyond one. Obviously this isn't future proofed so if more custom powerups are added it will be awkward to have them all stack using this method.
edit: I will post the other powerups I teased in a previous post in its own topic when I get them working correctly on all maps.
-
[Resource] [GSC] Working Tombstone Fix - Works on Tranzit and TownSimply include this code in your script:
solo_tombstone_removal() { notify( "tombstone_on" ); } turn_tombstone_on() { while ( 1 ) { machine = getentarray( "vending_tombstone", "targetname" ); machine_triggers = getentarray( "vending_tombstone", "target" ); i = 0; while ( i < machine.size ) { machine[ i ] setmodel( level.machine_assets[ "tombstone" ].off_model ); i++; } level thread do_initial_power_off_callback( machine, "tombstone" ); array_thread( machine_triggers, ::set_power_on, 0 ); level waittill( "tombstone_on" ); i = 0; while ( i < machine.size ) { machine[ i ] setmodel( level.machine_assets[ "tombstone" ].on_model ); machine[ i ] vibrate( vectorScale( ( 0, -1, 0 ), 100 ), 0,3, 0,4, 3 ); machine[ i ] playsound( "zmb_perks_power_on" ); machine[ i ] thread perk_fx( "tombstone_light" ); machine[ i ] thread play_loop_on_machine(); i++; } level notify( "specialty_scavenger_power_on" ); array_thread( machine_triggers, ::set_power_on, 1 ); if ( isDefined( level.machine_assets[ "tombstone" ].power_on_callback ) ) { array_thread( machine, level.machine_assets[ "tombstone" ].power_on_callback ); } level waittill( "tombstone_off" ); if ( isDefined( level.machine_assets[ "tombstone" ].power_off_callback ) ) { array_thread( machine, level.machine_assets[ "tombstone" ].power_off_callback ); } array_thread( machine, ::turn_perk_off ); players = get_players(); _a1718 = players; _k1718 = getFirstArrayKey( _a1718 ); while ( isDefined( _k1718 ) ) { player = _a1718[ _k1718 ]; player.hasperkspecialtytombstone = undefined; _k1718 = getNextArrayKey( _a1718, _k1718 ); } } } perk_machine_spawn_init() { match_string = ""; location = level.scr_zm_map_start_location; if ( location != "default" && location == "" && isDefined( level.default_start_location ) ) { location = level.default_start_location; } match_string = ( level.scr_zm_ui_gametype + "_perks_" ) + location; pos = []; if ( isDefined( level.override_perk_targetname ) ) { structs = getstructarray( level.override_perk_targetname, "targetname" ); } else { structs = getstructarray( "zm_perk_machine", "targetname" ); } _a3578 = structs; _k3578 = getFirstArrayKey( _a3578 ); while ( isDefined( _k3578 ) ) { struct = _a3578[ _k3578 ]; if ( isDefined( struct.script_string ) ) { tokens = strtok( struct.script_string, " " ); _a3583 = tokens; _k3583 = getFirstArrayKey( _a3583 ); while ( isDefined( _k3583 ) ) { token = _a3583[ _k3583 ]; if ( token == match_string ) { pos[ pos.size ] = struct; } _k3583 = getNextArrayKey( _a3583, _k3583 ); } } else pos[ pos.size ] = struct; _k3578 = getNextArrayKey( _a3578, _k3578 ); } if ( !isDefined( pos ) || pos.size == 0 ) { return; } precachemodel( "zm_collision_perks1" ); i = 0; while ( i < pos.size ) { perk = pos[ i ].script_noteworthy; if ( isDefined( perk ) && isDefined( pos[ i ].model ) ) { use_trigger = spawn( "trigger_radius_use", pos[ i ].origin + vectorScale( ( 0, -1, 0 ), 30 ), 0, 40, 70 ); use_trigger.targetname = "zombie_vending"; use_trigger.script_noteworthy = perk; use_trigger triggerignoreteam(); perk_machine = spawn( "script_model", pos[ i ].origin ); perk_machine.angles = pos[ i ].angles; perk_machine setmodel( pos[ i ].model ); if ( isDefined( level._no_vending_machine_bump_trigs ) && level._no_vending_machine_bump_trigs ) { bump_trigger = undefined; } else { bump_trigger = spawn( "trigger_radius", pos[ i ].origin, 0, 35, 64 ); bump_trigger.script_activated = 1; bump_trigger.script_sound = "zmb_perks_bump_bottle"; bump_trigger.targetname = "audio_bump_trigger"; if ( perk != "specialty_weapupgrade" ) { bump_trigger thread thread_bump_trigger(); } } collision = spawn( "script_model", pos[ i ].origin, 1 ); collision.angles = pos[ i ].angles; collision setmodel( "zm_collision_perks1" ); collision.script_noteworthy = "clip"; collision disconnectpaths(); use_trigger.clip = collision; use_trigger.machine = perk_machine; use_trigger.bump = bump_trigger; if ( isDefined( pos[ i ].blocker_model ) ) { use_trigger.blocker_model = pos[ i ].blocker_model; } if ( isDefined( pos[ i ].script_int ) ) { perk_machine.script_int = pos[ i ].script_int; } if ( isDefined( pos[ i ].turn_on_notify ) ) { perk_machine.turn_on_notify = pos[ i ].turn_on_notify; } if ( perk == "specialty_scavenger" || perk == "specialty_scavenger_upgrade" ) { use_trigger.script_sound = "mus_perks_tombstone_jingle"; use_trigger.script_string = "tombstone_perk"; use_trigger.script_label = "mus_perks_tombstone_sting"; use_trigger.target = "vending_tombstone"; perk_machine.script_string = "tombstone_perk"; perk_machine.targetname = "vending_tombstone"; if ( isDefined( bump_trigger ) ) { bump_trigger.script_string = "tombstone_perk"; } } if ( isDefined( level._custom_perks[ perk ] ) && isDefined( level._custom_perks[ perk ].perk_machine_set_kvps ) ) { [[ level._custom_perks[ perk ].perk_machine_set_kvps ]]( use_trigger, perk_machine, bump_trigger, collision ); } } i++; } } isTown() { if (isDefined(level.zombiemode_using_tombstone_perk) && level.zombiemode_using_tombstone_perk) { level thread perk_machine_spawn_init(); thread solo_tombstone_removal(); thread turn_tombstone_on(); } }and this code in your init():
isTown();and finally make sure to include:
#include maps\mp\zombies\_zm_perks;Basically the way it works is GSC only reads the first function with the same name. So if you have a function that you want to override simply call it first before the game calls the base function and it will be overridden.
edit: Updated to be map agnostic so it will only attempt to fix tombstone on Tranzit and Town.
edit2: Changed the condition to something more accurate - credit to Sparker for the recommendation. -
[Release] [GSC] Zombies Custom Powerup | Unlimited AmmoOx_ Plutonium is a custom bo2 client that supports 8 player dedicated zombie servers on all maps. It doesn't support GSC injection and instead uses its own modloader similar to Redacted so dedicated servers can load custom GSC mods. The GSC modloader feature is relatively new so it seems to have some interesting behavior sometimes. Eg. your old code not working but your new code does for some reason that I'll look into at some point.
I recommend you try Plutonium sometime since it has a more active playerbase than steam bo2, you can actually find games for all maps usually.
Also, I used your mod as a base to add a few extra powerups in the game files as drops like, the bonus team points, perk bottle, and random weapon. So thanks for the new version again.
Last thing, is it possible for a world at war nacht der untoten style powerup display for the infinite ammo powerup? I think it would it say Infinite Ammo: 20 and tick down from 20 at the bottom of the screen.
-
[Release] [GSC] Zombies Custom Powerup | Unlimited AmmoOx_ I tested your rewrite of the mod and it works on Plutonium dedicated servers now!
-
[Release] [GSC] Zombies Custom Powerup | Unlimited AmmoOx_ After some testing I've determined that in order for this mod to work you have to inject it at the lobby in Redacted. Which means as it is right now it won't work loaded as a mod on a Plutonium server. I'm guessing its both the include_powerup() and add_zombie_power() functions being ignored since the server thinks it has already loaded all powerups for the level. Is there some way to add powerups to the the level without injection at the lobby?
This is kinda weird though since adding weapons to the box works fine and its a similar methodology. Using
include_weapons() { include_weapon( "beretta93r_upgraded_zm", 1 ); } custom_add_weapons() { add_zombie_weapon( "beretta93r_upgraded_zm", undefined, &"ZOMBIE_WEAPON_BERETTA93r", 1000, "", "", undefined ); }will put the upgraded b23r into the box on any map that has the b23r in its fast file.