GreatEmerald / UT3Vehicles

The vehicles portion of the UT3Style mod for Unreal Tournament 2004.
Other
3 stars 4 forks source link

Raptor: Plasma Improvements Cont. #173

Closed HellDragon-HK closed 6 years ago

HellDragon-HK commented 6 years ago

Continuing from where we left off we should be getting 40 damage per shot to vehicles but it only seems to happen on everything shot after the first shot which only seems to do 20.

GreatEmerald commented 6 years ago

And if you change Damage in defaultproperties to, say, 200, does the first shot always deal 200?

HellDragon-HK commented 6 years ago

I guess we can find out

HellDragon-HK commented 6 years ago

Considering the Goliath has 900 and it had 700 when I got in I'd say yes, everything else was 40......are you thinking setting the base damage as 40? The only problem with that is non-vehicle targets will be taking some serious damage.

GreatEmerald commented 6 years ago

Not really, I'm trying to find out what's going on here. This still doesn't seem to make sense, even though there's a method to the madness. It looks like the first shot deals default.Damage no matter anything else, as if it's not even going through the Explode function or so, because it would otherwise be overridden by the default.Damage setting in the function...

If you remove the default.Damage = Damage; line, does the behaviour change any? You can keep the damage defaultproperties at 200 to make it obvious.

HellDragon-HK commented 6 years ago

Removing that now has consistent 200 damage, Manta destroyed in single shot, Raptor set on fire, Scorpion set on fire, Goliath dropped to 700 hp and Hellbender dropped to 400 hp

GreatEmerald commented 6 years ago

And if you remove the Super.Explode(), does it deal no damage always?

HellDragon-HK commented 6 years ago

The whole line or just Super.Explode and leave (HitLocation, HitNormal); ?

HellDragon-HK commented 6 years ago

'does it deal no damage always'

Uh actually the opposite, a Goliath and every vehicle after is exploding in a single shot

EDIT - Set the damage back to 20 from the 200 test and everything is still blowing up in a single shot, except the shots are now going through turrets and not doing anything as well as get stuck on the ground for a second if they hit the ground and look kind of like viewing the effect in the editor or something

GreatEmerald commented 6 years ago

That's also weird, maybe everything dies in one shot because the game thinks it's a telefrag... Put Destroy(); at the end of the function and see whether it does any damage then.

HellDragon-HK commented 6 years ago

With or without Super.Explode?

EDIT - Ok now I'm getting a consistent 200 damage plus the impact visual is missing

GreatEmerald commented 6 years ago

Without. It should not deal any damage...

HellDragon-HK commented 6 years ago

simulated function Explode(vector HitLocation, vector HitNormal) { local float MyDamage;

MyDamage = 20.0;

if ( LifeSpan < 1.0 )
    Damage = 0.75 * MyDamage;
else
    Damage = MyDamage * FMin(2.0, Square(MaxSpeed)/Square(Speed));

//default.Damage = Damage;
Destroy();

}

