// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Engine/DataAsset.h" #include "PaperSprite.h" #include "Engine/DataTable.h" #include "ItemContainer.generated.h" UENUM(BlueprintType) enum class Geography : uint8 { Central, South, East, North, West }; UENUM(BlueprintType) enum class Category : uint8 { Seed, Item, Potion, Tea, Plant, Key, Food, Decoration, Other, Special, MAX UMETA(Hidden) }; UENUM(BlueprintType) enum class ItemProperty : uint8 { Heal, Poison, Cleanse, Curse, Enhance }; UENUM(BlueprintType) enum class EChemicalAlignment : uint8 { None, }; UENUM(BlueprintType) enum class Element : uint8 { Light, Dark, Fire, Water, Air, Earth }; UENUM(BlueprintType) enum class BaseType : uint8 { Ground, Pot, Wine, Tree }; USTRUCT(BlueprintType) struct FItemDatabaseRow : public FTableRowBase { GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite) FString Name; UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 Heal; UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 Poison; UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 Cleanse; UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 Curse; UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 Enhance; UPROPERTY(EditAnywhere, BlueprintReadWrite) FString Element; UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 Cost; UPROPERTY(EditAnywhere, BlueprintReadWrite) float Effectiveness; }; USTRUCT(BlueprintType) struct FSeedStage { GENERATED_BODY() UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) TSoftObjectPtr Sprite; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) float SpriteScale = 1.f; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) FVector Offset = FVector::ZeroVector; /** In game days after planting at which this stage is shown, the seed bed ages its plants per hour and scales it */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) int32 ChangeOnDay = 0; }; USTRUCT(BlueprintType) struct FItemBase { GENERATED_USTRUCT_BODY() /** ID of the item, generated by hand, usually Name + number */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") FName ItemID; /** Default name of the item */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") FName ItemName; /** Profession level needed to harvest the plant in case of an ingredient and profession level needed to have a chance of HQ potion in the case of potions*/ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Ingredient") int32 ProfessionLevelNeeded; /** Description of the item that's in the inventory view nad quick overview */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info", meta = (MultiLine = true)) FName ItemDescription; /** Description levels unlocked by leveling the ingredient or potion level, since all of them have 2-3 levels there should only ever be that amount of items in the array*/ UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Ingredient", meta = (MultiLine = true)) TArray ItemDescriptionLevels; /** Category the item belongs to */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") Category ItemCategory; /** The item element describes what type of crystal goes into creating a potion of the same element type*/ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") Element ItemElement; /** The chemical alignment of item, coresponds to a clock */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") TArray ChemicalAlignments; /** What are the main properties of the ingredient/potion */ UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Ingredient") TArray Properties; /** What defects does a certain ingredient have */ UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Ingredient") TArray Defects; /** Icon of the item */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") UTexture2D* ItemImage; /** Sprite of the item */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") UPaperSprite* ItemSprite; /** Does the item stack or only one can be present at a time (all seeds should stack) */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") bool Stackable = true; /** Mesh that the item / potion have, ignored for seeds */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") UStaticMesh* ItemMesh; /** Base cost of the item that's used to form buying and selling prices */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Info") int32 BaseCost; /** Effectivness of the potion or ingredient that determines how strong the crafted potion is */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Ingredient") int32 Effectiveness; UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Ingredient") int32 DefectStrength; /** Does a potion have a fixed recipe? */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Potion") bool HasRecipe; /** Array of item ids that are required to craft the potion if it has a fixed recipe */ UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Potion") TArray RecipeItemsID; /** What part of the world grants faster growth and higher chance to harvest an HQ ingredient */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Seed") Geography ItemGeography; /** Does this ingredient have a seed? Ignored in potions */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Seed") bool IsSeed; /** What is the base cost of the seed for this ingredient, ignored in potions */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Seed") int32 SeedCost; /** Grow time for a seed, if the seed is a tree or wine this is the growth for them */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Seed") int32 GrowTime; /** Stages of a plant, set a mesh for certain days */ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Seed") TArray SeedStages; /** What is the prefered temperature in alchemy that the ingredient releases it's properties in the most effective way*/ UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Ingredient") int32 PreferedTemperature; }; /** * */ UCLASS() class PROJECTELERI_API UItemContainer : public UDataAsset { GENERATED_BODY() public: UPROPERTY(EditDefaultsOnly, BlueprintReadOnly) TArray AllItems; };