Uscript Tutorials & Resources / Tools

Discussions about Coding and Scripting
Post Reply
User avatar
Wises
Godlike
Posts: 1088
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: Right-Wing

Uscript Tutorials & Resources / Tools

Post by Wises » Mon Apr 15, 2013 11:21 pm

~ Updated 22.April.2013 ~

If you have anything to add , please feel free to post here.

Notes:
* Right-Click Links & Open in new Tab
* Click Spoilers to expand content

WOD Tutorial Guides
^Dead links on this website?.. (refer to the following); UScript Function Reference
List of essential tools for Unreal/UT scripting/mapping
Academic Resources for the Unreal Development Environment
UnrealScript Beginners Tutorials
UnrealEd Pro Tips, Complete Unreal Ed Guide (40mb Download), Bunch of UED Tutorials Package
Complete UnrealScript (Uscript) Reference manual , Mirror (Mediafire.com) Unrealscript Tutorials Complete
Excerpt from above Document wrote:I n t r o d u c t i o n
So, I'm guessing the first question floating through your mind would be, What the hell is UnrealScript? Well, UnrealScript is the mini programming language that Unreal mods are written in. If you've had experience coding with C++ or JavaScript, you'll probably catch on quickly. UnrealScript syntax is almost identical to JavaScript, so JavaScript books and tutorials are good resources for learning your UnrealScript vocabulary.
If you've never written a line of code in your life, though, don't give up. Everyone has to start somewhere, and UnrealScript is as good a place as any. I've tried to make this tutorial as simple and basic as possible, so it can be understood by just about anyone.
Like anything else, UnrealScript takes practice to become good at, but that doesn't mean it can't be fun along the way.

L e t ' s g e t s t a r t e d . . .
There are two methods for writing UnrealScript. The first, and simplest, is to use UnrealEd, which comes fully featured with everything you'll need to get started in UScript. The second method involves writing code in plain text .uc files, and compiling them using Unreal -make. This is usually the preferred method for most experienced UScripters, because it gets rid of complications and bugginess caused by UnrealEd. It also allows for easier mixing and matching of new models. Information on how to use this method is contained in the Using Unreal -make tutorial. If you're just starting out, though, I would have to recommend that you stick to UnrealEd for now. As a result, this is the method I'll talk about most during this tutorial. If you've never run UnrealEd before, you'll need to grab a couple of bug fixes to make sure it works properly. Download and install the Visual Basic 5.0 Runtime, and the RichText Control Update, and you should be set. Alright. It's time to start your career in UnrealScript. Open up UnrealEd, and take a look around. The first thing you'll probably notice are the grided viewports in the center. These are meant for level design and you won't be using them for writing UnrealScript. Now take a look on the right. This is the browser window. By default, it displays textures for level design, but this isn't what you want. Click on the "Browse" pull-down menu, and select “Classes". This will bring up the class tree.
in my short stint at programming using UScript I have found that decompiling others works seems to be a great way to learn.

a quick run down on how to do this is as follows;

Tools needed:
Context UScript Editor , like notepad with syntax highlighting , alternatively you may want to use Notepad++ + UScript Syntax Highlighter (see fig 1.0a below) , or Programmers Notepad aka upn2_1d *(highlighting included) - see figure 1.0b
^use one of these to edit .uc classes/files.
Spoiler
Show
Image
fig 1.0a
Spoiler
Show
Image
fig 1.0b
^
UArchitech wrote:portable and doesnt require installation, run from anywhere including a flash drive
can be configured as your default text editor just like any other
comes with no guarantees, its a beta version of programmers notepad and ive just configured it how i like for unrealscript editing
escape closes the program
ctrl+m with an unrealscript source file open will start the compiler
make sure ued/ut is closed when compiling otherwise ucc will complain about file locks as usual

some time in the future i hope to add support for ravens unrealcript preprocessor

feel free to post bugs or whatever but i wont see them for a few weeks or a month maybe// more info
umake1.2
^ This is what we will use to compile our code into executable mutators. extract to a folder on your Desktop -> send the main UMAKE.exe as a Shortcut to your Desktop itself.. you will drag and drop files onto this shortcut to quickly compile your work.

wotgrealExporter
^ This decompiles mods.u into your UT Folder under the following hierarchy;

Code: Select all

UnrealTournament---
                             |
                             ModName---
                                              |
                                              Classes 
^Once extracted.. All you have to do to re-compile is drag 'n' drop the Parent-class ModName.uc onto the UMAKE Icon.
this will then compile the file into Modname.u in your system folder.

*Important --> to see it in your Unrealtournament > mutators you need to copy also the .int file over.. note that the mutator-name = Description="Mymutator desc"

^example;

ModName.int

Code: Select all

[Public]
Object=(Name=ModName.ModName,Class=Class,MetaClass=Engine.Mutator,Description="MyMutator desc")
*also --> some mods have external (config) files known as .ini's. Also copy these over.

