This post will attempt to explain how to make a simple vehicle mod for
UT3. It is a very basic mod and is only intended to get you started. I'm a n00b myself and this is what I've figured out so far.
Before we get started, we need to do some basic prep work.
1. download the original source from Epic. do *NOT* use the export script utility to get your base scripts. you will just have problems.
2. Copy one of epic's maps to your home folder. To use and test a vehicleCode:http://udn.epicgames.com/Files/UT3/Mods/UT3ScriptSource_1.1.rar
mod, you'll need a place to test it in.
I copied this file:
to this folder:Code:"$(Program Files)\Unreal Tournament 3\UTGame\CookedPC\Maps\WAR-Torlan.ut3"
Code:"$(My Documents)\My Games\Unreal Tournament 3\UTGame\Unpublished\CookedPC\CustomMaps"
Also, I renamed it "Snarflan.ut3" so there would be no confusion which map I was editing.
Ok, now we can get to the actual mod. We'll call our vehicle the Rattler. It will be based on the Scorpion vehicle, but we'll beef up it's turret. The official name will be VH_Rattler. To make sure this project builds, add it to your .ini file:
$(MyDocuments)\My Games\Unreal Tournament 3\UTGame\Config\UTEditor.ini
Code:[ModPackages] ModPackagesInPath=..\UTGame\Src ModOutputDir=..\UTGame\Unpublished\CookedPC\Script ModPackages=VH_Rattler
3. Create the folder
4. Copy these files from Epics source ball into your classes folder:Code:"$(My Documents)\My Games\Unreal Tournament 3\UTGame\src\VH_Rattler\Classes"
Rename the files from 'Scorpion' to 'Rattler'.Code:UT3ScriptSource_1.1\Development\Src\UTGame\Classes\UTVehicle_Scorpion.uc UT3ScriptSource_1.1\Development\Src\UTGameContent\Classes\UTVehicle_Scorpion_Content.uc UT3ScriptSource_1.1\Development\Src\UTGameContent\Classes\UTVehicleFactory_Scorpion.uc
5. At the top of the file, change it so that it reads this:
Here we subclass Rattler from Scorpion. Subclassing allows you to override some behavior without having to worry about implementing the rest of it.Code:class UTVehicle_Rattler extends UTVehicle_Scorpion native(Vehicle) abstract;
6. Remove all of the variables and 'final' functions. Since we are subclassing Scorpion, these variables already exist and we don't need to override them. By removing them we are using the base classes variables instead. In this example, you are going to delete everything after
Up to this method:Code:class UTVehicle_Rattler extends UTVehicle_Scorpion native(Vehicle) abstract; ---- cut here---- (ln 7)
Code:native final function bool ReadyToSelfDestruct(); ----- cut here ---- (ln 158) function bool EagleEyeTarget() { return ReadyToSelfDestruct(); }
7. Remove all the 'Class=XXX'. Sometimes, you need the 'Class=XXX', but in the UTVehicle_Rattler.uc file, there should be no line that says 'Class=XXX'. If there is, you'll get an error saying something like:
Code:Vehicle_Rattler.uc(904) : Error, BEGIN OBJECT: The component name LFWheel is already used (if you want to override the component, don't specify a class):
8. You might get this error
If you do it's because your .uc file needs to be saved in Unicode format.Code:" VTVehicle_Rattler.uc(1): Error, Unexpected 'ï'".
9. So far so good. Next is UTVehicle_Rattler_Content.uc
*Edit* I had a bug in this step, now fixed. Sorry about that!
10. Change the first line to:
11. To put a levi turret on the vehicle, replace the GunClass=class line to :Code:class UTVehicle_Rattler_Content extends UTVehicle_Rattler;
Code:Seats(0)={( GunClass=class'UTVWeap_LeviathanTurretShock',
12. Last file, UTVehicleFactory_Rattler.uc.
13. Rename the class from UTVehicleFactory_Scorpion to: UTVehicleFactory_Rattler.
14. Change the 'VehicleClassPath' to:
Code:VehicleClassPath="VH_Rattler.UTVehicle_Rattler_Content"
With any luck, you should be able to compile your mod using "ut3 make"
If everything works, you can open your custom map, add your custom vehicle using the generic browser->classes->NavigationPoint->VehicleFactory->VehicleFactory_Rattler, right click to add it to the map, and right click again and 'play from here' to test it out.
There is a lot more that can be done. This is just a basic tutorial. Hopefully it is useful.
CaptainSnarf



Reply With Quote
In any event it's easy enough to follow the steps this way.
You're right though. Logically it should be able to be made to work that way.
Maybe that's what the confusion was about, warlord?







Bookmarks