So I am trying to make a nest for hatching dinosaur eggs. I’d like to share my experience from spending an evening working in the Dev Kit on it.
So far, I got the structure part working. I created my own custom item based off the compost bin, but made it look like a campfire. I also made an inventory for it and attached it as a component to the nest’s blueprint. The inventory is limited to 1 slot and can have any egg placed inside (no stacking). All of that works just fine, and was surprisingly easy to do
The hard part was making it actually do stuff. First, I needed to make a value slowly accumulate over time. When it hits the max value, it removes the egg and spawns the dinosaur. So I get to the event graph for the nest’s blueprint and try to use EventTick.
I get a warning message that this actor cannot use EventTick.
Well poo. But then I had another idea. So I create my own custom event in the event graph. Then I go to my Game Mode’s event graph and set a looping timer that starts on Begin Play. The timer calls a function at regular intervals, which loops through all the nests that exist and calls the custom event that I made for them. Not the way I wanted to go about doing things, but it was an acceptable work around. Progress!
Now I just need to check the nest’s inventory for an egg and…
There’s no way to check or modify the contents of inventories.
Okay…a little weird, but I can manage. I’ll just make it behave like a campfire. Use the egg as fuel, and when the “fire” deactivates, then spawn the dino. I can work with that. There’s a check box in the defaults so when I put the egg (ie. fuel) in the nest, then it’ll automatically activate. In the final version, I can make it so that the activated mesh shows an egg in the nest. That’ll work for me
Trying to use the egg as fuel causes the game and editor to crash.
Welp. I tried. Obviously, I still have quite a bit to learn. But in its current state (pre-200.5), the Dev Kit seems restrictive. At least for the kind of stuff I’m trying to do. So far, anything I’ve tried to do in the event graph has required me to think up workarounds. Perhaps I’m being too ambitious. Or maybe I’m not using the Dev Kit the right way. I’m still pretty new to UE4 modding, though I have quite a bit of modding experience on other games. Can I get some feedback on “am I using this right?”
Also, are there any plans to make parsing and modifying inventory possible? For example, in the game the compost bin is able to check it’s own inventory and turn dung+thatch into fertilizer. This probably is done in the C++ code. However, I see no way to emulate this behavior in blueprints. I know campfires can consume fuel and produce charcoal, via editing the defaults on the blueprint. But how does it turn meat into cooked meat? I didn’t see an option in the defaults for that behavior. Is there something I’m overlooking?
Also, where’s a good place to talk to the devs and give suggestions? I don’t want to be that guy who just complains but doesn’t make an effort to help.
Edit: Just realized that 200.5 with SotF for the Dev Kit released since last night. So all of the above is from the released version immedately before 200.5.