Possible to turn of the highlighting of the best attack?

General feedback and discussion of the game.

Moderator: Forum Moderators

Post Reply
Palatin
Posts: 31
Joined: March 27th, 2011, 6:50 pm

Possible to turn of the highlighting of the best attack?

Post by Palatin »

When attacking an enemy, you get that little screen where you can choose what weapon should be used. For every option, you can hit the button "damage calculation" and the attack with best chances is highlighted.
Is it possible to turn that highlighting as well as the button of, maybe with a parameter or a special command? I ask because I would like to try it without that help, maybe it adds a bit more fun to me.

Please note that this is not a general demand to get rid of that hint!
fabi
Inactive Developer
Posts: 1260
Joined: March 21st, 2004, 2:42 pm
Location: Germany

Re: Possible to turn of the highlighting of the best attack?

Post by fabi »

Sorry, I don't get what you mean.

The "damage calculation" dialog only compares the damage distributions of a single attack.
So how can the best attack being highlighted?

Regards,
Fabi
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Possible to turn of the highlighting of the best attack?

Post by GunChleoc »

I don't think he means highlighting in the technical sense, but the statistical info that helps you decide which attack to use
Palatin
Posts: 31
Joined: March 27th, 2011, 6:50 pm

Re: Possible to turn of the highlighting of the best attack?

Post by Palatin »

You are right for the button, but in the screen before the attack with the best chances is already selected when it opens. See the attached picture. The witch-fire attack is selected by the game, because it has the best chance. That is the point I would like to be able to control.
Attachments
Screen2.jpg
User avatar
Dugi
Posts: 4965
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Possible to turn of the highlighting of the best attack?

Post by Dugi »

You can just double-click on the attack that isn't highlighted and that attack will be used instead (because, as we all know, the suggested attack isn't always the best).
Palatin
Posts: 31
Joined: March 27th, 2011, 6:50 pm

Re: Possible to turn of the highlighting of the best attack?

Post by Palatin »

I realize that and know how the system works.
What I try to accomplish is to add the challenge of deciding what attack to use without any hints by the game. Like I said, this is just for me, I'm not complaining or want to change the standard of BfW.
I was hoping for debug command or a starting parameter that hides the button and also turns off the pre-selection.
User avatar
Dugi
Posts: 4965
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Possible to turn of the highlighting of the best attack?

Post by Dugi »

The hint is frequently wrong anyway.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Possible to turn of the highlighting of the best attack?

Post by zookeeper »

Frankly I can't really see anyone implementing such a thing.

I'd say it's not really a hint in the first place; it just pre-selects the attack you're most likely to use anyway (IIRC it selects the one which gives you the least chance of getting killed, and then the one which results in the least damage to yourself) so you can get away with fewer clicks in most cases. Removing the feature wouldn't really add any extra challenge, as the pre-selection isn't going to help you decide what you want to do in a given situation anyway, especially in situations which have any tactical importance.
Palatin
Posts: 31
Joined: March 27th, 2011, 6:50 pm

Re: Possible to turn of the highlighting of the best attack?

Post by Palatin »

OK, thanks for the information.

You both are right, but to me learning about the units and their weapons is part of the fun. If the preselection and the damage calculation isn't possible, you are forced to keep more things in mind and calculate the probabilities yourself. This is just personal taste of course and maybe I'm wrong - but I won't know that, until I tried it. Maybe I modify the source code myself, can't be that hard to find and change the proper part.
AI
Inactive Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Possible to turn of the highlighting of the best attack?

Post by AI »

IIRC, the heuristic it uses is the same one used by the AI by default, which first considers chance to kill and chance to be killed and if neither is applicable, expected damage dealt and received, where damage dealt is twice as important. (so it's usually whichever attack does more damage, unless the opponent is much stronger, or either combatant is close to death)
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: Possible to turn of the highlighting of the best attack?

Post by mattsc »

Palatin wrote:This is just personal taste of course and maybe I'm wrong - but I won't know that, until I tried it. Maybe I modify the source code myself, can't be that hard to find and change the proper part.
I don't think that there's a wrong or right here so if you want to try it, go ahead and do so and find out what's the most fun for you. As far as I know, there is no config option to do that though, so you will have to go with modifying the source code yourself. Here's a starting point:

Comment out l.135 in gui/dialogs/unit_attack.cpp. That's the line that highlights what Wesnoth considers the "best weapon". I have not tried that though, so I don't know if that causes some other problems. If so, you could replace l.815 in mouse_events.cpp with

Code: Select all

const int best = 0;
and that will always highlight the first weapon.

As I said, I have not tried either of them so these might not work exactly like that, but something along those lines should do the trick.
AI wrote:IIRC, the heuristic it uses is the same one used by the AI by default, which first considers chance to kill and chance to be killed and if neither is applicable, expected damage dealt and received, where damage dealt is twice as important. (so it's usually whichever attack does more damage, unless the opponent is much stronger, or either combatant is close to death)
The exact method used is described here. Check out the post I am linking to directly plus the one two posts down.

Hope this helps.

EDIT: Well, no, I just tried this and it's not quite that simple. Neither of those work just as they are, but if you change l.815 in the second file to

Code: Select all

int best = fill_weapon_choices(bc_vector, attacker, defender);
best = 0;
that does always select the first weapon. I'm sure there are different and better ways. As I said, this is just meant as a quick and dirty hack as a starting point for you.
Palatin
Posts: 31
Joined: March 27th, 2011, 6:50 pm

Re: Possible to turn of the highlighting of the best attack?

Post by Palatin »

OK, thanks for the info. Time permitting, I will look into it.
helmick2003
Posts: 3
Joined: November 20th, 2013, 8:39 pm

Re: Possible to turn of the highlighting of the best attack?

Post by helmick2003 »

I believe the iPad version of the game does not offer damage calculations because that is the version I have been playing. If it does, I must be blind because I always to rough calculations mentally every time. All it tells you is damage and number of swings (12-3 for example) and hit percentage. Really, the damage calculator doesn't really seem helpful after you get used to calculating them frequently in your head.
Post Reply