Jump to content
Sign in to follow this  
Carnage-

Item upgrade levels rollover problem

Recommended Posts

I happened to notice a huge update to DD1 yesterday and was happy to find that the game has started to receive more updates, I've read through all the patch notes; changes look good however I didn't see mention of the one issue that bothered me during my time playing: stat rollovers in item generation and was wondering if it had been fixed/changed.


The issue for those unaware is that the generation code for items (at least used to) worked something like this: generate a random number, multiply by the level difficulty, take its modulus by 256, use the result as the basis for generating the items stat. This meant that there wasn't a decent sliding scale of good items as the difficulty increased, rather they would wrap around once the difficulty increased beyond a certain level.


This issue (indirectly) is probably why I stopped playing since it made finding better gear than I had, a grind through 3-4 hour survivals with often nothing to show at the end. The changes to the item removal algorithm may well be sufficient to rectify this, but I was wondering if anything had been done to address the core issue?

Share this post


Link to post
Share on other sites

I had created a fix for this problem; it's trivial to do but I can't find the DD source code anymore in the steam folder. If someone points out how I can find it again, I'll happily contribute a patch to resolve.

Share this post


Link to post
Share on other sites
My last 3 runs of WW NMHCMM (waves 17-35) got me only one decent piece of armor (but even though it's decent, it's not good enough for me to actually use).

So if you're worried that you can keep farming survival and getting nothing, that's definitely true in the current version.  RNG is not always kind.  The same is true of lab, which as far as I can tell is about equal to survival in terms of how often you get anything good.  You can definitely get good items still, but it's basically up to luck.

Carnage-,

The source code will download if you install the DDDK, but the source code is for a very old version, and I think you'll have to revalidate DD after you install the DDDK.  At any rate, only the CDT has the current version's source code, as far as I know.

EagleOne,

"Loot multiplier scaling now increases with every wave of a map (integer division…) "

I wonder if this change has anything to do with it.

Share this post


Link to post
Share on other sites

Thanks for the pointer: found it.

So, for anyone wanting to look at this issue; the offending line of code is

Dungeon Defenders\Development\Src\UDKGame\Classes\HeroEquipment.uc: 893

This line rolls over the equipment level if it is > 254; trouble being that in order to be considered Trans+ it has the following minimum level requirements:

Trans: 100, Sup: 140, Ult: 175

