cepheidqq / FactorySkyline

MIT License
8 stars 13 forks source link

Feature Request: Use Building Cost #27

Open nclow opened 3 years ago

nclow commented 3 years ago

When building large factories I like to use mods that improve the quality of life and remove tedium, but I like to set things so it doesn't feel like cheating. In Area Actions, there is an option to consume building materials when copy/pasting areas, and it can also draw those materials from player inventory and any storage chests within a certain range.

I'd love to see a "Building Cost" option in Factory Skyline that does the same thing instead of always building for free.

cepheidqq commented 3 years ago

It has almost finished, there will be a big update. The players using Factory Skyline will not be considered as a cheater. If there exists a toggle to switch the mode, I think it will be outside this mod. (e.g. Pak Utility) It can easily consume items from player inventory and storages, but refunds construction cost without enough space is a tough problem. So there will exist a virtual storage of the Factory Skyline, you can send materials from conveyors to it or take out materials to your inventory.

nclow commented 3 years ago

So I'm trying 0.1.0 and the building cost is great. It deducts the needed materials from the player inventory as expected. One thing seems strange though: I can see the Factory Skyline inventory window off to the right. Clicking on items in the window moves them to my character's inventory. The weird part is that items going into the Awesome Sink seem to be going into the Factory Skyline inventory. I can take 50 plates out, put them into a sink, watch them accumulate in the Factory Skyline inventory again, take them out again, and keep repeating. The Sink awards points for this each time. Reading the patch notes, this seems intentional, but it is confusing. I'd expect items going into the Sink to be gone from the game. It seems strange to have materials refunded from dismantling also go into the same inventory that the sink goes to.

cepheidqq commented 3 years ago

Use a sink to recycle materials to skyline inventory is a way that you could both collect materials from conveyor and play normally when uninstall this mod. You can switch the option to determine whether the materials should be recycled by the mod. For the repeating points counting problem, it also can be solved. But what's your opinion for the two choices below?

  1. Alternative either recycle or count awards points
  2. Add a option to determine whether count awards points while recycling
nclow commented 3 years ago

Having the mod affect the behavior of the Awesome Sink seems unexpected, so I'm not sure adding further options clarifies things. It makes sense that the mod has its own inventory. Since one could click items to move them out of the inventory when the window is open, could one also click to move items into it when the window is open? This might still be confusing though since it would override normal behavior.

How difficult do you think it would be to code the mod to look in regular storage containers for items to use when constructing? Area Actions does this, and when it needs to process a large refund, it creates a small container near the player to hold the items. So it gets around the problem by using containers for inventory space instead of keeping its own logically separate inventory.

If you want Factory Skyline to have its own separate inventory, could it make a special container building with belt hookups, just like the Sink, and when items enter the container they go into the mod inventory? It may not be as simple, but it would avoid altering the behavior of the Sink.

cepheidqq commented 3 years ago

In the 0.1.1, it changes to alternative either recycle or count awards points. I will do some changes if it still has other problems.

Add a new sink like building can solve this problem perfactly. I didn't do it bacause I'm still thinking whether this mod should/need have its own building. Maybe I will do that when I make the decision.

I havn't use a chest on the ground instand of the mod inventory because it needs to avoid transporting tons of materials manually when dismantle buildings. If you copy a large number of buildings, undo and copy to another location, it will be crazy to handle the chests, especially for the case that the materials are much larger than the player inventory.

It is a good idea to look in regular storage containers when constructing, I will think about it. Maybe I will add a option to avoid use raw materials for production.

It makes sense to move items to mod inventory. I will do it when I got the interface for draging items from the player inventory.

nclow commented 3 years ago

If you copy a large number of buildings, undo and copy to another location, it will be crazy to handle the chests, especially for the case that the materials are much larger than the player inventory.

AA does this by making the kind of chest that a player drops when they die. This chest type has infinite inventory space and it just shoves everything in there so I don't think management of that would be complicated.

Looking forward to trying 0.1.1 👍

murphyDeffa commented 3 years ago

Inventory is kinda broken, adding removing dose not work. Awsome sink is not an solution.