Chain Saw and Jack Hammer not leveling up
"excludeChainsawOnGather": true,
"excludeJackhammerOnGather": true,
To false in the config
"PowerToolPerHit": {
"M": 15,
"WC": 15
},i want to be able to use the level rewards with the tools but not gain XP. Natas989the json config for the mod doesnt have this sectioni want to be able to use the level rewards with the tools but not gain XP."PowerToolPerHit": { "M": 15, "WC": 15 },
If it doesn't have that section, I'd rename your config and reload the plugin. Then I think all you have to do is set those values to zero.
Bumfuzzler
If it doesn't have that section, I'd rename your config and reload the plugin. Then I think all you have to do is set those values to zero.
i deleted the config and reloaded but it didnt add that section to the config i tried manually adding that section to the config but it dont change anything in game.
Do this to make sure:Natas989i deleted the config and reloaded but it didnt add that section to the config i tried manually adding that section to the config but it dont change anything in game.
- Make sure to be on the latest version.
- Unload plugin
- Delete json in config folder
- Reload plugin
- Review json in config folder
Hello Default
I have some questions because i have issues with this plugin.
i wourld like to know if its possible to have the jackhammer and chainsaw not level up when use for wood and on nodes.
i try many settings and i cant find the right one where you can use the chainsaw on trees and get wood but not level up.
thereason i want this setting is because its way to fast with these tools and in 2 days they are level 50.
maybe you have an idea how to do this.
greetings lemo
Update
i dont have this in my config file same issue as above
"PowerToolPerHit": {
"M": 15,
"WC": 15
},
I did the same.
removed the config reload plugin
and still no PowerToolPerHit option
we use version 2.9.9
So the problem was kinda obvious. Jackhammers and Chainsaws were just over powered in terms of leveling up since xp gain is based on hit count.
I'm not a C# programmer (sadly, PHP ;P) so the code is ugly as hell and can be done way better.. But it works for me and keeps the ratio more as intended.
The code simply changes the amount of xp points player get when using one of these tools to 0.2 of the points.
Obviously the ratio itself could be exported to config etc.. but check it out, maybe you can create something better from it :)
My original idea was to make different exp amounts for different tools so you get with every tier a bit more exp per node.. but for now this works fine :)
The code itself is from method void levelHandler(), line 1316. I can post my plugin file if needed.
var pointsToGet = (int)pointsPerHitCurrent[skill];
var activeItem = player.GetActiveItem();
if(activeItem != null)
{
if(skill == Skills.MINING && Equals(activeItem.info.shortname, "jackhammer"))
{
pointsToGet = (int)(pointsToGet * 0.2);
}
else if(skill == Skills.WOODCUTTING && Equals(activeItem.info.shortname, "chainsaw"))
{
pointsToGet = (int)(pointsToGet * 0.2);
}
}
var xpMultiplier = Convert.ToInt64(playerPrefs.PlayerInfo[player.userID].XPM);
been trying to figure out why the jackhammer won't get me any exp, and ive gotten no where. in my config ive set these two to false;
"excludeChainsawOnGather": false,
"excludeJackhammerOnGather": false,
and even added in this later on;
"PowerToolPerHit": {
"M": 10,
"WC": 10
},
i reload the plugin after every change i make, other changes ive made work just find, like adjusting how much exp i gain per hit n such, but this refuses to work still.
if (excludeJackhammerOnGather && player.GetHeldEntity() is Jackhammer || excludeChainsawOnGather && player.GetHeldEntity() is Chainsaw)
return;Seems like this code is intended to abort the leveling and multiplier for the skill if the player is holding a jackhammer or chainsaw and the relevant variables are set to true (by default they are). However, there doesn't seem to be a comparison on the actual variables themselves, so that part of the statement always returns true regardless of whether or not they are set to true or false.
I deleted this line entirely and those two tools now work with the addon on my server, however, I would like to know if
if (excludeJackhammerOnGather == true && player.GetHeldEntity() is Jackhammer || excludeChainsawOnGather == true && player.GetHeldEntity() is Chainsaw)
return;Would work to make the code run as intended regarding whether the variables are set to true or false? Same problem seems to exist for excluding weapons as well. I'm trying to modify the mod entirely so that it would multiply the yield with these tools but not yield experience with the tool and knowing if this would work would give me insight on whether my attempt to modify the plugin would work before I try doing it on a live server.
- 1
- 2