Modding

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

NovaDude

New Member
Jun 15, 2004
14
0
0
Hey,

Yep, punish me for posting in the completely wrong place, I'm really sorry I'm just not very sure where to post a Help on Modding question.

There isn't much I'd like to do, but I just want to edit a few stats for the turret in UT2004, And I want to start working on little bits of differences to make things sweet.

I'm wondering to where and what I should change exactly.

Thanks,
Nova
 

monkey8

New Member
Apr 4, 2004
87
0
0
I'm assuming you're ut2k3 or ut2k4 and you have little coding experience.

I would suggest first creating a hp or adrenaline regeneration mutator, since they're easy to do.

heres links to check out

the wiki http://wiki.beyondunreal.com/wiki/
hp regen tutorial: http://wiki.beyondunreal.com/wiki/Regen_Mutator

You'll also want to run unrealed, the script editor, and export all scripts. Now in your ut2004 directory you'll have a ton of folders, and they are filled with *.uc files. Just open them with notepad/wordpad/WOTgreal since they are just text. They are unrealscript that comes with the game. code for *turrets* etc...

If you want to edit the stats of a turret type that's already in maps, I bet you could do an "arena" like mutator that replaces them with your version.

To generate a cache file, and an int:
Code:
ucc dumpint myMod.u
ucc exportcache -a myMod.u

hope thats a good start
 

NovaDude

New Member
Jun 15, 2004
14
0
0
Hey,

That's good, I tried the HP Regen Mutator and I got a way better insight on how things work. It didn't work though, so I'm going to explain what I did.

I extracted MutRegen.uc from the Xgame.u file.

I placed this within c:\UT2004\nova\Classes\MutRegenPlus.uc

I changed the code exactly as the tutorial said, and trust me when I say I made VERY sure it was the same as on the tutorial.

I then went to "ucc make" and it compiled as it should have.
I then created an int with the line:
[Public]
Object=(Class=Class,MetaClass=Engine.Mutator,Name=nova.MutRegenPlus,Description="Regeneration Plus")

And I went in game, selected DeathMatch, turned on the mutator, went in game, and there was no regeneration.

I am running UT2004, so perhaps the "*2" isn't accutate on the code?

Let me know what I did wrong, thanks,
Nova

--
EDIT: Here's the MutRegenPlus.uc code:

Code:
//=============================================================================
// MutRegen - regenerates players
//=============================================================================
class MutRegenPlus extends Mutator;

#exec OBJ LOAD File=MutatorArt.utx

var() float RegenPerSecond;

// Don't call Actor PreBeginPlay() for Mutator 
event PreBeginPlay()
{
    SetTimer(1.0,true);
}

function Timer()
{
    local Controller C;

    for (C = Level.ControllerList; C != None; C = C.NextController)
    {
		if (C.Pawn != None && C.Pawn.Health < C.Pawn.HealthMax*2 )
        {
            C.Pawn.Health = Min( C.Pawn.Health+RegenPerSecond, C.Pawn.HealthMax*2 );
        }
    }
}
 
Last edited by a moderator:

T2A`

I'm dead.
Jan 10, 2004
8,752
0
36
Richmond, VA
The "times two" is not the problem. What that's saying is "if they have less health than twice their default amount, regenerate some." Looks like you need to set the value of RegenPerSecond. Do it like this after the code you have:


Code:
defaultproperties
{
    RegenPerSecond=1.0
}
 

NovaDude

New Member
Jun 15, 2004
14
0
0
Hey,

It worked, perfectly! Thanks alot!

Now I should start getting that turrent to move.
I was thinking of making it move like the Raptor, I think I'll start off with that.

I want to make the turret which looks like a mech robot into the movement of the Raptor, where would I find this?
 

T2A`

I'm dead.
Jan 10, 2004
8,752
0
36
Richmond, VA
I'd say subclass the Raptor, change the mesh and textures to the turret, change the firing modes to those of the turret, and then see what happens. It should already have the controller class attached to it which sets movement and such, so hopefully that's all you'll need to do.

But like I said, I'm don't consider myself a coder for this Unreal stuff, so who knows if it's even possible given yours and my skill levels. So many of the little stupid things I tried failed it's not even funny.
 

NovaDude

New Member
Jun 15, 2004
14
0
0
I've looked all over the .u files but I can't anywhere find the location of the files of the vehicles such as the Raptor or the Turret.

Do you know of the location, if so, please tell me ;)

---
EDIT: Here's the plan!

I want to create a mutator, which changes the model and the skin of the raptor, perhaps also the movement. I perhaps know how to do it, but I don't know the location of the script files, does anyone have a clue?

I was thinking of making the Raptor Script call up a different Texture and a different model, later on I can try to edit its movement.

