Modme Forums

Things I Ported from Cold War by Eric Maynard

Game Asset Reversing | Releases


EricMaynard:

This is my first foray into porting; An exercise in learning the tools. Lots of it came from testing the work with Scob to blend my program "ModelGetter" into Greyhound for the Cold War release.

The models are from Cold War, set up the materials and some FX for them as well!

You can use preexisting tutorials for replacing perk machines with these and follow the instructions in the readme, and you should be golden!

Download Here!

CREDITS:
Scobalula-Greyhound
Eric Maynard-Everything Else




Dick_Nixon:

Thank you Eric, Very Cool!


nightmare0161:

holy shit nice one!


Khramos:

Awesome! Working on porting for the first time with some BOCO weapons myself. Wish me luck!


KillJoy:

nice work m8


ImBulletm9:

One problem I've had is elemental pop is given at the start of the game.

Edit: If anyone has compile issues put the .gsc and .csc lines of code right above the main function, when i had organized it, it broke the linker


KillRideMasterJ:

Here's how you fix this jank ass elemental pop. replace your "function elemental_pop_aat_response" with this

function elemental_pop_aat_response( death, inflictor, attacker, damage, flags, mod, weapon, vpoint, vdir, sHitLoc, psOffsetTime, boneIndex, surfaceType )
{
if (IsPlayer( attacker ) )
{
if(attacker HasPerk("specialty_armorpiercing"))
{
if ( mod != "MOD_PISTOL_BULLET" && mod != "MOD_RIFLE_BULLET" && mod != "MOD_GRENADE" && mod != "MOD_PROJECTILE" && mod != "MOD_EXPLOSIVE" && mod != "MOD_IMPACT" )
{
return;
}

weapon = get_nonalternate_weapon( weapon );
self.aat = [];
self.aat_cooldown_start = [];
keys = GetArrayKeys( level.aat );
keys_random = array::randomize( keys );
keys_randomize = keys_random[0];

if ( !IsDefined( keys_randomize ) )
{
//IPrintLnBold("aat not defined");
return;
}

if ( death && !level.aat[keys_randomize].occurs_on_death )
{
return;
}

if ( !isdefined( self.archetype ) )
{
return;
}

// if self's archetype is registered in immune_trigger, AAT check is completely bypassed
if ( IS_TRUE( level.aat[keys_randomize].immune_trigger[ self.archetype ] ) )
{
return;
}

now = GetTime() / 1000;

if ( now <= self.elemental_pop_aat_cooldown_start[keys_randomize] + level.aat[keys_randomize].cooldown_time_entity )
{
return;
}

if ( now <= attacker.elemental_pop_aat_cooldown_start[keys_randomize] + level.aat[keys_randomize].cooldown_time_attacker )
{
return;
}

if ( now <= level.aat[keys_randomize].cooldown_time_global_start + level.aat[keys_randomize].cooldown_time_global )
{
return;
}

if ( isdefined( level.aat[keys_randomize].validation_func ) )
{
if ( !self [[level.aat[keys_randomize].validation_func]]() )
{
return;
}
}

success = false;
reroll_icon = undefined;
percentage = level.aat[keys_randomize].percentage;

//IPrintLnBold(percentage);

if ( percentage >= RandomFloat( 2 ) )
{
success = true;
}

if ( !success )
{
keys = GetArrayKeys( level.aat_reroll );
keys = array::randomize( keys );// randomize the keys so players don't assume one reroll is better than another just because of registration order
foreach ( key in keys )
{
if ( attacker [[level.aat_reroll[key].active_func]]() )
{
for ( i = 0; i < level.aat_reroll[key].count; i++ )
{
if ( percentage >= RandomFloat( 2 ) )
{
success = true;
reroll_icon = level.aat_reroll[key].damage_feedback_icon;
break;
}
}
}

if ( success )
{
break;
}
}
}

if ( !success )
{
return;
}

level.aat[keys_randomize].cooldown_time_global_start = now;
attacker.elemental_pop_aat_cooldown_start[keys_randomize] = now;
self thread [[level.aat[keys_randomize].result_func]]( death, attacker, mod, weapon );
attacker thread damagefeedback::update_override( level.aat[keys_randomize].damage_feedback_icon, level.aat[keys_randomize].damage_feedback_sound, reroll_icon );
}
}
return -1;
}


777tones:

Here's how you fix this jank ass elemental pop. replace your "function elemental_pop_aat_response" with this

