Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for randomizer affecting quest items. #97

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.5.3
v0.5.4
4 changes: 2 additions & 2 deletions cfg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Version": "v0.5.3",
"Version": "v0.5.4",
"SourceDir": "",
"OutputDir": "",
"MeleeSplash": true,
Expand All @@ -17,7 +17,7 @@
"RemoveUniqCharmLimit": false,
"EnterToExit": true,
"RandomOptions": {
"Randomize": true,
"Randomize": false,
"Seed": -1,
"IsBalanced": true,
"BalancedPropCount": true,
Expand Down
4 changes: 2 additions & 2 deletions gui/react-ui/src/components/D2ModMaker/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -39,7 +39,7 @@ const defaultCfg = {
RemoveUniqCharmLimit: false,
EnterToExit: false,
RandomOptions: {
Randomize: true,
Randomize: false,
UseSeed: false,
Seed: -1,
IsBalanced: true,
Expand Down
4 changes: 2 additions & 2 deletions internal/d2mod/config/cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type Data struct {

func DefaultData() Data {
return Data{
Version: "v0.5.3",
Version: "v0.5.4",
SourceDir: "",
OutputDir: "",
MeleeSplash: true,
Expand All @@ -62,7 +62,7 @@ func DefaultData() Data {
RemoveUniqCharmLimit: false,
EnterToExit: false,
RandomOptions: RandomOptions{
Randomize: true,
Randomize: false,
UseSeed: false,
Seed: -1,
IsBalanced: true,
Expand Down
10 changes: 10 additions & 0 deletions internal/d2mod/randomizer/randomizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down