diff --git a/docs/_framework/OpenRpg.Cards.dll b/docs/_framework/OpenRpg.Cards.dll index 45ee7a3..1a64545 100644 Binary files a/docs/_framework/OpenRpg.Cards.dll and b/docs/_framework/OpenRpg.Cards.dll differ diff --git a/docs/_framework/OpenRpg.Cards.dll.br b/docs/_framework/OpenRpg.Cards.dll.br index ec92bdd..f7c76ea 100644 Binary files a/docs/_framework/OpenRpg.Cards.dll.br and b/docs/_framework/OpenRpg.Cards.dll.br differ diff --git a/docs/_framework/OpenRpg.Cards.dll.gz b/docs/_framework/OpenRpg.Cards.dll.gz index 878b35c..ca976fb 100644 Binary files a/docs/_framework/OpenRpg.Cards.dll.gz and b/docs/_framework/OpenRpg.Cards.dll.gz differ diff --git a/docs/_framework/OpenRpg.Combat.dll b/docs/_framework/OpenRpg.Combat.dll index 94f781a..da7e877 100644 Binary files a/docs/_framework/OpenRpg.Combat.dll and b/docs/_framework/OpenRpg.Combat.dll differ diff --git a/docs/_framework/OpenRpg.Combat.dll.br b/docs/_framework/OpenRpg.Combat.dll.br index 8453c3c..0a711b7 100644 Binary files a/docs/_framework/OpenRpg.Combat.dll.br and b/docs/_framework/OpenRpg.Combat.dll.br differ diff --git a/docs/_framework/OpenRpg.Combat.dll.gz b/docs/_framework/OpenRpg.Combat.dll.gz index ef4b44b..638ddf3 100644 Binary files a/docs/_framework/OpenRpg.Combat.dll.gz and b/docs/_framework/OpenRpg.Combat.dll.gz differ diff --git a/docs/_framework/OpenRpg.Core.dll b/docs/_framework/OpenRpg.Core.dll index a417832..2031b28 100644 Binary files a/docs/_framework/OpenRpg.Core.dll and b/docs/_framework/OpenRpg.Core.dll differ diff --git a/docs/_framework/OpenRpg.Core.dll.br b/docs/_framework/OpenRpg.Core.dll.br index 3852606..888e152 100644 Binary files a/docs/_framework/OpenRpg.Core.dll.br and b/docs/_framework/OpenRpg.Core.dll.br differ diff --git a/docs/_framework/OpenRpg.Core.dll.gz b/docs/_framework/OpenRpg.Core.dll.gz index f947bc2..537b8f3 100644 Binary files a/docs/_framework/OpenRpg.Core.dll.gz and b/docs/_framework/OpenRpg.Core.dll.gz differ diff --git a/docs/_framework/OpenRpg.CurveFunctions.dll b/docs/_framework/OpenRpg.CurveFunctions.dll index db1c2b1..4de2014 100644 Binary files a/docs/_framework/OpenRpg.CurveFunctions.dll and b/docs/_framework/OpenRpg.CurveFunctions.dll differ diff --git a/docs/_framework/OpenRpg.CurveFunctions.dll.br b/docs/_framework/OpenRpg.CurveFunctions.dll.br index 606febe..cff9ca8 100644 Binary files a/docs/_framework/OpenRpg.CurveFunctions.dll.br and b/docs/_framework/OpenRpg.CurveFunctions.dll.br differ diff --git a/docs/_framework/OpenRpg.CurveFunctions.dll.gz b/docs/_framework/OpenRpg.CurveFunctions.dll.gz index 25cb66d..daf8cd9 100644 Binary files a/docs/_framework/OpenRpg.CurveFunctions.dll.gz and b/docs/_framework/OpenRpg.CurveFunctions.dll.gz differ diff --git a/docs/_framework/OpenRpg.Data.dll b/docs/_framework/OpenRpg.Data.dll index e0e23e6..8b2172f 100644 Binary files a/docs/_framework/OpenRpg.Data.dll and b/docs/_framework/OpenRpg.Data.dll differ diff --git a/docs/_framework/OpenRpg.Data.dll.br b/docs/_framework/OpenRpg.Data.dll.br index 1fadec7..28a7178 100644 Binary files a/docs/_framework/OpenRpg.Data.dll.br and b/docs/_framework/OpenRpg.Data.dll.br differ diff --git a/docs/_framework/OpenRpg.Data.dll.gz b/docs/_framework/OpenRpg.Data.dll.gz index c45e06b..b9ac7cb 100644 Binary files a/docs/_framework/OpenRpg.Data.dll.gz and b/docs/_framework/OpenRpg.Data.dll.gz differ diff --git a/docs/_framework/OpenRpg.Demos.Web.dll b/docs/_framework/OpenRpg.Demos.Web.dll index e1102a4..5e496f0 100644 Binary files a/docs/_framework/OpenRpg.Demos.Web.dll and b/docs/_framework/OpenRpg.Demos.Web.dll differ diff --git a/docs/_framework/OpenRpg.Demos.Web.dll.br b/docs/_framework/OpenRpg.Demos.Web.dll.br index 67a8c60..af52295 100644 Binary files a/docs/_framework/OpenRpg.Demos.Web.dll.br and b/docs/_framework/OpenRpg.Demos.Web.dll.br differ diff --git a/docs/_framework/OpenRpg.Demos.Web.dll.gz b/docs/_framework/OpenRpg.Demos.Web.dll.gz index ba82dfc..a621437 100644 Binary files a/docs/_framework/OpenRpg.Demos.Web.dll.gz and b/docs/_framework/OpenRpg.Demos.Web.dll.gz differ diff --git a/docs/_framework/OpenRpg.Demos.Web.pdb.gz b/docs/_framework/OpenRpg.Demos.Web.pdb.gz index 060b1cb..e97e26b 100644 Binary files a/docs/_framework/OpenRpg.Demos.Web.pdb.gz and b/docs/_framework/OpenRpg.Demos.Web.pdb.gz differ diff --git a/docs/_framework/OpenRpg.Genres.Fantasy.dll b/docs/_framework/OpenRpg.Genres.Fantasy.dll index 8817664..9d832bf 100644 Binary files a/docs/_framework/OpenRpg.Genres.Fantasy.dll and b/docs/_framework/OpenRpg.Genres.Fantasy.dll differ diff --git a/docs/_framework/OpenRpg.Genres.dll b/docs/_framework/OpenRpg.Genres.dll index a44a423..708667a 100644 Binary files a/docs/_framework/OpenRpg.Genres.dll and b/docs/_framework/OpenRpg.Genres.dll differ diff --git a/docs/_framework/OpenRpg.Items.dll b/docs/_framework/OpenRpg.Items.dll index 84b886e..5c0919a 100644 Binary files a/docs/_framework/OpenRpg.Items.dll and b/docs/_framework/OpenRpg.Items.dll differ diff --git a/docs/_framework/OpenRpg.Items.dll.br b/docs/_framework/OpenRpg.Items.dll.br index 3700284..54277b5 100644 Binary files a/docs/_framework/OpenRpg.Items.dll.br and b/docs/_framework/OpenRpg.Items.dll.br differ diff --git a/docs/_framework/OpenRpg.Items.dll.gz b/docs/_framework/OpenRpg.Items.dll.gz index dde5eaa..de36168 100644 Binary files a/docs/_framework/OpenRpg.Items.dll.gz and b/docs/_framework/OpenRpg.Items.dll.gz differ diff --git a/docs/_framework/OpenRpg.Localization.dll b/docs/_framework/OpenRpg.Localization.dll index 1d27e9c..158a76d 100644 Binary files a/docs/_framework/OpenRpg.Localization.dll and b/docs/_framework/OpenRpg.Localization.dll differ diff --git a/docs/_framework/OpenRpg.Localization.dll.br b/docs/_framework/OpenRpg.Localization.dll.br index 9fb75f1..55b351b 100644 Binary files a/docs/_framework/OpenRpg.Localization.dll.br and b/docs/_framework/OpenRpg.Localization.dll.br differ diff --git a/docs/_framework/OpenRpg.Localization.dll.gz b/docs/_framework/OpenRpg.Localization.dll.gz index ac42627..d44791f 100644 Binary files a/docs/_framework/OpenRpg.Localization.dll.gz and b/docs/_framework/OpenRpg.Localization.dll.gz differ diff --git a/docs/_framework/OpenRpg.Quests.dll b/docs/_framework/OpenRpg.Quests.dll index af694df..72d3ece 100644 Binary files a/docs/_framework/OpenRpg.Quests.dll and b/docs/_framework/OpenRpg.Quests.dll differ diff --git a/docs/_framework/OpenRpg.Quests.dll.br b/docs/_framework/OpenRpg.Quests.dll.br index 792bb16..d7cf865 100644 Binary files a/docs/_framework/OpenRpg.Quests.dll.br and b/docs/_framework/OpenRpg.Quests.dll.br differ diff --git a/docs/_framework/OpenRpg.Quests.dll.gz b/docs/_framework/OpenRpg.Quests.dll.gz index 3acc03e..6d6ec08 100644 Binary files a/docs/_framework/OpenRpg.Quests.dll.gz and b/docs/_framework/OpenRpg.Quests.dll.gz differ diff --git a/docs/_framework/System.Linq.dll b/docs/_framework/System.Linq.dll index 98791c5..9c86756 100644 Binary files a/docs/_framework/System.Linq.dll and b/docs/_framework/System.Linq.dll differ diff --git a/docs/_framework/System.Linq.dll.br b/docs/_framework/System.Linq.dll.br index 212c0d2..ea474b3 100644 Binary files a/docs/_framework/System.Linq.dll.br and b/docs/_framework/System.Linq.dll.br differ diff --git a/docs/_framework/System.Linq.dll.gz b/docs/_framework/System.Linq.dll.gz index 4a97ce4..35a8759 100644 Binary files a/docs/_framework/System.Linq.dll.gz and b/docs/_framework/System.Linq.dll.gz differ diff --git a/docs/_framework/blazor.boot.json b/docs/_framework/blazor.boot.json index 5ecd836..efdab22 100644 --- a/docs/_framework/blazor.boot.json +++ b/docs/_framework/blazor.boot.json @@ -27,19 +27,19 @@ "netstandard.dll": "sha256-Njv4QtOTpwFKzkaMg8VFjyNAMWyB+YpphaAb1kcimkQ=", "Newtonsoft.Json.dll": "sha256-cs8pHUurDt0IqbB8YXPh560au3q3J\/1wRL9jBddRVmE=", "OpenRpg.AdviceEngine.dll": "sha256-mwHKE6uSy29tht26qwWS4oft9KR\/JY5+QOYRWQS\/CSQ=", - "OpenRpg.Cards.dll": "sha256-XBPL8J86PS9OjJ6s7tDvGRrkA0gDGywGCRbNuRXe8qM=", - "OpenRpg.Combat.dll": "sha256-QQdH\/hArhH76JN\/LqlHYCNG9KkOVEKeVZtYnt+IlWdo=", - "OpenRpg.Core.dll": "sha256-BFl15E03TeXI3ZQjFZDL4iMk1lmrvqQEQL93lHwdHsM=", - "OpenRpg.CurveFunctions.dll": "sha256-Yl5pHX6VgNwhBiSEppy9hQsQsHMnGrfpAD8\/YjYU0bY=", - "OpenRpg.Data.dll": "sha256-CJnTB4qe0YdxSXq28e14RoI\/dl0fZEWnEVMiA5lShcA=", + "OpenRpg.Cards.dll": "sha256-8i\/cBidBEdO25Mn6sL4qHbPufyXh3En10qTQ+DB6xyo=", + "OpenRpg.Combat.dll": "sha256-kdK24YJEB5gXcV4zdPhg\/dKGePYv92QGLbjTpohji0A=", + "OpenRpg.Core.dll": "sha256-O83KlxdSIynwzvU8SpG3qtuDjXwd7UD3wejv5b1Zz0M=", + "OpenRpg.CurveFunctions.dll": "sha256-MDxxg2Y390PQPW+dPk1YpRhoPrW+u7BIYz7qu4WMNU0=", + "OpenRpg.Data.dll": "sha256-vYNJeVnY+8tx22UFzoZfABIIvHaRZPwz4jjzDj8gn6U=", "OpenRpg.Data.InMemory.dll": "sha256-XdmAB1E8NOtcztOLzz2N9INYGnN4LtoAQA2zRVjqPu8=", "OpenRpg.Demos.Infrastructure.dll": "sha256-\/psbVqucp0c3YlvVZD2I6JM4WqkIt99wmMt\/b37fhEk=", - "OpenRpg.Demos.Web.dll": "sha256-zG\/pgICmvOOAicgz7EdzAjiPFa4Yn3ghr8K9cJroQrg=", - "OpenRpg.Genres.dll": "sha256-zaXcB\/qqbjaM8V7rRFlG1SKIiyRqczcTwXw1t8+vlKE=", - "OpenRpg.Genres.Fantasy.dll": "sha256-GV90VgAhABFCQzhrvOwp+8c6gSb21XhiscP9denJ9Go=", - "OpenRpg.Items.dll": "sha256-BQypYhjryAmciE1qToVJeVjaglCO2bFjo5ZmSfxnm2A=", - "OpenRpg.Localization.dll": "sha256-Za0M2MTUjIHeUbsqT2yv7kKHcPld53F6Fm4zplPzPpM=", - "OpenRpg.Quests.dll": "sha256-3CsgYo9GtDBs9bJIMzJ34qDATtgfI2PhgyjtvwNojOE=", + "OpenRpg.Demos.Web.dll": "sha256-fzIi2X4WyVFg9MyRnCUl7FDyfLP9IGVqXnOP7vYfPdE=", + "OpenRpg.Genres.dll": "sha256-1rUw49xhroiRrCC5SoLs8A0YZjCiK5KVicnvEIC0I2o=", + "OpenRpg.Genres.Fantasy.dll": "sha256-Pz1k3MUzsInOaySjOAo7rEXkDma8ZIYz\/YyNtLCDvjk=", + "OpenRpg.Items.dll": "sha256-wJzAiKNUebP6twoR\/gVNDV2e1foQKWRL5i2SzUcyqS8=", + "OpenRpg.Localization.dll": "sha256-yb0bP9FTvx\/d6qv1ygkGl5865FTrZ55ZlQvOiHKJUKc=", + "OpenRpg.Quests.dll": "sha256-KNsY1KnYsgVEkTn9c4evm9Foq\/kLnBSVnfhrEZCP\/2g=", "RandomNameGenerator.dll": "sha256-aZenSA\/tE3jilQD1YLI2e5+lV7sZbkqT8aj+SL93+AU=", "System.Collections.Concurrent.dll": "sha256-3U228gTvMf\/gO9hhTQZGzQ83G6FRxqNnsx\/TbQfbZUI=", "System.Collections.dll": "sha256-4OQzh8enJT1otPCDBr0DO073OkYRSgynTt1n\/BW46pk=", @@ -53,7 +53,7 @@ "System.dll": "sha256-BNWEPToYca0k2Y0PYNhWWJz+D2hRVoqA4pqCB6I0mxE=", "System.Drawing.dll": "sha256-BW9w083EkVEAm2xBAvSmRXUnpSd45a3GazhKcjthruU=", "System.Drawing.Primitives.dll": "sha256-2sqtdptuVCbKPTG50s4QWPCMZzz1r2d5gGy60ieYTmM=", - "System.Linq.dll": "sha256-gsNWPYsCOe8R0z0+VRTpiFDii\/KgdkS7tMbiLKINYYc=", + "System.Linq.dll": "sha256-WFZVIZf2K75dKhMdyi7V+onr8R1V4\/B4hMAkePb18kM=", "System.Linq.Expressions.dll": "sha256-2AWLyEEUmBcfDkWb0BKsmXjqBw5lPOhuAJlMZjMktwY=", "System.Linq.Queryable.dll": "sha256-cuW5HEWrexvKLiNa74LV1Y7Xb74tT2VEmxzkP9hg5BU=", "System.Memory.dll": "sha256-f2pwZs1veHufJYGAI2PAQcFZy0VK7DuAEWqkgn39res=", diff --git a/docs/_framework/blazor.boot.json.br b/docs/_framework/blazor.boot.json.br index 9cb5b83..fc0e53e 100644 Binary files a/docs/_framework/blazor.boot.json.br and b/docs/_framework/blazor.boot.json.br differ diff --git a/docs/_framework/blazor.boot.json.gz b/docs/_framework/blazor.boot.json.gz index e340f8c..a5a5108 100644 Binary files a/docs/_framework/blazor.boot.json.gz and b/docs/_framework/blazor.boot.json.gz differ diff --git a/src/OpenRpg.Demos.Web/Pages/Curves/ScalingFunctionComponents.razor b/src/OpenRpg.Demos.Web/Pages/Curves/ScalingFunctionComponents.razor index bc65a90..b46cd51 100644 --- a/src/OpenRpg.Demos.Web/Pages/Curves/ScalingFunctionComponents.razor +++ b/src/OpenRpg.Demos.Web/Pages/Curves/ScalingFunctionComponents.razor @@ -105,32 +105,75 @@
+ +
+
+ + ### Experience Required To Level Example + Given how easy this is to do now lets have another look at a useful example, experience required for each level. + + Lets not do anything fancy, just make it scale linearly with us having 20 levels with the maximum xp threshold + being 10000, that means its about 500 extra per level when done linearly. + +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ Plot Value + +
+
+
+
+
+ +
+
- ### Experience Required To Level Example - Given how easy this is to do now lets have another look at a useful example, experience required for each level. + ### Inverse Value Scaling + So lets look at something which you may need to do but dont know it yet, and this is a real world problem I faced + when doing some work in Unity. + + Say you have to have an `AttackSpeed` stat, and you want `Effects` to bump that value up so you can attack faster, + it sounds great until you come to implement it as to attack faster you want LESS of a cooldown between attacks. - Lets not do anything fancy, just make it scale linearly with us having 20 levels with the maximum xp threshold - being 10000, that means its about 500 extra per level when done linearly. + This is a scenario where you want to inversely scale the input value as they are both pulling in different directions, + so far both values have being going up together at their own rate of scale, but in this case we want to go the opposite + way, so lets use an `InverseLinear` preset and set input range as 0-100 as 100 seems pretty high for attack speed, then + set the output scaling as between 0.5 and 2. + + > As this is using an INVERSE curve the max and min are effectively flipped so the maximum input value would yield + > the minimum output value, give it a go.
- +
- +
- +
- +
- Plot Value - + Plot Value +
@@ -148,9 +191,13 @@ public float OutputValue2 { get; set; } public ScalingFunction XpToLevelScalingFunction = new ScalingFunction(PresetCurves.Linear, 0, 10000, 0, 20); - public float InputValue3 { get; set; } = 10; + public float InputValue3 { get; set; } = 1; public float OutputValue3 { get; set; } + public ScalingFunction AttackSpeedScalingFunction = new ScalingFunction(PresetCurves.InverseLinear, 0.5f, 2, 0, 100); + public float InputValue4 { get; set; } = 35; + public float OutputValue4 { get; set; } + public void RefreshOutputValue1() { OutputValue1 = ConstitutionToHealthScalingFunction1.Plot(InputValue1); @@ -165,4 +212,9 @@ { OutputValue3 = XpToLevelScalingFunction.Plot(InputValue3); } + + public void RefreshOutputValue4() + { + OutputValue4 = AttackSpeedScalingFunction.Plot(InputValue4); + } } \ No newline at end of file