empire 4 suggestion: small buildings

Asked by MP on 2018-08-06

don't require dismantle of the wells or lumberjack.

the lj nw from hq can reach fields planted by sw forester (once removed roads)

nothing wrong with the wells, why not keep?

also, farm isn't "converted" and no upgrade/dismantle option when plans found. bug?

Question information

English Edit question
widelands Edit question
hessenfarmer Edit question
Last query:
Last reply:
hessenfarmer (stephan-lutz) said : #1

Hi MP,

the Scenario is designed to create a real mess in the economy which the Player has to solve to be able to win the scenario.
I tried to create some randomness in the buildings by letting them be placed by the place building in Region algorithm without specifying the precise filed but a Region to build the buildings there. Although that doesn't work that good on my machine (buildings placed almost every time in the same spot) it was the Intention and therefore one of the Lumberjacks might be placed near some trees. However it is not a normal lumberjack but a screwed one to ensure it has very low stats in the beginning. In fact it produces 16 times slower than a normal lumberjack. So there is no reason to disobey to your advisors (Amalea) consult. Same for the wells they won't produce more than 10% of all attempts which is much lower than the normal 65%.

Furthermore it is essential to get enough building material in the beginning to build up the basic chain to constantly produce the building materials. It is strongly recommended that the player should carefully read what Amalea is saying. Some useful hints are only given in the message boxes not in the objectives box.

Regarding the farms it is nowhere said that they would be converted. It is said the only thing we can do with them is burn them down to get back the space. I'll have a look into the texts though to make this point clear that the plans are only to construct and operate new farms.

Some additional info. this scenario is designed to be more difficult to win. It is essential to get a working economy as fast as possible. Perhaps it will take more than one attempt to achieve that but this is intended. Next scenarios will be even more difficult (whether the next empire scenario I have in mind or the Frisian Campaign designed by another developer).

As you already experienced it is also possible to completely loose against the AI. The AI is only slowed down by terrain not by scripting as in other scenarios. Perhaps this needs some rework for the next release after the performance of the AI is freezed. I will retest the scenario then to see whether the AI is performing much better now then the time the scenario was created.

By the way this is also true for the empire03 scenario. This has to be checked and balanced against the final release AI too.

I hope I was able to answer all your questions about the scenario. However if you need further information I'd be happy to support this.

Best regards

MP (pagel-d) said : #2

thank you for the detailed response.

I wish to confirm that it's the building themselves that are poorly functioning, and not the workers or the combination of building+worker? In other words, can issues be circumvented by dismissing the worker from the site and waiting for the next to fill?

