| Home Page | Recent Changes | Preferences

Mod Ideas/InstaVsSniper

Mod ideas for UT Classic (Other versions open for discussion)– InstaVsSniper

Description

This is a mutator that gives the Red team the Sniper Rifle with 999 ammo, and gives the Blue team the Enhanced Shock Rifle. All pick-ups are removed from the maps.

Sniper fans can play Sniper, but now they have a new opponent with their own weapons. This is more like real life wars. Instagibers can enjoy a new opponent as well. Sniper fans and Instagib fans have alot in common and clans of each persuasion can come together in this merging of their favorite Arena mutators.

Earlier version I made of this mod was determined to be fair gameplay by the testers. It is, however, biased to one or the other weapon depending on range of attack or how close of quarters the fight takes place in. Cool. Sounds like UT to me.

Progress

This version is finished for UT Classic. Call me a slob if you wish, I am fed up with trying to cator to the AI for this mod. I'll suffice it to say that this mod has minimal bot support because once in a while they get stupid and don't know where to go. I suppose they'll look retarded and then die. Sounds good to me. I'll leave the idea page up because it can still be done for other games. Besides, this mod came from the wiki. Most of it happened right here.

/*============================================================================
InstaVsSniper
By Ch3z 
This mod was created almost entirely by information I found at UnrealWiki.
                                                  (http://wiki.beyondunreal.com/wiki/Home_Page)
A simple Arena style mutator to give Sniper Rifle to Red Team (with 999 ammo) and Enhanced Shock Rifle to Blue Team
In non-TeamGames everyone has both weapons. All pickups are gone.
=============================================================================
*/

class InstaVsSniper extends Mutator;

function AddMutator(Mutator M)
{
    if ( M.IsA('Arena') )
    {
        log(M$" not allowed (Arena mutator not compatible with existing mutator, InstaVsSniper)");
        return; // Arena Muator not added.
    }
    Super.AddMutator(M); // Allow next mutator to load otherwise.
}

function PostBeginPlay()
{
    local actor Other;

// Get rid of all pickups here otherwise they are gone as player inventory as well, which looses our weapons.
     foreach AllActors( class 'Actor', Other )
    {
        if( Other.IsA('Pickup') || Other.IsA('Pickupbase' ) || Other.IsA('Weapon') || Other.IsA('Ammo'))
        {
            if( Inventory(Other).MyMarker != None)
            {
                        Other.Destroy();
            }
        }
        }

    Super.PostBeginPlay();
}

function bool AlwaysKeep(Actor Other) // Keep CheckReplacement from removing some stuff from map that loads..
{
    if ( Other.IsA('SniperRifle') || Other.IsA('SuperShockRifle') ) // keep our 2 weapons.
    {
            Weapon(Other).PickupAmmoCount = 999; // Otherwise SniperRifle only gets 8 loads.
            Weapon(Other).bCanThrow = false; // so weapons aren't dropped and left when player is killed.
            return true;
    }

    if ( Other.IsA('BulletBox') || Other.IsA('SuperShockCore')  ) // Keep our 2 weapons' ammo.
    {
            Ammo(Other).AmmoAmount = 999; // Probably didn't need to raise this, but don't matter.
            return true;
    }

    Super.AlwaysKeep(Other);  // So that Mutator class can allow next mutator to use AlwaysKeep function.
    return false;
}

function bool CheckReplacement(Actor Other, out byte bSuperRelevant) // Get rid of some stuff from map that loads.
{
    

    if ( Other.IsA('Weapon') )
    {
                return false;
    }


    super.CheckReplacement(Other, bSuperRelevant);
    return true;
}

function bool bIsATeamGame()
{

// Called in ModifyPlayer() and used to give weapons reguardless of team for DeathMatch and LastManStanding
    if(Level != None && Level.Game != None )
        return Level.Game.bTeamGame;
}

function ModifyPlayer(Pawn Other)
{

// If teamgame give weapons per team else give both weapons to all

    if ( Other.PlayerReplicationInfo != None)
    { 
        if ( Other.PlayerReplicationInfo.Team == 0 ||  !bIsATeamGame())
            Super(DeathMatchPlus).GiveWeapon(Other, "Botpack.SniperRifle");
        if ( Other.PlayerReplicationInfo.Team == 1 || !bIsATeamGame())
            Super(DeathMatchPlus).GiveWeapon(Other, "Botpack.SuperShockRifle");
    }

    Super.ModifyPlayer(Other); // So that Mutator class can allow next mutator to use ModifyPlayer function
}

defaultproperties
{
}

Please stop by the Testing Lab and try this out on my test server. Let me know there if you see any problems. Thanks!

Interested Scripters

If you are interested in developing this mod for any UnrealTournament game then add your name to the list (Specify Version). Once you start development you should indicate that below (and hopefully include a link to a journal page). Before you start development you should also check this section to see if anyone else has started.

  • CH3Z(UT Version)
  • (name in link form)

Discussion

Ch3z: This "Mod Idea" page is serving as kind of a lab for now. It may be that it should be done in a journal, but my journal is a mess right now. =P I plan to move the working parts to a more appropriate place when I can.

Ch3z: I have learned sooo much making this mod! I first made it with brute force and got it to work. Finally, I went about it properly and with eligance. It is very well done in my less than humble opinion (proud of myself). With some help from Wormbo and Daid303 in answering a question for me in BuF, I have this mod finished working compatibly and with out errors or warnings. I am releasing it now. It will first be available only at [http://www.ShooterSGL.com] in the Chaptor1 forum. Chaptor1 and Allied Snipers at that ladder were the inspiration for this mod and tested it for me. Thanks everyone for the help and support.

Ch3z: This mod causes a Accessed None warning to be logged when a player leaves the game and a bot comes into replace him. The bot doesn't know where to go or some crap. I'm tired of trying to fix it. I'm releasing it as it is. If you don't like it, don't have bots in the game, ignore the warning, or figure out the fix and i'll release the fixed version giving you credit. I won't work on that issue anymore even if i'm given a suggestion for the fix. Only if proven and compiled proof is given. I'm done with it.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

Mapping Topics

Mapping Lessons

UnrealEd Interface

Questions&Answers

Scripting Topics

Scripting Lessons

Making Mods

Class Tree

Questions&Answers

Modeling Topics

Questions&Answers

Log In