[Support] Enabling phd flopper (persistent upgrade) on Die Rise

Topic created · 6 Posts · 150 Views
  • Alright so, I am a total noob to gsc scripting and I tried to enable flopper (persistent upgrade) for Die Rise.

    As expected, I ran into an error:

    1 script error(s):
     Unresolved external :  "maps/mp/zombies/_zm_pers_upgrades_functions" with 0 parameters in "_clientids" at lines 1,1 
    

    Here's the code:

    
    #include maps/mp/zombies/_zm_perk_divetonuke;
    #include maps/mp/zombies/_zm_pers_upgrades_functions;
    
    init()
    {
    level.pers_upgrade_flopper = 1; 
    level.divetonuke_precache_override_func=::maps/mp/zombies/_zm_pers_upgrades_functions::divetonuke_precache_override_func;
    level.pers_flopper_divetonuke_func = ::maps/mp/zombies/_zm_pers_upgrades_functions::pers_flopper_explode;
    level.pers_flopper_network_optimized = 1;
    }
    
    

    Could someone help me please?

  • I fixed the error and code actually runs! The only problem that it actually doesn't give you the flopper for some reason.

    #include maps/mp/zombies/_zm_perk_divetonuke;
    #include maps/mp/zombies/_zm_pers_upgrades_functions;
    #include maps/mp/zombies/_zm_magicbox;
    #include maps/mp/zombies/_zm_perks;
    #include maps/mp/zombies/_zm_weapons;
    #include maps/mp/_visionset_mgr;
    #include maps/mp/zombies/_zm_powerups;
    #include maps/mp/gametypes_zm/_globallogic_score;
    #include maps/mp/zombies/_zm_score;
    #include maps/mp/zombies/_zm_stats;
    #include maps/mp/zombies/_zm_pers_upgrades;
    #include maps/mp/zombies/_zm_utility;
    #include maps/mp/_utility;
    #include common_scripts/utility;
    #include maps\mp\zombies\_zm_powerups;
    
    init()
    {
        checkthemap();
    }
    
    checkthemap()
    {
        if( getdvar("mapname") == "zm_highrise" )
    	{
        level.pers_upgrade_flopper = 1; 
        level.divetonuke_precache_override_func = divetonuke_precache_override_func;
        level.pers_flopper_divetonuke_func = pers_flopper_explode;
        level.pers_flopper_network_optimized = 1;
    	}
    
    
    }
    
    
    divetonuke_precache_override_func()
    {
    	precacheshader( "specialty_divetonuke_zombies" );
    	level._effect[ "divetonuke_light" ] = loadfx( "misc/fx_zombie_cola_dtap_on" );
    }
    
    pers_flopper_explode( attacker, origin )
    {
    	self endon( "disconnect" );
    	radius = level.zombie_vars[ "zombie_perk_divetonuke_radius" ];
    	min_damage = level.zombie_vars[ "zombie_perk_divetonuke_min_damage" ];
    	max_damage = level.zombie_vars[ "zombie_perk_divetonuke_max_damage" ];
    	if ( isDefined( level.pers_flopper_network_optimized ) && level.pers_flopper_network_optimized )
    	{
    		attacker thread pers_flopper_damage_network_optimized( origin, radius, max_damage, min_damage, "MOD_GRENADE_SPLASH" );
    	}
    	else
    	{
    		radiusdamage( origin, radius, max_damage, min_damage, attacker, "MOD_GRENADE_SPLASH" );
    	}
    	attacker setclientfield( "phd_flopper_effects", 1 );
    	maps/mp/_visionset_mgr::vsmgr_activate( "visionset", "zm_perk_divetonuke", attacker );
    	wait 1;
    	maps/mp/_visionset_mgr::vsmgr_deactivate( "visionset", "zm_perk_divetonuke", attacker );
    	attacker setclientfield( "phd_flopper_effects", 0 );
    }
    

    I don't even know if you actually can make PHD Flopper work on Die Rise, but still worth a try.

  • @Banni If a zombies map doesn't cache or have the perk preloaded I do not think you can force it on the player.

  • @Banni I think your going about this in the wrong way. I imagine the perk code itself is already loaded. (Which is what you've got so far). The issue is probably more the fact that the perk machine isn't present on the map which probably isn't easily changed. (It might be actually not sure, but would probably involve you having to override some other gsc files)

    I suggest just forcefully assigning the perk to each player.

  • To solve this, you're going to want to carefully look at gscs found in e.g. zm_buried_patch, since that's a map that has the perk. You can find a GSC dump from the pinned thread on this forum.
    And help yourself out by downloading some program which can search inside multiple files. "AstroGrep" is one I've used. just search for e.g. "dive" inside all the gscs and and study the results.

  • Bump. Anyone figured this out yet?

Log in to reply