PDA

View Full Version : Quick First Mod



IceIYIaN
11-06-2009, 10:53 PM
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:


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


[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=<Images:UI_FrontEnd_Art.GameTypes.TeamDeathmatch>
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


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


Src/EoW/Classes/EoWxGame.uc


// /* *** *** *** *** *** *** */ //
// /* *** *** *** 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_ImpactHamm er'

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


Src/EoW/Classes/EoWxHUD.uc


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

class EoWxHUD extends UTTeamHUD;

defaultproperties
{

}


Src/EoW/Classes/EoWxPlayer.uc


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

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

defaultproperties
{
// bBehindView=True
}


Src/EoW/Classes/EoWxPawn.uc


// /* *** *** *** *** *** *** */ //
// /* *** *** *** 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]


[ModPackages]
ModPackagesInPath=..\..\UTGame\Src
ModOutputDir=..\..\UTGame\Unpublished\CookedPC\Scr ipt
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


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 =
http://www.ModDB.com/Mods/Elements-of-War

Angel_Mapper
11-06-2009, 11:05 PM
You shouldn't be using 'native' in any of your classes, since there is no native code behind it. I'm surprised it compiled for you. :confused:

IceIYIaN
11-06-2009, 11:08 PM
I copied those from the Pawn and Player classes. I assumed I had to copy it?

Angel_Mapper
11-06-2009, 11:25 PM
No, the only thing I think you'd need is the config part, and you can change it to create one of your own (like config(MyMod) would make UTMyMod.ini). The dependson stuff is inherited iirc.

marilol
11-07-2009, 10:01 AM
I can't get the editing the shorcut to work. I have tried many variations, with or without editor, -uccmake, -ucc -make, -ucc make etc etc. They just load the editor.

Im not actually seeing how this links to my files which are on the desktop, I think you may have missed a step here :(

IceIYIaN
11-07-2009, 12:40 PM
oh, you actually gotta copy/paste your work back into the UDK/2009 folder or whatever. I only use the desktop to make sure my work doesn't get mixed and it's quicker to access.

marilol
11-07-2009, 02:41 PM
Thanks for the reply, I'll test now :rolleyes:

Ok, Ive put it in that folder, but the shorcut still doesn't work, neither does the frontend find anything

EDIT: Im gonna go from scratch, currently Im trying to get over an old mod so maybe this only works from scratch.

Btw, is it:

UDK/UDK-2009-11/ElementsofWar

or just UDK/ElementsofWar

EDIT2: Found the problem, I wasnt reading the UTEditor bit properly and assumed it was on in my EoW folder lol.

EDIT3: Im assuming I need to do package game or something to run this, at least run it from frontend until someone knows the executable target.

Wormbo
11-07-2009, 03:17 PM
Class definitions should really only start out as "class X extends Y;" and only if you need to add/change specific things, then you should add the corresponding modifiers to it.

IceIYIaN
11-07-2009, 04:21 PM
You don't use the ElementsofWar folder. Only what's inside it. ElementsofWar = UDK/UDK-2009-11/

If somebody knows how to use a said "Game or Mod" folder like that, then plz tell.

I edited the tutorial, shows UTGame folder now and reminds people to copy/paste the mod back into UDK-2009-11

IceIYIaN
11-07-2009, 04:25 PM
I left out:

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


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

MadGrenadier
11-07-2009, 04:50 PM
Lol pretty big part to leave out :P

for those that don't know that last piece tells the compiler where to look for additional folders to compile and obviously where to output them to.

Good tutorial overall! definitly good to see people stepping up and making some guides.

marilol
11-07-2009, 07:54 PM
I found what I was doing wrong, sorry for the confusion with all that, I was editing the wrong UTEditor.ini (I edited the one inside ElementsOfWar).

Are you saying that I should then drop the EoW into my UDK/UDK-2009-11/UTGame/published/cookedpc/script folder?

If so you might want to add the bit beforehand, for me it reads as put it into my ElementsOfWar/UTGame/CookedPc/Script folder, which of course can't be used without a way to load the game.

IceIYIaN
11-07-2009, 08:10 PM
The folder on your desktop(UTGame or ElementsofWar/UTGame or UDK-2009-11/UTGame) doesn't do anything. It's only there to seperate your work from everything else. The icon you copied from the Start menu and changed to ucc make will work, it uses the C:/GameZ/UDK/UDK-2009-11 folder

ucc make should create EoW.u in
C:/GameZ/UDK/UDK-2009-11/UTGame/Unpublished/CookedPC/Script ---> / EoW.u

Simply create the same folders or just rename Unpublished to Published and it should show when you run the game.

marilol
11-07-2009, 08:13 PM
Yes I understand that, its getting pretty confusing post wise:

I have got the compiled EoW.u file from Unpublished/cookedpc/script. The question is where do I put it? I don't have an EoW.exe file to run or a commandline to load the mod, do I put the file into:

C:/UDK/UDK-2009-11/UTGame/Script?

IceIYIaN
11-07-2009, 08:24 PM
Just rename Unpublished to Published. Then play UDK - Game, from the Start button on Windows. All it does is add a new GameType. Once you got that setup you can create your own gametype, modify player movement, the HUD, and if UT3 is like UT2003/4 you can do the camera sytem from I believe Player, maybe Pawn I don't recall.

Those classes that I extended, you can view those in
C:/GameZ/UDK/UDK-2009-11/Development/Src/

I'm not sure if you can put your Src code there and UCC Make it. Since this is UDK and not UT3/UT2003/4 it's possible that you can edit those rather than just extend everything. You would be messing up other people's UDK, so, when somebody posts a tut on how to setup your own stand alone without the UDK demo you might wanna do that.

I dunno yadda yadda (:

marilol
11-07-2009, 08:30 PM
I have my EoW.u in:

C:/UDK/UDK-2009-11/Elements of War/UTGame/Published/CookedPc/Script

When I run the UDK - Game shortcut / exe it does "not" show the Elements of War gametype, only the default Dm, TDM and CTF.

Could you post the exact location all the way back to C:\ like I have above of where your EoW.u file is placed please.

IceIYIaN
11-07-2009, 08:41 PM
I removed the ElementsofWar/UTGame folder from the start of the tutorial. ElementsofWar = UDK/UDK-2009-11

So
C:/UDK/UDK-2009-11/UTGame/Published/CookedPC/Script/EoW.uc

On your desktop you should have:
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)

rygoody
11-08-2009, 12:12 AM
Is it even necessary to do this?

I'm having trouble understanding what exactly your doing here, but it appears to me like your setting it up to run in it's own folder? So instead of making your mod in the UDK-2009-11 folder, you are specifying it to go from a different folder. Correct?


Is this is even necesary with UDK? This seems like an obvious thing to do when making an Unreal 3 mod, because you don't want to mess with Unreal 3 game files. But with UDK, your supposed to mess with the Unreal 3 game files. I see no mention of making your own game folder anywhere in the UDK documentation, so I assume its intended we just work inside of the UDK-2009-11 folder.

I'm sorry if thats completely wrong, I'm just trying to get my head around all this.

MadGrenadier
11-08-2009, 01:53 AM
Doing it this way leaves the base UDK install in a working state, so if you change game ideas or something you dont need to reinstall the UDK to get it back to how it was originally.

rygoody
11-08-2009, 02:29 AM
But if you just extend everything, wouldn't that leave it in a working state just the same?

Because in this tutorial http://udn.epicgames.com/Three/DevelopmentKitProgramming.html

It says to put the custom modded uc file into the UDK-2009-11/Development/Src/MyMod directory and then all you do is add ModEditPackages=MyMod into the .ini file. Which just tells the compiler to compile your code in the MyMod folder.

And it says you can have more than one ModEditPackages entry in the file. All you would have to do is remove those modeditpackage entries in the .ini file to restore your UDK install to what it was by default.

Then when you run the unrealfrontend and use the make command, it compiles your mymod folder into UDK-2009-11/UTGame/Script/MyMod.u right where all the other .u files are at

I think this is the way that epic intends us to use the UDK.

I mean not to discredit Iceiyan or not be thankful for his help, because I am and obviously it works just fine. But I get the feeling setting it up the way Iceiyan says is what you did for UT3 modding and then putting in this ModEditPackages entry is the way your suposed to do for UDK.

or I could be completely wrong here, this is the first time I've opened Unrealscript. Is there any benefit to the way Iceiyian describes over using this modeditpackages entry?


Although one thing I don't understand about the way epic is describing to set this up in that tutorial I linked above is they say in order to run the mod you have to use the command udk dm-deck?game=mymod.superfungame

Does this mean we have to distribute our game with an .exe file that requires those commands on it? Or is there someway to strip out all the UT3 stuff and produce our own .exe file for our game?

IceIYIaN
11-08-2009, 02:48 AM
C:/GameZ/UDK/UDK-2009-11/Development/Src/MyMod

I don't think that does anything. You gotta put it in UTGame. Unless you change your ucc make or something.

USE two folders. The default UDK install and your desktop. When you finally send out your mod to others, we don't need any extra files. Just remember you gotta use both folders. Mainly for the compile and getting EoW.u The desktop folder is what you send out!!! It's seperate and it's quicker to get to.

Whenever you see "EoW" change it to "YourModName"(No Spaces). Because I'll be using EoW or ElementsofWar :p

As for having a "MoD" folder, I don't know if that's possible. But I haven't touched UT3 code since I first ported Elements of War UT2003/4 over. You'll have to figure that one out on your own. This tutorial simply sets up a very quick and first Unreal Script. It's not a mutator, I don't even know where to begin on those. It's a GameType.

IceIYIaN
11-08-2009, 02:50 AM
As far as replacing default UDK stuff, I mean you could do that. We cannot even play online as far as I'm aware. People who download your mod might not like that when they find out. However, if you change it from UDK to Your Stand Alone game then more power to you. Plz give the tut on that one ;)

rygoody
11-08-2009, 03:08 AM
Yes, you do have to edit an ini file.

As the tutorial says:

"Open UTEngine.ini in the UTGame\Config directory, and remove the ; preceding ModEditPackages=MyMod in the [UnrealEd.EditorEngine] section. You can have more than one mod edit package, you'll just need to create a separate source directory for each one and add each one to the [UnrealEd.EditorEngine] section."

As for the two folders. If your making it in UDK, won't you have to send out all the Unreal files as well? When your making a mod you only have to send your mod specific files because everyone already has the Unreal core files. But if your using UDK, everyone doesn't have the core files.

And Epic said UDK has the internent play built into it, so you gotta be able to set it up somehow. Although since it's UDK and not unreal, does this mean you will have to set up your own server list resource? Hopefully Epic will be releasing more tutorials on this.

IceIYIaN
11-08-2009, 03:19 AM
If you make a UT3 or UDK mod, you just send out your mod files. If you make a stand alone game, you send out your mod files and only the files you need from UDK.

marilol
11-08-2009, 07:26 AM
Ok, I understand this now, thanks for the tutorial :D

lcizzle
11-08-2009, 08:05 PM
Seems like a lot of work to do things that aren't needed.

-Install the UDK (Default Directory is C:\UDK\UDK-2009-11)
-Change UDK-2009-11 to the name of your project/game/mod/whatever.
-UDK\What Ever Name You Used\Development\Src\What Ever Name You Used\Classes - Your scripts go here
-Edit C:\UDK\What Ever Name You Used\UTGame\Config\UTEngine.ini in the [UnrealEd.EditorEngine] section add ModEditPackages=WhatEverNameYouUsed
-Open the front end and click "Make" this will compile the engine scripts and your new mod/game/project/what ever.

If you are trying to do 2 project side by side, do yourself a favor.
On the start menu rename Udk\UDK-2009-11 to What Ever Name You Used.
Install the UDK again using C:\UDK\2nd Project Name.

I think the problem with some of you is that you are getting hung up on the directory UTGame. "Oh my god UTGame folder in my project, I don't want a UTGame folder in my directory list."

Seriously, install the UDK, use it like the documentation tells you and make a wonderful game. Trying to edit out all these directories and stuff is just going to cause you a major headache later when you try to cook the game and stuff is missing or broken.

http://udn.epicgames.com/Three/DevelopmentKitProgramming.html

IceIYIaN
11-09-2009, 12:47 AM
Trying to create your stand alone game can come later. I'd get some content first. Although a really good "Base" folder is great to have.

It's not that we have a problem with UTGame. We want a stand alone game folder or our own mod folder. Now like I said I stopped my UT3 mod when the game first came out. I'm not sure if you can make your own mod folder. It's rather important and I don't see how Epic overlooked this.

Angel_Mapper
11-09-2009, 12:51 AM
I think you're missing the point of the UDK. :)

MadGrenadier
11-09-2009, 01:08 AM
Ive been reading this thread wrong the whole time. =S I only skimmed the tutorial the first time and assumed it was setting up a project folder like The Haunted and The Ball did once UT3 got updated to read mods that way. But then I actually read through it and saw it was just a gamemode... My bad :P

IceIYIaN
11-09-2009, 01:32 AM
I don't really know anything about Unreal tech to battle with you Angel Mapper. My playground is Quake Config.cfg tech and the Source engine.

I like Source's Game Cache File(.gcf - It's like a .zip of your whole game/mod) (Quake uses the same concept except puts the folder right inside the game folder). The problem is modders are unable to create their own .gcf I finally figured out how to use my own folder with a GameInfo.txt trick.

Anyways, you get your own mod folder. Delete it, bam, whole mod is gone. Content is not mixed with every mod making that mod easy to mod itself.

But like I said I have no idea what I'm talking about so don't mind me (:

lcizzle
11-09-2009, 02:51 AM
If you just use UTGame as is and put your maps, models, sounds, and whatever else you need and cook the game.

The game will pull all the textures, maps, models, and sounds that you use and package them all nice and neat.

I'm not saying your way is wrong.

marilol
11-09-2009, 03:57 AM
For those of you wanting to test it afterwards copy and paste the udk game shortcut, and in its target add:

UDK dm-deck?game=EoW.EoWxGame

...at the end.

erwilly
11-09-2009, 08:49 AM
@IceIYIaN
In my opinion this is very confuse regardlees about is o isn't necessary.
I think that you could explain a little the objetive in the first post, before to star the tutoral.

coldcut
11-10-2009, 01:57 PM
The point of the UDK is that you can make games that can be distributed without any other software requirements (other than stuff like DirectX, obviously).

The key is that the FrontEnd is used, among other things, for finalizing the game. There is a button called "Package Game". The tool-tip says
Creates an installer package containing the created mod and all files required to run it.and the FrontEnd doc (http://udn.epicgames.com/Three/DevelopmentKitUFE.html) says
This allows you to name the file and shortcut of your game, then packages Epic's binaries and your cooked content into a standalone installer for distribution.
I have not actually tried this myself, but it seems then that doing that will give you something to distribute that the end-user can then install the game and, thus, NOT require UDK be installed.

Hopefully, someone can soon try this out with something simple and see how it works out.

Azzedinistan
11-10-2009, 02:25 PM
i can't compile the mod ! i have added -ucc make to the Editor shortcut , but it just launch the editor and nothing else !

coldcut
11-10-2009, 02:45 PM
OK, I have now tried the Whizzle game available from the UDN Showcase (http://udk.com/showcase-whizzle.html). It started as a UT3 mod and was ported to UDK.

EDIT: Sorry, I was thinking of The Ball, which was ported from a UT3 mod. Whizzle was wholly created with UDK.

The installer you get will install to C:\UDK\Whizzle (default location). What gets installed is similar to a whole UDK installation, except with the authors' Cooked content. Also, a shortcut is added to the start menu. The shortcut target is C:\UDK\Whizzle\Binaries\Win32\UDK.exe -seekfreeloading.

So, apparently you do not get an actual YourGame.exe file made.

--Regarding the link not working, have you tried it without "editor"? I'm not sure, really, why editor is in there, anyway. And udk.exe should be able to build it.

Azzedinistan
11-10-2009, 03:01 PM
Ok it works now , it's just that i have written ModPackes=EoW like you say and not ModPackages=EoW , thanks for the tutorial , but can you correct it , it makes me loose something like 1 hour of searching :)

coldcut
11-11-2009, 03:24 AM
I have now taken a good look at The Ball (http://udk.com/showcase-the-ball.html) from the UDK Showcase and it seems like a very good example of what to expect for the output when developing a game with UDK.

prchakal
11-11-2009, 08:19 AM
So,

I have created some tutorials on my portal (www.devgames.com.br) about UDK, and i want learn how to create a third person game with UDK.

So if a want create a new standalone game, i have to (game name = Zombie Island):

1 - Download UDK (obvious)
2 - Install on C:\UDK\ZombieIsland (this is the full path)
3 - Create the paths:
3.1 - C:\UDK\ZombieIsland\Development\Src\ZombieIsland
3.2 - C:\UDK\ZombieIsland\Development\Src\ZombieIsland\C lasses (for script)
4 - Edit file:
4.1 - C:\UDK\ZombieIsland\UTGame\Config\UTEngine.ini
4.1.1 - Section: [UnrealEd.EditorEngine] put "ModEditPackages=ZombieIsland"
5 - Open: Unreal Frontend
6 - Click on MAKE (this is will compile all of project defined on UTEngine.ini ??)
7 - Click on Package Game to created a standalone EXE ??