Jump to content

What is components and what can i do with them?

Recommended Posts

Hello i am just trying to make my character become a leader item (like chester eyebone but not as an item character himself is the leader item) and i am trying to add my follower some crafting tech perks. But those things need to change in game when the stuation changes. So i thought it would be easier with components. Is it possible to add things like that with components and what else i can do with components? Thanks for the information.

Link to comment
Share on other sites

The idea with a component is that it's in an Entity Component System (ECS).  It's an abstraction that decouples entities from their capabilities by modularizing the capabilities into components.

For example, a torch entity would have a component that controls its light emission, another component for temperature, another for smoke, etc.  But then you could easily make another light-type entity like a campfire which would then reuse the same components with different parameters.  Then a completely different entity like a flash grenade could then use the light and smoke components with really high tuned parameters.

Klei does it another step further by adding on Actions to the ECS to further abstract the idea that entities can do things using components, but only through Actions.


For your case, I would delve into Walter + Woby's code as it already has the follow-leader style you're after.  You can then add onto it with your crafting tech perks by making the follower a walking +science station that only affects your character's prefab.

  • Like 1
  • Sanity 2
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...