How to modify base body part efficiency

Started by GiantSpaceHamster, July 29, 2021, 03:54:13 PM

Previous topic - Next topic

GiantSpaceHamster

I'm trying to figure out the best way to apply a change in the efficiency of base body parts on all human pawns based on a new trait (or other quality) that would get applied at pawn creation.

For example, a pawn could spawn with the "right-handed" trait, and their right hand would contribute more proportionally to any related stats like manipulation than their left hand. The "left-handed" trait would operate similarly. I'm not tied to traits but that seems the most appropriate for this aspect of the mod. The one reason I am hesitant about using traits for this is that every pawn will have one of these traits, so it feels more like a native pawn property, but I don't think adding it like that is feasible (if I am wrong please let me know).

I did some exploring for modifying body part efficiency but haven't found anything concrete. Ideally there would be a way to plug in a filter via some DLL code that gets run whenever efficiency is checked and I could check for presence of the trait and modify the value returned, but I suspect that probably isn't supported (and haven't found anything to indicate it is from the code I've reviewed).

I'm comfortable doing DLL modding in general, I'm just not that familiar with the code base to know what is available (and looking over the code is sloooow going).

RawCode

everything is supported if you codeinject

hands and other parts do not contribute directly, they contribute to stats like "manipulation".

check how manipulation is calculated by vanilla, codeinject here, and alter output based on traits of pawn.

GiantSpaceHamster

I'd rather not resort to code injection and prefer to stick to the supported modding capabilities

RawCode


GiantSpaceHamster

I am fine with DLL modding but I do not want to do code injection to override base game behavior. DLL modding is not limited to injection hacks.

RawCode

fine, check how manipulation is calculated by vanilla and use "supported modding capabilities" here.

special note, only ONE mod may use "supported modding capabilities" here.

GiantSpaceHamster

Quote from: RawCode on August 01, 2021, 12:07:52 AM
fine, check how manipulation is calculated by vanilla and use "supported modding capabilities" here.

special note, only ONE mod may use "supported modding capabilities" here.

You can also just not bother to reply if you don't want to help out at all.

Canute

That's RawCode kind of help.
He say look there, analyse that.
I think he want to say, you need to understand first how the vanilla code do it, before you try to modify it.
Instead to put you down some code lines.

When you don't want to analyse the vanilla code, maybe you should learn it from some prostetic mod, how they modify it.

But if you got a specific problem with your own code, post it here and i think RawCode will help you with it.


GiantSpaceHamster

That's not very useful then. I don't have time to figure out how everything works from scratch. This game is sorely missing official documentation on the systems to help modders navigate the code base and functionality. If I can't get official help, and community help is limited to "read the code and figure it out", then I just don't have the time to be a modder any more.

RawCode

don't have the time?
lack official documentation?
are you kidding bro?

I given you exact keyword, lets see how long time it takes to check?
https://youtu.be/UnQOpZqG3z0

2-38
not hours or days, 2 minutes 38 seconds