Jump to content

Recommended Posts

Hi all,

Since this is my first post, let me just quickly set the stage about myself since it might help guide response levels. :)

I'm a fairly seasoned software engineer, so feel free to get technical with me. I don't have much Lua experience, however, but I'm picking it up as I go (so far so good). I also have some hobbiest-indie experience in the game development world, but it's been forever.

Ok, with that out of the way. On to my mod idea, and my request for some pointers.

I'm looking to create a structure that resembles the "Thumper". I'd like to be able to place fuel in it, which activates it. Upon activation, I'd like for it to (slowly) "mine materials per the biome it is placed in. So, in the rocky/dessert area, it unearths rock, flint, gold etc. If it's placed in the forest biome, it would unearth twigs, and logs etc.

I was thinking about trying to base it off of the fire pit (activated by and consumes logs), but I'm not aware of any structure that creates other items. Perhaps a pond, spawning frogs might be a good component to model this off of as well?

Would love your thoughts, ideas or pointers along this line!

Cheers,

~ Volte

Ok, did some more digging. What I've found so far is that my instinct about modeling off of the firepit and the pond might be correct. However, more specifically, I'm learning about the sorta "composable" nature of these items.

Adding a component for "fueled" will get me the majority of the functionality I need for the Thumper to "run" `AddComponent("fueled")`.

Additionally, a pond has a component called "childspawner". I could likely use the two together to turn on and off the child spawner based on the fuel in the unit, and configure it to "drop" items, however I haven't confirmed if this works with "inanimate" objects such as rocks/twigs etc.

The only other open question I guess I have is how to detect the biome that the device is in. I'll keep looking, but would still love a conversation about this :grin:

Edited by volte
Title clarity

You would use SpawnPrefab to spawn in inanimate objects.

 

About the biome detection, I wouldn’t have the foggiest, but maybe there is something in the structure component that tells you what it’s placed on?

 

Edit: you might need to look at some  tutorials on how to make structures before trying to add all the fancy parts

Edited by decduck3

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