Announcement

Collapse
No announcement yet.

Changing the velocity of a projectile.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changing the velocity of a projectile.

    So, I've been trying to edit the RipperLite spinning blade to travel a bit faster, but I'm running into some issues and documentation on this sort of thing has recently become hard to come by. I've managed to unpack the .u files into its base .uc files and adjust the speed there, but repacking them throws errors about invalid references I'm not sure how to resolve. I figure I need to incorporate the .upk in this process, but I'm not sure how to do that.

    Code:
    Init: Version: 3809
    Init: Epic Internal: 0
    Init: Compiled: Mar 26 2009 01:14:17
    Init: Command line:
    Init: Base directory: E:\Games\Steam\steamapps\common\unreal tournament 3\Binaries\
    Init: Character set: Unicode
    Log: Executing Class Editor.MakeCommandlet
    --------------------Core - Release--------------------
    --------------------Engine - Release--------------------
    --------------------GameFramework - Release--------------------
    --------------------Editor - Release--------------------
    --------------------UnrealEd - Release--------------------
    --------------------UnrealScriptTest - Release--------------------
    --------------------IpDrv - Release--------------------
    --------------------OnlineSubsystemGameSpy - Release--------------------
    --------------------UTGame - Release--------------------
    --------------------UTEditor - Release--------------------
    --------------------UTGameContent - Release--------------------
    --------------------UT3Gold - Release--------------------
    --------------------UWeb - Release--------------------
    --------------------UT3GoldGame - Release--------------------
    --------------------RipperLite - Release--------------------
    Analyzing...
    Parsing UTAmmo_RipperLite
    Parsing UTAttachment_RipperLite
    Parsing UTDmgType_Melee
    Parsing UTDmgType_MeleeHeadshot
    Parsing UTDmgType_RipperLite
    Parsing UTDmgType_RipperLiteAlt
    Parsing UTDmgType_RipperLiteHeadshot
    Parsing UTMutator_RipperLite
    Parsing UTProj_PinnerBlade
    Parsing UTProj_RipperLiteBlade
    Parsing UTProj_RipperLiteBladeAlt
    Parsing UTWeap_RipperLite
    Compiling UTAmmo_RipperLite
    Compiling UTAttachment_RipperLite
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTAttachment_RipperLite.uc(6) : Warning, Unresolved reference to Material 'RipperLitePack.Materials.M_RipperLite'
    Compiling UTDmgType_Melee
    Compiling UTDmgType_MeleeHeadshot
    Compiling UTDmgType_RipperLite
    Compiling UTDmgType_RipperLiteAlt
    Compiling UTDmgType_RipperLiteHeadshot
    Compiling UTMutator_RipperLite
    Compiling UTProj_PinnerBlade
    Compiling UTProj_RipperLiteBlade
    Compiling UTProj_RipperLiteBladeAlt
    Compiling UTWeap_RipperLite
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(115) : Warning, Unresolved reference to SoundCue 'RipperLitePack.Sounds.SecondaryFireCue'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(97) : Warning, Unresolved reference to Material 'RipperLitePack.Materials.M_RipperLite'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(89) : Warning, Unresolved reference to SoundCue 'RipperLitePack.Sounds.SecondaryFireCue'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(70) : Warning, Unresolved reference to SoundCue 'RipperLitePack.Sounds.SecondaryFireCue'
    Importing Defaults for UTAmmo_RipperLite
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTAmmo_RipperLite.uc(28) : Error, BEGIN OBJECT: The component name PickupLightEnvironment is already used (if you want to override the component, don't specify a class):    Begin Object Class=DynamicLightEnvironmentComponent Name=PickupLightEnvironment ObjName=PickupLightEnvironment Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTAmmo_FlakCannon:PickupLightEnvironment'
    Importing Defaults for UTAttachment_RipperLite
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTAttachment_RipperLite.uc(11) : Error, BEGIN OBJECT: The component name SkeletalMeshComponent0 is already used (if you want to override the component, don't specify a class):    Begin Object Class=SkeletalMeshComponent Name=SkeletalMeshComponent0 ObjName=SkeletalMeshComponent0 Archetype=SkeletalMeshComponent'UTGameContent.Default__UTAttachment_Translocator:SkeletalMeshComponent0'
    Importing Defaults for UTDmgType_Melee
    Importing Defaults for UTDmgType_MeleeHeadshot
    Importing Defaults for UTDmgType_RipperLite
    Importing Defaults for UTDmgType_RipperLiteAlt
    Importing Defaults for UTDmgType_RipperLiteHeadshot
    Importing Defaults for UTMutator_RipperLite
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTMutator_RipperLite.uc(159) : Error, BEGIN OBJECT: The component name Sprite is already used (if you want to override the component, don't specify a class):    Begin Object Class=SpriteComponent Name=Sprite ObjName=Sprite Archetype=SpriteComponent'UTGame.Default__UTMutator:Sprite'
    Importing Defaults for UTProj_PinnerBlade
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTProj_PinnerBlade.uc(47) : Error, BEGIN OBJECT: The component name ProjectileMesh is already used (if you want to override the component, don't specify a class):    Begin Object Class=StaticMeshComponent Name=ProjectileMesh ObjName=ProjectileMesh Archetype=StaticMeshComponent'UTGame.Default__UTProj_StingerShard:ProjectileMesh'
    Importing Defaults for UTProj_RipperLiteBlade
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTProj_RipperLiteBlade.uc(364) : Error, BEGIN OBJECT: The component name CollisionCylinder is already used (if you want to override the component, don't specify a class):    Begin Object Class=CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTProjectile:CollisionCylinder'
    Importing Defaults for UTProj_RipperLiteBladeAlt
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTProj_RipperLiteBladeAlt.uc(26) : Error, BEGIN OBJECT: The component name CollisionCylinder is already used (if you want to override the component, don't specify a class):    Begin Object Class=CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTProjectile:CollisionCylinder'
    Importing Defaults for UTWeap_RipperLite
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(221) : Error, BEGIN OBJECT: The component name FirstPersonMesh is already used (if you want to override the component, don't specify a class):    Begin Object Class=UTSkeletalMeshComponent Name=FirstPersonMesh ObjName=FirstPersonMesh Archetype=UTSkeletalMeshComponent'UTGame.Default__UTWeapon:FirstPersonMesh'
    Compile aborted due to errors.
    
    Warning/Error Summary
    ---------------------
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTAmmo_RipperLite.uc(28) : Error, BEGIN OBJECT: The component name PickupLightEnvironment is already used (if you want to override the component, don't specify a class):    Begin Object Class=DynamicLightEnvironmentComponent Name=PickupLightEnvironment ObjName=PickupLightEnvironment Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTAmmo_FlakCannon:PickupLightEnvironment'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTAttachment_RipperLite.uc(11) : Error, BEGIN OBJECT: The component name SkeletalMeshComponent0 is already used (if you want to override the component, don't specify a class):    Begin Object Class=SkeletalMeshComponent Name=SkeletalMeshComponent0 ObjName=SkeletalMeshComponent0 Archetype=SkeletalMeshComponent'UTGameContent.Default__UTAttachment_Translocator:SkeletalMeshComponent0'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTMutator_RipperLite.uc(159) : Error, BEGIN OBJECT: The component name Sprite is already used (if you want to override the component, don't specify a class):    Begin Object Class=SpriteComponent Name=Sprite ObjName=Sprite Archetype=SpriteComponent'UTGame.Default__UTMutator:Sprite'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTProj_PinnerBlade.uc(47) : Error, BEGIN OBJECT: The component name ProjectileMesh is already used (if you want to override the component, don't specify a class):    Begin Object Class=StaticMeshComponent Name=ProjectileMesh ObjName=ProjectileMesh Archetype=StaticMeshComponent'UTGame.Default__UTProj_StingerShard:ProjectileMesh'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTProj_RipperLiteBlade.uc(364) : Error, BEGIN OBJECT: The component name CollisionCylinder is already used (if you want to override the component, don't specify a class):    Begin Object Class=CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTProjectile:CollisionCylinder'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTProj_RipperLiteBladeAlt.uc(26) : Error, BEGIN OBJECT: The component name CollisionCylinder is already used (if you want to override the component, don't specify a class):    Begin Object Class=CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTProjectile:CollisionCylinder'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(221) : Error, BEGIN OBJECT: The component name FirstPersonMesh is already used (if you want to override the component, don't specify a class):    Begin Object Class=UTSkeletalMeshComponent Name=FirstPersonMesh ObjName=FirstPersonMesh Archetype=UTSkeletalMeshComponent'UTGame.Default__UTWeapon:FirstPersonMesh'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTAttachment_RipperLite.uc(6) : Warning, Unresolved reference to Material 'RipperLitePack.Materials.M_RipperLite'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(115) : Warning, Unresolved reference to SoundCue 'RipperLitePack.Sounds.SecondaryFireCue'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(97) : Warning, Unresolved reference to Material 'RipperLitePack.Materials.M_RipperLite'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(89) : Warning, Unresolved reference to SoundCue 'RipperLitePack.Sounds.SecondaryFireCue'
    E:\Games\Steam\steamapps\common\unreal tournament 3\Development\Src\RipperLite\Classes\UTWeap_RipperLite.uc(70) : Warning, Unresolved reference to SoundCue 'RipperLitePack.Sounds.SecondaryFireCue'
    
    Failure - 7 error(s), 5 warning(s)
    
    Execution of commandlet took:  1.30 seconds

    #2
    The problem is that when it is decompiled, the object has no order. You have to rebuild the object.

    UT3 Documents Unpublished folder: Upk "RipperLitePack.Sounds.SecondaryFireCue"
    Also keep in mind if an extension is declared in the scrip, which calls a variable that is not declared inside. How it happens with the biorofile case. That calls other extensions outside of UTgame "folder" to UTGameContents "folder".


    class UTProj_BioGlob2 extends UTProj_BioShot; ( UTProj_BioShot Call another UC )

    var() int MaxRestingGlobStrength;
    var repnotify int GlobStrength;
    var() float GloblingSpeed;

    var StaticMeshComponent GooLandedMesh;
    var ParticleSystemComponent HitWallEffect;

    var class<UTDamageType> GibDamageType;

    replication
    {
    if (bNetInitial)
    GlobStrength;
    }

    function InitBio(UTWeap_BioRifle2 FiringWeapon, int InGlobStrength) / Call another UC
    {
    // adjust speed
    InGlobStrength = Max(InGlobStrength, 1);
    Velocity = Normal(Velocity) * Speed * (0.4 + InGlobStrength)/(1.35*InGlobStrength);

    SetGlobStrength(InGlobStrength);
    RestTime = Default.RestTime + 0.6*InGlobStrength;
    }

    simulated function SetGlobStrength( int NewStrength )
    {
    GlobStrength = Max(NewStrength,1);
    SetDrawScale(Sqrt((GlobStrength == 1) ? 1 : (GlobStrength + 1)) * default.DrawScale);
    if (GlobStrength > 4)
    {
    SetCollisionSize(CylinderComponent.CollisionRadius, CylinderComponent.CollisionHeight * 2.0);
    }

    // set different damagetype for charged shots
    if (GlobStrength > 1)
    {
    MyDamageType = default.MyDamageType;
    }
    else
    {
    MyDamageType = class'UTProj_BioShot2'.default.MyDamageType;
    }
    }

    /**
    * Spawns several children globs
    */
    simulated function SplashGloblings()
    {
    local int g;
    local UTProj_BioShot NewGlob; / Call extencion UC
    local float GlobVolume;
    local Vector VNorm;

    if ( (GlobStrength > MaxRestingGlobStrength) && (UTPawn(Base) == None) )
    {
    if (Role == ROLE_Authority)
    {
    GlobVolume = Sqrt(GlobStrength);

    for (g=0; g<GlobStrength-MaxRestingGlobStrength; g++)
    {
    NewGlob = Spawn(class'UTProj_BioGlobling2', self,, Location+GlobVolume*6*SurfaceNormal);
    if (NewGlob != None)
    {
    // init newglob
    NewGlob.Velocity = (GloblingSpeed + FRand()*150.0) * (SurfaceNormal + VRand()*0.8);
    if (Physics == PHYS_Falling)
    {
    VNorm = (Velocity dot SurfaceNormal) * SurfaceNormal;
    NewGlob.Velocity += (-VNorm + (Velocity - VNorm)) * 0.1;
    }
    NewGlob.InstigatorController = InstigatorController;
    }
    }
    }
    SetGlobStrength(MaxRestingGlobStrength);
    }
    }

    state OnGround
    {
    simulated function Drip()
    {
    // @todo drop a globling
    }

    simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal)
    {
    local UTProj_BioGlob2 Glob;

    Glob = UTProj_BioGlob2(Other);
    if ( Glob != None )
    {
    if ( (Glob.Owner != self) && (Owner != Glob) )
    {
    MergeWithGlob(GlobStrength);
    Glob.Destroy();
    }
    }
    else if ( !bExploded && (UTProj_BioGlobling2(Other) == None) / Call another UC BioGlobling2
    && ((Other.bProjTarget && (Other != Base)) || (UTProj_BioShot2(Other) != None)) )
    {
    Explode(Location, SurfaceNormal );
    }
    }

    simulated function MergeWithGlob(int AdditionalGlobStrength)
    {
    SetGlobStrength(GlobStrength+AdditionalGlobStrength);
    SplashGloblings();
    GrowCollision();
    PlaySound(ImpactSound);
    bCheckedSurface = false;
    SetTimer(GetTimerCount() + AdditionalGlobStrength, false);
    }


    simulated function AnimEnd(int Channel)
    {
    local float DotProduct;

    if (!bCheckedSurface)
    {
    DotProduct = SurfaceNormal dot Vect(0,0,-1);
    if (DotProduct > 0.7)
    {
    // PlayAnim('Drip', 0.66);
    SetTimer(DripTime, false, 'Drip');
    if (bOnMover)
    {
    Explode(Location, SurfaceNormal);
    }
    }
    else if (DotProduct > -0.5)
    {
    // PlayAnim('Slide', 1.0);
    if (bOnMover)
    {
    Explode(Location, SurfaceNormal);
    }
    }
    bCheckedSurface = true;
    }
    }
    }

    defaultproperties
    {
    Components.Empty();
    MaxRestingGlobStrength=6
    GlobStrength=1
    GloblingSpeed=200.0
    DamageRadius=120.0
    bProjTarget=true
    bNetTemporary=false
    DrawScale=0.5
    LifeSpan=20.0
    MyDamageType=class'UTDmgType_BioGoo_Charged'
    GibDamageType=class'UTDmgType_BioGooGib'
    bRotationFollowsVelocity=false

    Begin Object Name=CollisionCylinder
    CollisionRadius=20
    CollisionHeight=4
    End Object
    components.Add(CollisionCylinder)
    Explosionsound=SoundCue'A_Weapon_BioRifle.Weapon.A_BioRifle_FireAltImpactExplode_Cue'
    ImpactSound=SoundCue'A_Weapon_BioRifle.Weapon.A_BioRifle_FireAltImpactExplode_Cue'
    AmbientSound=SoundCue'A_Weapon_BioRifle.Weapon.A_BioRifle_Inair_Cue'

    Begin Object Class=StaticMeshComponent Name=ProjectileMeshFloor
    StaticMesh=StaticMesh'WP_BioRifle.Mesh.S_Bio_Blob_Chunk_Reduced'
    CullDistance=12000
    Scale=2.0
    bAcceptsDecals=false
    bUseAsOccluder=FALSE
    End Object
    GooLandedMesh=ProjectileMeshFloor

    Begin Object class=AnimNodeSequence Name=MeshSequenceA
    End Object
    Begin Object Class=SkeletalMeshComponent Name=ProjectileSkelMeshAir
    SkeletalMesh=SkeletalMesh'WP_BioRifle.Mesh.SK_WP_Bio_Alt_Projectile_Blob'
    AnimSets(0)=AnimSet'WP_BioRifle.Anims.Bio_Alt_Blob_Projectile_Shake'
    Animations=MeshSequenceA
    bAcceptsDecals=false
    bUseAsOccluder=FALSE
    End Object
    GooMesh=ProjectileSkelMeshAir
    Components.Add(ProjectileSkelMeshAir)


    FloorHit=none
    CeilingHit=none
    WallHit=none

    Begin Object Class=ParticleSystemComponent Name=HitWallFX
    Template=ParticleSystem'WP_BioRifle.Particles.P_WP_Bio_Alt_Blob_Impact'
    bAutoActivate=false
    SecondsBeforeInactive=1.0f
    End Object
    HitWallEffect=HitWallFX
    ProjExplosionTemplate=ParticleSystem'WP_BioRifle.Particles.P_WP_Bio_Alt_Blob_POP'
    }
    And remember that when compiling you have to have a duplicate of the UPK in unpulbished

    Begin Object Weapons / pickage , light, proj , etc


    // Weapon SkeletalMesh
    Begin Object class=AnimNodeSequence Name=MeshSequenceA
    End Object

    // Weapon SkeletalMesh
    Begin Object Name=FirstPersonMesh
    SkeletalMesh=SkeletalMesh'X.mesh.X'
    AnimSets(0)=AnimSet'WeaponX.Anims.nameP1X'

    FOV=56.0
    Animations=MeshSequenceA
    End Object

    Begin Object Name=PickupMesh
    SkeletalMesh=SkeletalMesh'WeaponsX.Mesh.Name_P3X'
    End Object

    Begin Object Class=ForceFeedbackWaveform Name=ForceFeedbackWaveformShooting1
    Samples(0)=(LeftAmplitude=90,RightAmplitude=40,LeftFunction=WF_Constant,RightFunction=WF_LinearDecreasing,Duration=0.1200)
    End Object



    The projectiles that do not use the U cascade (do not use physics Therefore it is created in the UC " CollisionCylinder "
    ).

    Comment

    Working...
    X