Need help with Blueprint/C++ of custom resource extractor

I have been working on a custom version of miner which outputs a fixed resource and requires additional input in form of a catalyst resource consumed per production cycle. The issues are: - Input Inventory and input connection component dsn't work at all, I have dug through a lot of info on this server and nothing has worked in the end - Setting custom resource to the output in OnExtractableResourceSet doesn't work at all - Overriding FactoryTick_Producing works only partially, production cycle float gets iterated but nothing comes out of the output - As an extra I wasn't able to figure out what can/should be done in Blueprint if needed at all, can't fully understand from modding starter project guide What works: - CanProduce seems to be working properly despite input inventory not properly functioning - The whole thing about restriction to resource nodes of special type works too - As said earlier, production cycle iterates but i feel like it's not thanks to the code i have already written
11 Replies
AniMouse
AniMouseOP3w ago
No description
No description
No description
No description
No description
AniMouse
AniMouseOP3w ago
No description
Robb
Robb3w ago
hmm my only suggestion was to make sure the input port was set to the right inventory, but it seems like you already did that I think you need to change your logic for Factory Grab Output. the input inventory should still be allowed to collect items even if the machine isn't currently outputting, and also, the function currently never returns an output item also, consider making the input port a variable on the c++ side so that you can implement all the Factory Grab stuff in C++ for improved performance
AniMouse
AniMouseOP3w ago
I did it in blueprint at the moment just to make it easier to test ingame, patching takes hours unlike building in blueprint. Will rewrite it in c++ ofc, but not sure when exactly Will be debugging to trace the source of problem
Robb
Robb3w ago
yeah testing stuff in blueprint makes sense, figured I would mention it for later in case you weren't alreayd aware try updating Factory Grab Output to return something all the time just as a test, maybe?
AniMouse
AniMouseOP3w ago
Nope, doesn't respond Will write more as I keep debugging Okay, the one thing I have been able to deduce is that Factory Grab Output doesn't work at all. Input and output inventories seem to get reconfigured just fine, now need to understand exactly why grab output doesn't work To be more precise it doesn't get called First assumption was that I have messed up the code, but I don't think I did, no source code has been overridden without calling it in child methods
Bababooie
Bababooie3w ago
Okay yeah I'm having a similar thing with making a custom merger/splitter unit
Bababooie
Bababooie3w ago
still nada :NOOOO:
No description
No description
No description
Bababooie
Bababooie3w ago
Can confirm, tried overriding both Peek and Grab and added logs to both, neither got called
AniMouse
AniMouseOP3w ago
Marking this as a solved problem, Factory_GrabOutput must be called directly in Factory_Tick and Factory_TickProducing where grabbing and outputting logic is written by you

Did you find this page helpful?