With an existing item system, how can I save and load data if it was modified? (2 Questions)

That wouldn’t happen. That’s the entire reason the Rarity Lerp exists and is saved in the first place.
The part below is responsible for deciding the random value, the part I’m assuming you’re talking about.


Notice that the purpose of the section is to fill out unfilled rarity lerps. Let’s take damage for example- say you have rarity 3 (which is 4 upgrades from base) with a rarity lerp arr of {0.5, 0, 1}. This part will see that you still need one more lerp, and will fix that- so {0.5, 0, 1, 0.7}.

It doesn’t run if you already have enough lerps- which are saved. Technically the upgrade points distributor runs every time you load the game, but it runs 0 times so long as you haven’t changed the rarity between the load call and this.


Distribute X can recreate that, but you may want to just create a different method that isn’t normalized.


I don’t think you would ever do this, though (Also the system as it is isn’t built for giving multiple points per stat, you’re just supposed to modify the arr containing min/max values).
The main reason you’d downgrade that from 10 → 7 would be due to some stats being overpowered- in which case you wouldn’t decrease the number of them, you would just decrease that stat in the max array for legendary.


I just really don’t like having backwards compatibility code. If this system really doesn’t work, I can whip up something.

1 Like