Advertisement
ALegendsTale

4.14.3 Conversion Structure

Feb 22nd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 6.02 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "UEnumLibrary.h"
  4. #include "UStructLibrary.generated.h"
  5.  
  6. USTRUCT(BlueprintType)
  7. struct FAchievementStruct
  8. {
  9.     GENERATED_BODY()
  10.  
  11.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Achievement Structure")
  12.         float Percentage;
  13.  
  14.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Achievement Structure")
  15.         bool Completed;
  16.  
  17.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Achievement Structure")
  18.         TArray<bool> AchievementList;
  19.  
  20.     FAchievementStruct()
  21.     {
  22.         Percentage = 0;
  23.         Completed = false;
  24.     }
  25. };
  26.  
  27. USTRUCT(BlueprintType)
  28. struct FLevelStruct
  29. {
  30.     GENERATED_BODY()
  31.  
  32.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level Structure")
  33.         int32 Difficulty;
  34.  
  35.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level Structure")
  36.         FName Level;
  37.  
  38.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level Structure")
  39.         TArray<int32> PassedCheckpoints;
  40.  
  41.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Level Structure")
  42.         TArray<FAchievementStruct> AchievementStruct;
  43.  
  44.     FLevelStruct()
  45.     {
  46.         Difficulty = 1;
  47.         Level = "Level1";
  48.     }
  49. };
  50.  
  51. USTRUCT(BlueprintType)
  52. struct FSoundStruct
  53. {
  54.     GENERATED_BODY()
  55.  
  56.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Sound Structure")
  57.         TArray<FString> SoundType;
  58.  
  59.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Sound Structure")
  60.         TArray<float> Volume;
  61.  
  62.     FSoundStruct()
  63.     {
  64.         FString SoundTypeInit[] = {"Master", "Music", "Ambient", "UI", "Dialog"};
  65.         SoundType.Append(SoundTypeInit, ARRAY_COUNT(SoundTypeInit));
  66.         float VolumeInit[] = {1, .5 ,.5 ,.5 ,.5};
  67.         Volume.Append(VolumeInit, ARRAY_COUNT(VolumeInit));
  68.     }
  69. };
  70.  
  71. USTRUCT(BlueprintType)
  72. struct FAchieveableStruct : public FTableRowBase
  73. {
  74.     GENERATED_BODY()
  75.  
  76. public:
  77.  
  78.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Achieveable Structure")
  79.         int32 AchieveableList;
  80.  
  81.     FAchieveableStruct()
  82.     {
  83.         AchieveableList = 0;
  84.     }
  85. };
  86.  
  87. USTRUCT(BlueprintType)
  88. struct FSavedItem
  89. {
  90.     GENERATED_BODY()
  91.  
  92.     /*The ID of this item to set apart from others of the same class when saving*/
  93.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  94.         int32 ID;
  95.  
  96.     /*The leftover stack amount for this item after some has been added to the inventory*/
  97.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  98.         int32 Rest;
  99.  
  100.     FSavedItem()
  101.     {
  102.         ID = 0;
  103.         Rest = 0;
  104.     }
  105. };
  106.  
  107. USTRUCT(BlueprintType)
  108. struct FItemInformation
  109. {
  110.     GENERATED_BODY()
  111.  
  112.         /*The name of this item*/
  113.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  114.         FText ItemName;
  115.  
  116.     /*The description of this item*/
  117.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  118.         FText ItemDescription;
  119.  
  120.     /*The value of this item*/
  121.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  122.         int32 Value;
  123.  
  124.     /*The image shown in the inventory*/
  125.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  126.         UTexture2D* Thumbnail;
  127.  
  128.     /*The category that this item is in*/
  129.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  130.         EItemCategories Category;
  131.  
  132.     /*Can this item be used*/
  133.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  134.         bool CanBeUsed;
  135.  
  136.     /*Can this item be stacked*/
  137.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  138.         bool CanBeStacked;
  139.  
  140.     FItemInformation()
  141.     {
  142.         ItemName = NSLOCTEXT("Evolution", "Evoltion", "Item Name");
  143.         ItemDescription = NSLOCTEXT("Evolution", "Evoltion", "Item Description");
  144.         Value = 0;
  145.         Thumbnail = NULL;
  146.         Category = EItemCategories::IC_Consumable;
  147.         CanBeUsed = true;
  148.         CanBeStacked = false;
  149.     }
  150. };
  151.  
  152. USTRUCT(BlueprintType)
  153. struct FInventorySlot
  154. {
  155.     GENERATED_BODY()
  156.  
  157.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  158.         TSubclassOf<AActor> ItemClass;
  159.  
  160.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Inventory")
  161.         int32 StackAmount;
  162.  
  163.     FInventorySlot()
  164.     {
  165.         ItemClass = AActor::StaticClass();
  166.         StackAmount = 1;
  167.     }
  168. };
  169.  
  170. USTRUCT(BlueprintType)
  171. struct FStatusEffect
  172. {
  173.     GENERATED_BODY()
  174.  
  175.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DamageType")
  176.         EStatusEffect StatusEffect;
  177.  
  178.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "DamageType")
  179.         int32 Strength;
  180.  
  181.     FStatusEffect()
  182.     {
  183.         StatusEffect = EStatusEffect::SE_Poison;
  184.         Strength = 1;
  185.     }
  186. };
  187.  
  188. USTRUCT(BlueprintType)
  189. struct FDialog
  190. {
  191.     GENERATED_BODY()
  192.  
  193.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dialog")
  194.         FString Dialog;
  195.  
  196.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dialog")
  197.         TArray<FString> Answers;
  198.  
  199.     FDialog()
  200.     {
  201.         Dialog = "";
  202.     }
  203. };
  204.  
  205. USTRUCT(BlueprintType)
  206. struct FNPCActor
  207. {
  208.     GENERATED_BODY()
  209.  
  210.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  211.         FString Level;
  212.  
  213.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  214.         FTransform Transform;
  215.  
  216.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  217.         float Health;
  218.  
  219.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  220.         FText DefaultHelpText;
  221.  
  222.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  223.         TArray<FDialog> DialogAndAnswers;
  224.  
  225.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  226.         TArray<FInventorySlot> Offer;
  227.  
  228.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  229.         float InteractRange;
  230.  
  231.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  232.         bool ShowHelpText;
  233.  
  234.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  235.         FVector HelpTextLocation;
  236.  
  237.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  238.         float HelpTextFontSize;
  239.  
  240.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Checkpoint")
  241.         USoundBase* ShopOpeningSound;
  242.  
  243.     FNPCActor()
  244.     {
  245.         Level = "";
  246.         Transform = FTransform::Identity;
  247.         Health = 0;
  248.         DefaultHelpText = NSLOCTEXT("Evolution", "Evoltion", "");
  249.         InteractRange = 0;
  250.         ShowHelpText = false;
  251.         HelpTextLocation = FVector::ZeroVector;
  252.         HelpTextFontSize = 0;
  253.         ShopOpeningSound = NULL;
  254.     }
  255. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement