Jump to content

Recommended Posts

Hi. I'm making my first mod and I want my character to gain more sanity from being near followers like pigs and bunnymen, but I have no idea how to do it. I tried digging through code, but I understand almost nothing. Could anyone give me a hand?

What you ask is probably two vague for us to help you out, I may be mistaken but I don't think anyone will program it for you. Knowing what step you are at, what you know, what you already did, where exactly is your issue, could help us help you.

two things though:

-have you looked at the lua of glommer (has a sanity aura like you requested) ?

-you could also check out the mod satori the mind reader : http://steamcommunity.com/sharedfiles/filedetails/?id=240990229

-also a lot of enemies have insanity auras too.... worth looking at

I think bunnies followers give out sanity with this character, not sure though.

Edited by whismerhill

I looked at a lot of mobs with insanity aura and at sanity code itself, but I still have no idea how it works. And thanks, I'll check out this mod. I actually made no progress on this perk at all, I don't even know how to start, even though I was looking at code for the whole day. I'm dumb. Is there any more info I can provide to make it easier for you to help?

I checked out a bunch of mods with characters with various sanity effects, but I still have no idea how it all works. I mean, I can say which lines of code do what, but I can't say how, so it's still no help. I feel really dumb right now.

still too vague sorry can't help much, don't wanna throw replies which fall short because they are not what you wanna do.

did you at least try something ?

there's a lot of ways to do this I believe, you can add sanity auras to creatures prefabs, or you can check what's in range of your character to increase his sanity directly ....

Edited by whismerhill

No, I'm modding for regular DS. What I meant was that I'm afraid that I'll make it so when my mod is active, you will get the sanity boost regardles of what character you play as.

Edited by Agarania

well if you go the adding auras to creatures route, you could add a function that checks who is the player.

careful though it's a bad idea to just copy/paste creatures prefabs into your mod directly, it makes your mod override base game files, which means, users will not benefit from any updates from klei in the future unless you also update your mod when those files are touched by klei

and if there's several version of the same file depending on DLC, then it's even more complicated.

best to use : AddPrefabPostInit

which allows to not change base game files

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...