From 19a53529e98fcd7b1df64245840b185619bb9fe2 Mon Sep 17 00:00:00 2001 From: MARCEL HARA Date: Mon, 6 Feb 2023 14:29:26 +0000 Subject: [PATCH 01/16] Added Sneak keybind --- Config/DefaultInput.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/Config/DefaultInput.ini b/Config/DefaultInput.ini index a87dbd8..8698439 100644 --- a/Config/DefaultInput.ini +++ b/Config/DefaultInput.ini @@ -82,6 +82,7 @@ DoubleClickTime=0.200000 +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=SpaceBar) +ActionMappings=(ActionName="Interact",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=E) +ActionMappings=(ActionName="RightClick",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftMouseButton) ++ActionMappings=(ActionName="Sneak",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftControl) +AxisMappings=(AxisName="Look Up / Down Gamepad",Scale=1.000000,Key=Gamepad_RightY) +AxisMappings=(AxisName="Look Up / Down Mouse",Scale=-1.000000,Key=MouseY) +AxisMappings=(AxisName="Move Forward / Backward",Scale=1.000000,Key=Gamepad_LeftY) From 0cf4ace43a19211034d94c4d2778279986f9e7d0 Mon Sep 17 00:00:00 2001 From: MARCEL HARA Date: Mon, 6 Feb 2023 14:30:13 +0000 Subject: [PATCH 02/16] Updated TempCharacter Added Jump function which is using ACharacter and started working on custom Sneak function --- Content/Blueprints/Combat_UI/CombatCharacter.uasset | 4 ++-- Content/Blueprints/Player/BP_MyTempCharacter.uasset | 4 ++-- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 9 +++++++++ Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 4 ++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index b1fb7b7..a1aecc3 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:396a6ff81c0c1250e4a9251f6e9d027a09814199f3a07dc98ba8b087f35ce12b -size 72432 +oid sha256:75f1be8dcc2242cadbf525aee17e98a61c33a44d283b85f10073985ca70c642e +size 71310 diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index 68f202b..cf1a4a5 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df9e97f92efc6e557cb50693743a5db37bb9b97703afeccf8d1452b5886931ea -size 66442 +oid sha256:4f15d6bea7197b5335d686ea829286466b065c9e1329fcdb437a6c9aae018cc3 +size 65454 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 1062d20..aa0414e 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -38,6 +38,11 @@ void ATempCharacter::RightMoveInput(float Axis) AddMovementInput(UKismetMathLibrary::GetRightVector(FRotator(0, GetControlRotation().Yaw, 0)) * Axis); } +void ATempCharacter::Sneak() +{ + +} + // Called every frame void ATempCharacter::Tick(float DeltaTime) @@ -53,6 +58,8 @@ void ATempCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCompo PlayerInputComponent->BindAxis(TEXT("Move Right / Left"), this, &ATempCharacter::RightMoveInput); PlayerInputComponent->BindAxis(TEXT("Turn Right / Left Mouse"), this, &ATempCharacter::AddControllerYawInput); PlayerInputComponent->BindAxis(TEXT("Look Up / Down Mouse"), this, &ATempCharacter::AddControllerPitchInput); + PlayerInputComponent->BindAction(TEXT("Jump"), IE_Pressed, this, &ATempCharacter::Jump); + PlayerInputComponent->BindAction(TEXT("Sneak"), IE_Pressed, this, &ATempCharacter::Sneak); PlayerInputComponent->BindAction("Interact", IE_Pressed, this, &ATempCharacter::KeyPressed); } @@ -62,6 +69,8 @@ void ATempCharacter::KeyPressed() LineTraceLogic(); } + + // Line trace logic void ATempCharacter::LineTraceLogic() { diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 510587b..ef4d667 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -25,6 +25,9 @@ protected: void ForwardInput(float Axis); void RightMoveInput(float Axis); + UFUNCTION() + void Sneak(); + public: // Called every frame virtual void Tick(float DeltaTime) override; @@ -80,5 +83,6 @@ public: UPROPERTY(BlueprintReadWrite) bool disableTab = false; + }; From 5b4da1f02ecd0ce49914eed743334b6c20928867 Mon Sep 17 00:00:00 2001 From: MARCEL HARA Date: Mon, 6 Feb 2023 15:26:22 +0000 Subject: [PATCH 03/16] Updated TempCharacter for Jump and Sneak Added A sneak function and Jump function for the character --- .../Combat_UI/CombatCharacter.uasset | 2 +- .../Player/BP_MyTempCharacter.uasset | 4 +- .../PlayerTemp/TempCharacter.cpp | 47 ++++++++++++++----- .../PlayerTemp/TempCharacter.h | 3 ++ 4 files changed, 40 insertions(+), 16 deletions(-) diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index a1aecc3..8d884e7 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75f1be8dcc2242cadbf525aee17e98a61c33a44d283b85f10073985ca70c642e +oid sha256:d41dd0f4c13a2823d7cda168b1109dfa219681d8f7fda30c966830823dc227a6 size 71310 diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index cf1a4a5..21e9727 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f15d6bea7197b5335d686ea829286466b065c9e1329fcdb437a6c9aae018cc3 -size 65454 +oid sha256:9f65775451fb2105a879b7ceed94887ea520b41464c773052234285414565157 +size 54763 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index aa0414e..553ac9c 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -5,6 +5,8 @@ #include "Blueprint/UserWidget.h" #include "the_twilight_abyss/BaseItems/InventoryComponent.h" #include "the_twilight_abyss/BaseItems/Items/BaseItem.h" +#include "Components/CapsuleComponent.h" +#include "GameFramework/CharacterMovementComponent.h" #include "the_twilight_abyss/MerchantInteraction/Interaction.h" @@ -17,6 +19,7 @@ ATempCharacter::ATempCharacter() Inventory->MaxItemSlots = 10; GoldBalance = GoldBalance; Health = Health; + this->GetCharacterMovement()->GetNavAgentPropertiesRef().bCanCrouch = true; } // Called when the game starts or when spawned @@ -25,6 +28,7 @@ void ATempCharacter::BeginPlay() Super::BeginPlay(); Health = 100; ThisCamera = Cast(this->FindComponentByClass()); + PlayerCapsule = GetCapsuleComponent(); } //Binds the input we made in the setup player component to the forward vector @@ -40,6 +44,15 @@ void ATempCharacter::RightMoveInput(float Axis) void ATempCharacter::Sneak() { + UE_LOG(LogTemp, Display, TEXT("Sneak activated")); + if (bIsCrouched) + { + UnCrouch(); + } + else + { + Crouch(); + } } @@ -60,6 +73,7 @@ void ATempCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCompo PlayerInputComponent->BindAxis(TEXT("Look Up / Down Mouse"), this, &ATempCharacter::AddControllerPitchInput); PlayerInputComponent->BindAction(TEXT("Jump"), IE_Pressed, this, &ATempCharacter::Jump); PlayerInputComponent->BindAction(TEXT("Sneak"), IE_Pressed, this, &ATempCharacter::Sneak); + PlayerInputComponent->BindAction(TEXT("Sneak"), IE_Released, this, &ATempCharacter::Sneak); PlayerInputComponent->BindAction("Interact", IE_Pressed, this, &ATempCharacter::KeyPressed); } @@ -149,14 +163,17 @@ void ATempCharacter::LineTraceLogic() void ATempCharacter::InputDisabler() { - UE_LOG(LogTemp, Display, TEXT("Disabling playermovement")); + //Disable Character Movement + if (ACharacter* PlayerCharacter = Cast(GetWorld()->GetFirstPlayerController()->GetPawn())) + { + PlayerCharacter->DisableInput(GetWorld()->GetFirstPlayerController()); + } + //Set to UI Mode Only + APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); + PlayerController->SetInputMode(FInputModeUIOnly()); + PlayerController->bShowMouseCursor = true; + disableTab = true; - //GetWorld()->GetFirstPlayerController()->InputComponent->RemoveActionBinding("Interact", IE_Pressed); - GetWorld()->GetFirstPlayerController()->SetIgnoreLookInput(true); - GetWorld()->GetFirstPlayerController()->SetIgnoreMoveInput(true); - GetWorld()->GetFirstPlayerController()->bShowMouseCursor = true; - GetWorld()->GetFirstPlayerController()->bEnableClickEvents = true; - GetWorld()->GetFirstPlayerController()->bEnableMouseOverEvents = true; if (ThisCamera == nullptr) { return; @@ -173,14 +190,18 @@ void ATempCharacter::InputDisabler() void ATempCharacter::InputEnabler() { + //Enable Character Movement + if (ACharacter* PlayerCharacter = Cast(GetWorld()->GetFirstPlayerController()->GetPawn())) + { + PlayerCharacter->EnableInput(GetWorld()->GetFirstPlayerController()); + } + //Reset UI Mode + APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); + PlayerController->SetInputMode(FInputModeGameOnly()); + PlayerController->bShowMouseCursor = false; + UE_LOG(LogTemp, Display, TEXT("Enabling Inputs")); disableTab = true; - GetWorld()->GetFirstPlayerController()->SetIgnoreLookInput(false); - GetWorld()->GetFirstPlayerController()->SetIgnoreMoveInput(false); - GetWorld()->GetFirstPlayerController()->bShowMouseCursor = false; - GetWorld()->GetFirstPlayerController()->bEnableClickEvents = false; - GetWorld()->GetFirstPlayerController()->bEnableMouseOverEvents = false; - //GetWorld()->GetFirstPlayerController()->InputComponent->BindAction("Interact", IE_Pressed, this, &ATempCharacter::KeyPressed); TraceDistance = 300; if (ThisCamera == nullptr) { diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index ef4d667..c1f22e9 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -28,6 +28,9 @@ protected: UFUNCTION() void Sneak(); + + UCapsuleComponent* PlayerCapsule; + public: // Called every frame virtual void Tick(float DeltaTime) override; From 36c18382a26fd08f9a635c8ad19f70e1fbba315c Mon Sep 17 00:00:00 2001 From: MARCEL HARA Date: Mon, 6 Feb 2023 15:55:12 +0000 Subject: [PATCH 04/16] Updated TempCharacter for sneaking vignette effect Added a Vignette effect when crouching --- Content/Levels/Top_layer_level.umap | 4 ++-- .../the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 12 +++++++++--- Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Content/Levels/Top_layer_level.umap b/Content/Levels/Top_layer_level.umap index ad576cc..a338efc 100644 --- a/Content/Levels/Top_layer_level.umap +++ b/Content/Levels/Top_layer_level.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b9913f8136b9bf2c1f42801089b7071ad667f9467ee25d72ab588ae96d7543f2 -size 247266 +oid sha256:b12ca45d23f48747799c368c38e00f316adb025ea913272a4a36b69ec4b30fa3 +size 247139 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 553ac9c..42a36fe 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -8,6 +8,7 @@ #include "Components/CapsuleComponent.h" #include "GameFramework/CharacterMovementComponent.h" #include "the_twilight_abyss/MerchantInteraction/Interaction.h" +#include // CONSTRUCTOR @@ -20,6 +21,7 @@ ATempCharacter::ATempCharacter() GoldBalance = GoldBalance; Health = Health; this->GetCharacterMovement()->GetNavAgentPropertiesRef().bCanCrouch = true; + } // Called when the game starts or when spawned @@ -29,6 +31,10 @@ void ATempCharacter::BeginPlay() Health = 100; ThisCamera = Cast(this->FindComponentByClass()); PlayerCapsule = GetCapsuleComponent(); + TArray AllActorsInScene; + + UGameplayStatics::GetAllActorsOfClass(GetWorld(), APostProcessVolume::StaticClass(), AllActorsInScene); + PostProcessVolume = Cast(AllActorsInScene[0]); } //Binds the input we made in the setup player component to the forward vector @@ -48,10 +54,12 @@ void ATempCharacter::Sneak() if (bIsCrouched) { UnCrouch(); + PostProcessVolume->Settings.VignetteIntensity = 0.0f; } else { Crouch(); + PostProcessVolume->Settings.VignetteIntensity = 0.8f; } } @@ -183,7 +191,6 @@ void ATempCharacter::InputDisabler() OriginalCameraLocation = ThisCamera->GetComponentLocation(); OriginalCameraRotation = ThisCamera->GetComponentRotation(); OriginalCameraFOV = ThisCamera->FieldOfView; - //ulog the originalcameralocation value UE_LOG(LogTemp, Display, TEXT("Original Camera Location: %s"), *OriginalCameraLocation.ToString()); } } @@ -212,7 +219,6 @@ void ATempCharacter::InputEnabler() ThisCamera->SetWorldLocation(OriginalCameraLocation); ThisCamera->SetWorldRotation(OriginalCameraRotation); ThisCamera->FieldOfView = OriginalCameraFOV; - //ulog the originalcameralocation value UE_LOG(LogTemp, Display, TEXT("Original Camera Location: %s"), *OriginalCameraLocation.ToString()); } } @@ -222,7 +228,7 @@ void ATempCharacter::UseItem(class UBaseItem* Item) if(Item) { Item->Use(this); - Item->OnUse(this); //Blueprint Version + Item->OnUse(this); //OnUse is a Blueprint Version } } diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index c1f22e9..f162b7f 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -7,6 +7,7 @@ #include "the_twilight_abyss/BaseItems/Items/BaseItem.h" #include "Camera/CameraComponent.h" #include "Kismet/KismetMathLibrary.h" +#include "Engine/PostProcessVolume.h" #include "TempCharacter.generated.h" UCLASS() @@ -87,5 +88,5 @@ public: UPROPERTY(BlueprintReadWrite) bool disableTab = false; - + APostProcessVolume* PostProcessVolume; }; From 30d22975b79ab6f0ba19edc89fd7c412c9006101 Mon Sep 17 00:00:00 2001 From: Rowland Rowland Date: Mon, 6 Feb 2023 17:24:41 +0000 Subject: [PATCH 05/16] Updated Level Added textures and began experimenting with curves. Planning to investigate Splines --- Content/Levels/Hub.umap | 4 ++-- Content/Levels/_GENERATED/tr258492/Boolean_227A3118.uasset | 3 +++ Content/Levels/_GENERATED/tr258492/Boolean_8613293A.uasset | 3 +++ Content/Levels/_GENERATED/tr258492/Box_481BA8EA.uasset | 3 +++ Content/Levels/_GENERATED/tr258492/Box_57F24318.uasset | 3 +++ Content/Levels/_GENERATED/tr258492/Box_F1F2469E.uasset | 3 +++ 6 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Content/Levels/_GENERATED/tr258492/Boolean_227A3118.uasset create mode 100644 Content/Levels/_GENERATED/tr258492/Boolean_8613293A.uasset create mode 100644 Content/Levels/_GENERATED/tr258492/Box_481BA8EA.uasset create mode 100644 Content/Levels/_GENERATED/tr258492/Box_57F24318.uasset create mode 100644 Content/Levels/_GENERATED/tr258492/Box_F1F2469E.uasset diff --git a/Content/Levels/Hub.umap b/Content/Levels/Hub.umap index ec5a412..21d3280 100644 --- a/Content/Levels/Hub.umap +++ b/Content/Levels/Hub.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6988da9e0a0dcd9548ca16b4e663f79e07d90e1805b363dd82d8d3c0f15057ad -size 69244 +oid sha256:2b73e19c7617141c932b36ad90071b4300da2ff2fa7ba9e4b766e178bbdc4e7a +size 71158 diff --git a/Content/Levels/_GENERATED/tr258492/Boolean_227A3118.uasset b/Content/Levels/_GENERATED/tr258492/Boolean_227A3118.uasset new file mode 100644 index 0000000..9bcd7eb --- /dev/null +++ b/Content/Levels/_GENERATED/tr258492/Boolean_227A3118.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95a5e23adcc7c8b5fd6d5147cf80beb11961b30ec59a9e8b312dd0048fb563ff +size 14986 diff --git a/Content/Levels/_GENERATED/tr258492/Boolean_8613293A.uasset b/Content/Levels/_GENERATED/tr258492/Boolean_8613293A.uasset new file mode 100644 index 0000000..4cd3803 --- /dev/null +++ b/Content/Levels/_GENERATED/tr258492/Boolean_8613293A.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b2e60c2b086ec4aae6cbf239e722603883432dfd3b2f077d2f73a5af1070231 +size 13480 diff --git a/Content/Levels/_GENERATED/tr258492/Box_481BA8EA.uasset b/Content/Levels/_GENERATED/tr258492/Box_481BA8EA.uasset new file mode 100644 index 0000000..123e9fc --- /dev/null +++ b/Content/Levels/_GENERATED/tr258492/Box_481BA8EA.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fef6cdb331ab103ff5eaf4168b2f092dc74e9ea2de53c5a13a2f43feefc2698 +size 13505 diff --git a/Content/Levels/_GENERATED/tr258492/Box_57F24318.uasset b/Content/Levels/_GENERATED/tr258492/Box_57F24318.uasset new file mode 100644 index 0000000..3eab495 --- /dev/null +++ b/Content/Levels/_GENERATED/tr258492/Box_57F24318.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52471fa2b49c5603f2122fc56b2cabc528079f8b62901b75376cfc073512f3dc +size 13505 diff --git a/Content/Levels/_GENERATED/tr258492/Box_F1F2469E.uasset b/Content/Levels/_GENERATED/tr258492/Box_F1F2469E.uasset new file mode 100644 index 0000000..7999ef6 --- /dev/null +++ b/Content/Levels/_GENERATED/tr258492/Box_F1F2469E.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66a480d98451df5d2a08e53329d958deb83d151eef4a2675da08f7725bf2c312 +size 13505 From 797c447d4798889630baf514f2e4e687500fcafe Mon Sep 17 00:00:00 2001 From: MH261677 Date: Mon, 6 Feb 2023 23:51:45 +0000 Subject: [PATCH 06/16] Added Ammo Icon to Images --- .../Items/ItemsInWorld/BP_HealingJellyItem.uasset | 4 ++-- Content/Images/ammoicon.uasset | 3 +++ Content/Levels/MerchantPrototype.umap | 4 ++-- Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp | 2 -- Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp | 7 ------- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 1 + 6 files changed, 8 insertions(+), 13 deletions(-) create mode 100644 Content/Images/ammoicon.uasset diff --git a/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset b/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset index 5e94613..b53dd84 100644 --- a/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset +++ b/Content/Blueprints/Items/ItemsInWorld/BP_HealingJellyItem.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32388bd47d08a69c1f782c682fdf67358fb2fdd5f9dd821ed9fc97d66a0bda70 -size 31327 +oid sha256:14abf326c7821612e3c60b5312759ae40948cadf47a909bf25201e0dfa39ea7d +size 31322 diff --git a/Content/Images/ammoicon.uasset b/Content/Images/ammoicon.uasset new file mode 100644 index 0000000..f2ed9de --- /dev/null +++ b/Content/Images/ammoicon.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c3fc688d58293f796f23824c1478b40cf0d62f868547a7f0e6bf25a471db496 +size 9826 diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index ea85903..b26f4c0 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:838c48c134383d4b1db178233640e11ef2c4bcd49102f53648cf621dd1dcbf8a -size 27100 +oid sha256:a85cec4d3024ec9a40e0fd888530e7982d06461cf90dca88004eae911b6a8431 +size 33243 diff --git a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp index a208bd0..2c808c8 100644 --- a/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp +++ b/Source/the_twilight_abyss/BaseItems/InventoryComponent.cpp @@ -40,13 +40,11 @@ bool UInventoryComponent::AddItem(class UBaseItem* BaseItem) BaseItem->StoredItems = this; BaseItem->World = GetWorld(); bool isNewItem = true; - // for every item in inventory for (auto & Item : Items) { //if the item is the same as the item that is being added if (Item->ItemDisplayName.ToString() == BaseItem->ItemDisplayName.ToString()) { - //add the amount of the item that is being added to the item in the inventory Item->StackCount++; UE_LOG(LogTemp, Display, TEXT("ITEM STACKCOUNT: %d"), Item->StackCount); isNewItem = false; diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index ceae474..eb3ceaa 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -22,7 +22,6 @@ void UEatableItems::Use(ATempCharacter* Character) { Character->Health += 10; UE_LOG(LogTemp, Display, TEXT("Healed")); - //delete itself Character->Inventory->RemoveItem(this); } else if (Character->Health >= 100) @@ -37,11 +36,5 @@ void UEatableItems::Use(ATempCharacter* Character) Character->Inventory->RemoveItem(this); } } - - /* - when player uses the item syrengine to debuff enemies - detect what enemie actors the player is fighting with - lower their damage by a value. - */ } diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 42a36fe..039fdd4 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -33,6 +33,7 @@ void ATempCharacter::BeginPlay() PlayerCapsule = GetCapsuleComponent(); TArray AllActorsInScene; + //MAKE SURE POST PROCESSING IS IN THE SCENE OR GAME WILL CRASH UGameplayStatics::GetAllActorsOfClass(GetWorld(), APostProcessVolume::StaticClass(), AllActorsInScene); PostProcessVolume = Cast(AllActorsInScene[0]); } From 324f062cc7c72728367483a2a27aaa3c4d7d1a8a Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 7 Feb 2023 00:11:00 +0000 Subject: [PATCH 07/16] Updated EatableItems for AmmoFunctionality Added ammo base functionality for using the ammo item in game --- Content/Levels/MerchantPrototype.umap | 4 ++-- Source/the_twilight_abyss/BaseItems/Items/BaseItem.h | 3 +++ .../BaseItems/Items/EatableItems.cpp | 11 +++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Content/Levels/MerchantPrototype.umap b/Content/Levels/MerchantPrototype.umap index b26f4c0..e1f4942 100644 --- a/Content/Levels/MerchantPrototype.umap +++ b/Content/Levels/MerchantPrototype.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a85cec4d3024ec9a40e0fd888530e7982d06461cf90dca88004eae911b6a8431 -size 33243 +oid sha256:c5cc473e60c24da835baacec54217c1f6c675c42c29643b889f07bff057a9c95 +size 34830 diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index 346966f..4ff62dd 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -53,6 +53,9 @@ public: UPROPERTY(EditAnywhere, Category = "Item") bool isDamageBuffItem; + UPROPERTY(EditAnywhere, Category = "Item") + bool isAmmoItemType; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item") int32 StackCount = 1; diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index eb3ceaa..dab88bc 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -16,7 +16,7 @@ void UEatableItems::Use(ATempCharacter* Character) { if(Character) { - if(isHealingItem == true) + if(isHealingItem) { if (Character->Health < 100) { @@ -29,12 +29,19 @@ void UEatableItems::Use(ATempCharacter* Character) UE_LOG(LogTemp, Display, TEXT("Health is full")); } } - if(isDamageBuffItem == true) + + if(isDamageBuffItem) { // need to add the damage buff functionality here UE_LOG(LogTemp, Display, TEXT("Damage Buffed")); Character->Inventory->RemoveItem(this); } + + if (isAmmoItemType) + { + UE_LOG(LogTemp, Display, TEXT("ADD AMMO FUNCTIONALITY HERE")); + Character->Inventory->RemoveItem(this); + } } } From a6436c9110bca13e1edb22ce296586505e63063e Mon Sep 17 00:00:00 2001 From: MH261677 Date: Tue, 7 Feb 2023 00:11:19 +0000 Subject: [PATCH 08/16] Added BP_AmmoItem Added Ammo into the game for the player to find --- Content/Blueprints/Items/AmmoItem.uasset | 3 +++ Content/Blueprints/Items/ItemsInWorld/BP_AmmoItem.uasset | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 Content/Blueprints/Items/AmmoItem.uasset create mode 100644 Content/Blueprints/Items/ItemsInWorld/BP_AmmoItem.uasset diff --git a/Content/Blueprints/Items/AmmoItem.uasset b/Content/Blueprints/Items/AmmoItem.uasset new file mode 100644 index 0000000..9991ade --- /dev/null +++ b/Content/Blueprints/Items/AmmoItem.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d7e4e608a5183142630757d1496d08c76ac9cdcb16b039c3b2e51848ab89d9d +size 6552 diff --git a/Content/Blueprints/Items/ItemsInWorld/BP_AmmoItem.uasset b/Content/Blueprints/Items/ItemsInWorld/BP_AmmoItem.uasset new file mode 100644 index 0000000..fa2720b --- /dev/null +++ b/Content/Blueprints/Items/ItemsInWorld/BP_AmmoItem.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:733e8e625dc0b5a4b8e64f50ccda5397cdeb71aa75470f42b44a4c2606730875 +size 31844 From f032ac91c97bd31eb1f5c4b4e09123900d0e32aa Mon Sep 17 00:00:00 2001 From: Rowland Rowland Date: Thu, 9 Feb 2023 17:02:47 +0000 Subject: [PATCH 09/16] Cleaning Level Using booleans to remove excess assets --- Content/Levels/Hub.umap | 4 ++-- Content/Levels/_GENERATED/tr258492/Box_0AF9695A.uasset | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 Content/Levels/_GENERATED/tr258492/Box_0AF9695A.uasset diff --git a/Content/Levels/Hub.umap b/Content/Levels/Hub.umap index 21d3280..d087c0a 100644 --- a/Content/Levels/Hub.umap +++ b/Content/Levels/Hub.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b73e19c7617141c932b36ad90071b4300da2ff2fa7ba9e4b766e178bbdc4e7a -size 71158 +oid sha256:be6f9443f989aac1fde2b33c5f3bd02e18cc035bdf641eea6e49ed63b1b9ae4c +size 853427 diff --git a/Content/Levels/_GENERATED/tr258492/Box_0AF9695A.uasset b/Content/Levels/_GENERATED/tr258492/Box_0AF9695A.uasset new file mode 100644 index 0000000..be96908 --- /dev/null +++ b/Content/Levels/_GENERATED/tr258492/Box_0AF9695A.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0c0c9e32613c3957933db8d898f3e73d6f3798ebc8a3d3f8500986282bc6726 +size 13499 From e678bcb0bb9612fb22b390feff2036ac36002b50 Mon Sep 17 00:00:00 2001 From: Thomas Jacob Rowland Date: Sat, 11 Feb 2023 16:19:14 +0000 Subject: [PATCH 10/16] Fixed Build Issues for personal PC Couldn't open without building from source. Fixed that hopefully this push means I won't have to do so again --- .vsconfig | 5 - UpgradeLog.htm | 277 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 277 insertions(+), 5 deletions(-) create mode 100644 UpgradeLog.htm diff --git a/.vsconfig b/.vsconfig index b9be525..cf3175a 100644 --- a/.vsconfig +++ b/.vsconfig @@ -1,15 +1,10 @@ { "version": "1.0", "components": [ - "Microsoft.Net.Component.4.6.2.TargetingPack", - "Microsoft.VisualStudio.Component.VC.14.33.17.3.ARM64", - "Microsoft.VisualStudio.Component.VC.14.33.17.3.x86.x64", "Microsoft.VisualStudio.Component.VC.Tools.ARM64", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", "Microsoft.VisualStudio.Component.Windows10SDK", "Microsoft.VisualStudio.Workload.CoreEditor", - "Microsoft.VisualStudio.Workload.ManagedDesktop", - "Microsoft.VisualStudio.Workload.NativeCrossPlat", "Microsoft.VisualStudio.Workload.NativeDesktop", "Microsoft.VisualStudio.Workload.NativeGame", "Microsoft.VisualStudio.Workload.Universal" diff --git a/UpgradeLog.htm b/UpgradeLog.htm new file mode 100644 index 0000000..67f7ecf --- /dev/null +++ b/UpgradeLog.htm @@ -0,0 +1,277 @@ + + + + Migration Report +

