Update default RandomizerConfiguration to use vanilla values and build Presets off "changed from vanilla" - #425
Conversation
|
The reason the presets are the way they are is how I've been creating/modifying them. I don't really treat them as code so much (even tho, yes, they are C# code). I often diff two presets as text files to see their differences. Also when creating a new preset from another, it can be nice if all the "normal" properties are there so you don't have to think if you're missing something (or figure out what it's called) that is generally a part of a preset. However, I do agree that having all the fields for all the presets is overkill. For some presets it's much more reasonable to do things like (pseudo code): StandardBrackets = StandardSwiss.With(StartWithCandle=False). I'll see if I can create an analyzer that forces the order of the fields so diffing will always be possible. (To prevent branching presets adding fields in different orders.) Of course, being able to diff two presets in the Z2R UI would be much better for everyone (but a lot of work lol). I don't know if you're planning on updating this more. Otherwise, I might continue and tweak the branch a little bit myself. |
Presets are reworked to only include values that are different from vanilla behavior, and the default values are set to explicitly match defaults. This should help when adding new flags, so you don't need to update all the presets for your flag (if your flag's default value is to match vanilla that is!)
I removed the values that matched vanilla from the presets using a quick script, so there's always a chance that something went wrong. I did some spot checking and didn't notice any issues in the different presets, but anything can happen lol
I also added a
.Withmethod that I'm not using. I thought it might be handy to allow "overriding" a config with a second config, but not too sure. Its there if we need it I guess? Not hurting anyone to leave it in ...