item tier in tooltip + two new item definitions
This commit is contained in:
parent
e9e1a188a5
commit
4c85272900
@ -3,6 +3,7 @@ using Kryz.CharacterStats.Examples;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using static EquippableItemGenerator;
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public class ItemStatBonus
|
public class ItemStatBonus
|
||||||
@ -33,6 +34,7 @@ public class EquippableItemInstance : ItemInstance
|
|||||||
[Header("Equipment Identity")]
|
[Header("Equipment Identity")]
|
||||||
public EquipmentType EquipmentType;
|
public EquipmentType EquipmentType;
|
||||||
public WeaponType WeaponType;
|
public WeaponType WeaponType;
|
||||||
|
public ItemTier ItemTier;
|
||||||
|
|
||||||
[Header("Dynamic Stat System")]
|
[Header("Dynamic Stat System")]
|
||||||
public List<ItemStatBonus> statBonuses = new List<ItemStatBonus>();
|
public List<ItemStatBonus> statBonuses = new List<ItemStatBonus>();
|
||||||
@ -216,7 +218,7 @@ public class EquippableItemInstance : ItemInstance
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Constructor for generating from EquipmentTypeDefinition (recommended approach)
|
// Constructor for generating from EquipmentTypeDefinition (recommended approach)
|
||||||
public EquippableItemInstance(EquippableItemTypeDefinition equipmentTypeDef, string itemName, Sprite icon, string iconPath = null)
|
public EquippableItemInstance(EquippableItemTypeDefinition equipmentTypeDef, string itemName, Sprite icon, ItemTier tier, string iconPath = null)
|
||||||
{
|
{
|
||||||
ItemName = itemName;
|
ItemName = itemName;
|
||||||
Icon = icon;
|
Icon = icon;
|
||||||
@ -233,6 +235,7 @@ public class EquippableItemInstance : ItemInstance
|
|||||||
sellPricePlayer = 100;
|
sellPricePlayer = 100;
|
||||||
sellPriceVendor = 50;
|
sellPriceVendor = 50;
|
||||||
description = $"A {equipmentTypeDef.GetDisplayName()}";
|
description = $"A {equipmentTypeDef.GetDisplayName()}";
|
||||||
|
ItemTier = tier;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper method to set icon with path
|
// Helper method to set icon with path
|
||||||
|
|||||||
@ -85,6 +85,9 @@ public class EquippedItemTooltip : MonoBehaviour
|
|||||||
|
|
||||||
sb.Length = 0;
|
sb.Length = 0;
|
||||||
|
|
||||||
|
sb.Append(item.ItemTier);
|
||||||
|
sb.AppendLine();
|
||||||
|
|
||||||
// Get all non-zero bonuses and group them by flat vs percent
|
// Get all non-zero bonuses and group them by flat vs percent
|
||||||
var allBonuses = item.GetAllNonZeroBonuses();
|
var allBonuses = item.GetAllNonZeroBonuses();
|
||||||
var flatBonuses = allBonuses.Where(b => b.HasFlatBonus).ToList();
|
var flatBonuses = allBonuses.Where(b => b.HasFlatBonus).ToList();
|
||||||
@ -172,7 +175,7 @@ public class EquippedItemTooltip : MonoBehaviour
|
|||||||
|
|
||||||
private string GetFlatStatDisplayName(StatDefinition statDef)
|
private string GetFlatStatDisplayName(StatDefinition statDef)
|
||||||
{
|
{
|
||||||
return statDef.DisplayName;
|
return " " + statDef.DisplayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetPercentStatDisplayName(StatDefinition statDef)
|
private string GetPercentStatDisplayName(StatDefinition statDef)
|
||||||
|
|||||||
@ -95,6 +95,9 @@ namespace Kryz.CharacterStats.Examples
|
|||||||
|
|
||||||
sb.Length = 0;
|
sb.Length = 0;
|
||||||
|
|
||||||
|
sb.Append(item.ItemTier);
|
||||||
|
sb.AppendLine();
|
||||||
|
|
||||||
// Get all non-zero bonuses and group them by flat vs percent
|
// Get all non-zero bonuses and group them by flat vs percent
|
||||||
var allBonuses = item.GetAllNonZeroBonuses();
|
var allBonuses = item.GetAllNonZeroBonuses();
|
||||||
var flatBonuses = allBonuses.Where(b => b.HasFlatBonus).ToList();
|
var flatBonuses = allBonuses.Where(b => b.HasFlatBonus).ToList();
|
||||||
|
|||||||
@ -7502,8 +7502,10 @@ MonoBehaviour:
|
|||||||
equipmentDefinitionsResourcesPath: EquipmentDefinitions
|
equipmentDefinitionsResourcesPath: EquipmentDefinitions
|
||||||
autoRefreshInEditor: 0
|
autoRefreshInEditor: 0
|
||||||
allEquipment:
|
allEquipment:
|
||||||
|
- {fileID: 11400000, guid: 89b1ffa5ee84c4c40b8179ed5444ad09, type: 2}
|
||||||
- {fileID: 11400000, guid: a8b9c44760450794299fcb8e3cd443b3, type: 2}
|
- {fileID: 11400000, guid: a8b9c44760450794299fcb8e3cd443b3, type: 2}
|
||||||
- {fileID: 11400000, guid: 9044a1de874c1294bbd261141af44093, type: 2}
|
- {fileID: 11400000, guid: 9044a1de874c1294bbd261141af44093, type: 2}
|
||||||
|
- {fileID: 11400000, guid: 69cb8404e295ee84abe01f0a7e60e857, type: 2}
|
||||||
--- !u!1 &4646726119636579143
|
--- !u!1 &4646726119636579143
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -7872,6 +7874,7 @@ MonoBehaviour:
|
|||||||
templateIndex: 0
|
templateIndex: 0
|
||||||
EquipmentType: 0
|
EquipmentType: 0
|
||||||
WeaponType: 7
|
WeaponType: 7
|
||||||
|
ItemTier: 0
|
||||||
statBonuses: []
|
statBonuses: []
|
||||||
CraftableBase: 0
|
CraftableBase: 0
|
||||||
MaxTotalUniqueStatsIncreasedByStones: 0
|
MaxTotalUniqueStatsIncreasedByStones: 0
|
||||||
|
|||||||
@ -78,7 +78,7 @@ Material:
|
|||||||
- _Mode: 0
|
- _Mode: 0
|
||||||
- _OcclusionStrength: 1
|
- _OcclusionStrength: 1
|
||||||
- _Parallax: 0.02
|
- _Parallax: 0.02
|
||||||
- _Rotation: 6.430226
|
- _Rotation: 5.7977843
|
||||||
- _SmoothnessTextureChannel: 0
|
- _SmoothnessTextureChannel: 0
|
||||||
- _SpecularHighlights: 1
|
- _SpecularHighlights: 1
|
||||||
- _SrcBlend: 1
|
- _SrcBlend: 1
|
||||||
|
|||||||
@ -760,68 +760,6 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
startingOutputModifierPercent: 0
|
startingOutputModifierPercent: 0
|
||||||
currentOutputModifierPercent: 0
|
currentOutputModifierPercent: 0
|
||||||
--- !u!1 &2437200879231412815
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 9002944841475030830}
|
|
||||||
- component: {fileID: 6724482519051982687}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: EquipmentDropTable
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &9002944841475030830
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2437200879231412815}
|
|
||||||
serializedVersion: 2
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 1040714684719195969}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!114 &6724482519051982687
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2437200879231412815}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: adb6baec1716da0409c4a040454a1a4a, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::EquipmentDropTable
|
|
||||||
dropChance: 15
|
|
||||||
minTier: 0
|
|
||||||
maxTier: 2
|
|
||||||
possibleEquipment:
|
|
||||||
- equipmentType: {fileID: 11400000, guid: a8b9c44760450794299fcb8e3cd443b3, type: 2}
|
|
||||||
weight: 1
|
|
||||||
lowestPossibleDifficulty: 0
|
|
||||||
highestPossibleDifficulty: 6
|
|
||||||
- equipmentType: {fileID: 11400000, guid: 9044a1de874c1294bbd261141af44093, type: 2}
|
|
||||||
weight: 1
|
|
||||||
lowestPossibleDifficulty: 0
|
|
||||||
highestPossibleDifficulty: 6
|
|
||||||
coinPrefab: {fileID: 7706952695029526538, guid: b0bce3e9bc0755445abb649e0c306c79, type: 3}
|
|
||||||
coinAmount: 12
|
|
||||||
onCoinDrop: {fileID: 11400000, guid: 48da3b1185c086c4c81a2b97ab7685fc, type: 2}
|
|
||||||
equipmentDropPrefab: {fileID: 7187375229850072788, guid: 6067f5d34154eb3498e9a5fdfcee4b00, type: 3}
|
|
||||||
usePlayerLevel: 1
|
|
||||||
fixedLevel: 1
|
|
||||||
--- !u!1 &2748734579092027444
|
--- !u!1 &2748734579092027444
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -12289,6 +12227,68 @@ GameObject:
|
|||||||
m_CorrespondingSourceObject: {fileID: 4961915953510107608, guid: 23e24e9936f1c6f4baaaef83461437db, type: 3}
|
m_CorrespondingSourceObject: {fileID: 4961915953510107608, guid: 23e24e9936f1c6f4baaaef83461437db, type: 3}
|
||||||
m_PrefabInstance: {fileID: 2293538936043110133}
|
m_PrefabInstance: {fileID: 2293538936043110133}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1001 &2783570444388332780
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 1040714684719195969}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 536939748880637603, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: EquipmentDropTable
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
--- !u!4 &9002944841475030830 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 6508220637222734786, guid: e7d2be798bec4c54784ecbc14ef1da45, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2783570444388332780}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &3053320187706664817
|
--- !u!1001 &3053320187706664817
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
72
Assets/Resources/EquipmentDropTable.prefab
Normal file
72
Assets/Resources/EquipmentDropTable.prefab
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &536939748880637603
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6508220637222734786}
|
||||||
|
- component: {fileID: 8931504111692555187}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: EquipmentDropTable
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &6508220637222734786
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 536939748880637603}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &8931504111692555187
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 536939748880637603}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: adb6baec1716da0409c4a040454a1a4a, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::EquipmentDropTable
|
||||||
|
dropChance: 15
|
||||||
|
minTier: 0
|
||||||
|
maxTier: 2
|
||||||
|
possibleEquipment:
|
||||||
|
- equipmentType: {fileID: 11400000, guid: a8b9c44760450794299fcb8e3cd443b3, type: 2}
|
||||||
|
weight: 1
|
||||||
|
lowestPossibleDifficulty: 0
|
||||||
|
highestPossibleDifficulty: 6
|
||||||
|
- equipmentType: {fileID: 11400000, guid: 9044a1de874c1294bbd261141af44093, type: 2}
|
||||||
|
weight: 1
|
||||||
|
lowestPossibleDifficulty: 0
|
||||||
|
highestPossibleDifficulty: 6
|
||||||
|
- equipmentType: {fileID: 11400000, guid: 89b1ffa5ee84c4c40b8179ed5444ad09, type: 2}
|
||||||
|
weight: 1
|
||||||
|
lowestPossibleDifficulty: 0
|
||||||
|
highestPossibleDifficulty: 6
|
||||||
|
- equipmentType: {fileID: 11400000, guid: 69cb8404e295ee84abe01f0a7e60e857, type: 2}
|
||||||
|
weight: 1
|
||||||
|
lowestPossibleDifficulty: 0
|
||||||
|
highestPossibleDifficulty: 6
|
||||||
|
coinPrefab: {fileID: 7706952695029526538, guid: b0bce3e9bc0755445abb649e0c306c79, type: 3}
|
||||||
|
coinAmount: 12
|
||||||
|
onCoinDrop: {fileID: 11400000, guid: 48da3b1185c086c4c81a2b97ab7685fc, type: 2}
|
||||||
|
equipmentDropPrefab: {fileID: 7187375229850072788, guid: 6067f5d34154eb3498e9a5fdfcee4b00, type: 3}
|
||||||
|
usePlayerLevel: 1
|
||||||
|
fixedLevel: 1
|
||||||
7
Assets/Resources/EquipmentDropTable.prefab.meta
Normal file
7
Assets/Resources/EquipmentDropTable.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e7d2be798bec4c54784ecbc14ef1da45
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,166 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 97c2864d727cc3f4485dcd520d9b2793, type: 3}
|
||||||
|
m_Name: Chest
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::EquippableItemTypeDefinition
|
||||||
|
equipmentKey: chest
|
||||||
|
displayName: Chest
|
||||||
|
shortName: Chest
|
||||||
|
description:
|
||||||
|
uiIcon: {fileID: 0}
|
||||||
|
equipmentType: 2
|
||||||
|
weaponType: 7
|
||||||
|
showInUI: 1
|
||||||
|
availableIcons: []
|
||||||
|
useResourcesFolder: 1
|
||||||
|
resourcesPath: Armor/Chests
|
||||||
|
statRules:
|
||||||
|
- stat: {fileID: 11400000, guid: d9561a8f85fc81f43961fa58de0cd088, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 8a59fbc0a19857b48a0789d4b4115ea4, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 1
|
||||||
|
weightMultiplier: 2
|
||||||
|
minStatRoll: 2
|
||||||
|
maxStatRoll: 4
|
||||||
|
- stat: {fileID: 11400000, guid: de18f1cd5c7345243a127dbf50a1c714, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 0886a83f3dd15114487850e54518829d, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 332d0dbee9590e24e9ad5166dd75ef69, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 8dcb92f2ee1026241a3bc051a42f91f5, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 4e90e0c058763a143b3ec657351fcace, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: ec3548202e941294da429cd3083937c0, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0.01
|
||||||
|
maxStatRoll: 0.05
|
||||||
|
- stat: {fileID: 11400000, guid: d318a3662a3ccf04f9f193a818cc3361, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: a19f2ac40579e5d4aa0713f43fcfa276, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: d52b20e3f02ba8946bf37a7470beafd0, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: aa214c2ad3c962447b486ecf16c9c950, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 63eee8f1286035f4a80356bcfad289b6, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 1e63fcf4ac1c02c4e9b9bd62f0243f05, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 79006f60ae538ad4ca179ee739f39232, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 1
|
||||||
|
maxStatRoll: 2
|
||||||
|
- stat: {fileID: 11400000, guid: 6093187f425cccc43b5fa829db293893, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1.5
|
||||||
|
minStatRoll: 1
|
||||||
|
maxStatRoll: 3
|
||||||
|
- stat: {fileID: 11400000, guid: a50126674c634ef49b4986605ee42baa, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 1
|
||||||
|
maxStatRoll: 2
|
||||||
|
- stat: {fileID: 11400000, guid: e6da017ba613adf4d82d9b6a214c6c7c, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 2
|
||||||
|
maxStatRoll: 3
|
||||||
|
- stat: {fileID: 11400000, guid: f1c964d3ea9c1d349bb5111b11accade, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 1
|
||||||
|
maxStatRoll: 3
|
||||||
|
- stat: {fileID: 11400000, guid: 1407df369cf076445a1619597e085e1c, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 599541ff1aaa6c848a732f9a97e5f1c4, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 7895ba1f0b9a732488642046ee62c8a6, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 88595dcd80f9c614b8bd7d8218fb5951, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
canBeGenerated: 1
|
||||||
|
baseGenerationWeight: 1
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 89b1ffa5ee84c4c40b8179ed5444ad09
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -0,0 +1,166 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 97c2864d727cc3f4485dcd520d9b2793, type: 3}
|
||||||
|
m_Name: Sword
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::EquippableItemTypeDefinition
|
||||||
|
equipmentKey: sword
|
||||||
|
displayName: Sword
|
||||||
|
shortName: Sword
|
||||||
|
description:
|
||||||
|
uiIcon: {fileID: 0}
|
||||||
|
equipmentType: 8
|
||||||
|
weaponType: 7
|
||||||
|
showInUI: 1
|
||||||
|
availableIcons: []
|
||||||
|
useResourcesFolder: 1
|
||||||
|
resourcesPath: Weapons/Swords
|
||||||
|
statRules:
|
||||||
|
- stat: {fileID: 11400000, guid: d9561a8f85fc81f43961fa58de0cd088, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 8a59fbc0a19857b48a0789d4b4115ea4, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: de18f1cd5c7345243a127dbf50a1c714, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 1
|
||||||
|
weightMultiplier: 2
|
||||||
|
minStatRoll: 1
|
||||||
|
maxStatRoll: 3
|
||||||
|
- stat: {fileID: 11400000, guid: 0886a83f3dd15114487850e54518829d, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 332d0dbee9590e24e9ad5166dd75ef69, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 8dcb92f2ee1026241a3bc051a42f91f5, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 4e90e0c058763a143b3ec657351fcace, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: ec3548202e941294da429cd3083937c0, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: d318a3662a3ccf04f9f193a818cc3361, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 1
|
||||||
|
maxStatRoll: 2
|
||||||
|
- stat: {fileID: 11400000, guid: a19f2ac40579e5d4aa0713f43fcfa276, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 1
|
||||||
|
maxStatRoll: 3
|
||||||
|
- stat: {fileID: 11400000, guid: d52b20e3f02ba8946bf37a7470beafd0, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: aa214c2ad3c962447b486ecf16c9c950, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 63eee8f1286035f4a80356bcfad289b6, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 1e63fcf4ac1c02c4e9b9bd62f0243f05, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 79006f60ae538ad4ca179ee739f39232, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 6093187f425cccc43b5fa829db293893, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: a50126674c634ef49b4986605ee42baa, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: e6da017ba613adf4d82d9b6a214c6c7c, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: f1c964d3ea9c1d349bb5111b11accade, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 1407df369cf076445a1619597e085e1c, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 599541ff1aaa6c848a732f9a97e5f1c4, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 7895ba1f0b9a732488642046ee62c8a6, type: 2}
|
||||||
|
isAllowed: 0
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 1
|
||||||
|
minStatRoll: 0
|
||||||
|
maxStatRoll: 100
|
||||||
|
- stat: {fileID: 11400000, guid: 88595dcd80f9c614b8bd7d8218fb5951, type: 2}
|
||||||
|
isAllowed: 1
|
||||||
|
isMandatory: 0
|
||||||
|
weightMultiplier: 0.2
|
||||||
|
minStatRoll: 1
|
||||||
|
maxStatRoll: 2
|
||||||
|
canBeGenerated: 1
|
||||||
|
baseGenerationWeight: 1
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 69cb8404e295ee84abe01f0a7e60e857
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -77,7 +77,7 @@ public class EquippableItemGenerator : MonoBehaviour
|
|||||||
string itemName = GenerateItemName(equipmentTypeDef, tier);
|
string itemName = GenerateItemName(equipmentTypeDef, tier);
|
||||||
|
|
||||||
// Create the item instance
|
// Create the item instance
|
||||||
var item = new EquippableItemInstance(equipmentTypeDef, itemName, randomIcon, iconPath);
|
var item = new EquippableItemInstance(equipmentTypeDef, itemName, randomIcon, tier, iconPath);
|
||||||
|
|
||||||
// Generate stats based on equipment rules
|
// Generate stats based on equipment rules
|
||||||
GenerateStatsForItem(item, equipmentTypeDef, tier, playerLevel);
|
GenerateStatsForItem(item, equipmentTypeDef, tier, playerLevel);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user