Scripting Posts FAQ
Q: Do I need to know anything to learn UScript?
A: Patience. While prior programming knowledge surely is helpful, its not necessary. Unrealscript is relatively easy to pick up, but pretty hard to master.
Q: Is there a SDK (or: Where do I find the source code?)
A: There are two ways to get your hands on the source code. You can download it off of the internet (http://wiki.beyondunreal.com/wiki/UnrealScript_Source) or you can export them yourself using UCC's batchexport command. Easier yet, open UnrealEd and in the Actor Browser (the button that looks like a Pawn from chess) under File, choose 'Export All Scripts.' It may take a while, but when it's all finished you will have a bunch of new folders in your base UT2k* directory, named after all of the stock packages.
Q: What programs do I need?
A: At the very least you need a text editor. Notepad will work, but many will tell you that you will be better off with a more robust editor. WOTGreal (http://www.wotgreal.com) is through and through one of the very best you can find. In the end though, you should only use something youre comfortable using.
Q: I want to make a TC mod, where do I start?
A: You should start small first. Make a mutator, a weapon, maybe a Capture the Flag variant. Jumping in with both feet can be very discouraging when you get stuck. Best advice is to start small. Always start small.
Q: How do I compile my code?
A: Run UCC make to compile. If you're not using WOTGreal or another program that automates the compiling process you can use a batch file to compile for you. You will also need to add a line to your UT200*.ini located in the game's System folder. EditPackages is used to tell the compiler what needs to be created, so you would add your package at the end of the EditPackages list, like so.
Code:
[Editor.EditorEngine]
...
EditPackages=XGame
EditPackages=XWeapons
EditPackages=XInterface
EditPackages=XAdmin
EditPackages=XWebAdmin
EditPackages=Vehicles
EditPackages=BonusPack
EditPackages=SkaarjPack
EditPackages=SkaarjPack_rc
EditPackages=OGGPlayer
EditPackages=<YOUR PACKAGE NAME WITHOUT FILE EXTENSION>
Here's a simple batch file that will compile for you. Save it as Compile.bat and run it whenever the time to compile comes around.
Code:
@cd <PATH TO UT200*\SYSTEM FOLDER>
@erase <YOURPACKAGE>.u
@ucc make
@echo Eat stew!
Q: How different will UT2004's source code be?
A: At the base its still the same. UT2004 will still use Controllers and Pawns and Weaponfire and Pickup and all that stuff. The GUI has changed, so you may have to re-learn a bit of that. Overall though, anything youve learned for 2k3 will still directly apply to 2k4.
Q: Are there any good Unrealscript websites/forums?
A: Yes there are!
These forums 
The Wiki
BeyondUnreal's Coding Forum
The Unreal Developer Network
The official Scripting Forum at Atari
All have a wealth of knowledge and (if applicable) there is always someone who can give you a nudge in the right direction.
Q: I want to learn how to script, where should I start?
A: Join the UScript 101 class at www.masteringunreal.com, the VTM's are a great starting point and theyre much easier to understand than reading through pages upon pages of technical mumbo-jumbo. If the VTM's arent available to you for lack of a star, the Wiki has a nice 'Introductory' unreal script section which goes over most of the basics and a few other common topics. Wiki: UnrealScript Lessons
Q: Why doesnt my code get formatted correctly when I post it?
A: Wrap your code in the tags, which will display them in a uniform font and preserve all indentation. This makes it easier for both you and other readers to understand what is going on and it also makes some of the more common errors more noticable.
Q: I changed what kind of missiles the rocket launcher shoots, but they dont ever get created in the game... Why?!
A: The rocket launcher doesnt use the WeaponFire to create its projectiles like most weapons do, it uses it's own SpawnProjectile() function in RocketLauncher.uc that ignores what changes you've made to the weaponfire. Copy and paste that function into your new rocket launcher and tell it to spawn your rockets instead of the normal ones, that should fix up your problems 
Q: I made a new weapon that works fine in Instant Action mode, but when i host a server my friends never get the weapon, they cant even see me carrying it! What's wrong?!
A: It could be a few things. But always check to make sure you have added your package to the ServerPackages list in the UT200*.ini. That will ensure that anyboy joining your server will have the required files.
Q: This is a short FAQ, can I add questions?
A: Yes, please do! Add away
Last edited by ffejnosliw; 03-30-2008 at 07:46 PM.
AIM:EvilDrWongPhD | ICQ:26065027
You know you want to baby, I can see it in your eyes.