(If it then has enough quality, it's upgrade levels are further boosted depending on it's classification. If it's Ult, there is a 25% change it gets turned to Ult+ and a 6.25% change it becomes Ult++)

As the difficulty multiplier goes up the mean (avg) level slowly rises; the nearer it gets to 256 the greater the change of a level rollover, back to 1 upgrade level.

My suggested fix (and this would need beta testing; but from my recollection works quite well - KG NMHC starts dropping a fair dozen supremes per run) is to change the line from:

MaxEquipmentLevel = MaxEquipmentLevel%256 + 1

to

MaxEquipmentLevel = MaxEquipmentLevel%128 + 128

This means that once an item rolls Trans it stays trans and can't roll over. It may still make ults too rare so might need some testing on that front as well; but will balance the drops much better on higher levels towards the higher qualities.


--------------------

On the loot multiplier: I was fairly sure it always went up per wave, at least in survival...


Share this post


Link to post
Share on other sites
Carnage- quote:
@Carnage- quote:(If it then has enough quality, it's upgrade levels are further boosted depending on it's classification. If it's Ult, there is a 25% change it gets turned to Ult+ and a 6.25% change it becomes Ult++)

I don't have the source in front of me because I don't have DD installed right now, but I think the version of the source included with the DDDK is from before Ult++ was added, so the numbers you're quoting (assuming they are the right numbers for that old version) are probably for Ult93 and Ult+.

Share this post


Link to post
Share on other sites

I'm assuming that you are right. I thought that Ult+ was 93 and Ult++ was 100 is that not correct?


If someone could point me in the direction of the latest code (github?); I can update as per the latest changes.


Share this post


Link to post
Share on other sites
90 Ult
93 Ult93
100 Ult+
100 Ult++

You might have to become part of the CDT to get the latest code.  I don't know, I'm just a player.

Share this post


Link to post
Share on other sites

While changing that line of code is trivial, the testing RNG() changes is anything but trivial, especially without any automated testing and just relying on volunteer beta testers.  FYI the code still the same however you've put incorrect values in your post.  The modulo (modulus) is on 255 not 256 as below

MaxEquipmentLevel = MaxEquipmentLevel%255 + 1

Aside from the above statement, my views on this are not representative of the CDT

Firstly, this code has been in the game since the beginning, now over 5 years ago.  I'm of the opinion the NONE of the RNG() code should be touched at all period (including changes already made).  Changing the RNG() will just lead to problems at best.  Let's say that we make a change similar to your suggestion, guaranteeing that trans+ drops stay that way (i.e. not rolling over).  I can't help but see that as a slap in the face to all players who've spent hundreds if not thousands of hours farming.  IMO essentially saying "Thanks for all your time, but really you should have just waited, saved yourself hundreds of hours, to do your farming now."

For argument's sake lets pretend that no one would feel this way.  There are always players who say "it seems like" or "feels like" there has been some sort of RNG() change, I'm guilty of this myself.  By leaving the RNG() completely alone, we don't have to spend hours and hours of discussion pinning down if or what changed, unforeseen consequences, etc, etc.  That's even the community could come anywhere near a consensus on how the RNG() should behave in the first place.  If we simply look at any previous discussions regarding balance issues, from Moonbase rewards to tower re-balancing, you'll see that consensus is almost impossible to achieve.  I don't consider this to be a flaw with the community or game, but a situation to learn from and to realize that some things should just be left alone and have everyone spend their time related to DD1 enjoying themselves and focuses on new content.

Even now with minor RNG() changes (aside from unintended armor buffing in 8.1) there are either complaints or praises about the RNG(), though mostly complaints from what I've seen.  In previous CDT meetings some members are convinced that there is absolutely no difference in how armor is generated from v8.0 (Moonbase and QoL changes directly from Trendy) to v8.2.1.  Having no RNG() changes would result in quicker turn around times and more content.  Looking at the 8.2 releases cycle with its long delays there were still changes that the community and CDT were unable to test effectively and had to be reverted, the golden enemies.

All of the people who are still playing the game have lived with the RNG() for up to 5 years, i don't think the risk/reward of changing it now is worth it.  How many retired players would be more likely to get back in the game if they were told the RNG() has been updated(changed, fixed, w/e wording) would come back to the game vs. players who would come back to play new content?


@Carnage- quote:

Thanks for the pointer: found it.

So, for anyone wanting to look at this issue; the offending line of code is

Dungeon Defenders\Development\Src\UDKGame\Classes\HeroEquipment.uc: 893

This line rolls over the equipment level if it is > 254; trouble being that in order to be considered Trans+ it has the following minimum level requirements:

Trans: 100, Sup: 140, Ult: 175

(If it then has enough quality, it's upgrade levels are further boosted depending on it's classification. If it's Ult, there is a 25% change it gets turned to Ult+ and a 6.25% change it becomes Ult++)

As the difficulty multiplier goes up the mean (avg) level slowly rises; the nearer it gets to 256 the greater the change of a level rollover, back to 1 upgrade level.

My suggested fix (and this would need beta testing; but from my recollection works quite well - KG NMHC starts dropping a fair dozen supremes per run) is to change the line from:

MaxEquipmentLevel = MaxEquipmentLevel%256 + 1

to

MaxEquipmentLevel = MaxEquipmentLevel%128 + 128

This means that once an item rolls Trans it stays trans and can't roll over. It may still make ults too rare so might need some testing on that front as well; but will balance the drops much better on higher levels towards the higher qualities.


--------------------

On the loot multiplier: I was fairly sure it always went up per wave, at least in survival...



Share this post


Link to post
Share on other sites

I couldn't disagree with you more. When DD was at it's prime, there were lots of people farming good gear and trading it on the forums, there are far far fewer now, with a smaller player base it is inevitable that people will need to farm their own gear - there is a high barrier to entry for this if it takes hundreds of hours. Are you going to get old players to come back with new content? Absolutely. Are you going to get new players to stick around if they can't farm their own gear in a reasonable time frame? Probably not.

The rollover bug has been in the game since the beginning, however it only really became apparent when Trans items were added since a) to be classed as Trans, an item must have a minimum number of upgrade levels and b) There were now several maps which had high enough quality to trigger the rollover frequently. The rollover caused Trans items to be rarer than they perhaps should have been. Roll in Supreme and then Ultimate with even higher level requirements and the problem simply increases.

If it had been realised early on in the shards expansion, I'm sure it would have been rectified as the in game effect makes no sense, however once inertia set in it becomes harder to make changes like this do to resistance of the community - as you have pointed out but I truly believe that this issue will harm the long term playability of the game.

-----

Onto the technical side.

Yes, testing a change like this could take a very very long time as it mostly effects survival at high waves. To get a good sample size you'd have to run a few dozen survivals on all the Shards+ maps.

What I propose to rectify this situation is to create a model (probably in python as this makes it easy to run outside of the game itself and pull the data into a spreadsheet) of the item gen RNG code only - as it currently exists and then feed it with values from the game eg wave quality multipliers, numbers of enemies per wave, character classes in play. This can then be run 1000's of times and statistics from the items can be captured. - this could be as simple as avg number of trans+ generated each wave on KG NMHCMM or could be more complex, looking at how many of the items have a minimum level; how good certain stats are etc.

Once we have a base line for how the RNG currently behaves we can make my suggested change and any other changes people think might help and re run the simulation - this will provide an evidence base which shows how the RNG behaves under certain circumstances which can then be used to decide upon making the change or not.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...