d2modmaker icon indicating copy to clipboard operation
d2modmaker copied to clipboard

Modding system tweak - Remove lines

Open OldBeardedCoder opened this issue 4 years ago • 2 comments

In 0.6.0 The modding system does not allow the modder to remove specific rows in a file if there are multiple rows where column 0 matches. This means that you cannot alter any except the first Rainbow Facet for example. It also doesn't allow the modder to just remove a line. I propose changing the format of the modding files to handle a [-] special prefix to the first column in any file to indicate that this exact row must be removed, and if the row doesn't have [-] then that row is to be added. This should solve both issues nicely.

OldBeardedCoder avatar Mar 13 '21 17:03 OldBeardedCoder

Per discussions in Discord, we when using the [-] the next line is always the replacement. This means you can never remove a line, however don't forget you can replace it with a line that comments it out with *.

OldBeardedCoder avatar Mar 13 '21 20:03 OldBeardedCoder

Also would be nice to have a [P] for Preserve, i.e. the item isn't affected by Generator/Randomizer. Generator will read the item to add to its pool of props, but will not alter its properties. If NumClones is on then it will create # NumClones copies of the item w/o gen or randing them: This is to preserve the probability of rolling the item (otherwise the probability goes down).

OldBeardedCoder avatar Mar 13 '21 21:03 OldBeardedCoder