Post tutorial RSS First MoD - Unreal Scipt - Unreal Development Kit

Quickly setup your first Unreal Script MoD for the Unreal Development Kit

Posted by on - Basic Client Side Coding

Quick First MoD
Unreal Script - Setup for a GameType/HUD/Pawn/Player Classes.
All Text Based - Use NotePad or ConTEXT, etc...

Two Folders:
1. Desktop UTGame
2. C:/GameZ/UDK/UDK-2009-11/UTGame

First, create folders on your desktop:

Code:

UTGame/
-Config
-Localization
---INT (I Guess this means International aka English)

-Published
---CookedPC
--- ---Script

-Src
---EoW (or ElementsofWar if you want, but YOU must use that name in ALL your .uc files and such. Keep that in mind)
--- ---Classes(Your code that's in the U file)
--- ---xClasses(Your full source code)

Config/UTEoW.ini

Code:

[EoWxGame UTUIDataProvider_GameModeInfo]
FriendlyName=Elements of War
Description=n00bZ killing each other

GameMode=EoW.EoWxGame
bIsCampaign=False
Prefixes=DM
OptionSet=TDM
DefaultMap=

GameSettingsClass=UTGameSettingsTDM
GameSearchClass=UTGameSearchTDM

PreviewImageMarkup=
IconImage=UI_HUD.HUD.UI_HUD_BaseD
IconU=571
IconV=76
IconUL=149
IconVL=105

bRemoveOn360=False
bRemoveOnPC=False
bRemoveOnPS3=False

Localization/INT/EoW.ini

Code:

[EoWxGame UTUIDataProvider_GameModeInfo]
FriendlyName=Elements of War
Description=n00bZ killing each other

Src/EoW/Classes/EoWxGame.uc

Code:

// /* *** *** *** *** *** *** */ //
// /* *** *** *** Elements of War *** *** *** */ //
// /* *** *** *** *** *** *** */ //

class EoWxGame extends UTTeamGame;

defaultproperties
{
// Acronym="TDM"
// MapPrefixes[0]="DM"

bTeamGame=True
HUDType=CLass'EoW.EoWxHUD' // HUDType=Class'UTGame.UTTeamHUD'

// DefaultInventory(0)=Class'UTGame.UTWeap_Enforcer'
// DefaultInventory(1)=Class'UTGame.UTWeap_ImpactHammer'

PlayerControllerClass=Class'EoW.EoWxPlayer' // PlayerControllerClass=Class'UTGame.UTPlayerController'
DefaultPawnClass=Class'EoW.EoWxPawn' // DefaultPawnClass=Class'UTGame.UTPawn'
}

Src/EoW/Classes/EoWxHUD.uc

Code:

// /* *** *** *** *** *** *** */ //
// /* *** *** *** Elements of War *** *** *** */ //
// /* *** *** *** *** *** *** */ //

class EoWxHUD extends UTTeamHUD;

defaultproperties
{

}

Src/EoW/Classes/EoWxPlayer.uc

Code:

// /* *** *** *** *** *** *** */ //
// /* *** *** *** Elements of War *** *** *** */ //
// /* *** *** *** *** *** *** */ //

class EoWxPlayer extends UTPlayerController
dependson(UTPawn)
dependson(UTProfileSettings)
dependson(UTPlayerReplicationInfo)
config(Game)
native;

defaultproperties
{
// bBehindView=True
}

Src/EoW/Classes/EoWxPawn.uc

Code:

// /* *** *** *** *** *** *** */ //
// /* *** *** *** Elements of War *** *** *** */ //
// /* *** *** *** *** *** *** */ //

class EoWxPawn extends UTPawn
config(Game)
dependson(UTWeaponAttachment)
dependson(UTEmitter)
dependson(UTFamilyInfo)
native
nativereplication
notplaceable;

defaultproperties
{
// ViewPitchMin=0 // -18000.000000
// ViewPitchMax=0 // 18000.000000

bFixedView=True

SuperHealthMax=199

CameraScale=9.000000
CurrentCameraScale=1.000000
CameraScaleMin=1.000000 // Was 3
CameraScaleMax=40.000000

HeroCameraScale=6.000000
HeroCameraPitch=6000

TeamBeaconMaxDist=3000.000000
TeamBeaconPlayerInfoMaxDist=3000.000000

DefaultAirControl=0.350000

bStopOnDoubleLanding=True
bCanDoubleJump=True
DodgeSpeed=600.000000
DodgeSpeedZ=295.000000
MultiJumpRemaining=1
MaxMultiJump=1
MultiJumpBoost=-45
MaxDoubleJumpHeight=87.000000

CustomGravityScaling=1.000000

bCanCrouch=True
bCanSwim=True
bCanClimbLadders=True
bCanStrafe=True
bCanPickupInventory=True

Buoyancy=0.990000
MeleeRange=20.000000
GroundSpeed=440.000000
WaterSpeed=220.000000
AirSpeed=440.000000
JumpZ=322.000000
AirControl=0.350000
WalkingPct=0.400000
CrouchedPct=0.400000
MaxFallSpeed=1250.000000
AIMaxFallSpeedFactor=1.100000

UnderWaterTime=20.000000
}

EDIT C:/GameZ/UDK/UDK-2009-11/UTGame/Config/UTEditor.ini
Add ModPackages=EoW at the bottom of [ModPackages]

Code:

[ModPackages]
ModPackagesInPath=..\..\UTGame\Src
ModOutputDir=..\..\UTGame\Unpublished\CookedPC\Script
ModPackages=EoW

Copy and paste your UTGame into the UDK/UDK-2009-11 folder

ok, now go to your "Start" button on Windows. Unreal Dev Kit - UDK-2009-11 and COPY the Editor. Paste it on your desktop. Now right click the desktop icon and go to TARGET. Add -ucc make to it and save. (It should look something like this: C:\GameZ\UDK\UDK-2009-11\Binaries\UDKLift.exe editor -ucc make)

Run UCC Make and you'll get:
C:/GameZ/UDK/UDK-2009-11
---Unpublished
--- ---CookedPC
--- --- ---Script
--- --- --- ---EoW.u

Copy EoW.u and paste into your UTGame/Published/CookedPC/Script folder. Test the mod if you didn't get any ucc make errors. If it worked, copy EoW.u to your desktop folder and then you can start building from there.

I NEED HELP HELP HELP

Code:

EoW = Rename this to MySuperMod, but you gotta change EVERYTHING
.u = COMPILED CODE
ucc make = Compiler
.uc = (TEXT) = Your code
.ini = (TEXT) = Some Config.cfg but .ini cause UT != Quake/HL

This for UT3 or UDK? BOTH, but you gotta edit the .uc and .ini files

EoW = Elements of War =
ModDB.com

Comments
AL_06
AL_06

the EoW.u wont show for me there is no unpublished folder even when i ran the thing :(

Reply Good karma Bad karma+2 votes
IceIYIaN Author
IceIYIaN

You put the .uc files in the correct place and added ModPackages=EoW to that-one-editor.ini when you ran -ucc make?

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.