Topic: Improving Production Sites
toptopple Topic Opener |
Posted at: 2016-07-26, 10:52
The aim of this thread is to discuss improvements to multi-product production sites of Widelands, by exclusion of the training sites (which have their own implementations). For this I refer to the LUA scripts of these sites.
contains an unconditional sleep phase of 35 sec before evaluation takes place whether a complex production can take place resource-wise. This is the culprit! - "return=skipped unless economy needs snack" returns immediately when there is no need for the product. - "consume=barbarians_bread fish,meat beer" also returns immediately when there is not enough resources. - the "sleep=35000" runs as a penalty If the script is modified in the following way, the problem disappears, leaving only that amount of "misfit production site" penalty which was planned for, in this case 5 seconds. If "consume" returns it breaks the entire procedure, hence the longer sleep time is omitted. == Activity == I have supplied amendments for the Taverns, Inns and Big-Inns in my branch topple-sounds-4. Similar enhancements can - and I think: should - be applied to the Smelting-Works and various Weapon-Smithies (if they are multi-production-sites). I can prepare a branch for this in short time since I actually tested this in a private "data" version already. It works good! The question for the penalty, if there should be one and if yes, how high, is left to lead. ;) So when I get a "Go" from you here, I can do more about it! What is left-over is the statistics for the production sites. E.g. if a smelting-works is running full charge with only producing Iron, it still will display only 65 % productivity or so, because of the "false" return from the Gold production cycle. This is bearable, maybe, but in the future one may think of relating productivity values more to time consumption than to production events. Cheers! Top Quote |
king_of_nowhere |
Posted at: 2016-07-26, 14:28
I fully agree. A site that produces many resources shouldn't be penalized if it only produces one of them. If your big inn is only producing rations because they are all you need, it stands to reason that it would make them at least as fast as the simple tavern. Since we're here, may I point out that the barbarian inns will use indiscriminately meat, fish or bread to produce a ration, despite meat being extremely abundant for barbarians, while bread being super expensive? I'd rather there was a way to instruct the inns to preferrably use meat or fish to make rations instead of bread. Possibly a command such as "use the resource whose stock is most abundant", which shouldn't be hard to code and should do the trick. Top Quote |
GunChleoc |
Posted at: 2016-07-26, 16:49
I agree on both points. Busy indexing nil values Top Quote |
einstein13 |
Posted at: 2016-07-27, 16:06
I also agree with the improvement!
I prohibit my buildings to use only meat instead. If I want to add "only some" fish/bread, the solution is to let the building have 1-2 wares at most, and after that you will see that bread is used only in 30-50 % of time (the rest is moving bread from the distance). This improvement will bring less distance between advanced players and newbies, and I am not sure about improving it. einstein13 |
GunChleoc |
Posted at: 2016-07-27, 16:15
Good point - let's just do the sleep times then. Busy indexing nil values Top Quote |
toptopple Topic Opener |
Posted at: 2016-07-28, 07:27
I agree with GunChleoc. We must remember this is a game, after all, and it needs to have a strategy depth. Depth means there must be different ways to do things and also bad ones.
king_of_nowhere Nicely put, but we may also notice that big companies take for everything much more time than smaller, and Taverns are specialised for rations, so they should make them faster. Strategy depth is also demanding here, so I would suggest to include a penalty in the advanced buildings for less advanced products. This will give players a small advantage for holding all kinds of kitchens at the same time (or alternatively supplying all demanded resources)! I would slightly increase the penalty in Inns + Big-Inns to 7 sec for Snack and 8 sec for Meal, so that someone using the Big-Inn for Rations COULD suffer a 15 sec penalty (+33 % of Tavern), 8 sec for Snack (+22 % of Inn). The "could" means that this penalty is conditional only takes place when demand for a delayed product is there but not the resources. If the economy doesn't need for a product, it is always skipped neatly. We could, if you like the idea of penalties, also add an unconditional increase of production times of lower products in higher buildings, say by 15 % per step (and then reduce the conditional penalty a bit). What do you think? Edited: 2016-07-28, 07:27
Top Quote |
toptopple Topic Opener |
Posted at: 2016-07-28, 07:52
Just submitted my branch topple-production-logic-1. It is about the smelting-works. You may want to check it out!
Top Quote |
Tibor |
Posted at: 2016-07-28, 11:11
I am not much happy about such changes especially now in feature freeze, because it can affect AI. If it is done for one type of building - OK then, but if you are going to do it for more, further testing and tweaking of AI would be needed. Top Quote |
GunChleoc |
Posted at: 2016-07-28, 18:32
This will definitely be something for Build 20, not Build 19 Busy indexing nil values Top Quote |
DragonAtma |
Posted at: 2016-07-28, 21:38
Keep in mind that going from tavern to inn to big inn are upgrades, not downgrades. The way I see it, it makes more sense for upgrades to make them better at producing lower-level items, not worse.
Top Quote |