I don't think the AI is in need of major tweaking. Perhaps it should be bottlenecked during the time period that the user's only build option is lumberjack (as in, they at least can't build military sites during that time).

Perhaps the graphics for the deficient buildings can be altered a bit to make it clear that there's something amiss. If possible, have them able to be retrofitted by placing them in the enhancement chain before the buildings that the user can select for direct building. E.g. BrokenFarm -> Farm (after plans discovered) with 2 marble.

I could also envision having a custom "tool sharpener" or "tinker" building that needs to be "visited" by the workers from the defective sites. This building would have a supply from the toolsmith of something like 1 iron+1 wood -> 2 sharpening stones + 4 basket/handle repair kits. But that would add new items to the supply chain, new buildings, a new worker type, a new supply mode (standard-but-specialized workers get "trained" at the site rather than those workers going directly to warehouses).

hessenfarmer (stephan-lutz) said : #3


I will try to answer your questions in the order you asked:

It is always the building that is tweaked never the worker. Currently only scenario specific buildings are defined in Widelands. They were implemented to support me telling the story of empire04. so kicking out the worker does not solve it and this is intended.
The AI in Widelands is mainly considered poor and therefore some efforts are taken to improve the AI. As I said if I find the AI is too strong I will implement some delaying features to make this scenario not too frustrating. But I can only tell this when the AI status of b20 is freezed.
Graphics alteration is a nice idea but complicated as I am not sure whether this is supported by the save/load game mechanism. Furthermore Widelands lacks graphic designers and the ones we have are working hard to get the new tribe ready. Personally I don't have the knowledge nor the programs to do that. But if you want you could file a wishlist bug for this (having decent graphics for scenario specific buildings). Back when I created the scenario I fiddled around with the building menu to get custom buildings in there, but I skipped this due to they are not distinguishable from the other buildings in the menu. Next thing you can't implement an upgrade to normal buildings as it is not possible to do so, but it would have been possible to add a clone of a normal building that behaves exactly like the normal "farm". Personally I like the scenario as it is. However if you get some support for that idea in the forums I could rethink my position here.
Training the workers is a nice idea as well but as custom workers are not implemented in the engine this is to comlex to implement, as that would need a lot of c++ coding, which is not my skill. But I will keep that in mind for the future. Thanks for the idea.
best regards

GunChleoc (gunchleoc) said : #4

If you'd like to enable upgrading the scenario-specific buildings to default buildings, that problem sounds solvable - feel free to create a bug with the error you get.

Custom images should be possible - we'd have to test whether we can work with the map: prefix in the path there. I sort of havked it for the market test: https://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/test/maps/market_trading.wmf/scripting/tribes/market/init.lua#L8

hessenfarmer (stephan-lutz) said : #5

Upgrade to default building is complicated, cause to enable the upgrade button the old building needs to have an enhancement defined (that would be possible easily) but on the other hand you need to define the enhancement cost in the default building (which is not possible cause it is no longer default then. However as I need to do some major work on the scenario now I will test if and how this could be achieved. If there is a good solution I will probably add this feature to scenario. But this will take some time.
custom images are possible as long as they have unique names for each building. reason is that all of them need to be saved in
../scripting/tribes currently. it is not possible to create subfolders of the ../tribes folder as they are not saved/loaded within savegames. I discovered this while creating the "Temple of vesta" and the relating helptext. However this should be solvable. What isn't solvable that easy is the lack of graphic designers in the dev team. ;-)

GunChleoc (gunchleoc) said : #6

Sounds like something we could target for Build 21 then.

The definition of enhancement costs could then also be shifted in he tribe definitions to the building that is being enhanced - I think that makes much more sense. The reason we have this weird setup is that originally, a building could theoretically have multiple enhancements and the implementation in conf files was easier that way. Now that we have Lua tables, all that should be defined together in a single table.

I have created a new bug report:


hessenfarmer (stephan-lutz) said : #7

I am not sure whether this would really be an improvement to the current situation, as it is a lot of work and has a lot of side implications. What really could help to structure a scenario a lot would be to have subfolders in the ..scripting/tribes/ folder of the scenario. Please let me give it a try to implement the farms as upgradeable after having found the plans.
The current design is going back to the times where custom scenario specific buildings weren't possible. Maybe I have identified some potential to have the same effect as currently with less effort and more flexibility. When moving to the custom buildings I overlooked some potential to have custom buildings in the build menu as well that might nicely fit into the scenario now without affecting other games.
Thanks to MP for giving such input. Maybe I have become a little bit narrow minded while working on this scenario not to see this potential.

hessenfarmer (stephan-lutz) said : #8

OK the new branch
contains the first changes. I got rid of some custom building definitions as they were only made to prevent the buildings be in the build menu in all games. As they are now Scenario specific, we can control the build menus with "allow_buildings" and "forbid_buildings" the farm is now upgradeable, where the upgrade is an exact clone of the normal building. As this fits so nicely I plan to make the odd mill and brewery upgradeable as well after the technology from the temple is obtained.

GunChleoc (gunchleoc) said : #9
hessenfarmer (stephan-lutz) said : #10

ok finished my work player can build degraded mill and brewery and and upgrade them after the technology is found. Farms are upgradeable as well after the plans have recovered.
Scenario is hardened against mishandling. And should be winnable without the help of vesta or the new technology
However this needs some testing in all aspects.

Can you help with this problem?

Provide an answer of your own, or ask MP for more information if necessary.

To post a message you must log in.