A nother question would be how to make it a mutator, then.
 
Last edited:

T2A`

I'm dead.
Jan 10, 2004
8,752
0
36
Richmond, VA
Alrighty, what you wanna do doesn't sound too terribly difficult. The Raptor and turrets, along with all the other vehicles are in the Onslaught folder of the source code. If you don't have that, I suggest you pick it up here. I'm not sure of the names of the classes since they're not called "RaptorVehicle" and "HereIsYourTurret" so I'd suggest opening up ONS-Torlan and figuring out which classes the vehicle factories are spawning.

As for your mutator, you'd want something that functions like the Arena mutator in that it searches through all the actors in a level and changes certain ones. To get you started on mutators, check these out.

http://wiki.beyondunreal.com/wiki/Regen_Mutator
http://wiki.beyondunreal.com/wiki/Super_Arena_Mutator

Also check out MutArena in the XWeapons folder to see how weapon bases are replaced.
 

NovaDude

New Member
Jun 15, 2004
14
0
0
Alright I found both names!

Raptor: ONSAttackCraft
Turret: ONSManualGun

I got all the script files and I'm telling you right here, I don't know how to go on :lol: I looked all over the script files but I don't see anywhere it calling for a moddel... I'm looking for movement controlles, I'm still looking.

I could really use some help, while looking over the files I discover how much I am a noob. I know I should add parts of the Turret into the script files of the Raptor, I need to make the raptor use the models and textures of the Turret, I need it to use the same weapons (by calling up the turrent script files instead of the Raptor ones?) And I need to make it a mutator.

Yet I don't know what text specifies what exactly, I read bits which I understand, I read more bits which I don't understand, if anyone wishes to interact with me more directly on MSN or AIM or IRC, I'd love it :)

MSN: nova_raven@hotmail.com
AIM: NovaDudey
IRC: Let me know where.

I did all the earlyer mutator turorials, so I know how those work, a little ;)

[EDIT] I just noticed both ONSManualGun and ONSAttackCraftGun are pretty much identical, just using different information. I am now wondering whether I should just overwrite the ONSManualGun data over the ONSAttackCraftGun date :rolleyes:
-----------------

Alright here are two scripts I did:

Code:
The modified ONSAttackCraftGun Script:

//-----------------------------------------------------------
//
//-----------------------------------------------------------
class ONSAttackCraftGunNova extends ONSWeapon;

#exec OBJ LOAD File=MutatorArt.utx
#exec OBJ LOAD FILE=..\Animations\ONSWeapons-A.ukx
#exec OBJ LOAD FILE=..\Textures\TurretParticles.utx

var class<ONSTurretBeamEffect> BeamEffectClass[2];

static function StaticPrecache(LevelInfo L)
{
    L.AddPrecacheMaterial(Material'TurretParticles.Beams.TurretBeam5');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.PlasmaMuzzleBlue');
    L.AddPrecacheMaterial(Material'EpicParticles.Flares.SoftFlare');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.PlasmaStar2');
    L.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.SmokePanels1');
    L.AddPrecacheMaterial(Material'XEffectMat.shock_flare_a');
    L.AddPrecacheMaterial(Material'XEffectMat.Shock_ring_b');
    L.AddPrecacheMaterial(Material'XEffectMat.Shock.shock_mark_heat');
    L.AddPrecacheMaterial(Material'XEffectMat.shock_core');
}

simulated function UpdatePrecacheMaterials()
{
    Level.AddPrecacheMaterial(Material'TurretParticles.Beams.TurretBeam5');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.PlasmaMuzzleBlue');
    Level.AddPrecacheMaterial(Material'EpicParticles.Flares.SoftFlare');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.PlasmaStar2');
    Level.AddPrecacheMaterial(Material'AW-2004Particles.Weapons.SmokePanels1');
    Level.AddPrecacheMaterial(Material'XEffectMat.shock_flare_a');
    Level.AddPrecacheMaterial(Material'XEffectMat.Shock_ring_b');
    Level.AddPrecacheMaterial(Material'XEffectMat.Shock.shock_mark_heat');
    Level.AddPrecacheMaterial(Material'XEffectMat.shock_core');

    Super.UpdatePrecacheMaterials();
}

function TraceFire(Vector Start, Rotator Dir)
{
    local Vector X, End, HitLocation, HitNormal;
    local Actor Other;
    local int Damage;

    X = Vector(Dir);
    End = Start + TraceRange * X;

    //skip past vehicle driver
    if (ONSVehicle(Instigator) != None && ONSVehicle(Instigator).Driver != None)
    {
      	ONSVehicle(Instigator).Driver.bBlockZeroExtentTraces = False;
       	Other = Trace(HitLocation, HitNormal, End, Start, True);
       	ONSVehicle(Instigator).Driver.bBlockZeroExtentTraces = true;
    }
    else
       	Other = Trace(HitLocation, HitNormal, End, Start, True);

    if (Other != None)
    {
	if (!Other.bWorldGeometry)
        {
            Damage = (DamageMin + Rand(DamageMax - DamageMin));
            if (ONSPowerCore(Other) == None && ONSPowerNodeEnergySphere(Other) == None)  // Sweet Hackaliciousness
                Other.TakeDamage(Damage, Instigator, HitLocation, Momentum*X, DamageType);
            HitNormal = vect(0,0,0);
        }
    }
    else
    {
        HitLocation = End;
        HitNormal = Vect(0,0,0);
    }

    HitCount++;
    LastHitLocation = HitLocation;
    SpawnHitEffects(Other, HitLocation, HitNormal);
}

state InstantFireMode
{
	simulated function SpawnHitEffects(actor HitActor, vector HitLocation, vector HitNormal)
	{
		local ONSTurretBeamEffect Beam;

		if (Level.NetMode != NM_DedicatedServer)
		{
			if (Role < ROLE_Authority)
			{
				CalcWeaponFire();
				DualFireOffset *= -1;
			}

            if (!Level.bDropDetail && Level.DetailMode != DM_Low)
            {
    			if (DualFireOffset < 0)
    				PlayAnim('RightFire');
    			else
    				PlayAnim('LeftFire');
    		}

			Beam = Spawn(BeamEffectClass[Team],,, WeaponFireLocation, rotator(HitLocation - WeaponFireLocation));
			BeamEmitter(Beam.Emitters[0]).BeamDistanceRange.Min = VSize(WeaponFireLocation - HitLocation);
			BeamEmitter(Beam.Emitters[0]).BeamDistanceRange.Max = VSize(WeaponFireLocation - HitLocation);
			BeamEmitter(Beam.Emitters[1]).BeamDistanceRange.Min = VSize(WeaponFireLocation - HitLocation);
			BeamEmitter(Beam.Emitters[1]).BeamDistanceRange.Max = VSize(WeaponFireLocation - HitLocation);
			Beam.SpawnEffects(HitLocation, HitNormal);
		}
	}
}

defaultproperties
{
     BeamEffectClass(0)=Class'Onslaught.ONSTurretBeamEffect'
     BeamEffectClass(1)=Class'Onslaught.ONSTurretBeamEffectBlue'
     YawBone="TurretBase"
     PitchBone="Dummy01"
     PitchUpLimit=15000
     PitchDownLimit=52500
     WeaponFireAttachmentBone="TurretCockpit"
     GunnerAttachmentBone="TurretCockpit"
     WeaponFireOffset=25.000000
     DualFireOffset=75.000000
     bInstantRotation=True
     bInstantFire=True
     bDualIndependantTargeting=True
     FireInterval=0.300000
     FireSoundClass=Sound'WeaponSounds.Misc.instagib_rifleshot'
     FireForce="Laser01"
     DamageType=Class'Onslaught.DamTypeTurretBeam'
     DamageMin=30
     DamageMax=30
     TraceRange=20000.000000
     Momentum=50000.000000
     AIInfo(0)=(bInstantHit=True,aimerror=750.000000)
     Mesh=SkeletalMesh'ONSWeapons-A.NewManualGun'
     CollisionRadius=50.000000
     CollisionHeight=70.000000
}

Code:
The Mutator Script (Not working, help?)

//=======================================
//HoverTurret:
//Changes the Raptor into a HoverTurret
//=======================================
class HoverTurret extends mutator;

#exec OBJ LOAD File=MutatorArt.utx

function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
    {
        if ( class = ONSAttackCraftGun )
            class = ONSAttackCraftGunNova;
        else
            return true;
    }

defaultproperties
{
     GroupName="HoverTurret"
     FriendlyName="HoverTurret"
     Description="Changes the Raptor Vehicle into a HoverTurret."
}

----EDIT:---
I been checking something different out now... I think "ONSPlaneCraft" holds the flying controlles, would simply doing the following work?
Code:
class ONSManualGunPawnNova extends ONSPlaneCraft
---EDIT:----
I figured a nother thing out. "ONSManualGunPawn" uses the "ONSStationaryWeaponPawn" script. I changed the date from that into that from the "ONSPlaneCraft" and got almost everything to work.
But then it seemed like the engine just wanted to play smart on me.
BTW This means changing the existing turret into different movement!

C:\UT2004\nova\Classes\ONSManualGunPawnNova.uc(4) : Error, nova.ONSManualGunPawn
Nova's superclass must be Onslaught.ONSStationaryWeaponPawn, not nova.ONSStation
aryWeaponPawn
Nova
 
Last edited:

T2A`

