From 05abbff3c11a14ec3a07294a8d11479edbd48cc9 Mon Sep 17 00:00:00 2001 From: OldBeardedCoder <73860715+OldBeardedCoder@users.noreply.github.com> Date: Fri, 29 Jan 2021 00:19:11 -0800 Subject: [PATCH 1/2] Fix for randomizer affecting quest items. --- README.md | 4 ++-- internal/d2mod/randomizer/randomizer.go | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4fcebc6..ed2583d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ This should be compatible with PlugY and other things such as: # ModConfig -The mod config is located in `cfg.json`. You can change this config to your liking to produce a new `data` folder. +The mod config is located in `cfg.json`. You can change this config to your liking and run to produce a new `data` folder. ## ModConfig Options #### SourceDir `string` @@ -45,8 +45,8 @@ The mod config is located in `cfg.json`. You can change this config to your lik * Increases key stack sizes to 100 #### IncreaseMonsterDensity `float` * Will increase the density of all areas by the given multiplier -* `MAX: 30.0` * `MIN: 0.0` +* `MAX: 30.0` * Set to `-1` to omit #### EnableTownSkills `bool` * Enables all skills in town diff --git a/internal/d2mod/randomizer/randomizer.go b/internal/d2mod/randomizer/randomizer.go index d4a37d0..e1d6451 100644 --- a/internal/d2mod/randomizer/randomizer.go +++ b/internal/d2mod/randomizer/randomizer.go @@ -370,6 +370,16 @@ func scramble(s scrambler) { } func scrambleRow(s scrambler, f *d2fs.File, idx int, level int) { + + if f.Rows[idx][1] == "" { + // Don't run scrambler on row dividers + return + } + if level == 0 { + // Don't run scrambler on Quest items. It may raise level requirements + return + } + //Choose a random number of props between min and max numProps := randInt(s.minMaxProps.minNumProps, s.minMaxProps.maxNumProps+1) From a324162db62b50f6cf477a86bc6033f756323037 Mon Sep 17 00:00:00 2001 From: OldBeardedCoder <73860715+OldBeardedCoder@users.noreply.github.com> Date: Fri, 29 Jan 2021 00:26:00 -0800 Subject: [PATCH 2/2] Default Randomizer to off, bumped version # --- README.md | 5 +++++ VERSION.txt | 2 +- cfg.json | 4 ++-- gui/react-ui/src/components/D2ModMaker/Main.js | 4 ++-- internal/d2mod/config/cfg.go | 4 ++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ed2583d..4ef5e3d 100644 --- a/README.md +++ b/README.md @@ -156,8 +156,13 @@ Thanks! ## Upcoming Release * Added ElementalSkills option (+Cold,Lightning,Magic,Poison Skills) + +## v0.5.4 +* [bugfix] Fix for the randomizer affecting quest items like Khalim's flail + ## v0.5.3 * Fixed version # + ## v0.5.2 * [bugfix] - fixed density overlap in old code, which was squaring density for nightmare, no increase for hell. * Upped density max to 45 and split between MonStats.txt & Levels.txt so that the density caps are not hit. diff --git a/VERSION.txt b/VERSION.txt index 4bc4a91..8ea9cc1 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -v0.5.3 +v0.5.4 diff --git a/cfg.json b/cfg.json index 9aaa189..acbe63d 100644 --- a/cfg.json +++ b/cfg.json @@ -1,5 +1,5 @@ { - "Version": "v0.5.3", + "Version": "v0.5.4", "SourceDir": "", "OutputDir": "", "MeleeSplash": true, @@ -17,7 +17,7 @@ "RemoveUniqCharmLimit": false, "EnterToExit": true, "RandomOptions": { - "Randomize": true, + "Randomize": false, "Seed": -1, "IsBalanced": true, "BalancedPropCount": true, diff --git a/gui/react-ui/src/components/D2ModMaker/Main.js b/gui/react-ui/src/components/D2ModMaker/Main.js index c36a458..94fcdb8 100644 --- a/gui/react-ui/src/components/D2ModMaker/Main.js +++ b/gui/react-ui/src/components/D2ModMaker/Main.js @@ -21,7 +21,7 @@ const _ = require('lodash'); const axios = require("axios"); const defaultCfg = { - Version: "v0.5.3", + Version: "v0.5.4", SourceDir: "", OutputDir: "", MeleeSplash: true, @@ -39,7 +39,7 @@ const defaultCfg = { RemoveUniqCharmLimit: false, EnterToExit: false, RandomOptions: { - Randomize: true, + Randomize: false, UseSeed: false, Seed: -1, IsBalanced: true, diff --git a/internal/d2mod/config/cfg.go b/internal/d2mod/config/cfg.go index dfe1183..404a04a 100644 --- a/internal/d2mod/config/cfg.go +++ b/internal/d2mod/config/cfg.go @@ -44,7 +44,7 @@ type Data struct { func DefaultData() Data { return Data{ - Version: "v0.5.3", + Version: "v0.5.4", SourceDir: "", OutputDir: "", MeleeSplash: true, @@ -62,7 +62,7 @@ func DefaultData() Data { RemoveUniqCharmLimit: false, EnterToExit: false, RandomOptions: RandomOptions{ - Randomize: true, + Randomize: false, UseSeed: false, Seed: -1, IsBalanced: true,