Jump to content

Recommended Posts

Hi there!

 

Like the titles says, I'd like to let my custom character have followers that won't go away once they are fed. That would include rabbitmen, pigmen, and maybe catcoon.

 

Can someone help me please?

Edited by GalloViking

@GalloViking

See how this mod does it.

 

Example for pigman.

Note: You can reuse the same function for other prefabs, it's not specific to the pigman prefab.

TUNING = GLOBAL.TUNINGlocal almost_infinite = TUNING.TOTAL_DAY_TIME * 10000local function infinite_follow_tuning(inst)    if inst.prefab == "your_char_prefab" then        TUNING.PIG_LOYALTY_PER_HUNGER = almost_infinite    endendAddSimPostInit(infinite_follow_tuning)local function infinite_follow(inst)    if GetPlayer().prefab == "your_char_prefab" then        inst.components.follower.maxfollowtime = almost_infinite    endendAddPrefabPostInit("pigman", infinite_follow)

 

@GalloViking

See how this mod does it.

 

Example for pigman.

Note: You can reuse the same function for other prefabs, it's not specific to the pigman prefab.

TUNING = GLOBAL.TUNINGlocal almost_infinite = TUNING.TOTAL_DAY_TIME * 10000local function infinite_follow_tuning(inst)    if inst.prefab == "your_char_prefab" then        TUNING.PIG_LOYALTY_PER_HUNGER = almost_infinite    endendAddSimPostInit(infinite_follow_tuning)local function infinite_follow(inst)    if GetPlayer().prefab == "your_char_prefab" then        inst.components.follower.maxfollowtime = almost_infinite    endendAddPrefabPostInit("pigman", infinite_follow)

 

Ah, I understand. I did something completely different, that's why it didn't work at all. Thank you a lot.

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...