+ Migration Report -

\ No newline at end of file From 77c43ab3d1f4eeb8148d634b5022aae0d80e0cfa Mon Sep 17 00:00:00 2001 From: MARCEL HARA Date: Thu, 16 Feb 2023 15:02:58 +0000 Subject: [PATCH 11/16] Updated TempCharacter to find AI Sphere --- Content/Blueprints/Combat_UI/CombatCharacter.uasset | 4 ++-- Content/Blueprints/Player/BP_MyTempCharacter.uasset | 4 ++-- Content/Levels/Top_layer_level.umap | 4 ++-- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 2 ++ Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 5 +++++ 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index 8d884e7..6078475 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d41dd0f4c13a2823d7cda168b1109dfa219681d8f7fda30c966830823dc227a6 -size 71310 +oid sha256:53c111471c3a161fb4ed5408ebeac5cfca08d224652308dbb07cac6d7b829d6b +size 76303 diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index 21e9727..26ace7f 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f65775451fb2105a879b7ceed94887ea520b41464c773052234285414565157 -size 54763 +oid sha256:8cbb4fe454e40e00845b7b268c15000891cfc86bf0afba299b127f6634fc5edc +size 55495 diff --git a/Content/Levels/Top_layer_level.umap b/Content/Levels/Top_layer_level.umap index a338efc..b2c1483 100644 --- a/Content/Levels/Top_layer_level.umap +++ b/Content/Levels/Top_layer_level.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b12ca45d23f48747799c368c38e00f316adb025ea913272a4a36b69ec4b30fa3 -size 247139 +oid sha256:255a45f7e3d4362cc3378dd7a9858608bc92e2b4aa43fbe22db8e72eaa11e126 +size 247199 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 039fdd4..661de57 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -36,6 +36,8 @@ void ATempCharacter::BeginPlay() //MAKE SURE POST PROCESSING IS IN THE SCENE OR GAME WILL CRASH UGameplayStatics::GetAllActorsOfClass(GetWorld(), APostProcessVolume::StaticClass(), AllActorsInScene); PostProcessVolume = Cast(AllActorsInScene[0]); + + UGameplayStatics::GetAllActorsWithTag(GetWorld(), Enemy, AIActors); } //Binds the input we made in the setup player component to the forward vector diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index f162b7f..4c6c866 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -89,4 +89,9 @@ public: bool disableTab = false; APostProcessVolume* PostProcessVolume; + + TArray AIActors; + + FName Enemy; + }; From 43ef8e2110506dfa5c65082dfa3584dbc71d71cb Mon Sep 17 00:00:00 2001 From: MH261677 Date: Fri, 17 Feb 2023 13:12:28 +0000 Subject: [PATCH 12/16] Updated TempCharacter to sneak functionality Added sneak functionality which makes the sphere radius smaller near enemies. --- Config/DefaultEngine.ini | 12 +++++++ Content/Levels/Top_layer_level.umap | 2 +- .../PlayerTemp/TempCharacter.cpp | 32 ++++++++++++------- .../PlayerTemp/TempCharacter.h | 1 - 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index b792816..f3f6b2f 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -128,3 +128,15 @@ CompressionQualityModifier=1.000000 AutoStreamingThreshold=0.000000 SoundCueCookQualityIndex=-1 +[/Script/GameplayDebugger.GameplayDebuggerConfig] +CategorySlot1=One +CategorySlot2=Two +CategorySlot3=Three +CategorySlot4=Four +CategorySlot5=Five +CategorySlot6=Six +CategorySlot7=Seven +CategorySlot8=Eight +CategorySlot9=Nine +CategorySlot0=Zero + diff --git a/Content/Levels/Top_layer_level.umap b/Content/Levels/Top_layer_level.umap index b2c1483..a836a5f 100644 --- a/Content/Levels/Top_layer_level.umap +++ b/Content/Levels/Top_layer_level.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:255a45f7e3d4362cc3378dd7a9858608bc92e2b4aa43fbe22db8e72eaa11e126 +oid sha256:483069f41683db60a67e1b2417c5f3cd17005922d2a67500997ebbc20cb3cbba size 247199 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 661de57..6a7ace7 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -5,10 +5,11 @@ #include "Blueprint/UserWidget.h" #include "the_twilight_abyss/BaseItems/InventoryComponent.h" #include "the_twilight_abyss/BaseItems/Items/BaseItem.h" -#include "Components/CapsuleComponent.h" #include "GameFramework/CharacterMovementComponent.h" #include "the_twilight_abyss/MerchantInteraction/Interaction.h" #include +#include "Components/SphereComponent.h" +#include "Kismet/KismetMathLibrary.h" // CONSTRUCTOR @@ -37,6 +38,7 @@ void ATempCharacter::BeginPlay() UGameplayStatics::GetAllActorsOfClass(GetWorld(), APostProcessVolume::StaticClass(), AllActorsInScene); PostProcessVolume = Cast(AllActorsInScene[0]); + Enemy = TEXT("Enemy"); UGameplayStatics::GetAllActorsWithTag(GetWorld(), Enemy, AIActors); } @@ -58,10 +60,26 @@ void ATempCharacter::Sneak() { UnCrouch(); PostProcessVolume->Settings.VignetteIntensity = 0.0f; + for (AActor* Actor : AIActors) + { + USphereComponent* SphereComponent = Actor->FindComponentByClass(); + if (SphereComponent != nullptr) + { + SphereComponent->SetSphereRadius(40.0f); //default value + } + } } else { Crouch(); + for (AActor* Actor : AIActors) + { + USphereComponent* SphereComponent = Actor->FindComponentByClass(); + if (SphereComponent != nullptr) + { + SphereComponent->SetSphereRadius(15.0f); + } + } PostProcessVolume->Settings.VignetteIntensity = 0.8f; } @@ -185,11 +203,7 @@ void ATempCharacter::InputDisabler() PlayerController->bShowMouseCursor = true; disableTab = true; - if (ThisCamera == nullptr) - { - return; - } - else + if (ThisCamera != nullptr) { OriginalCameraLocation = ThisCamera->GetComponentLocation(); OriginalCameraRotation = ThisCamera->GetComponentRotation(); @@ -213,11 +227,7 @@ void ATempCharacter::InputEnabler() UE_LOG(LogTemp, Display, TEXT("Enabling Inputs")); disableTab = true; TraceDistance = 300; - if (ThisCamera == nullptr) - { - return; - } - else + if (ThisCamera != nullptr) { ThisCamera->SetWorldLocation(OriginalCameraLocation); ThisCamera->SetWorldRotation(OriginalCameraRotation); diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 4c6c866..44ba91e 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -6,7 +6,6 @@ #include "GameFramework/Character.h" #include "the_twilight_abyss/BaseItems/Items/BaseItem.h" #include "Camera/CameraComponent.h" -#include "Kismet/KismetMathLibrary.h" #include "Engine/PostProcessVolume.h" #include "TempCharacter.generated.h" From 3c2d0579515402632b344f15b5b16f9dd070b2b0 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Sun, 19 Feb 2023 15:28:34 +0000 Subject: [PATCH 13/16] Updated TempCharacter to destory ammo ore destroys ammo ore when the player presses e on it --- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 6 ++++++ Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index 6a7ace7..6710218 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -40,6 +40,8 @@ void ATempCharacter::BeginPlay() Enemy = TEXT("Enemy"); UGameplayStatics::GetAllActorsWithTag(GetWorld(), Enemy, AIActors); + + Ammo = TEXT("Ammo"); } //Binds the input we made in the setup player component to the forward vector @@ -150,6 +152,10 @@ void ATempCharacter::LineTraceLogic() { UE_LOG(LogTemp, Display, TEXT("Not Enough Gold")); } + if(OutHit.GetActor()->ActorHasTag(Ammo)) + { + OutHit.GetActor()->Destroy(); + } } // if the actor hit has the interaction component/script then it will activate the code diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 44ba91e..57675b2 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -93,4 +93,6 @@ public: FName Enemy; + FName Ammo; + }; From 618a9509cabf01f97be0b9108653ef5b9bab86d8 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Sun, 19 Feb 2023 15:29:16 +0000 Subject: [PATCH 14/16] Updated EatableItems to add ammo {UNSTABLE} Added functionality to the ammo count currently unstable as need to wait for other programmer to understand why it crashes. --- Content/Blueprints/Player/BP_MyTempCharacter.uasset | 4 ++-- Content/Levels/Top_layer_level.umap | 4 ++-- .../the_twilight_abyss/BaseItems/Items/EatableItems.cpp | 9 ++++++++- Source/the_twilight_abyss/BaseItems/Items/EatableItems.h | 6 ++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Content/Blueprints/Player/BP_MyTempCharacter.uasset b/Content/Blueprints/Player/BP_MyTempCharacter.uasset index 26ace7f..b161173 100644 --- a/Content/Blueprints/Player/BP_MyTempCharacter.uasset +++ b/Content/Blueprints/Player/BP_MyTempCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8cbb4fe454e40e00845b7b268c15000891cfc86bf0afba299b127f6634fc5edc -size 55495 +oid sha256:8e348a27c5a931226dba531ec739fec1e28b9f912e91b46078ed811fe50f06bd +size 54956 diff --git a/Content/Levels/Top_layer_level.umap b/Content/Levels/Top_layer_level.umap index a836a5f..dbb4467 100644 --- a/Content/Levels/Top_layer_level.umap +++ b/Content/Levels/Top_layer_level.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:483069f41683db60a67e1b2417c5f3cd17005922d2a67500997ebbc20cb3cbba -size 247199 +oid sha256:3ddfcf9a4f7c3b3ab626893a0d6d13cac4483f9a471bbdba97d0d00efc563dd7 +size 248803 diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index dab88bc..94a308e 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -39,7 +39,14 @@ void UEatableItems::Use(ATempCharacter* Character) if (isAmmoItemType) { - UE_LOG(LogTemp, Display, TEXT("ADD AMMO FUNCTIONALITY HERE")); + if (TurnBaseCombat->IronResource > 10) + { + TurnBaseCombat->IronResource += 5; + } + if (TurnBaseCombat->SulfurResource > 10) + { + TurnBaseCombat->SulfurResource += 5; + } Character->Inventory->RemoveItem(this); } } diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h index d636bcd..dadfc27 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.h @@ -4,6 +4,7 @@ #include "CoreMinimal.h" #include "BaseItem.h" +#include "the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h" #include "EatableItems.generated.h" /** @@ -19,4 +20,9 @@ class THE_TWILIGHT_ABYSS_API UEatableItems : public UBaseItem protected: virtual void Use(class ATempCharacter* Character) override; + + +private: + + ATurnBaseCombatV2* TurnBaseCombat; }; From e9af8b713fa2964169d0e68835d273ca4d3411e0 Mon Sep 17 00:00:00 2001 From: MARCEL HARA Date: Mon, 20 Feb 2023 14:49:05 +0000 Subject: [PATCH 15/16] Updated EatableItems to fix Ammo Consuming Fixed ammo consuming crashing the client --- Source/the_twilight_abyss/BaseItems/Items/BaseItem.cpp | 1 + Source/the_twilight_abyss/BaseItems/Items/BaseItem.h | 1 + Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.cpp b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.cpp index 2fac2d1..40ea61b 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.cpp @@ -14,3 +14,4 @@ void UBaseItem::Use(ATempCharacter* Character) { } + diff --git a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h index 4ff62dd..613c763 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h +++ b/Source/the_twilight_abyss/BaseItems/Items/BaseItem.h @@ -72,4 +72,5 @@ public: //This is the same as the use item class but its in BP instead UFUNCTION(BlueprintImplementableEvent) void OnUse(class ATempCharacter* Character); + }; diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index 94a308e..c481d7b 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -39,6 +39,7 @@ void UEatableItems::Use(ATempCharacter* Character) if (isAmmoItemType) { + TurnBaseCombat = GetWorld()->GetGameState(); if (TurnBaseCombat->IronResource > 10) { TurnBaseCombat->IronResource += 5; From 5e448c897d20c5d8465d9d73c26a269fb7693aa6 Mon Sep 17 00:00:00 2001 From: MARCEL HARA Date: Mon, 20 Feb 2023 16:03:25 +0000 Subject: [PATCH 16/16] Updated Widgets to fix scaling issue Fixed scaling issue on all widgets to fit all monitor types --- Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset | 4 ++-- Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset | 4 ++-- Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset | 4 ++-- .../Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset | 4 ++-- Content/Blueprints/Merchant/Merchant_UI/WBP_BuyBuff.uasset | 4 ++-- Content/Blueprints/Merchant/Merchant_UI/WBP_BuyHealing.uasset | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset index 708a5d3..ccfcb16 100644 --- a/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset +++ b/Content/Blueprints/Inventory_UI/WBP_ItemDisplay.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d2dacba46200972bd3ed39b2e006c6f815eed957e4cb57009fd850d3565dd6f -size 99076 +oid sha256:3d9a901fca1810f64a4b9a9db9287ad7a5bc3f1567e7d778c72d94d0cf2e45ff +size 100059 diff --git a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset index 138ec00..984f8e0 100644 --- a/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset +++ b/Content/Blueprints/Inventory_UI/WBP_PlayerInventory.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6077e113d99db0e0e7e66e52dc856fe1cf0473f23377f7d00f4e9ca187069ee1 -size 111320 +oid sha256:3940f6af26ff8d95d3e97b80d27b253544786ead926e582015eb17fb8da42daf +size 111618 diff --git a/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset index 239df23..def3d97 100644 --- a/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset +++ b/Content/Blueprints/Merchant/Merchant_UI/BP_OPENDIAL.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd57bdf81793aa6f3b76784e3be306fef5ca81c5e2fa7065a29abadd420c4e0b -size 75420 +oid sha256:ea25a76832a591caa677a97dfac6c30e410974dd3c705d8923f3eea49dd79699 +size 74712 diff --git a/Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset b/Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset index 0c1f862..66e45ff 100644 --- a/Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset +++ b/Content/Blueprints/Merchant/Merchant_UI/BP_ShopSelector.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0fe126443f981aa1875e8efe299d76c4f0f570aff93f9313cc9503bb811365a5 -size 51324 +oid sha256:c2ca75bf7097c26b9d40760320303c440a1559518901fd42ca6f384fbff6ea2a +size 52542 diff --git a/Content/Blueprints/Merchant/Merchant_UI/WBP_BuyBuff.uasset b/Content/Blueprints/Merchant/Merchant_UI/WBP_BuyBuff.uasset index 7eecebb..a711020 100644 --- a/Content/Blueprints/Merchant/Merchant_UI/WBP_BuyBuff.uasset +++ b/Content/Blueprints/Merchant/Merchant_UI/WBP_BuyBuff.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abe53946825159c2220acd237c3cc7360478b63836d52e3cbe000876e43eb5d5 -size 63822 +oid sha256:f02d6f1b555bbb983a74a2a4534e22e262373f525b0f96234c48aa8a77c11f68 +size 64594 diff --git a/Content/Blueprints/Merchant/Merchant_UI/WBP_BuyHealing.uasset b/Content/Blueprints/Merchant/Merchant_UI/WBP_BuyHealing.uasset index 8e7650a..cb3480f 100644 --- a/Content/Blueprints/Merchant/Merchant_UI/WBP_BuyHealing.uasset +++ b/Content/Blueprints/Merchant/Merchant_UI/WBP_BuyHealing.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:936f77df55a4f4c1baca361f8ca9384f1af821ab6c0e8c9b016a3ede25c9f8d1 -size 63821 +oid sha256:d21c0fb7a79d5390327eb841a5f67304a2ee6b13b68f3faa0c75ed276b1bf2f5 +size 64844