=Tim-_-;170672]I've received a few requests from people for custom mods, and rather than making them myself, I'll teach you real quick how it's done.
There's a base class in the NewNetWeapons package called "NewNetArena". I made this a long time ago to make it super easy to create Arena-style mods (mods that only use some default set of weapons).
To start, make sure you have your dependencies set up properly in UnrealTournament.ini. At the very least you'll need this:
Code:
EditPackages=Core
EditPackages=Engine
EditPackages=Editor
EditPackages=UWindow
EditPackages=Fire
EditPackages=IpDrv
EditPackages=UWeb
EditPackages=UBrowser
EditPackages=UnrealShare
EditPackages=UnrealI
EditPackages=UMenu
EditPackages=IpServer
EditPackages=Botpack
EditPackages=UTServerAdmin
EditPackages=UTMenu
EditPackages=UTBrowser
EditPackages=2k4Combos
EditPackages=NewNetUnrealv0_9_15
EditPackages=NewNetWeaponsv0_9_15
EditPackages=YourCustomNewNetModv0_9_15
You can specify a default weapon and up to 8 other weapons, and there's really not much to it, so it's probably easiest to just provide a code sample.
The "TeleGib" mod is probably the most straightforward. Players are given the InstaGib rifle (SuperShockRifle) as their default weapon, a translocator, and an impact hammer. Pickups (armor, shield, etc.) remain available.
UnrealTournament/NewNetTGv0_9_15/Classes/NewNetTG.uc:
Code:
class NewNetTG expands NewNetArena;
defaultproperties
{
DefaultWeapon=class'ST_SuperShockRifle'
WeaponNames(0)=ST_Translocator
WeaponNames(1)=ST_ImpactHammer
AmmoNames(0)=SuperShockCore
}
Or if you wanted to remove certain pickups:
Code:
class NewNetTG expands NewNetArena;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
if (
Other.IsA('TournamentHealth') ||
Other.IsA('UT_Shieldbelt') ||
Other.IsA('Armor2') ||
Other.IsA('ThighPads') ||
Other.IsA('UT_Invisibility') ||
Other.IsA('UDamage')
)
return false;
return Super.CheckReplacement( Other, bSuperRelevant );
}
defaultproperties
{
DefaultWeapon=class'ST_SuperShockRifle'
WeaponNames(0)=ST_Translocator
WeaponNames(1)=ST_ImpactHammer
AmmoNames(0)=SuperShockCore
}
That's all there is to it! Pretty easy right?
Note that you'll need to provide the AmmoNames for any weapons that use ammo. And if you want to use custom weapons not in the NewNetWeapons package, you'll need to provide their respective WeaponPackages.
For example:
Code:
class YourCustomNewNetMod expands NewNetArena;
defaultproperties
{
DefaultWeapon=class'ST_SuperShockRifle'
WeaponNames(0)=YourCustomWeapon
WeaponPackages(0)=YourCustomWeaponPackage
AmmoNames(0)=SuperShockCore
AmmoNames(1)=YourCustomAmmo
}
And last but not least, a batch file is really helpful when compiling. Just save something like the following and double click it when you're ready to compile your changes.
UnrealTournament/System/Make.bat:
Code:
del YourCustomNewNetModv0_9_15.u
ucc make
Server.bat
UnrealTournament/System/Server.bat:
Code:
:top
ucc server DM-Deck16][.unr?Game=Botpack.DeathMatchPlus?Mutator=MapvoteLA13.BDBMapvote?Maxplayers=10 ini=UnrealTournament.ini log=server.log -pktlag=300
copy server.log server-crash.log
goto top
-pktlag=300 will give you 300 ping, which is what I use when testing NewNet.