Sign in to follow this  
jaytoo

In Depth Restoration Analysis

Recommended Posts

Hey all, I wanted to bring some items to the attention of the devs some of them are probably bugs, some of them might not be. 

 

I was told by my favorite CA that bugs that cite the "old magic" are allowed here so here goes nothing.

 

 

Identifying:

In restoration, to determine the odds of one or more runes being placed on a created item the average identification value is used on each fragment. The identification value is just the power of the ID actions added with the current ID value and divided by two. new = (old+power)/2

 

Bug 1:

The incorrect tool is rewarded with better ID value and thus better rune odds.

 

How much stuff is scrubbed off the fragment is calculated by 10.0F * (power / 20.0F + 1.0F) * (correctTool ? 1.0F : 0.5F) 

 

when this value hits 127 the fragment is fully identified.

 

so a 100 power action will result in 60 of the 127, you can then get 3 actions to ID the frag.

a 100 power action with the wrong tool results in 30 of the 127, you can then get 5 actions to ID the frag.

 

 

Using the correct tool and scoring 100 power on each identification will result in:

0 //ID value starts at 0 when the fragment is created.

(0 + 100)/2 = 50

(50+100)/2 = 75

(75+100)/2 = 87 (int cast rounding floors the value)

 

wrong tool would give 5 actions allowing the result to be

 

(87+100)/2 = 93

(93+100)/2 = 96

 

Bug 1 Proposed Solution:

The value starts at 0 and so more actions is rewarded by raising the average power more. If this value was started at frag ql when it is dug up or pulled from the cache and then the wrong tool was punished the system might make more sense. If you want to obscure the ID power you can use a second skill roll to set init ID value.

 

Bug 2:

The identification value of instantly identified fragments is hard set at QL/2. since runes are gated at 50 power it is impossible for instantly identified fragments to get runes. I don't think this is intended for two reasons: 1. Since initial ql is not tied to rune power in other fragments and 2. also shovel functionality pushes the user into an easier difficulty bracket purposefully this seems like it was intended to be a perk rather than punishing players from searching in too easy areas trying to game the rune system.

 

Bug 2 Proposed Solution:

Setting the ID power of the insta frag to a second power roll would be ideal so players can't just wait until they have 3 99ql fragments and game the rune system. Or if you think that would be ok then just set it to the ql.

 

 

Possible Bug 3:

Plate armor fragment tier cannot get the alloy bump when pulled from the ground. This might be intended, it's nice to have some things unique to caches.

 

Possible Bug 4:

Metal statues in the alloy bump tiers can be bumped. So i'm slowly building an alloy drake statue. I'm ok with this.

 

Combining:

Bug 1:

if you fix nothing else please fix this one.

The metal type of a completed item is determined by getMetalBaseMaterial which has a switch statement on (Server.rand.nextInt(Math.max(6, 75 - identifyLevel)))

Then cases for 0 to 5 are gold, silver, copper, zinc, tin and lead where iron is the default case if the value is not 0 to 5.

 

This one is particularly infuriating for high level players. Because if your identification level is over 69 you cannot get iron.

Server.rand.nextInt(6) rolls a 0 to 5 and does not allow for the default and usually best case (iron) to be rolled. 

 

I know this is a bug because the get alloy method is correct and can always roll steel. 

 

The get moon metal material method is... odd. It appears to heavily favor glimmersteel.

with 90 identification power it has a 7 in 10 chance of glimmersteel 2 in 10 of adamantine and 1 in 10 of seryll.

with 50 identification power it has a 37 in 40 chance of glimmersteel and 2 in 40 for addy and 1 in 40 on seryll.

 

This also results in LOTS of iron tools for low level restoration which may or may not be desired.

 

Bug 1 Proposed Solution:

6 needs to be updated to at least 7 in getMetalBaseMaterial. it can be higher to increase the odds of iron

switch (Server.rand.nextInt(Math.max(7, 75 - identifyLevel)))

Please. Please. Please. I feel this in my soul every time I do restoration.

 

 

Bug 2:

For Rune application almost all tools are considered weapons. To my knowledge only file and trowel are not weapons. This stops them from getting tool runes such as a Gold Fo rune (more yield from forestry or rake) cannot end up on a rake or sickle because they are categorized as both tools and weapons. (big scary rake weapons)

Bug 2 Proposed Solution:

The conditional statements for what to see the item is run in this order: 

 

toEnchant.isWeapon()

toEnchant.isArmour()

toEnchant.isTool()

toEnchant.isHollow()

toEnchant.isVehicle() // lol please add vehicles

 

I spot checked some weapons and they don't seem to be identified as tools. I think if you put isTool() first most of this would be resolved, however there would still be some overlap for example hatchet is only a weapon. A more in depth solution would be to make a map of the possible fragment items and just categorize all of them. Such maps already exist for all the statues and special day drops etc.

 

Possible Bug 3:

Combination failures have no negative effects.

 

Possible Bug 4:

Combination overflow is punished by reducing the ID value of the remaining bits. Not really a problem but not sure if there's a point to that.

 

 

Feel free to drop me a message if you want to discuss any of this in more detail. I would love to be part of improving this.

 

 

 

 

 

Edited by jaytoo
  • Like 8
  • Cat 1

Share this post


Link to post
Share on other sites

when you get an unidentified weapon fragment it can be tool or weapon , it is classified as a full fragment , with unidentified metal fragments you get weapon and tool heads 

 

Share this post


Link to post
Share on other sites

using a different tool to identify , ie brush instead of chisel , or vice versa , is higher difficulty , so meh , dont know what your actually saying

 

Share this post


Link to post
Share on other sites

lol dang you're hostile. I'll try to address all of your comments here:

 

I'm not quite sure what the 4 rune alloy armor comment is about but you can get plate alloy fragments from caches if that's what you're referring too, otherwise yes, you can get chain alloy fragments from the ground. I'm only talking about plate in my bug description. I added a little clarification to that in the post.

 

weapon fragments can be tools but the game defines them as weapons and tools, then on the final combination when creating the item it checks if they are weapons first and since they are it never checks if they are tools. Only trowel and file do not have the weapon definition. But i'm not talking about what the fragment will turn out to be i'm talking about rune allocation.

Once it decides that you're going to get runes it figures out what type of item it is so it can decide which set of runes to roll from.

Let me know if I missed what you were going for there.

 

 

As for the tool difficulty:

In the decompiled code, difficulty for identifying a fragment is 

float difficulty = FragmentUtilities.getDifficultyForItem(target.getRealTemplateId(), target.getMaterial()) / 2;
float power = (float)restoration.skillCheck(difficulty, source, 0.0D, false, correctTool ? counter : counter / 2.0F);

 

It only checks tool for how much skill to give which you can see at the end there. counter /2 for the wrong tool means half skill. It does not alter the difficulty. it also does not reference the tool in getDifficultyForItem

 

If you have more up to date code or logs from a lot of restoration actions which indicate which of your actions got skill ticks that we could use to calculate difficulty, I would be happy to take a look!

Edited by jaytoo
  • Like 4

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