(03-07-2015 01:50 PM)Rasmus Wrote: I am not sure I understand what you mean here, but as I understand it the "queue of these Rooms demands" is something where each room calculate the demand of a certain items etc. and the highest needs gets the item. The problem here is that the "queue of these Rooms demands" are hard enough to calculate for the storage rooms, and it will be way harder to calculate for individual rooms as there are so much more of them.
Actually, right now the game don't care about any room demands at all, when the storage rooms were first introduced I tried to calculate the demand of each room and that got complicated way to fast and the balance were lost, usually it ended up with one room getting all the items and the rest got nothing.
Sorry, I should have been more specific when describing the whole idea.
Now I managed to think about this idea for longer so let me explain it then in details and put some example:
First the idea of in-room storages says that: There's no such thing like Storage Rooms as building to build, they're gone forever in this form, but instead, each Room has it's own storage unit as in-room construction that can be placed in Room by the Room itself or a player l like now it's bed in Bedroom or table and chairs in Bar Room. So all storages are specialized in certain items of the Room they're placed in - so finally you can make for each Room special graphic, so weapons won't be stocked in small squared shelves, but on special racks, gold items in vaults, fish in crates filled with ice, etc. - these are this in-room storage I'm trying to describe and several posts before some of us even put some images for them.
Then it's your decision whether player has to build these or Rooms decides depending on their size or quantity of in-room constructions how much in-room storages will be automatically placed there - (like in DK) - so I see only this solution for what problem you mentioned saying "The only problem I see here is that the storage rooms has limited storage and at some point they can't be expanded anymore".
In Dwelvers Rooms are not deciding of how much of what has to be delivered, but their in-room constructions (like they're Tables in Bar Room or Brewing Vat in Brewery) decides, because it is in-room constructions that are producers - not same Rooms, so...
Let's say we have 3 different in-room constructions that are placed in different Rooms in different distance between each other - they produces different goods, but each of them requires the same item to produce, let's say Iron Ores - so how the game will know to which of these in-room constructions and in what number has to go those Iron Ores first? Game then makes a QUEUE - each TYPE of Item in the game has it's own queue of in-room constructions.
III. The (holy) Item related Queues
How the QUEUE works? Hmm, different in-room constructions that needs the same resource type probably needs those Iron Ores in different quantity and produce goods from those Iron Ores in different time, right? Let's take a look of these 3 different in-room constructions closely and put numbers for them: 1, 2 and 3:
- number 1 requires 2 Iron Ores and needs 20 seconds to make a good from them,
- number 2 requires 3 Iron Ores and needs 15 seconds to make a good from them,
- number 3 requires 5 Iron Ores and needs 47 seconds to make a good from them.
So queue is being made in TIME and it predicts which in-room construction will get and how many of Iron Ores first, so it makes a super fast calculations and the results are in order (assuming that all started their production at the same time and got all required resources):
1. number 2 and 3 Iron Ores,
2. number 1 and 2 Iron Ores,
3. number 2 and 3 Iron Ores, (it's 30th second of the player's Dungeon production from Iron Ores now here, number 1 is still producing so it doesn't need Iron Ores yet and number 3 hasn't finished his task, so it doesn't need them either)
4. number 1 and 2 Iron Ores,
5. number 3 and 5 Iron Ores,
6. number 2 and 3 Iron Ores,
First room in queue will be number 2 in fifteen second and then number 1 gets Iron Ores - but it won't get anything until you'll deliver the exact number of Iron ores to number 2, numbers won't change their places in queue even if there's 1 hour brake of empty storages with Iron Ores!
Then when number 2 got those 3 Iron Ores and then number 1 it's 2 Iron Ores, then after them next Iron Ores have to go to the number 2, then again number 1 and so on...
IV. Delivery and Imps
(03-07-2015 01:50 PM)Rasmus Wrote: I can't make it so that an imp fill his backpack with items that has different target locations. It gets way to complicated, the only time he fills his backpack is if all the items are going to the same location".
Let's change this so. Now until Imp won't fill his backpack up completely or there's no other task about digging resources and so his backpack is not filled up completely I see this algorithm:
1. Going to dig resource block (in our case it can be the Iron Ore block).
2. Obtained 1 Item after digging.
3. Check if there's next resource digging task to do.
- if yes: go to the (next) digging point and start from point 1 above,
- if no: go to the point 4,
4. Search in obtained Item's QUEUE for first in queue in-room construction that requires now that obtained Item.
- if yes: deliver obtained Item to the free space of in-room storage placed in the Room in which is placed demanding in-room construction. After delivering it to there search for any new task,
- if no: search for any new task, but after doing it start from point 3.
What if this Imp has already or almost filled backpack up with different resources?
Let's say that each Backpack can be filled up with 10 items and Imp just got it full. It gathered 6 Iron Ores, 1 piece of Wood and 3 Fish. Imp after getting his backpack full is searching in all queues - Iron Ore queue, Wood queue and Fish queue at the same time and makes his own queue of which of these Items in what number it has to deliver where which queue works of the same rule like queue for Items - but there Imp also reserves slots equal to number if items. So for example in Iron Ore queue the first in queue is - let's take it from the earlier example - number 2 and 3 Iron Ores - that means there are 3 slots that can be reserved. If there was no other Imp who took all the slots our Imp friend can reserve all the slots and the next Imp that will search for free slots in Iron Ore queue will have to occupy free slots from the second on the list of Iron Ore queue.
Of course to not drive Imp crazy like going to the same Room twice Imp's queue is corrected of calculated distance between him and Rooms he has to go, so even if the first in queue in-room construction that needs i.e. 3 Iron Ore - Imp could deliver to there up to 5 or 6 Iron Ores instead of 3 there's demand for - because there can be another in-room construction that will require Iron Ores in the time this Imp reach the Room in which are placed both of demanding in-room constructions. If any in-room construction won't demand more then 3 Iron Ores in the same Room if Imp will be fast enough...well, the Imp still is carrying other resources so if he won't manage to deliver Wood and Fish to their respective storages before demand for 5 or 6 Iron Ores will happen then he will deliver required 3 Iron Ores not 5 or 6 at once.
V. Blue flags are not needed anymore
(03-07-2015 01:50 PM)Rasmus Wrote: The blue flag is working as a way point where the rooms are linked together, not as a storage location, it is more like a drop point. If we would have in room storage we would still need the blue flag as a dropping point.
Well, now Imps will deliver required item to the closest free slot of any in-room storage in the Room in which lays in-room construction that demands an item from an Imp - if Imp is carrying required Item. Blue flags are not needed anymore because now in-room storages serves for such dropping points, but in more esthetic way.