Skip to content
Milan Ender edited this page Jul 24, 2016 · 14 revisions

Economy Wiki

I'll try to extend this wiki and provide an easy walkthrough/tutorial in the future. For now, you can find some basic guidelines here.

There are currently two ways you can use this mod: 1. Create resource production and consumer entities.
2. Make your custom storage component compatible with other storage/logistic systems.

1. Creating resource producers/consumers

That one is easy: Just add a MarketSubscriberComponent to your entity. There you have the possibility to specify what resources are needed to produce the specified productscan be left empty if there are none). You also have to set an entityRefs to the entities where the MarketLogisticSystem should look for storage components, one to draw potential consumption resources from and one to store potential products. You'll also need to specify the time interval (should be in seconds) on which the production and consumption events are sent. Currently you'll also need to register your entity with the MarketSubscriberComponent to the MarketUpdaterSystem.

2. Registering custom storage components

The only thing you really have to do is to implement the StorageComponentHandler for the storage-component you use in your mod. When the handler is ready, you'll need to register it in the StorageHandlerLibrary by calling storageHandlerLibrary.registerHandler(StorageComponentHandler handler). Then you are already done :).

Clone this wiki locally