Elin
60 ratings
SkillAndLuckMatter
   
Award
Favorite
Favorited
Unfavorite
Gameplay: Cheat
File Size
Posted
Updated
85.961 KB
18 Dec, 2024 @ 3:46pm
24 Aug @ 12:37pm
8 Change Notes ( view )

Subscribe to download
SkillAndLuckMatter

Description
Your skill and luck influence your drops when doing activities.

Each activity is influenced by its skill level (what you'd gain XP on from doing it).

Note this doesn't change the chances of individual items appearing, just adds a chance to get a 2nd roll of items from the same source.

Formula:
(Skill Level * Skill Level Modifier * Skill Weight + Luck Level * Luck Level Modifier * Luck Weight) / (Skill Weight + Luck Weight)

You can change the modifiers and weights in the settings, by default there's no modifiers and the skill to luck ratio is 3:2.

The result of the formula above is checked against a non-linear scale to determine the chances of the 2nd roll of drops.
Results and chances:
10 = 15% chance
40 = 50% chance
100 = 75% chance
200 = 100% chance
300 = 200% chance (for crafting, see below)

For crafting instead of a duplicate item you get the crafting materials back and the chance is 1/10 of the result above (but it continues to scale and every +100 result value gives +10% chance).

Technically at high levels it's possible to duplicate things by building blocks/floors and destroying them, but I cannot validate if blocks/floors are crafted by the player or not, (ab)use as you see fit.

Settings can be adjusted in the config file that appears on Elin\BepInEx\config after the first launch of the game with the mod enabled or by using https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3379819704 (allows changing the settings without restarting the game).

Implemented:
- Mining
- Digging
- Harvesting/Gathering/Reaping
- Fishing
- Crafting/Processing

If you want to help find actions which this mod doesn't apply to yet and maybe it should, enable the debug setting and you'll receive a notification (on the pop notification widget) with each action you take that could give you drops (even if you don't actually get more drops), you can then report actions which you think should give more drops but aren't being considered.
It's possible that some things can have a pop up but still be missed, for example, bird nests actually have specific code for the chances of giving eggs which is separate from their standard drops, unfortunately there's no great way to detect these cases outside of going through all the code.
60 Comments
beiwan 15 Aug @ 3:37am 
After the update, I re-entered the save file and no errors occurred. Thank you.
NPOu  [author] 15 Aug @ 3:30am 
@Tangent Logic
It should be fixed now. The issue is that TryMakeRandomItemSource had its arguments changed, there's no pratical difference but technically when compiling the mod based on different versions the game doesn't like it.
I disabled that bit of code, which was only used to generate a random egg from bird nests anyway, and I'll enable it again when there's a new stable version.
Tangent Logic 14 Aug @ 11:40pm 
@sora347 Bad habit unless your the source don't make up false info.
sora347 14 Aug @ 8:32pm 
@Tangent Logic if you read the comments the mod was updated for the nightly branch. If you are playing on stable it will cause errors now
Tangent Logic 14 Aug @ 5:35pm 
harvesting a vine on a farming quest, causes this
Tangent Logic 14 Aug @ 5:34pm 
rescubscribed but error still persist. DOesnt happen when mod is disabled.
Tangent Logic 14 Aug @ 5:27pm 
Just got this now disregard if already fixed:

TypeLoadException: Could not resolve type with token 0100004a from typeref (expected class 'TryMakeRandomItemSource' in assembly 'Elin, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null')
at (wrapper dynamic-method) Map.DMD<Map::MineObj>(Map,Point,Task,Chara)
at (wrapper dynamic-method) TaskHarvest+<>c__DisplayClass24_0.DMD<TaskHarvest+<>c__DisplayClass24_0::<OnCreateProgress>b__2>(TaskHarvest/<>c__DisplayClass24_0)
at (wrapper dynamic-method) Progress_Custom.DMD<Progress_Custom::OnProgressComplete>(Progress_Custom)
at AIProgress+<Run>d__15.MoveNext () [0x000fe] in <2d558dff9ced4a59aed071e59b80d671>:0
Tangent Logic 14 Aug @ 5:27pm 
at AIAct.Tick () [0x000a5] in <2d558dff9ced4a59aed071e59b80d671>:0
at AIAct.Tick () [0x0002c] in <2d558dff9ced4a59aed071e59b80d671>:0
at (wrapper dynamic-method) Chara.DMD<Chara::Tick>(Chara)
at GameUpdater+CharaUpdater.FixedUpdate () [0x00065] in <2d558dff9ced4a59aed071e59b80d671>:0
at GameUpdater.FixedUpdate () [0x000aa] in <2d558dff9ced4a59aed071e59b80d671>:0
at Game.OnUpdate () [0x00086] in <2d558dff9ced4a59aed071e59b80d671>:0
at Core.Update () [0x0025b] in <2d558dff9ced4a59aed071e59b80d671>:0

[CWL][INFO] [ExceptionProfile] Map.MineObj
+PREFIX: SkillAndLuckMatter::Patch.Prefix_Map_MineObj
TaskHarvest+<>c__DisplayClass24_0.DMD<TaskHarvest+<>c__DisplayClass24_0::<OnCreateProgress>b__2>
Progress_Custom.OnProgressComplete
Shin 14 Aug @ 3:59pm 
@NPOu

Yup that did it thanks for the quick fix!
NPOu  [author] 14 Aug @ 3:23pm 
@Shin
Should be fixed now, it's very weird because it doesn't seem like this method has really changed in months, although it was edited recently, it shouldn't have broken it, but different decompilers are showing different things for it... so something must be going on and looks like just another case where a simple recompile fixes it.