Topic: A bug or a feature?
Ex-Member Topic Opener |
Posted at: 2014-09-13, 12:50
I am playing a simulation where there is a large area between me and the AI enemy which was cleverly designed so that few building can be buit there, and all are limited to the smallest. So I build a string of sentries and then a cluster as I reach the border. I can the attack the opposing sentry with about 20 soldiers, one from each of my sentries with one left behind guarding or washing his hair. A short while later the expeditionary forces return victorious but bloodied, most have some reduction in their health, some are almost dead, now is the time tp press on with my advantage in numbers but if I select the next sentry to attack all the wounded soldiers return to battle, is there a way I can select the ones that did not fight the first battle so the wounded guys can get some rest? It could be that the buttons for prefering rookies or veterans does something like this though I have not found out what the option actually do yet, but it does seem logical to me that the soldier with the worst health would be the one to stay at home. It seems that the last on in is always the first one out. On a similar topic, when I atack an AI military object the AI sends assistance from other nearby buildings, when the AI attacks one of my buildings nobody leaves any nearby buildings to help defend, How do I tell soldiers to help defend a nearby building? Top Quote |
wl-zocker |
Posted at: 2014-09-13, 13:27
1) Wounded soldiers being sent to attack is surely not the best way. There is currently no way to control which soldiers are sent out (and I have no idea how they are chosen by the game). If you would like to discuss this and bring in your ideas, you can write here: https://bugs.launchpad.net/widelands/+bug/585981. It makes sense to consider the soldiers' health, too. 2) The prefer heroes/rookies buttons have no influence on which soldiers go out to fight, but which soldiers go into this particular building. Buildings that prefer heroes get the trained soldiers (if available), buildings that prefer rookies get the untrained ones. This exchange is done automatically from time to time. 3) Soldiers do come out automatically when hostile soldiers attack somewhere nearby, there is no need to tell that explicitely. I do not know the exact conditions when this happens, but you need at least two soldiers in those buildings if you want them to help (one always has to guard his building, the others can help). I normally do not pay much attention to that, because if it works, it works (and if not, I cannot change it). However, if you have lost your building, you can attack with many more soldiers than those that helped to defend, so it normally is not that bad to lose a building. "Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg Top Quote |
Ex-Member Topic Opener |
Posted at: 2014-09-13, 13:38
Top Quote |
wl-zocker |
Posted at: 2014-09-13, 13:50
It is ok to write it in the forums. The developpers look here from time to time. However, bug reports can always be set to invalid or marked as wishlist item. Furthermore, features that Widelands has but that are not found by the players are also a kind of bug - what is a feature worth that nobody knows? "Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg Top Quote |
DragonAtma |
Posted at: 2014-09-14, 01:37
Hello, everyone! I found widelands back in may 2012 and I've been lurking ever since. One thing I did notice is that -- thanks to https://wl.widelands.org/wiki/SoldierLevels/ -- it's possible to estimate the power of any soldier with a single number (feel free to guess how the three tribes compare; I'll give their stats a few paragraphs down).
Top Quote |
GunChleoc |
Posted at: 2014-09-14, 07:27
Also, the slightly wounded rookie is less of an investment than the badly wounded hero, so it would be more efficient to send out the rookie. Busy indexing nil values Top Quote |
wl-zocker |
Posted at: 2014-09-14, 12:24
The idea makes sense. I think there an error in the formula, it should read (MaxAttack+MinAttack)/2)*(100/(100-Defense))*(100/(100-Evade))*MaxHP*(CurHP/MaxHP). If you cancel MaxHP and the constant factors, you get (MaxAttack+MinAttack)/((100-Defense)(100-Evade))*CurHP. Those soldiers are equally strong and die with the same percantage, but the trained soldier is a bigger loss. I would therefore divide this value by the costs the soldier has produced, cumulative for every step of his training. The costs should be something like log = 0.5 (thus wood = 2*log = 1), fish = meat = bread = 1, coal and the ores based on the food cost, since gold is rarer, multiply it by 1.5 or so. These parameters have to be adjusted with care so that the "best" soldier (the soldier a human would send out?) is sent out. "Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg Top Quote |
DragonAtma |
Posted at: 2014-09-14, 13:12
I added the extra (CurHP/MaxHP) so it'd prioritize high-health soldiers over badly wounded soldiers (just like real life!). You don't have to use that chunk (which would give the same formula you suggested) if you don't mind seeing a veteran at 20% health being prioritized over a rookie at 80% health, but it'd just seem bizarre to me.
Edited: 2014-09-14, 13:21
Top Quote |
wl-zocker |
Posted at: 2014-09-14, 19:01
In the first two paragraphs, I did not introduce anything new, I merely corrected a fault you had made (at least what you wrote did not accord with your formula). In your first formula, you multiply with with MaxHP at the end, while in your second formula, you multiply with CurHP (and the relHP factor you introduced). It makes even sense that the maxHP cancel out, because when a soldier (with given evade, attack and defense) has 100 HP, it does not matter in battle whether he can have 130 or 214, simply because he will never get there. So the formula (MaxAttack+MinAttack)/((100-Defense)(100-Evade))*CurHP describes the soldier's power (in the lack of a better term). Soldiers of equal power have the same chance of winning, even when the distribution on the attributes is different. As GunChleoc pointed out, a rookie is not such a big loss when he is killed as a hero (with the same strength), therefore some corrections have to be made when deciding which soldier should be sent out. To conlude:
Btw, I do not understand your last paragraph:
Edited: 2014-09-14, 19:40
"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg Top Quote |
DragonAtma |
Posted at: 2014-09-15, 01:57
We have two formulas:
Top Quote |