defaultproperties { Damage = 200.0 //20 GE: We're weaker! Hooray! Speed=2000 MaxSpeed=12500 AccelerationMagnitude = 20000 //GE: And slower! MomentumTransfer = 20000.000000 //4000.0 LifeSpan = 1.6 }

here you go, this is what I have right now and it's causing a consistent 200 on everything

HellDragon-HK commented 6 years ago

Wait, how did that get back to 200 when I just set it at 20!? Ok so that means only base damage is being taken into account then....so what does that mean...I'm lost again where are we on this issue?

GreatEmerald commented 6 years ago

Interesting, I think the reason this is happening is because we're looking at the wrong function entirely! Try this:

simulated singular function HitWall(vector HitNormal, actor Wall)
{
    Damage = 123;
    Super.HitWall(HitNormal, Wall);
}

This ought to deal 123 damage to vehicles.

HellDragon-HK commented 6 years ago

Remove the Explode function?

GreatEmerald commented 6 years ago

No, keep it for the time being.

HellDragon-HK commented 6 years ago

Ok kind of makes things hard as there is no impact visual now

HellDragon-HK commented 6 years ago

Well now you've got the 0 damage happening, also not being told I can't hurt unlinked core

GreatEmerald commented 6 years ago

Argh, it must be due to the singularity... Try this instead:

simulated function HitWall(vector HitNormal, actor Wall)
{
    Damage = 123;
    Super.HitWall(HitNormal, Wall);
}
HellDragon-HK commented 6 years ago

Ok that worked, my math may be off but I think it's doing 123 now, all vehicles have _77 after a shot, core shield still isn't telling me I can't hurt it and still can't visually tell that I'm hitting anything unless it catches on fire or starts smoking

GreatEmerald commented 6 years ago

Awesome. So then it should all look like this, I suppose:

simulated function UpdateDamage()
{
    if ( LifeSpan < 1.0 )
        Damage = 0.75 * default.Damage;
    else
        Damage = default.Damage * FMin(2.0, Square(MaxSpeed)/Square(Speed));
}

simulated function HitWall(vector HitNormal, actor Wall)
{
    UpdateDamage();
    Super.HitWall(HitNormal, Wall);
}

simulated function Explode(vector HitLocation, vector HitNormal)
{
    UpdateDamage();
    Super.Explode(HitLocation, HitNormal);
}

simulated function BlowUp(vector HitLocation)
{
    UpdateDamage();
    Super.BlowUp(HitLocation);
}
HellDragon-HK commented 6 years ago

Unfortunately nope, 350 nearly on the first shot to a Hellbender and all other vehicles 123 by the look of it

GreatEmerald commented 6 years ago

Uh, do make sure you have Damage in defaultproperties set back to 20. Otherwise update the pull request with what you have, because that seems implausible.

HellDragon-HK commented 6 years ago

I did, it already is set at 20 and has been since I noticed it earlier

GreatEmerald commented 6 years ago

So there's no way it would deal 123, there's no place for it to take such a number... Well, place this at the bottom of the UpdateDamage() function:

log(self@"UpdateDamage: Dealing"@Damage@"instead of"@default.Damage)
HellDragon-HK commented 6 years ago

Sure but log hasn't helped much so far, what we get in-game including what Alex got isn't what the log says so far....why is that and how is that possible?

GreatEmerald commented 6 years ago

It isn't. The reason why it wasn't very useful before is because we've been editing the wrong function, so it wouldn't log anything at all (you saw logs of shots to other things that you didn't check the health of).

HellDragon-HK commented 6 years ago

You mean the floor was taking 40 damage?

C:\Unreal Anthology\UT2004\UT3Vehicles\Classes\UT3RaptorProjRed.uc(123) : Error, Missing ';' before '}' Compile aborted due to errors.

EDIT - Nvm I got this one

GreatEmerald commented 6 years ago

Exactly.

And yes, you need to add ; at the end.

HellDragon-HK commented 6 years ago

Lol I wasn't even aware the floor could take damage.

The heck, now I'm getting 40 on every shot...but the only thing changed was adding a log

ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 15.00 instead of 20.00 ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 15.00 instead of 20.00 ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 15.00 instead of 20.00 ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 15.00 instead of 20.00 ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 40.00 instead of 20.00 ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 40.00 instead of 20.00 ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 40.00 instead of 20.00 ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 40.00 instead of 20.00 ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 40.00 instead of 20.00 ScriptLog: ONS-RedPlanet.UT3RaptorProjRed UpdateDamage: Dealing 40.00 instead of 20.00

....hmm possibly I didn't save or didn't actually compile the change the first time?

HellDragon-HK commented 6 years ago

Looks like those changes might be good then and since you already had me add it to the request it's already there.....might be best to wait for @Unre-Alex to try it and see what he gets just in case though?

EDIT - Oh right, add it to the other class too now

Unre-Alex commented 6 years ago

It works.

@HellDragon-HK You forgot this for the red

simulated function UpdateDamage()
{
    if ( LifeSpan < 1.0 )
        Damage = 0.75 * default.Damage;
    else
        Damage = default.Damage * FMin(2.0, Square(MaxSpeed)/Square(Speed));
}
HellDragon-HK commented 6 years ago

Thanks, why is it GitHub keeps doing weird things on me, I know for fact I pasted the whole thing....just like how that other class shouldn't have had redundant data when all of that section was replaced

EDIT - Ah no, freezing rain, around here that usually means we lose power for a day to 3 days, I may end up being offline later just to warn everyone....or something bad may have happened where I live gets fairly dangerous and already is now.

GreatEmerald commented 6 years ago

Well, mystery solved, then! Who knew that vehicles were considered to be "walls"...

HellDragon-HK commented 6 years ago

I didn't catch that, I caught the floor but not that....hmm maybe it's not so much the vehicles as it is the collision boxes which probably could be considered a wall...just a guess

GreatEmerald commented 6 years ago

Yes, probably.