I didn't expect a response after a long period of time. So truth be told I don't need anymore answers since this is for a school project and the semester has already ended.
Besides I moved on from UDK to UE4.
So to any mods, if you want to delete/lock this thread plz do so; I really don't need this thread any longer.
Announcement
Collapse
No announcement yet.
How to alter UT3 weapons?
Collapse
X
-
RattleSN4K3 repliedWell instead of my re-writing/copy-pasting the whole things, explain what you didn't understand or where you at.
Leave a comment:
-
RattleSN4K3 repliedYou could start by investigating the code of each weapon (classes with the "UTWeap_" prefix). Most of the damage inflicting code or property is inside the weapon (in case of an instant hit weapon) or the projectile. The projectile casses are setup in the weapon case (in some cases in the content verison of the weapon, with a "_Content" suffix).
A interesting code snippet to look at would be the Titan mutator (UTMutatorHero) which is replacing the Pawn class. The Pawn class UTHeroPawn is modifying weapons dynamically if the use transform into a Titan.
Code:NewWeapon = GiveWeapon("UTGame.UTWeap_RocketLauncher"); NewWeapon.WeaponProjectiles[0] = class'UTProj_HeroRocket'; NewWeapon.WeaponProjectiles[1] = class'UTProj_HeroRocket'; NewWeapon.FireOffset = GetFamilyInfo().default.HeroFireOffset; NewWeapon.bAutoCharge = true; NewWeapon.AmmoCount = NewWeapon.MaxAmmoCount; NewWeapon.bCanThrow = false; NewRL = UTWeap_RocketLauncher(NewWeapon); NewRL.SeekingRocketClass = class'UTProj_HeroRocket'; NewRL.GrenadeClass = class'UTProj_HeroGrenade'; NewRL.LockAim = 0.97; NewRL.LockChecktime = 0.1; NewRL.LockAcquireTime = 0.3; NewRL.LockTolerance = 3.0; NewWeapon = GiveWeapon("UTGame.UTWeap_ShockRifle"); NewWeapon.InstantHitDamageTypes[0] = class'UTDmgType_HeroShockPrimary'; NewWeapon.WeaponProjectiles[0] = class'UTProj_HeroShockBall'; NewWeapon.WeaponProjectiles[1] = class'UTProj_HeroShockBall'; NewWeapon.FireOffset = GetFamilyInfo().default.HeroFireOffset; NewWeapon.bAutoCharge = true; NewWeapon.bCanThrow = false; NewWeapon.AmmoCount = NewWeapon.MaxAmmoCount;
For a static modification, you need to subclass existing class and change properities statically (as defaultproperties) or logic dynamically (as code).
Code:class MOBAWeap_RocketLauncher extends UTWeap_RocketLauncher; function class<Projectile> GetProjectileClass() { // enforce Grenades for secondary if (CurrentFireMode == 1) { return GrenadeClass; } return super.GetProjectileClass(); } defaultproperties { WeaponProjectiles(0)=class'MOBAProj_Rocket' WeaponProjectiles(1)=class'MOBAProj_Rocket' LoadedRocketClass=class'MOBAProj_LoadedRocket' GrenadeClass=class'MOBAProj_Grenade' SeekingRocketClass=class'MOBAProj_SeekingRocket' MaxLoadCount=3 }
Code:class MOBAProj_Rocket extends UTProj_Rocket; defaultproperties { LifeSpan=6.0 // originally 8.0 }
Here's the simple class:
Code:class MOBAProj_LoadedRocket extends UTProj_LoadedRocket; defaultproperties { // Same changed properties as MOBAProj_Rocket LifeSpan=6.0 // originally 8.0 }
Code:class MOBAProj_SeekingRocket extends UTProj_SeekingRocket; defaultproperties { // Same changed properties as MOBAProj_Rocket LifeSpan=6.0 // originally 8.0 }
Code:class MOBAProj_Grenade extends UTProj_Grenade; defaultproperties { }
Implementating all the code and giving all the example would be out of the scope. Just try to investigate the exting code. The ShockRifle could use PassThroughDamage for instance.
Leave a comment:
-
franman started a topic How to alter UT3 weapons?How to alter UT3 weapons?
Hello,
I want to utilize UnrealScript to alter certain UT3 weapons.
Generally I want to do the following:
- Adjust the damage scale
- Adjust the damage scale based on the lvl the hero is at
- Get rid of push backs
- Adjust the range
Can someone plz share a piece of advice or some guidance on where to look at?
I know have to make a subclass to extend from something but with so many info around its tough to find and besides I'm a rookie programmer.
For the specifics, here's what I want them to do:
Rocket Launcher- decrease the life span of primary fire.
- for secondary, only one shot of the grenade (instead of three) temporary slows enemy speed.
- takes 10 seconds to reload.
- Hero lvl 1: slows enemies down by 5 seconds.
- Hero lvl 2: slows enemies down by 10 seconds.
- Hero lvl 3: slows enemies down by 15 seconds.
- takes 10 seconds to reload.
ShockRifle- For secondary fire.
- Hero lvl 1: Goes through 1 enemy.
- Hero lvl 2: Goes through 2 enemies.
- Hero lvl 3: Goes through 3 enemies.
BioRifle (optional)- adjust to an even shorter range for both primary & secondary fire.
- For secondary fire.
- Hero lvl 1: Shoots a maximum of one huge blob that sticks to the ground.
- takes 15 seconds to reload and once fired previous blob disappears.
- Hero lvl 2: Shoots a maximum of two huge blobs that sticks to the ground.
- takes 15 seconds to reload and once the second blob gets fired, first blob fired disappears.
- Hero lvl 3: Shoots a maximum of three huge blobs that sticks to the ground.
- takes 15 seconds to reload and once the second blob gets fired, first blob fired disappears.
- on contact with enemy, the blob explodes into 4 mini blobs (the size of those from primary fire).
- enemies who step on the smaller blog will receive 1/4 damage of the big blob.
- Hero lvl 1: Shoots a maximum of one huge blob that sticks to the ground.
- no blobs from primary fire will stick to walls or ground.
I am doing a MOBA game certain heroes use certain UT3 weapons and levels up (max lvl 3) based how much enemies they defeat.Tags: None
Leave a comment: