Hi again @rokenrock Thanks a lot for the reply.
I think the most thing that I was looking for is the save and load method.
This one:
Now… either I’m missing something… or this does in fact have a flaw.
I’ll explain the main problem through a simple example:
Let’s say we are in V1 of the game.
Sniper stats is: 20/75/30/15 → Damage/HitChance/CritRate/Ammo
And let’s say that the legendary trait gives us 10 upgrade points which are distributed randomly onto these stats.
Essentially we could end up with +10 to damage
Or +5 to damage and hitchance
Or +3 to damage and hitchance and ammo and +1 to critrate.
So… purely random.
Now, if I use your method, that means every time I load up the weapon, I will need to fire upgrade points distributer, which could end up giving me a different set of upgrades every time I load the game.
And that of course doesn’t make sense… so this is one of the problems I have with the suggestion.
Another problem is what if I patch the game from V1 to V1.5
With this patch, I’ve changed the default damage of the sniper rifle only, from 20 → 15
Your second part of your suggestion regarding the DT helps with this, so all good on that front.
However, if I also said I want to change the number of points that a legendary rarity gives… from 10 → 7
Now we’ve got another problem.
This means I need to somehow save-up where did each point get assigned to, and then randomly remove 3 of them from each stat that was upgraded by the rarity.
(If instead I change it from 10 to 15, I’d need to add 5 more randomly to each stat)
Essentially I’m basically circling back to my main problem, where I’d need to create some sort of “Save Game Mender”, which first checks for any changes (Such as the game version), if it is different then it will run this “Mender”.
Though I don’t need to change the save-game file, but rather make sure that after the game is loaded, all weapons that each unit has in the whole game is checked. (Which would be done ONCE)
To put it in perspective, we may have around 100~200 or so units that can exist at a time.
the number may increase in the future, but right now we’re still building a test version of the game, so we don’t worry too much about that.
Each unit can have up to 10 weapons in its inventory, or only 1~3
But I’m not only trying to check for weapons, but also for Armor/Helmet/Accessories.
Anyhow, if I can figure out how to do it for one of those things, I can make it work with the others.
Edit: Oh and thanks again for your suggestion!