function elemental_pop_aat_response( death, inflictor, attacker, damage, flags, mod, weapon, vpoint, vdir, sHitLoc, psOffsetTime, boneIndex, surfaceType )
{
if (IsPlayer( attacker ) )
{
if(attacker HasPerk("specialty_armorpiercing"))
{
if ( mod != "MOD_PISTOL_BULLET" && mod != "MOD_RIFLE_BULLET" && mod != "MOD_GRENADE" && mod != "MOD_PROJECTILE" && mod != "MOD_EXPLOSIVE" && mod != "MOD_IMPACT" )
{
return;
}

weapon = get_nonalternate_weapon( weapon );
self.aat = [];
self.aat_cooldown_start = [];
keys = GetArrayKeys( level.aat );
keys_random = array::randomize( keys );
keys_randomize = keys_random[0];

if ( !IsDefined( keys_randomize ) )
{
//IPrintLnBold("aat not defined");
return;
}

if ( death && !level.aat[keys_randomize].occurs_on_death )
{
return;
}

if ( !isdefined( self.archetype ) )
{
return;
}

// if self's archetype is registered in immune_trigger, AAT check is completely bypassed
if ( IS_TRUE( level.aat[keys_randomize].immune_trigger[ self.archetype ] ) )
{
return;
}

now = GetTime() / 1000;

if ( now <= self.elemental_pop_aat_cooldown_start[keys_randomize] + level.aat[keys_randomize].cooldown_time_entity )
{
return;
}

if ( now <= attacker.elemental_pop_aat_cooldown_start[keys_randomize] + level.aat[keys_randomize].cooldown_time_attacker )
{
return;
}

if ( now <= level.aat[keys_randomize].cooldown_time_global_start + level.aat[keys_randomize].cooldown_time_global )
{
return;
}

if ( isdefined( level.aat[keys_randomize].validation_func ) )
{
if ( !self [[level.aat[keys_randomize].validation_func]]() )
{
return;
}
}

success = false;
reroll_icon = undefined;
percentage = level.aat[keys_randomize].percentage;

//IPrintLnBold(percentage);

if ( percentage >= RandomFloat( 2 ) )
{
success = true;
}

if ( !success )
{
keys = GetArrayKeys( level.aat_reroll );
keys = array::randomize( keys );// randomize the keys so players don't assume one reroll is better than another just because of registration order
foreach ( key in keys )
{
if ( attacker [[level.aat_reroll[key].active_func]]() )
{
for ( i = 0; i < level.aat_reroll[key].count; i++ )
{
if ( percentage >= RandomFloat( 2 ) )
{
success = true;
reroll_icon = level.aat_reroll[key].damage_feedback_icon;
break;
}
}
}

if ( success )
{
break;
}
}
}

if ( !success )
{
return;
}

level.aat[keys_randomize].cooldown_time_global_start = now;
attacker.elemental_pop_aat_cooldown_start[keys_randomize] = now;
self thread [[level.aat[keys_randomize].result_func]]( death, attacker, mod, weapon );
attacker thread damagefeedback::update_override( level.aat[keys_randomize].damage_feedback_icon, level.aat[keys_randomize].damage_feedback_sound, reroll_icon );
}
}
return -1;
}

Im getting a syntax error at (73,44) pls help


1CrazyGamer:

Im getting a syntax error at (73,44) pls help

did you really just copy and paste this, parts of it are unfinished and need certain stuff added. just wait till eric updates the script if he ever gets around to it


JesusYourFriend:

It just doesn' t work for me, i just keep getting image duplicate errors. Can someone make a tutorial on how to put them into the game ?
I' ve been trying for days...


777tones:

durr


kyleboiv:

I'm unable to get the perk machines to work in-game, they just show up as the old perk machines when I run the map, however they appear normally in Radiant, any idea what I'm doing wrong?


mario807906:

hey whenever I start my map i somehow already have elemental pop without actually buying it how do i stop this.


ironratchett:

I'm just getting a syntax error, need some help with resolving this issues as well


Sphynxmods:

How to fix Elemental Pop:

Add the following code:

if( !IS_TRUE(attacker HasPerk("specialty_armorpiercing"))){
   return;
}

at the top inside the