I'm dead.
Jan 10, 2004
8,752
0
36
Richmond, VA
If ONSAttackCraft extends ONSPlaneCraft and your Raptor class extends ONSAttackCraft, then it already has all the controlling functions inherited. If you see a function in ONSPlaneCraft you want to overwrite, you can do it in your class. Also, don't copy all the code from the original Raptor into your Raptor. That's the point of inheritance. Just copy the functions you're going to change because the rest of the code is already there by you putting in the word "extends."

Here's a quick lesson on Inheritance 101. Class A contains the function One(). Class B has Two() and extends A. Class C extends B and has no functions of its own. Or does it? Actually it has both One() and Two() available to it.

Don't get discouraged about the huge amounts of code in these classes. You should (I hope) just be able to overwrite the functions you need and copy-paste the code from the turret, like it's fire function, into your new Raptor.
 

NovaDude

New Member
Jun 15, 2004
14
0
0
Turns2Ashes said:
If ONSAttackCraft extends ONSPlaneCraft and your Raptor class extends ONSAttackCraft, then it already has all the controlling functions inherited. If you see a function in ONSPlaneCraft you want to overwrite, you can do it in your class. Also, don't copy all the code from the original Raptor into your Raptor. That's the point of inheritance. Just copy the functions you're going to change because the rest of the code is already there by you putting in the word "extends."

