Topic: Production Time
WorldSavior![]() |
Posted at:
2018-08-05, 20:16 UTC+2.0
The action starts by going to a randomly chosen coast field where he starts to build the ship - which needs exactly as much resources as the shipyard can store. So the total time for a ship is randomized. As far as I know, every object in Widelands moves one unit in 1.8 seconds. Before the worker moves from his flag to the coast, he has to move from the inside of the building to the flag (1.8 seconds). Can I answer further questions?
You can take a look of them and count how many steps the worker has to go. They also choose their spots randomly.
Quarries (and woodcutters) don't choose randomly, but they choose - as far as I know - a spot which is minimally distanced from their building (instead of choosing spots which deliver the minimal walking distance --> bug! )
For farmers, the walking times are often different as well... Wanted to save the world, then I got widetracked ![]() ![]() |
stonerl![]() Topic Opener |
Posted at:
2018-08-05, 22:14 UTC+2.0
How are slopes and inclines are handled? The aforementioned 1.8 seconds are for flat terrain, aren't they. Does it take 1.8s on a yellow or red section as well? ![]() ![]() |
WorldSavior![]() |
Posted at:
2018-08-05, 23:50 UTC+2.0
No, it doesn't, I forgot about that. At least not for carriers. I don't know the time difference between different inclines. Wanted to save the world, then I got widetracked ![]() ![]() |
stonerl![]() Topic Opener |
Posted at:
2018-08-06, 00:19 UTC+2.0
I calculated the production times for the shipyards. So the minimum distance between the flag and the construction side is 3 units and the maximum 6. In both cases +1 unit from the building to the flag. For some reason the shipwright seems to prefer 6 units... In the init.lua there is 35 second working time and a 20 second sleep time but for some reason it takes another 10 seconds before the shipwright leaves the building. Calculation looks like this:
So it takes min 22.64 minutes and max 25.52 minutes to build a ship. These are the ideal conditions, as in: the terrain is flat. But i'm not sure if it es necessary to consider inclines. Since on the way back it should be faster since it downhill, right? ![]() ![]() |
WorldSavior![]() |
Posted at:
2018-08-06, 01:17 UTC+2.0
Is the minimum distance not 1? When the flag is directly at the coast or on it? And for the maximum: What happens if the worker has to go around his building in the direction "from flag to building""? I want to say, maybe the maximum is higher. And theoretically the route to the spot can be very long (if there are some obstacles), can't it?
When happen the 10s?
Yes, faster. But this doesn't mean that the times are the same. Though the effect of inclines could be maybe rather negligible. Wanted to save the world, then I got widetracked ![]() ![]() |
stonerl![]() Topic Opener |
Posted at:
2018-08-06, 01:57 UTC+2.0
I had tested around 20 shipyards with all 3 tribes. Even if I build the shipyard next to the see, where I expected a distance of 1, most of the time it was 3 and sometimes 6, but never 1.
You're right I tested this, yet. I surrounded his building all the way to the see with Lumberjack's Huts and it took 8 units + 1. So 9 in total. I don't expect it to be more because this was the furthest away from the see. One buildingblock more and it would be to far to even start working on ships. So I guess 9 would be the max.
Right before the shipwright leaves the building. When he enters the building one can see the working animation for 34s. After that I expected that it would take another 20s until he leaves the building but it took 30 in total. The same occurs on the farm the sleeptime should be 14 but is 24. Also another 10s added for some reason. Here the code:
The 10 seconds are added to the planting corn actions. In the case of the shipyard after the ship action I assume
![]() ![]() |
einstein13![]() |
Posted at:
2018-08-06, 09:45 UTC+2.0
Have you tried to surround the shore with roads? I have spot a bug/feature about building ships far away long time ago and the simplest workaround is just to build roads on the shore and leave one place for the ship. Shipyard has to build it there. Then you can test ships building with repeated conditions. einstein13 ![]() ![]() |
stonerl![]() Topic Opener |
Posted at:
2018-08-06, 16:29 UTC+2.0
@einstein13 this "bug" seems to be fixed. The problem is not the repeating conditions, I build a map exactly for this. After further testing I can emphasize that the minimum distance is indeed 3+1 units. and the maximum is 8+1. But there is one catch. Take a look at this picture: On the north coast the shipwright has to move 3 units from the flag to the construction site. And 3 when he walks back. In total 8 units On the west coast the distance from the flag to the construction site is 3 units, but the shipwright cant walk vertical so he has to zigzag his way. This means he has to walk 5 units (black line) on his way to the construction site and 5 units back (white line). The construction site should be on the spot between 3 and 4 instead. To upper shipyard builds a ship in 22 minutes and 38 seconds. The left one in 24 minutes and 33 seconds; which is 8.5% longer. This seems to be a bug?!?
I measured the time for red inclines for a transporter. Upwards it takes 3.6 seconds for unit and downwards 0.9 seconds. Double and half the time of a green road. Which results in 3.6 seconds when he walks one unit forth and back. So the effect in case of the shipwright is 0. is is as if he would walk on a green unit. So the minimum time for a ship being build is 22 minutes and 38 seconds. The maximum time 27 minutes 28 seconds.
Edited:
2018-08-06, 16:38 UTC+2.0
![]() ![]() |
WorldSavior![]() |
Posted at:
2018-08-06, 16:45 UTC+2.0
No, the distance is 5 units.
No
Interesting...
No, 4.5 seconds.
No But I was also wrong. 0.9 seconds don't seem to be negligible... Wanted to save the world, then I got widetracked ![]() ![]() |
stonerl![]() Topic Opener |
Posted at:
2018-08-06, 17:28 UTC+2.0
Sorry I was wrong about the 1 Unit construction site: It is indeed possible to force a 1 unit or 2 unit construction site. But on its own the shipwright would never do this if there wouldn't be any roads.
Sorry to be pedantic, but the distance for the upper shipyard is 3. Have a look at the map without buildings: The distance between 2 flags is 1 unit isn't it? The black line I drew was the way the shipwright was walking. He walks from the 2nd left flag to the 5th left one. I can give you the map if you want to test it yourself.
You're right... I'm stupid. It is indeed 4.5
Yes that is indeed allot. ![]() ![]() |