Sign in to follow this  
Armyofsage

Character mod help: Bat neutrality?

Recommended Posts

Armyofsage    0

Hello! I have a question on going about making a character friendly with bats. Its not as easy as just adding the tag "bat" to masterpost_init so... thinking about this has been interesting to say the least.

I know that I will have to modify the behavior of the batilisk themselves. Is this possible to do just on the characters prefab script? Or is this going to have to be more in depth.

I have just basic programming knowledge and after searching for anything bat mod related on the workshop to look at code and compare I have decided to come here for assistance. Any help will be greatly appreciated for I am stumped.

 

Sindrake

Share this post


Link to post
Share on other sites
DarkXero    2892
1 hour ago, Armyofsage said:

Hello! I have a question on going about making a character friendly with bats. Its not as easy as just adding the tag "bat" to masterpost_init so... thinking about this has been interesting to say the least.

Actually, in your case, it is.

Bats don't retarget stuff with the "bat" tag, effectively making them neutral to you.

And if you attack them, they will still go and make a circle and bite you.

So putting inst:AddTag("bat") in common_postinit (the usual place to put tags), is a start.

1 hour ago, Armyofsage said:

I know that I will have to modify the behavior of the batilisk themselves. Is this possible to do just on the characters prefab script? Or is this going to have to be more in depth.

To edit the behaviour of a creature, you have to use the AddBrainPostInit function enabled to use inside modmain.lua, so that on brain initialization, you can edit the tree of behaviours of the brain you want.

1 hour ago, Armyofsage said:

I have just basic programming knowledge and after searching for anything bat mod related on the workshop to look at code and compare I have decided to come here for assistance. Any help will be greatly appreciated for I am stumped.

Of course you should be more specific here.

Share this post


Link to post
Share on other sites

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
Sign in to follow this