Jump to content

Help with Modding


Abraxas

Recommended Posts

I'm attempting to make a very basic Trait mod, but I cannot figure out how to do so.
I've got the trait in the game, but I can't do what I want with it - what I want is;

 

Detect when the player eats food, check if the food causes some kind of negative effect and do whatever, but I can't find out how I'd 'listen' for if the player has eaten food.

 

Right now, I got a tick function running that does what I want, but I want this code to only execute when the player eats bad food or drinks something bad. How would I do this?

I tried looking for a food eat event, but I could not find anything along those lines. I've read on things for hours, all I could find was something about overriding `ISEatFoodAction` and doing something with the inventory context menus, but I have no idea how to do so, and I can't find any tutorials on how I would.

 

I'm very new to making mods for this game, legit just started today, and I can't for the life of me find any helpful resources on modding this game. The javadocs have been.. kinda helpful? But I'm very new to Lua, as well.

If someone could point me in the right direction, that'd be nice! Thank you.

Edited by Abraxas
Link to comment
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
×
×
  • Create New...