S.k.I.n aims to improve the skinning experience. No more bringing out your knife to skin.
!!IMPORTANT!!
If updating from initial version(v220124), delete gamedata/script/ui_mutant_loot.script and gamedata/script/item_knife.script or you will have errors. Deleting ui_mutant_loot.script is essential.
S.k.I.n
Description
A relatively simple mod that aims to improve the skinning experience. No more bringing out your knife to skin, you simply need to have it equipped in your knife slot. Can also be used with axes equipped in any slot. Will bring back your previously equipped slot after looting.
Intended to be used together with FDDA, Mutant Loot Animations and Item Usage Animations enabled.
Requirements
Incompatibilities
- Probably anything that replaces item_knife.script and ui_mutant_loot.script functions
- Potentially anything that replaces FDDA core functions in enhanced_animations.script and take_item_anim.script. Should work with anything simply relying on these though.
Current Features
- Skinning without knife in hand
- Knife/axe condition loss as per usual
- Reequips last used slot and secondary item, if any, after looting
- Works with or without FDDA
- Option to "Loot All" with spacebar
- Option for whether knife/axe needs to be equipped into a slot or not
- Allows for compatibility with added knives and thick-skinned mutants by editing skin_config.script (example included)
- Compatible BaS knives with included patch
- Compatible with any addon that allows you to equip knife into binoculars slot. Such as this mod.
Planned Features
- nothing planned at the moment
Current Bugs
- "Bug" - not degrading knife the same amount as some mods
Credits
- Feel_Fried and Co for FDDA and for all the awesome animations
- Ishmaeel for Nitpicker's Modpack, in particular "SkinningWithSpace". It also helped me better understand overwriting/replacing Anomaly functions
Changelog
v220124
- initial release
v220126
- separated mod from default script files, thus decreasing potential incompatibilities
- now replaces FDDA functions for correct/smoother reequipping
- fixed animations showing incorrect knife
- compatibility with BaS
- compatibility with "Knife and Pistol in Binoculars slot Anomaly 1.5.1" and similar
v220126b
- added option to disable equipped in slot requirement
v220127
- now also functions without FDDA. Hopefully
- should now properly restore default functions if disabled
- changed how device is reequipped, which looks smoother
- misc cleanups and changes to fix potential future issues
v220128
- fixed bug/error causing knife to degrade twice (thanks StronGV & AyeBlin for reporting)
- cleaned up some code
v220129
- removed some code added during testing that might create errors (really ought to make a testing version)
v220201
- now properly checks if FDDA is installed
- cleaned up code and misc. edits
v220205
- fixed issue causing potential CTD
v220210
- fixed getting stuck in backpack animation
- fixed CTD issue(s)
Oh, yes! Another addon that can help me save 0.01 mili-seconds of my life!
But in all seriousness, this turned out to be pretty useful, because I often run into situations where I'm in a hurry and forget to pull out my knife.
Well, it's more about how bad it looks if you have replace the animations of the knife holstering. For me at least.
Because you holster your knife, take out the knife again, do the skinning animation and then you take out your knife again.
Hi, can it work along with this Addon?
Moddb.com
It should, yes.
Thank you very much, I add it 👍
I think it does not work with BaS. Knife is in the slot, but i can't skin anyone.
Since BaS overwrites item_knife.script it didn't, no. New version should work fine
This is a great addon. I do that it would be compatible with Knife Pistol in Binoculars slot in the future.
Should now work
How would I go about making this mod for myself from the ground up, but ONLY as a mod which allows CAPS LOCK to take all from animal menu?
All you want is to loot all with caps lock? Take a look at Nitpicker's Modpack and the SkinningWithSpace mod
Can't I do it from your mod using the ui_mutant_loot file?
Not using that file anymore. But yes, you could. Although I wouldn't really recommend using "mine" since it's modified already. Keybinds are under function UIMutantLoot:OnKeyboard
OK, so what you're saying is it's best to use Nitpickers file instead of yours? Thank you very much for the help.
Well, that particular mod, SkinningWithSpace, does nothing else but override the default bind. So it would be easier to understand if you are not familiar with stuff.
Great job, at least I can easily cut some stupid corpses, staying a pistol in the small weapon slot.
Good job! Keep on developing your mod!
Tovarish, I got one annoying bug with one quick melee mod (by knife, here's a link Moddb.com): when I'm trying to attack someone by this addon with equipped weapon, after attack my weapon automatically hiding.
Could you try it with the new version and see if it works?
Awesome! Working very well, thank you for patch.
Is there a way to disable the plugin's animation feature? and leave only the FDDA animation function? what happens is that when opening a corpse the animation is executed behind the frame where the parts of the animal appear, and I can't disable this animation from the FDDA options either
What do you mean? Disable the skinning animation? As of this moment, no. It plugs directly into FDDAs animations
I have got this error while trying to drink a flask of purified water, with the last version v220126b
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 191
[error]Description : fatal error
[error]Arguments : LUA error: ... anomaly 1.5.1.2/bin/..\gamedata\scripts\zzz_skin.script:151: attempt to concatenate field 'anim_section' (a nil value)
stack trace:
With the first version, your mod doesn't work when skining a crow
Unable to replicate this. Did you remove the old files as instructed in the readme?
It doesn't matter because with the last version I can drink.
Skining a crow doesn't work however, i must have the knife in hand.
Good mod, not essential but comfortable.
Alright. Yes, it does not hook into the crow skinning. I'll look into it
in the DLTX MINIMOD REPOSITORY plugin pack
there is one that allows you to skin crows, although you need to have the knife in hand but it works very well if you use it with this plugin, if you know how to order the plugins correctly in your mod organizer
I may have something like that, because crows gives me something sometimes, it's rare but it happens.
With your mod, knives wear out 2 times faster! For the test skinned 7 corpses of mutants. Knife "Kukri" start condition 82%. Without your mod, after skinning 7 corpses, the condition of the knife is 80%. With your mod, the condition becomes 78%. With the option "knife in the slot" turned off, the condition of the knife is already 77%. WTF!!!
EDIT: I also tried knife 1, it generally wears out almost 3 times faster. Author, Please fix this. I understand that you can pick up the values closer to the original in the file "skin_config.script", but it will take me a month to set it up "at random".
I can confirmed this
StronGV This might actually be an issue originating in FDDA. Both my function and the FDDA one it's based on calls item_knife.degradate, or my modified one in this case. I did think it slightly odd when I created this, but since I have less experience than the FDDA guys I didn't question it.
So basically it calls the degradate function twice, hence the double loss. However, the math will make it almost 3 times with knife1.
Anyway, fix uploaded :D
Thank for the fix!
Thanks bro, I'll check it out :)
Sick mod, thanks
best addon out there, vanilla skinning is so badly implemented
In the "S.k.I.n-v220129" version, knives degrade at the same rate as in previous versions. Do you even test your mod before releasing it?
I test it way more than I should honestly. And it's not on my end then. My code doesn't call for the degradation a single time. It just overwrites the default degradation with one that's identical with to the default one, with the exception of where it looks for the knife.
In my scripts, I have a file "item_knife.script" from mod "Bas" with the same settings for the degradation of knives as in the file "skin_config.script", which is in the "patch" folder of your mod. Maybe it's because of him? I don't see any other reasons. Maybe a piece of code from previous versions of your mod remained in the save and you need a clean save or a new game?
In general, I deleted the "gamedata" folder, installed only your mod, FDDA and MCM, without which your mod does not work. Loaded the test location, spawned 10 dogs, killed them and started the test. Without your mod, after skinning 10 dog corpses knife1 its condition is 90% With your mod 85%. This is of course not 2 times, but 1.5, but nonetheless. I looked at the main script and did not find anything special, except that I picked up the value of division by 4 (cond-num / 4), the value of 6 is the closest to the original. Now knives degrade almost the same as without your mod. Tested several times on 10 dog corpses, knife1 now degrades to either 90% or 91%.
Actually, it should now work without FDDA.
And there's nothing in the script that should persist in a save, so that's unlikely, but you could always test it? The degradation math is identical to the default one, so nothing wrong there. BaS' item_knife.script is not used with my mod and the knife settings from it are not accessible from the outside(which is why I'm using a config file for ease of use), so there's not an issue there either.
What results do you get if you disable FDDA?
I will look into it, but I don't seem to have the same issues.
As I wrote above, without FDDA your mod does not work. That is, when even a knife is just in the slot, the game requires it to be removed in order to skin the corpse. Or is it necessary that the FDDA mod be installed, but disabled in the MCM menu?
Hmmm.. I will look into that as well. But yes, you could try that
Can you make the degradation function call from the original game instead of creating your own?
No. It's still the game that calls the function, but I have to replace it for it. Else it will degrade your currently equipped item.
I am making some changes in the logic though, not sure if it will help. Can only check if it actually works or not, but not the issue since I don't have it myself
In general, after testing, I found out that your degradation function is somehow strange. First, the degradation of a knife is always different between knives in the slot and in the backpack. Secondly, for some reason, at the beginning of the game, knives degrade more slowly than at the end of the game (I'm currently at the "generators" location). In one word "anomaly"!!! Like the proverb "As you call a ship, so it will sail" Since this is the case, could you integrate your mod into the FDDA? Anyway, half of the functions you use from that mod, and you don’t have to write a separate degradation function.
That's strange.
But no, that would not make a difference. As I said, have to remake that function or it will just degrade your currently equipped item.
I am still not experiencing the same issue as you, but I am redoing some things either way
I seem to understand how your degradation function works. The default function wears out the knife depending on the number of corpses skinned, and yours - on the number of trophies cut from the corpses. Therefore, there will always be a random result of degradation. For example, with 10 dog corpses, a kukri knife is 100% condition, it always wears out stably by 2%, that is, it becomes 98% - this is without your mod. With your mod, the state is always different, depending on how many trophies I cut. From 10 attempts on 10 corpses, the kukri knife was basically 99%, once was 98% and once stayed at 100%. Tested with setting (cond-num/8).
I have the Dynamic Mutants mod installed. So, there you can get more than 10 trophies at a time from large mutants. When skinning 4 large mutants, the kukri knife immediately degraded by 3%, while without your mod it remained 100%. This is how I understood the principle of the degradation function of your mod, I think it is more logical than the default, but still requires adjustment so that the knives do not break too quickly.
I see. That's not my function doing that however.
If you check the default ui_mutant_loot, that's how it's supposed to work.
And checking the Dynamic Mutants mod, it edits this script, so maybe it changes it?
There would be suspicions of dynamic mutants if I didn't test on a naked game, see my post above.
Still, not my code calling the degradate function.
The game is supposed to degrade the knife for every item. Check the UIMutantLoot:Loot function in ui_mutant_loot; it calls item_knife.degradate for every item looted by default.