function elemental_pop_aat_response( death, inflictor, attacker, damage, flags, mod, weapon, vpoint, vdir, sHitLoc, psOffsetTime, boneIndex, surfaceType )
{
function

Full function code:
function elemental_pop_aat_response( death, inflictor, attacker, damage, flags, mod, weapon, vpoint, vdir, sHitLoc, psOffsetTime, boneIndex, surfaceType )
{   
    if ( !IsPlayer( attacker ) )
    {
        return;
    }

    if ( mod != "MOD_PISTOL_BULLET" &amp;&amp; mod != "MOD_RIFLE_BULLET" &amp;&amp; mod != "MOD_GRENADE" &amp;&amp; mod != "MOD_PROJECTILE" &amp;&amp; mod != "MOD_EXPLOSIVE" &amp;&amp; mod != "MOD_IMPACT" )
    {
        return;
    }

    if( !IS_TRUE(attacker HasPerk("specialty_armorpiercing"))){
        return;
    }
    
    weapon = get_nonalternate_weapon( weapon );

    self.aat = [];

    self.aat_cooldown_start = [];

    keys = GetArrayKeys( level.aat );
    
    keys_random = array::randomize( keys );

    keys_randomize = keys_random[0];
    if ( !IsDefined( keys_randomize ) )
    {
        //IPrintLnBold("aat not defined");
        return;
    }

    if ( death &amp;&amp; !level.aat[keys_randomize].occurs_on_death )
    {
        return;
    }
    
    if ( !isdefined( self.archetype ) )
    {
        return;
    }
    
    // if self&#39;s archetype is registered in immune_trigger, AAT check is completely bypassed
    if ( IS_TRUE( level.aat[keys_randomize].immune_trigger[ self.archetype ] ) )
    {
        return;
    }

    now = GetTime() / 1000;
    if ( now &lt;= self.elemental_pop_aat_cooldown_start[keys_randomize] + level.aat[keys_randomize].cooldown_time_entity )
    {
        return;
    }

    if ( now &lt;= attacker.elemental_pop_aat_cooldown_start[keys_randomize] + level.aat[keys_randomize].cooldown_time_attacker )
    {
        return;
    }
    
    if ( now &lt;= level.aat[keys_randomize].cooldown_time_global_start + level.aat[keys_randomize].cooldown_time_global )
    {
        return;
    }

    if ( isdefined( level.aat[keys_randomize].validation_func ) )
    {
        if ( !self [[level.aat[keys_randomize].validation_func]]() )
        {
            return;
        }
    }
    
    success = false;
    reroll_icon = undefined;
    percentage = level.aat[keys_randomize].percentage;
    
    //IPrintLnBold(percentage);

    if ( percentage &gt;= RandomFloat( 2 ) )
    {
        success = true;
    }

    if ( !success )
    {
        keys = GetArrayKeys( level.aat_reroll );
        keys = array::randomize( keys );// randomize the keys so players don&#39;t assume one reroll is better than another just because of registration order
        foreach ( key in keys )
        {
            if ( attacker [[level.aat_reroll[key].active_func]]() )
            {
                for ( i = 0; i &lt; level.aat_reroll[key].count; i++ )
                {
                    if ( percentage &gt;= RandomFloat( 2 ) )
                    {
                        success = true;
                        reroll_icon = level.aat_reroll[key].damage_feedback_icon;

                        break;
                    }
                }
            }

            if ( success )
            {
                break;
            }
        }
    }

    if ( !success )
    {
        return;
    }

    level.aat[keys_randomize].cooldown_time_global_start = now;
    attacker.elemental_pop_aat_cooldown_start[keys_randomize] = now;

    self thread [[level.aat[keys_randomize].result_func]]( death, attacker, mod, weapon );
    attacker thread damagefeedback::update_override( level.aat[keys_randomize].damage_feedback_icon, level.aat[keys_randomize].damage_feedback_sound, reroll_icon );
}


ShadingYT:

Greetings Mr eric i am downloading this rn but i am asking will you put the tombstone soda with your pack?


mario807906:

Greetings Mr eric i am downloading this rn but i am asking will you put the tombstone soda with your pack?

mule kick too lol


ironratchett:

How to fix Elemental Pop:

Add the following code:
if( !IS_TRUE(attacker HasPerk("specialty_armorpiercing"))){
   return;
}

at the top inside the

function elemental_pop_aat_response( death, inflictor, attacker, damage, flags, mod, weapon, vpoint, vdir, sHitLoc, psOffsetTime, boneIndex, surfaceType )
{
function

Full function code:
function elemental_pop_aat_response( death, inflictor, attacker, damage, flags, mod, weapon, vpoint, vdir, sHitLoc, psOffsetTime, boneIndex, surfaceType )
{  
    if ( !IsPlayer( attacker ) )
    {
        return;
    }

    if ( mod != "MOD_PISTOL_BULLET" &amp;&amp; mod != "MOD_RIFLE_BULLET" &amp;&amp; mod != "MOD_GRENADE" &amp;&amp; mod != "MOD_PROJECTILE" &amp;&amp; mod != "MOD_EXPLOSIVE" &amp;&amp; mod != "MOD_IMPACT" )
    {
        return;
    }

    if( !IS_TRUE(attacker HasPerk("specialty_armorpiercing"))){
        return;
    }
   
    weapon = get_nonalternate_weapon( weapon );

    self.aat = [];

    self.aat_cooldown_start = [];

    keys = GetArrayKeys( level.aat );
   
    keys_random = array::randomize( keys );

    keys_randomize = keys_random[0];
    if ( !IsDefined( keys_randomize ) )
    {
        //IPrintLnBold("aat not defined");
        return;
    }

    if ( death &amp;&amp; !level.aat[keys_randomize].occurs_on_death )
    {
        return;
    }
   
    if ( !isdefined( self.archetype ) )
    {
        return;
    }
   
    // if self&#39;s archetype is registered in immune_trigger, AAT check is completely bypassed
    if ( IS_TRUE( level.aat[keys_randomize].immune_trigger[ self.archetype ] ) )
    {
        return;
    }

    now = GetTime() / 1000;
    if ( now &lt;= self.elemental_pop_aat_cooldown_start[keys_randomize] + level.aat[keys_randomize].cooldown_time_entity )
    {
        return;
    }

    if ( now &lt;= attacker.elemental_pop_aat_cooldown_start[keys_randomize] + level.aat[keys_randomize].cooldown_time_attacker )
    {
        return;
    }
   
    if ( now &lt;= level.aat[keys_randomize].cooldown_time_global_start + level.aat[keys_randomize].cooldown_time_global )
    {
        return;
    }

    if ( isdefined( level.aat[keys_randomize].validation_func ) )
    {
        if ( !self [[level.aat[keys_randomize].validation_func]]() )
        {
            return;
        }
    }
   
    success = false;
    reroll_icon = undefined;
    percentage = level.aat[keys_randomize].percentage;
   
    //IPrintLnBold(percentage);

    if ( percentage &gt;= RandomFloat( 2 ) )
    {
        success = true;
    }

    if ( !success )
    {
        keys = GetArrayKeys( level.aat_reroll );
        keys = array::randomize( keys );// randomize the keys so players don&#39;t assume one reroll is better than another just because of registration order
        foreach ( key in keys )
        {
            if ( attacker [[level.aat_reroll[key].active_func]]() )
            {
                for ( i = 0; i &lt; level.aat_reroll[key].count; i++ )
                {
                    if ( percentage &gt;= RandomFloat( 2 ) )
                    {
                        success = true;
                        reroll_icon = level.aat_reroll[key].damage_feedback_icon;

                        break;
                    }
                }
            }

            if ( success )
            {
                break;
            }
        }
    }

    if ( !success )
    {
        return;
    }

    level.aat[keys_randomize].cooldown_time_global_start = now;
    attacker.elemental_pop_aat_cooldown_start[keys_randomize] = now;

    self thread [[level.aat[keys_randomize].result_func]]( death, attacker, mod, weapon );
    attacker thread damagefeedback::update_override( level.aat[keys_randomize].damage_feedback_icon, level.aat[keys_randomize].damage_feedback_sound, reroll_icon );
}




Which file do I fix this under?


mario807906:

Which file do I fix this under?

in the elemental pop .gsc


ironratchett:

in the elemental pop .gsc

Cool, but now I'm getting another syntax error in my map.gsc file (68,9) now.


ShadingYT:

what is the way to fix the perk model its still the og one for me


ironratchett:

Elemental Pop still needs to be fixed! The animation screen and some textures are missing


mario807906:

what is the way to fix the perk model its still the og one for me


mario807906:

Elemental Pop still needs to be fixed! The animation screen and some textures are missing

Redownload the pack add the folders that go into your root folder and delete only one of the duplicate images, you must of deleted both of them if u are missing them.


Riva:

Do you plan on releasing the new perk models, such as phd, tombstone, mule kick, etc?