Aftersight: Learning Programming imo is best by learning from others.. code. find a mod that almost does what you want , and another mod that has some function{} that you want to include.. then try and combine the 2 Mods together to get the result you wish to achieve. Persist and learn every aspect of each mod (decompiled).. and you will be rewarded with a customised version which satisfies your needs.. as well as a sense of accomplishment. :tu:
:roll:
Last edited by Wises on Mon Apr 22, 2013 11:34 am, edited 38 times in total.
...


User avatar
papercoffee
Godlike
Posts: 9270
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: WOD Uscript tutorials & Resources / Tools

Post by papercoffee » Tue Apr 16, 2013 1:34 am

Do we have here something useful for this thread http://www.ut99.org/viewtopic.php?f=15&t=3596 ??

User avatar
Wises
Godlike
Posts: 1088
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: Right-Wing

Re: WOD Uscript tutorials & Resources / Tools

Post by Wises » Tue Apr 16, 2013 2:04 am

perhaps just a link back here.. as more ppl may wish to comment here?

@DrFlay , Thanks for the links mate , Perhaps someone should go through and make a backup copy of that website. before it joins the rest ...
Last edited by Wises on Tue Apr 16, 2013 11:09 pm, edited 1 time in total.
...

Torax
Adept
Posts: 406
Joined: Fri Apr 20, 2012 6:38 pm
Personal rank: Master of Coop
Location: Odessa, Ukraine

Re: WOD Uscript tutorials & Resources / Tools

Post by Torax » Tue Apr 16, 2013 5:02 pm

Nice resources.
I remind that exactly that Unreal Script reference which provided by links, i printed out long years ago and use till today)
favorite book :mrgreen:
Unreal. Alter your reality..forever...

User avatar
Wises
Godlike
Posts: 1088
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: Right-Wing

Re: WOD Uscript tutorials & Resources / Tools

Post by Wises » Sun Apr 21, 2013 5:21 am

just when I thought thats all there is I find this website ;

UnrealSP.org which has some Tutorials and tools from our very own Ferali.. ;)

like this 40mb+ Compete Unreal Ed Guide, More Info
and this modeling thing? umodel
...

User avatar
papercoffee
Godlike
Posts: 9270
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: WOD Uscript tutorials & Resources / Tools

Post by papercoffee » Mon Apr 22, 2013 12:32 am

Wises wrote: and this modeling thing? umodel
This tool is only a viewer and exporter.

User avatar
Dr.Flay
Godlike
Posts: 3210
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Uscript Tutorials & Resources / Tools

Post by Dr.Flay » Mon Apr 22, 2013 8:03 pm

Can't believe you only just discovered UnrealSP !
Very useful site, with lots of mapping and modelling activity.

...You obviously haven't been reeding the "Unreal News"
http://my.opera.com/Unreal-Tournament/links/
Visit every day !

That Umodel is very handy for making screenshots of models/decos, or just looking through the contents quickly.

Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: Uscript Tutorials & Resources / Tools

Post by Aldebaran » Sun Jul 24, 2016 1:20 pm

Link 1, 4, 6 and 7 does not work any more :(
I am looking for a beginners guide. Are there updates available?
Last edited by Aldebaran on Fri Nov 18, 2016 5:06 pm, edited 1 time in total.

User avatar
Dr.Flay
Godlike
Posts: 3210
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: Uscript Tutorials & Resources / Tools

Post by Dr.Flay » Mon Jul 25, 2016 3:11 am

Try the "Development School" section https://www.ut99.org/viewforum.php?f=57 :tu:

User avatar
sektor2111
Godlike
Posts: 4078
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Uscript Tutorials & Resources / Tools

Post by sektor2111 » Mon Jul 25, 2016 6:41 am

For making a mutator that uses mutate command perhaps (like in other cases too) more than half of learning is looking at some mods/mutators as a priority for seeing relevant examples. Reading only tutorials without knowing any example is not the best method. For using mutate command there are a couple of examples in server-tools or different mutators: MapVote, some SemiAdmin, LagKicker, BotyMan, MonsterHunt mod, etc. Is way easy to check several mods because I'm doubt about tutorials showing at least 3 samples of such. Once having some experience with UScript you'll be able to write your own stuff because you can do 100+ things with mutate command. First default step for a coder beginner is to use another UT copy for coding jobs then exporting everything from Editor "File >> Export All Scripts" from Actor classes Browser Menu. This will return a lot of default scripts and these are examples (good and bad) to take in account nearby tutorials.
I recommend to start a topic in coding section about what you want and there are chances to find direct help rather than wasting time looking in Tutorials which are including more theory and less valid examples.

Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: Uscript Tutorials & Resources / Tools

Post by Aldebaran » Mon Jul 25, 2016 10:57 am

Thank you for help! I will do both, read the "development school" of this board and have a look to some code of finished mutators... When I need further help I will make a new coding topic :)

Post Reply