Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Compiling and modifying scripts in UT3


Amateur UT mapper

Status: Offline
Posts: 736
Date:
Compiling and modifying scripts in UT3
Permalink  
 


I dug up some old working out for using Uscript.

These instructions show how to compile scripts found else where and changing the properties of objects in the game.  The example I will show is extending the properties of the Flack Cannon to increase its ammo count.

To explore other items you may wish to change get a copy of the Script source and look through it for scripts that you wish to control.

 

How to Override Default Properties of a class

FlackCannon Example:

Folder structure:

Inside of C:\Users\UserName\Documents\My Games\Unreal Tournament 3\UTGame\Src\

Start by adding a folder where your work will be held. In my example "TestPackages" will be the starting point. Beneath that add Classes folder.  Then place the text file with the code you wish to change.

So

C:\Users\UserName\Documents\My Games\Unreal Tournament 3\UTGame\Src\TestPackage\Classes\MyFlackCannon.uc

With the text editor of your choice eg Notepad++ create MyFlackCannon.uc in the Classes folder.  Be sure to save in ANSI format.

In this case I am changing the ammo count variables.

To do this find UTWeap_FlackCannon and create your own custom class using the syntax:

class "name of .uc file you made" extends "name of class your changing";

{

adding the variable you wish to change beneath this, enclosing in curly braces

}

 So

__________________________________________________
class MyFlackCannon extends UTWeap_FlakCannon;

defaultproperties
{
   AmmoCount=30
    Locker AmmoCount=40
    Max AmmoCount=60
    ItemName="My Flak Cannon"
    PickupMessage="You got a better Flak Cannon"
}

__________________________________________________

Before compile time go to

C:\Users\UserName\Documents\My Games\Unreal Tournament 3\UTGame\Config

and edit: UTEditor.ini


beneath
[ModPackages]
ModPackageinPath=\UtGame\Src

\\Add this line. 

ModPackages=TestPackage

"TestPackage"  This is the name of the top level folder you placed your script in.  This tells the compiler where to look when compiling.


Save and close this file.


To compile place the make flag on a short cut to UT3.exe


ie  "C:\Program Files (x86)\Unreal Tournament 3\Binaries\UT3.exe" make

Now run the short cut.


If all goes well a console will pop up with the out put of the compilation telling if it completed successfully.  If so continue, else carefully go back and check your file names, their paths and syntax are all correct and repeat.


The Custom Weapon Class will be available inside of Generic Browser Pickup Factory Tree

Go ahead and place the actor inside of game.

When publishing this level place the the resultant script (MyFlakCannon.u) into the /Published/CookedPC/Script Folder.  That new script should now be available in game.


Because of the inheritance properties of Uscipt it is easy to create new custom classes that extend (inherit) all the properties of another class. So allowing small and large changes with next to no understanding of the language, so giving the novice a toe hold with which to explore the language.



-- Edited by Achernar on Saturday 26th of March 2011 07:49:57 AM

__________________


...ǝp¡s ɹǝɥʇo ǝɥʇ uo

Status: Offline
Posts: 4290
Date:
RE: Compiling scripts in UT3
Permalink  
 


lol....why ? what does it do exactly? plz m8 excuse me i m a noob, i can read thoses lines and imagine what they do but....why??? what s the target?

__________________


AMD RYZEN 7 1800x@ 4.0ghz-MSI X370 PRO CARBON-MSI RTX2070SuperGamingX Trio-Corsair Vengeance DDR4 16GB-SAMSUNG 850Evo-LOGITECH G19-MSI DS300 & HX1200i-COOLERMASTER HAF Stacker915R/935/915F-Custom Loop



Connoisseur of Bourbon!

Status: Offline
Posts: 2912
Date:
Permalink  
 

It's a script to make the Flack cannon more powerful.

__________________

I like playing with stuff!



...ǝp¡s ɹǝɥʇo ǝɥʇ uo

Status: Offline
Posts: 4290
Date:
Permalink  
 

ahhhhhh.......ok....interressant but now....while reading i m lost haha, need to watch that seriously wink.gif

__________________


AMD RYZEN 7 1800x@ 4.0ghz-MSI X370 PRO CARBON-MSI RTX2070SuperGamingX Trio-Corsair Vengeance DDR4 16GB-SAMSUNG 850Evo-LOGITECH G19-MSI DS300 & HX1200i-COOLERMASTER HAF Stacker915R/935/915F-Custom Loop



French cat under acid

Status: Offline
Posts: 1614
Date:
Permalink  
 

Thx for sharing smile
Just some little stuffs to fix on your post ( in red ) :
Achernar wrote:

How to Overide Default Properties of a class

FlackCannon Example:

Folder structure:
C:\Users\UserName\Documents\My Games\Unreal Tournament 3\UTGame/Src/TestPackage/Classes/MyFlackCannon.uc

Created .uc file in the Classes folder
> MyFlackCannon.uc

Use Notepad++ to create the .uc file and be shure to save as ANSI format.
__________________________________________________
class MyFlackCannon extends UTWeap_FlakCannon;

defaultproperties
{
    AmmoCount=30
    Locker AmmoCount=40
    Max AmmoCount=60
    ItemName="My Flak Cannon"
    PickupMessage="You got a better Flak Cannon"
}

__________________________________________________

Before compile time go to UTGame/Config and edit

UTEditor.ini
find
[ModPackages]

ModPackageinPath=\UtGame\Src
...
\\Add this line.  The "TestPackage" is the name of the top level folder you placed your script in.

ModPackages=TestPackage

To compile place the make flag on a short cut to UT3.exe
ie  "C:\Program Files (x86)\Unreal Tournament 3\Binaries\UT3.exe" make

Now run

UT3.exe Make

Now the Custom Weapon Class will be available inside of Generic Brower Pickup Factory Tree

Go ahead and place the actor inside of game.

When publishing this level place the the resultant script (MyFlakCannon.u) into the /Published/CookedPC/Script Folder.  That new script should now be availble in game.


 

 



__________________

Specs: Intel i7 7700 - Msi X3 - MSI GTX 970 - 16Go

UT3, UT2k4 & Swat4 final maps : check my portfolio - Some music by me, it's here



Amateur UT mapper

Status: Offline
Posts: 736
Date:
Compiling and moddifing scripts in UT3
Permalink  
 


Sry Blitz just threw up some rough notes to help LPS with his script compilation woes. Guess I was too late.

Anyway I added Nova's editing and expanded to try and explain form the ground up. Please tell if this needs more work.



-- Edited by Achernar on Saturday 26th of March 2011 01:20:15 AM

__________________


Unreal Old Friend

Status: Offline
Posts: 1
Date:
RE: Compiling and modifying scripts in UT3
Permalink  
 


thinks for sharing information

__________________

== crossword puzzles ==

 



Amateur UT mapper

Status: Offline
Posts: 736
Date:
Permalink  
 

Your welcome my friend. Glad it can help some one. smile

 

For a more formal tutorial see my website alphaeridani.wordpress.com



-- Edited by Achernar on Monday 21st of March 2016 05:37:41 AM

__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.



Create your own FREE Forum
Report Abuse
Powered by ActiveBoard