New server

General UT99 Discussions
Heathcliff_UK
Posts: 63
Joined: Wed May 10, 2017 8:38 am
Contact:

Re: New server

Post by Heathcliff_UK » Tue Sep 26, 2017 7:17 am

Scary how he gets around...😂

User avatar
Piligrim
Posts: 1
Joined: Fri Sep 29, 2017 6:53 pm
Contact:

Re: New server

Post by Piligrim » Fri Sep 29, 2017 8:33 pm

Owned mutator.

1. Create in root directory "Unreal Tournament" file by name mutator "AllWeapons".
Possible manually or by means of command line:

md c:\ut99\AllWeapons

2. Create in "AllWeapons", folder "Classes":

md c:\ut99\AllWeapons\Classes

3. Entry in "c:\ut99\AllWeapons\Classes" and create file "AllWeapons.uc"


Open the file *.UC by means of "Notepad", copy and get up the following text:

Code: Select all

////////////////////////////////////////////////////////////////////////////////
// AllWeapons.uc

class AllWeapons expands Mutator;

var bool g_bInit;
var int g_nCount;
var int g_nCountWeapon;

var name WeaponName, AmmoName;

function PostBeginPlay()
{
	if( !g_bInit )
	{	
		g_bInit = true;
		Level.Game.RegisterDamageMutator(Self);
	}
}

function ModifyPlayer(Pawn PlayerPawn)
{
	if ( PlayerPawn.IsA('Spectator') )
		return;

	SetWeapon(PlayerPawn);

	//
	// Here possible experiment, but neatly...
	//

	SetAmmo(PlayerPawn, 999);

	SetArmor(PlayerPawn, FALSE);

	GetInventory(PlayerPawn);

	if( NextMutator != None )
	{
		NextMutator.ModifyPlayer(PlayerPawn);
	}
}

function SetWeapon(Pawn PlayerPawn)
{
	local DeathMatchPlus DM;
	DM = DeathMatchPlus(Level.Game);
	if( DM != None )
	{
		DM.GiveWeapon(PlayerPawn, "Botpack.PulseGun");
		DM.GiveWeapon(PlayerPawn, "Botpack.ShockRifle");
		DM.GiveWeapon(PlayerPawn, "Botpack.UT_FlakCannon");
		DM.GiveWeapon(PlayerPawn, "Botpack.UT_BioRifle");
		DM.GiveWeapon(PlayerPawn, "Botpack.Minigun2");
		DM.GiveWeapon(PlayerPawn, "Botpack.SniperRifle");
		DM.GiveWeapon(PlayerPawn, "Botpack.Ripper");
		DM.GiveWeapon(PlayerPawn, "Botpack.UT_Eightball");
	}
}

function SetAmmo(Pawn PlayerPawn, int nCount)
{
	local Inventory inv;
	local Weapon weap;

	for ( inv=PlayerPawn.inventory; inv!=None; inv=inv.inventory )
	{
		weap = Weapon(inv);
		if ( (weap != None) && (weap.AmmoType != None) )
		{
			if( nCount > 0 )
				weap.AmmoType.AmmoAmount = nCount;
			else
				weap.AmmoType.AmmoAmount = weap.AmmoType.MaxAmmo;
		}
	}
}

function SetArmor(Pawn PlayerPawn, BOOL bEnable)
{
	local Inventory inv;
	if( bEnable == FALSE )
	{
		return;
	}
	inv = Spawn(class'Armor2');
	if( inv != None )
	{
		inv.bHeldItem = true;
		inv.RespawnTime = 0.0;
		inv.GiveTo(PlayerPawn);
	}
	inv = Spawn(class'Thighpads');
	if( inv != None )
	{
		inv.bHeldItem = true;
		inv.RespawnTime = 0.0;
		inv.GiveTo(PlayerPawn);
	}
	PlayerPawn.Health = 149;
}

function GetInventory(Pawn PlayerPawn)
{
	local Inventory inv;

	if( g_nCountWeapon > 0 )
		return;

	for ( inv=PlayerPawn.inventory; inv!=None; inv=inv.inventory )
	{
		if( inv.IsA('Weapon') )
		{
			++g_nCountWeapon;
			log([email protected]" : "@inv.ItemName);
		}
	}
}

defaultproperties
{
}

////////////////////////////////////////////////////////////////////////////////
// <<eof>> AllWeapons.uc
////////////////////////////////////////////////////////////////////////////////
4. Save (close) file "AllWeapons.uc"


* As a matter of convenience further work, create in root
directory mutator ( etc "c:\ut99\AllWeapons\" )
BAT-file of the assembly, for instance "compile.bat"
with the following contents:

-----[ compile.bat ]-----
cd ..
cd System
del AllWeapons.u
ucc make
pause

-----[ eof compile.bat ]-----


-= Main work completed =-


a) Remained to edit the file "UnrealTournament.ini".

- open "UnrealTournament.ini"

in sections
[Editor.EditorEngine]
add
EditPackages=AllWeapons
(sometime in most bottom...)


b) Create the *.INT file - "AllWeapons.int"

Open "Notepad" Save the file As...
"AllWeapons.int"

Get up following text in it:

-----[ AllWeapons.int ]-----

[Public]
Object=(Name=AllWeapons.AllWeapons,Class=Class,MetaClass=Engine.Mutator,Description="All weapons (999 ammo).")


-----[ eof AllWeapons.int ]-----

After conservation, go in mutator folder and start the assembly (the double click on "compile.bat").

If all aptly in system file of the play will is created file *.U - "AllWeapons.u".

The Pair of the methods of the start мутатора:


#1: CTF-Face
C:\ut99\System\UnrealTournament CTF-Face.unr?game=Botpack.CTFGame?mutator=AllWeapons.AllWeapons


#2: DM-Deck16
C:\ut99\System\UnrealTournament.exe DM-Deck16][.unr?mutator=AllWeapons.AllWeapons


:-_)

User avatar
Pileyrei
Site Admin
Posts: 433
Joined: Sat May 06, 2017 8:20 am
Contact:

Re: New server

Post by Pileyrei » Mon Oct 02, 2017 7:26 am

Hi Pilgrim

Great first post :)

Welcome!

Piley
Our Servers
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest