From bf2967312c725d62ca16550c1cb0f19f90c6ec88 Mon Sep 17 00:00:00 2001 From: Garb-in-PacK <46642663+Garb-in-PacK@users.noreply.github.com> Date: Sun, 15 Jun 2025 21:46:30 +0300 Subject: [PATCH 1/2] Update Crate.lua --- VoidWanderers.rte/Objects/Crate.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VoidWanderers.rte/Objects/Crate.lua b/VoidWanderers.rte/Objects/Crate.lua index 875da72..6093280 100644 --- a/VoidWanderers.rte/Objects/Crate.lua +++ b/VoidWanderers.rte/Objects/Crate.lua @@ -83,7 +83,7 @@ function Create(self) --print (cfg) - local acts = CF_Call(self, {"MakeListOfMostPowerfulActors"}, {cfg, 0, actorTypes[math.random(#actorTypes)], 100000})[1] + local acts = CF_Call(self, {"MakeListOfMostPowerfulActors"}, {cfg, 0, actorTypes.ANY, 100000})[1] if math.random() < artifactChance or acts == nil then local r = math.random(#artActPresets) From c274cb1dc4d167a8c0de6b79df32ef8818651649 Mon Sep 17 00:00:00 2001 From: Garb-in-PacK <46642663+Garb-in-PacK@users.noreply.github.com> Date: Sun, 15 Jun 2025 21:49:51 +0300 Subject: [PATCH 2/2] Update Case.lua artifact actor rate logic is strange --- VoidWanderers.rte/Objects/Case.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/VoidWanderers.rte/Objects/Case.lua b/VoidWanderers.rte/Objects/Case.lua index a6b5fc4..5e2ac80 100644 --- a/VoidWanderers.rte/Objects/Case.lua +++ b/VoidWanderers.rte/Objects/Case.lua @@ -52,7 +52,8 @@ function Create(self) CF_Write({"ArtifactItemRate"}, 0) end artifactActorRate = CF_Read(self, {"ArtifactItemRate"}) - local artifactChance =artifactActorRate - (artifactActorRate / (0.5 + math.sqrt(#artItmPresets))) + -- hmm.. + local artifactChance =artifactActorRate - (artifactActorRate / (0.5 + math.sqrt(#artItmPresets))) local f local ok = false @@ -69,7 +70,7 @@ function Create(self) cfg["Player0Faction"] = f --print (cfg) - local weaps = CF_Call(self, {"MakeListOfMostPowerfulWeapons"}, {cfg, 0, weaponTypes[math.random(#weaponTypes)], 100000})[1] + local weaps = CF_Call(self, {"MakeListOfMostPowerfulWeapons"}, {cfg, 0, weaponTypes.ANY, 100000})[1] if math.random() < artifactChance or weaps == nil then local r = math.random(#artItmPresets)