From be63f6c7e343d7f1a32c33422cea1b19827eb53d Mon Sep 17 00:00:00 2001 From: Jers Date: Mon, 11 Mar 2024 23:14:44 -0500 Subject: [PATCH] Added too much to list --- Config/DefaultEngine.ini | 7 ++++-- Config/DefaultGame.ini | 2 ++ Content/Audio/arggh.uasset | 3 +++ Content/Audio/argh.uasset | 3 +++ Content/Audio/croak.uasset | 3 +++ Content/Audio/oofwav.uasset | 3 +++ Content/Audio/oogh.uasset | 3 +++ Content/Audio/ouch.uasset | 3 +++ Content/Audio/ugh.uasset | 3 +++ Content/BattleMap.umap | 4 +-- .../BigCheese/Punkz_Skeleton.uasset | 4 +-- Content/Characters/McKee/MatMckee.uasset | 3 +++ Content/Characters/McKee/mckee.uasset | 3 +++ .../McKee/mckee_Material_BaseColor.uasset | 3 +++ .../McKee/mckee_Material_Normal.uasset | 3 +++ ...Material_OcclusionRoughnessMetallic.uasset | 3 +++ .../McKee/mckee_PhysicsAsset.uasset | 3 +++ .../Blueprints/AI/BP_AIControllerBasic.uasset | 4 +-- .../Blueprints/BP_TopDownGameMode.uasset | 4 +-- .../Characters/Animations/ABP_Punkz.uasset | 3 +++ .../Characters/Animations/Flying_Kick.uasset | 3 +++ .../Characters/Animations/M_FlyingKick.uasset | 3 +++ .../Characters/Animations/Running.uasset | 3 +++ .../Blueprints/Characters/BP_Unit.uasset | 4 +-- .../Characters/Punkz/BP_Boss1.uasset | 3 --- .../Characters/Punkz/BP_McKee.uasset | 3 +++ .../Blueprints/UI/WBP_DamageNumber.uasset | 4 +-- .../StreetPunkz/Private/BasicProjectile.cpp | 2 +- Source/StreetPunkz/Private/SPGameState.cpp | 1 + Source/StreetPunkz/Private/Unit.cpp | 25 +++++++++++++++++++ Source/StreetPunkz/Public/BasicProjectile.h | 3 +++ Source/StreetPunkz/Public/Unit.h | 6 +++++ 32 files changed, 109 insertions(+), 18 deletions(-) create mode 100644 Content/Audio/arggh.uasset create mode 100644 Content/Audio/argh.uasset create mode 100644 Content/Audio/croak.uasset create mode 100644 Content/Audio/oofwav.uasset create mode 100644 Content/Audio/oogh.uasset create mode 100644 Content/Audio/ouch.uasset create mode 100644 Content/Audio/ugh.uasset create mode 100644 Content/Characters/McKee/MatMckee.uasset create mode 100644 Content/Characters/McKee/mckee.uasset create mode 100644 Content/Characters/McKee/mckee_Material_BaseColor.uasset create mode 100644 Content/Characters/McKee/mckee_Material_Normal.uasset create mode 100644 Content/Characters/McKee/mckee_Material_OcclusionRoughnessMetallic.uasset create mode 100644 Content/Characters/McKee/mckee_PhysicsAsset.uasset create mode 100644 Content/TopDown/Blueprints/Characters/Animations/ABP_Punkz.uasset create mode 100644 Content/TopDown/Blueprints/Characters/Animations/Flying_Kick.uasset create mode 100644 Content/TopDown/Blueprints/Characters/Animations/M_FlyingKick.uasset create mode 100644 Content/TopDown/Blueprints/Characters/Animations/Running.uasset delete mode 100644 Content/TopDown/Blueprints/Characters/Punkz/BP_Boss1.uasset create mode 100644 Content/TopDown/Blueprints/Characters/Punkz/BP_McKee.uasset diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index c6d2707..cdf0ca2 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -63,9 +63,9 @@ VerticalDeviationFromGroundCompensation=0.000000 bForceRebuildOnLoad=True [/Script/Engine.RendererSettings] -r.ReflectionMethod=1 +r.ReflectionMethod=2 r.GenerateMeshDistanceFields=True -r.DynamicGlobalIlluminationMethod=1 +r.DynamicGlobalIlluminationMethod=2 r.Shadow.Virtual.Enable=1 r.Mobile.EnableNoPrecomputedLightingCSMShader=1 r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True @@ -74,6 +74,9 @@ r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=true r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8 r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8 +r.Nanite.ProjectEnabled=True +r.DefaultFeature.AutoExposure.Method=1 +r.MSAACount=2 [/Script/WindowsTargetPlatform.WindowsTargetSettings] DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini index 45cccaa..4edfc08 100644 --- a/Config/DefaultGame.ini +++ b/Config/DefaultGame.ini @@ -3,7 +3,9 @@ ProjectID=AB2871804EAE2524B4D807BF7C9A9978 ProjectName=Top Down BP Game Template CopyrightNotice=Copyright Zelle Games LicensingTerms=No LIcense Available +ProjectDisplayedTitle=NSLOCTEXT("[/Script/EngineSettings]", "EA4851D343916F753F6F739E5354CE05", "GutterPunkz") [/Script/UnrealEd.ProjectPackagingSettings] IncludeDebugFiles=False +bUseZenStore=False diff --git a/Content/Audio/arggh.uasset b/Content/Audio/arggh.uasset new file mode 100644 index 0000000..f4f2b9e --- /dev/null +++ b/Content/Audio/arggh.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb284bf8a1f78bed9db8453a4426526e3f07b9db3fc6a629835b5761df6e31be +size 129565 diff --git a/Content/Audio/argh.uasset b/Content/Audio/argh.uasset new file mode 100644 index 0000000..9249e3f --- /dev/null +++ b/Content/Audio/argh.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fef09e196db7211ade2376f003c0d6e5f2c74270bb090139a03aecd0f58e13c3 +size 102091 diff --git a/Content/Audio/croak.uasset b/Content/Audio/croak.uasset new file mode 100644 index 0000000..93ecf39 --- /dev/null +++ b/Content/Audio/croak.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e725f4d94182c79dbad028bcae3f93495e349296ff1c20b7dc1035fd53b0e29 +size 125245 diff --git a/Content/Audio/oofwav.uasset b/Content/Audio/oofwav.uasset new file mode 100644 index 0000000..3d66f62 --- /dev/null +++ b/Content/Audio/oofwav.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abda38cc4c8db7b357719b78293e68dc22fe312520266c88f890f2f238b10365 +size 136691 diff --git a/Content/Audio/oogh.uasset b/Content/Audio/oogh.uasset new file mode 100644 index 0000000..c86e295 --- /dev/null +++ b/Content/Audio/oogh.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:782a1ca5f8fcaf6d7f1369a1c153ddce17b819ee82a6d10600caa55def125cd0 +size 79183 diff --git a/Content/Audio/ouch.uasset b/Content/Audio/ouch.uasset new file mode 100644 index 0000000..62e04c4 --- /dev/null +++ b/Content/Audio/ouch.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b513b91f1137bba26c1b427212a8f75d36f094cd9e50dd48e1775b9eb34d27af +size 110964 diff --git a/Content/Audio/ugh.uasset b/Content/Audio/ugh.uasset new file mode 100644 index 0000000..52fb783 --- /dev/null +++ b/Content/Audio/ugh.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0288931233eb747ba7ae3f9bc991c294bd17a7cfab73bfe7f69858daab5c81a +size 106051 diff --git a/Content/BattleMap.umap b/Content/BattleMap.umap index 4256df0..3d078e7 100644 --- a/Content/BattleMap.umap +++ b/Content/BattleMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e27965a8618fa1fd2c5097dce1f6e0266f111211807c94f36bbad8f416237ec -size 344878 +oid sha256:d51e400d799d35d501172008784abcbe20ba58291b4237754f9259f49d324d86 +size 349776 diff --git a/Content/Characters/BigCheese/Punkz_Skeleton.uasset b/Content/Characters/BigCheese/Punkz_Skeleton.uasset index 03b110c..eb2b5e6 100644 --- a/Content/Characters/BigCheese/Punkz_Skeleton.uasset +++ b/Content/Characters/BigCheese/Punkz_Skeleton.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a5892f47100d959d27bfaf99b7967e44e6ad6fb0214557a3788c3b3972131de -size 10840 +oid sha256:5556fdcc14ac271ed35b3c59601bd011efbd2e47102919762cacaa872b43cd6e +size 11166 diff --git a/Content/Characters/McKee/MatMckee.uasset b/Content/Characters/McKee/MatMckee.uasset new file mode 100644 index 0000000..a4c9406 --- /dev/null +++ b/Content/Characters/McKee/MatMckee.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:707caed7e7eb31b825306de11c5d2fba5e3d1219a3b47da4740438663d967bd0 +size 14296 diff --git a/Content/Characters/McKee/mckee.uasset b/Content/Characters/McKee/mckee.uasset new file mode 100644 index 0000000..f278129 --- /dev/null +++ b/Content/Characters/McKee/mckee.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8dd0a29c079cb4851ae211b9dda54638a9eda1ce4b1200a8596fb3ffc931914 +size 809463 diff --git a/Content/Characters/McKee/mckee_Material_BaseColor.uasset b/Content/Characters/McKee/mckee_Material_BaseColor.uasset new file mode 100644 index 0000000..ee41f33 --- /dev/null +++ b/Content/Characters/McKee/mckee_Material_BaseColor.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8648055f876b0028aa1f8982341d4df994be2615bc68e8960028658185db6dea +size 770704 diff --git a/Content/Characters/McKee/mckee_Material_Normal.uasset b/Content/Characters/McKee/mckee_Material_Normal.uasset new file mode 100644 index 0000000..2a06bfb --- /dev/null +++ b/Content/Characters/McKee/mckee_Material_Normal.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09537e0e9231257842ff50d3f4fc72e1075dbf341bc013dca95c9452d99d6f7d +size 813264 diff --git a/Content/Characters/McKee/mckee_Material_OcclusionRoughnessMetallic.uasset b/Content/Characters/McKee/mckee_Material_OcclusionRoughnessMetallic.uasset new file mode 100644 index 0000000..7292835 --- /dev/null +++ b/Content/Characters/McKee/mckee_Material_OcclusionRoughnessMetallic.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9908a0aa01c5131d3b18025aa6e1b8d3f91ce9c086d0eedbe585c3219fd5968 +size 271353 diff --git a/Content/Characters/McKee/mckee_PhysicsAsset.uasset b/Content/Characters/McKee/mckee_PhysicsAsset.uasset new file mode 100644 index 0000000..ff57185 --- /dev/null +++ b/Content/Characters/McKee/mckee_PhysicsAsset.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60da3e6f87a613216d623d5730ba41a7eeea957e561d309db0e4ff2c8ef0068a +size 26064 diff --git a/Content/TopDown/Blueprints/AI/BP_AIControllerBasic.uasset b/Content/TopDown/Blueprints/AI/BP_AIControllerBasic.uasset index d36cc27..bdccbd1 100644 --- a/Content/TopDown/Blueprints/AI/BP_AIControllerBasic.uasset +++ b/Content/TopDown/Blueprints/AI/BP_AIControllerBasic.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:21a8b40fa6ffc797da643257b7f9b9cc3f8af8f9d79430314e58f3c95db0799f -size 111902 +oid sha256:a054d167ba4fa5d5052bc5a4b20ee386525c197208915bd958bf98c204bee7ae +size 111097 diff --git a/Content/TopDown/Blueprints/BP_TopDownGameMode.uasset b/Content/TopDown/Blueprints/BP_TopDownGameMode.uasset index 130498f..ef4df9d 100644 --- a/Content/TopDown/Blueprints/BP_TopDownGameMode.uasset +++ b/Content/TopDown/Blueprints/BP_TopDownGameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef1acd30a7dd0e1bb459690e5e24d44dc92538b523a72b4691c45a41f9e28d81 -size 15313 +oid sha256:e6ca7dcaff7be7762cab87e7291406c0ed940cda7bdade990a8ff14809a7c757 +size 28064 diff --git a/Content/TopDown/Blueprints/Characters/Animations/ABP_Punkz.uasset b/Content/TopDown/Blueprints/Characters/Animations/ABP_Punkz.uasset new file mode 100644 index 0000000..e822981 --- /dev/null +++ b/Content/TopDown/Blueprints/Characters/Animations/ABP_Punkz.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ac6ad990da6ebf0798cc46582d03277a1fa27f0c8c8752a1b93c54fb88e1141 +size 146429 diff --git a/Content/TopDown/Blueprints/Characters/Animations/Flying_Kick.uasset b/Content/TopDown/Blueprints/Characters/Animations/Flying_Kick.uasset new file mode 100644 index 0000000..044f6cf --- /dev/null +++ b/Content/TopDown/Blueprints/Characters/Animations/Flying_Kick.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87c022f79235977974ae24e376952a96c524011cd31a9ed1f0187074dbfa5bbb +size 3724649 diff --git a/Content/TopDown/Blueprints/Characters/Animations/M_FlyingKick.uasset b/Content/TopDown/Blueprints/Characters/Animations/M_FlyingKick.uasset new file mode 100644 index 0000000..8542144 --- /dev/null +++ b/Content/TopDown/Blueprints/Characters/Animations/M_FlyingKick.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd0ef8c0a35be92c0a809cacdcf3a2dd6521f545e9242f904c615a5437429a29 +size 11618 diff --git a/Content/TopDown/Blueprints/Characters/Animations/Running.uasset b/Content/TopDown/Blueprints/Characters/Animations/Running.uasset new file mode 100644 index 0000000..ebe184d --- /dev/null +++ b/Content/TopDown/Blueprints/Characters/Animations/Running.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e2bb7ab0dc5fb4dab253a90845cd151535eeba6f41c3ae49c28453762536c71 +size 97753 diff --git a/Content/TopDown/Blueprints/Characters/BP_Unit.uasset b/Content/TopDown/Blueprints/Characters/BP_Unit.uasset index 9cfb330..41faeee 100644 --- a/Content/TopDown/Blueprints/Characters/BP_Unit.uasset +++ b/Content/TopDown/Blueprints/Characters/BP_Unit.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d8eb3075d0099160241b406310d943ee6974cdaef63fb5e3bf1fce4387ebf9b0 -size 79310 +oid sha256:47ad1e291377ae3b8edefa3edcaa71af60393c94efdf979db0c21b476078f9a0 +size 124046 diff --git a/Content/TopDown/Blueprints/Characters/Punkz/BP_Boss1.uasset b/Content/TopDown/Blueprints/Characters/Punkz/BP_Boss1.uasset deleted file mode 100644 index 9997115..0000000 --- a/Content/TopDown/Blueprints/Characters/Punkz/BP_Boss1.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d898e733dd524bd41fcb3795a1c026ea81a136622c2fdf5357817eeece956319 -size 25516 diff --git a/Content/TopDown/Blueprints/Characters/Punkz/BP_McKee.uasset b/Content/TopDown/Blueprints/Characters/Punkz/BP_McKee.uasset new file mode 100644 index 0000000..1208263 --- /dev/null +++ b/Content/TopDown/Blueprints/Characters/Punkz/BP_McKee.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d28b52b544741008e2ec1ee21d78f6bc92d6d5b7859371328cd123b4afe24887 +size 41043 diff --git a/Content/TopDown/Blueprints/UI/WBP_DamageNumber.uasset b/Content/TopDown/Blueprints/UI/WBP_DamageNumber.uasset index 722158e..ce6ea69 100644 --- a/Content/TopDown/Blueprints/UI/WBP_DamageNumber.uasset +++ b/Content/TopDown/Blueprints/UI/WBP_DamageNumber.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a685f4fb169a19c2888030a057c14c7c15e1d84d063640d1e566d79c66cdad89 -size 99908 +oid sha256:2d9a3cc367dcf66322ab37312b736ab861c5334ef0a0f27d01ca582dd04845c9 +size 122126 diff --git a/Source/StreetPunkz/Private/BasicProjectile.cpp b/Source/StreetPunkz/Private/BasicProjectile.cpp index 666a8f9..dea1de0 100644 --- a/Source/StreetPunkz/Private/BasicProjectile.cpp +++ b/Source/StreetPunkz/Private/BasicProjectile.cpp @@ -54,6 +54,6 @@ void ABasicProjectile::OnSphereOverlap(UPrimitiveComponent* OverlappedComponent, DamageEvent.ShotDirection = UnitDirection; DamageEvent.Damage = Damage; - OtherActor->TakeDamage(Damage, DamageEvent, nullptr, this); + OtherActor->TakeDamage(Damage, DamageEvent, OwningController, this); Destroy(); } \ No newline at end of file diff --git a/Source/StreetPunkz/Private/SPGameState.cpp b/Source/StreetPunkz/Private/SPGameState.cpp index d43e839..785bea3 100644 --- a/Source/StreetPunkz/Private/SPGameState.cpp +++ b/Source/StreetPunkz/Private/SPGameState.cpp @@ -87,6 +87,7 @@ void ASPGameState::StartLevel(FLevelSetup InLevelSetup) PCUnit->Cooldown = 1 / StatsSystem->AttackSpeed; PCUnit->CooldownTimer = PCUnit->Cooldown; PCUnit->Dexterity = StatsSystem->Dexterity; + PCUnit->ApplyStats(); Cast(PCUnit->GetController())->MoveToLocation(LevelSetup.RunupPoint); diff --git a/Source/StreetPunkz/Private/Unit.cpp b/Source/StreetPunkz/Private/Unit.cpp index 28a04c2..3aae8ed 100644 --- a/Source/StreetPunkz/Private/Unit.cpp +++ b/Source/StreetPunkz/Private/Unit.cpp @@ -42,6 +42,7 @@ AUnit::AUnit() void AUnit::BeginPlay() { Super::BeginPlay(); + ApplyStats(); DamageNumbersOriginalPosition = DamageNumberWidget->GetRelativeLocation(); } @@ -107,6 +108,7 @@ void AUnit::LaunchProjectileSignal() ABasicProjectile* AsProjectile = Cast(NewProjectile); NewProjectile->SetLifeSpan(5.0f); AsProjectile->Damage = Attack; + AsProjectile->OwningController = GetController(); if(ActorHasTag("Enemy")) { AsProjectile->SphereComponent->SetCollisionProfileName("EnemyProjectile"); @@ -130,6 +132,11 @@ void AUnit::SetTarget(AUnit* InTarget) AUnit* AUnit::FindNearestEnemy() { + if(TargetUnit && !TargetUnit->IsDead() && FVector::Distance(GetActorLocation(), TargetUnit->GetActorLocation()) <= Range + 300) + { + return TargetUnit; + } + const bool IsEnemy = ActorHasTag("Enemy"); const FName TagToSearch = IsEnemy ? "Player" : "Enemy"; @@ -162,6 +169,18 @@ AUnit* AUnit::FindNearestEnemy() float AUnit::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser) { + AUnit* Attacker = Cast(EventInstigator->GetPawn()); + if(Attacker) + { + float DodgeChance = 0.05 + (Dexterity * 0.008f) - (Attacker->Dexterity * 0.008f); + float DodgeRoll = FMath::RandRange(0.0f, 1.0f); + if(DodgeRoll <= DodgeChance) + { + EventMiss(); + return 0; + } + } + FVector HitFromDirection = GetActorLocation() - DamageCauser->GetActorLocation(); HitFromDirection.Z = 0; HitFromDirection.Normalize(); @@ -180,6 +199,12 @@ bool AUnit::IsDead() const return HP <= 0; } +void AUnit::ApplyStats() +{ + GetCharacterMovement()->RotationRate.Yaw = 180 + Dexterity * 2; + GetCharacterMovement()->MaxWalkSpeed = 600 + Dexterity * 15; +} + void AUnit::HideDamageNumbers() const { DamageNumberWidget->SetVisibility(false, true); diff --git a/Source/StreetPunkz/Public/BasicProjectile.h b/Source/StreetPunkz/Public/BasicProjectile.h index e0c592b..09671f3 100644 --- a/Source/StreetPunkz/Public/BasicProjectile.h +++ b/Source/StreetPunkz/Public/BasicProjectile.h @@ -28,6 +28,9 @@ public: UPROPERTY(BlueprintReadWrite, EditAnywhere) UProjectileMovementComponent* ProjectileMovementComponent; + + UPROPERTY(BlueprintReadWrite, EditAnywhere) + AController* OwningController; protected: // Called when the game starts or when spawned diff --git a/Source/StreetPunkz/Public/Unit.h b/Source/StreetPunkz/Public/Unit.h index 27bdb38..859e4b4 100644 --- a/Source/StreetPunkz/Public/Unit.h +++ b/Source/StreetPunkz/Public/Unit.h @@ -117,6 +117,12 @@ public: UFUNCTION(BlueprintCallable) bool IsDead() const; + + UFUNCTION(BlueprintImplementableEvent) + void EventMiss(); + + UFUNCTION() + void ApplyStats(); virtual float TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser) override; void HideDamageNumbers() const;