Here's a quick lesson on Inheritance 101. Class A contains the function One(). Class B has Two() and extends A. Class C extends B and has no functions of its own. Or does it? Actually it has both One() and Two() available to it.

Don't get discouraged about the huge amounts of code in these classes. You should (I hope) just be able to overwrite the functions you need and copy-paste the code from the turret, like it's fire function, into your new Raptor.

Alright,

Let me get the facts straight here, this is all going very fast!
I must make a new script, which is a new vehicle?
This script extends ONSAttackCraft, but uses different parts of scripts info from the Turret, correct?

Or does it extend ONSPlaneCraft, as ONSAttackCraft does?

Now there are two things I might not fully understands,
1)ONSAttackCraft is the Raptor?
2)There are way more files (ie: (OAC=ONSAttackCraft) OACblue, OACred, OACExhaust, and more!)
3)From what Script file should I start? I'm lost!
 
Last edited:

NovaDude

New Member
Jun 15, 2004
14
0
0
Hey,

I'm posting a new post to clear up a little bit and not make things messy.
I been doing some more research and stuff and lol! This looks so funny!

I got to slow down teh Raptor, I increased its mass, and I changed the Gun Models, BUT instead of that looking good, the engine decided to hang the whole turrent beneeth/inside of the Raptor :lol:

Here are some screenshots:
shot1.jpg

shot2.jpg

shot3.jpg

shot4.jpg


Some help would be great!
In the default properties I changed this:
Code:
DriverWeapons(0)=(WeaponClass=Class'Onslaught.ONSManualGun',WeaponBone="PlasmaGunAttachment")
Yet I know what I did wrong here, I changed the DriverWeapons model in to the ONSManualGun model while I am not supposed to change the DriverWeapons model but the whole Raptors Model, yet I don't know where this is located yet, if someone knows, please tell me.
------EDIT-------

Alright, I took ONSManualGun and renamed it to HoverTurretGun.
I changed:
Code:
DriverWeapons(0)=(WeaponClass=Class'nova.HoverTurretGun',WeaponBone="PlasmaGunAttachment")
And inside of the HoverTurretGun I can now change the mesh:
Code:
Mesh=SkeletalMesh'ONSWeapons-A.NewManualGun'
To what ever nessecary later on!

----



After much changes I finally got most of everything to work!

1) I made sure the DriverWeapon Mesh wasn't showing up, I didn't know how to remove it (help, how do I do this?) so I changed it into a small object (TankMachineGunTurret)

2) I changed the Raptor's mesh in to that of the Turret's Mesh, worked perfectly.

3) I just need to change the skins now, as the Turret still uses the Raptor skins, which doesn't look all to bad though.

4) Right now I want to change the exisiting Turret model and use my own, note that the Turret has only got a Skeleton Mesh, I don't know how to export and when I have it, what program allowes me to edit the mesh.

5) I need to know where the First Person Camera date of the raptor is stored.
I need to make the TP Mesh visible while in FP and I hopefully I can make the player show up too.



-----------------------------
Alright it's currently 03:30AM and I been working on this HoverTurret all day long, crazy huh?

I got everything to work now, it's flying the way I want it to, no weirdness showing up, cockpit is the way it should be, now all I need left to do is remove some peaces of the Model, I need some help here ;)
 
Last edited: