theepicdragon976 Posted September 5, 2020 Share Posted September 5, 2020 I've been looking in to how zombie loot works. As everyone knows, looting a zombie with the nimble hands perk grants 2 items instead of 1. I was looking for the code that changes this once you get the perk. I have looked through at least most of the files and can't find anything dictating this change. If somebody could point me in the right direction, I would be much appreciative. Link to comment Share on other sites More sharing options...
StinVec Posted September 10, 2020 Share Posted September 10, 2020 It is in the "data\skills\common_skills.xml" file. The file lists different skills and where the slot in the skill menu, which tree they are in, how what level is needed to unlock it, how many points it requires to learn it, what prerequisite skills are needed to learn it and what effects it causes upon learning it. That skill is located on line 406 of the file when opened in Notepad/Notepad++. You can also search the file for "NimbleHands" to go right to it. <skill id="NimbleHands" cat="status" tier="16" max_level="1" desc_params="nimble_hands;P" skill_points="1" skill_points_type="Status"> <level_req type="Status" value="10"/> <skill_req id="RepairLuck"/> <effect id="SearchDurationMul" change="x-0.5"/> <effect id="ThoroughSearch" change="0.5"/> </skill>The "SearchDurationMul" effect it possesses halves the time it takes to search by multiplying whatever the current time is that it takes to search by -0.5 (-50%). The "ThoroughSearch" part of the skill is what activates the additional loot from the search. It changes the effect's value to 0.5, though it would need to be tested with different values to know what its original value is internally in the game as it isn't configured in a file by default. I think the default is probably 0.0 though and it increases it. However, as increasing from 0.0 to 0.50 causing double items to be looted doesn't seem to make sense, the default might be 0.25. If it is set to 0.0 then it could cause no items to be looted. If the default is 0.25 for 1 item, and 0.5 for 2, then 0.75 might be for 3, 1.0 for 4, 1.25 for 5, etc. Just need to do some testing with altering it and seeing what the results are if you want to. Link to comment Share on other sites More sharing options...
theepicdragon976 Posted September 10, 2020 Author Share Posted September 10, 2020 It is in the "data\skills\common_skills.xml" file. The file lists different skills and where the slot in the skill menu, which tree they are in, how what level is needed to unlock it, how many points it requires to learn it, what prerequisite skills are needed to learn it and what effects it causes upon learning it. That skill is located on line 406 of the file when opened in Notepad/Notepad++. You can also search the file for "NimbleHands" to go right to it. <skill id="NimbleHands" cat="status" tier="16" max_level="1" desc_params="nimble_hands;P" skill_points="1" skill_points_type="Status"> <level_req type="Status" value="10"/> <skill_req id="RepairLuck"/> <effect id="SearchDurationMul" change="x-0.5"/> <effect id="ThoroughSearch" change="0.5"/> </skill>The "SearchDurationMul" effect it possesses halves the time it takes to search by multiplying whatever the current time is that it takes to search by -0.5 (-50%). The "ThoroughSearch" part of the skill is what activates the additional loot from the search. It changes the effect's value to 0.5, though it would need to be tested with different values to know what its original value is internally in the game as it isn't configured in a file by default. I think the default is probably 0.0 though and it increases it. However, as increasing from 0.0 to 0.50 causing double items to be looted doesn't seem to make sense, the default might be 0.25. If it is set to 0.0 then it could cause no items to be looted. If the default is 0.25 for 1 item, and 0.5 for 2, then 0.75 might be for 3, 1.0 for 4, 1.25 for 5, etc. Just need to do some testing with altering it and seeing what the results are if you want to.I believe that number is the chance that it activates, not how many items it gives. I currently have it set to 1. It activates every time but it's still only ever 2 items. Link to comment Share on other sites More sharing options...
Recommended Posts