• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

USEMAXPOTION_ONKEYPRESS's definition counterintuitive

MrMister

Sailor Apprentice
#define USEMAXPOTION_ONKEYPRESS in InternalSettings.h, which defaults to 0, has the explanation "BOOL - If pressing the use potion key, the SMALLEST potions will be used first."

I assume that that the "if enabled" is implicit in the explanation, and so what I get from this is that enabling "USEMAXPOTION" makes you use the smallest potion.

While not a bug per se, I'd like to know if the explanation is wrong, if the ellipsis is "If disabled" instead since that's its it default state, or if the variable's name is really counterintuitive.
 
Fair question; I'm not entirely sure, so I can't rule anything out.

What you could do is to use trick #3 described here:
Tutorial - Modding Tips & Tricks
Then you can search for the variable name and see how it is used.
That should explain exactly what it does. I hope...
 
Found its definition, and it is as I suspected: someone forgot to write "if disabled as by default" on its description. When it's enabled the potion hotkey uses the most health-restoring potion in the inventory, and if it is disabled it uses the least powerful one. To fix it just correct its description in InternalSettings.h

Now, this raises another point of interest, which I'll create another thread for in Brainstorming.
 
Done - this is how it will look after the next update:
Code:
#define USEMAXPOTION_ONKEYPRESS           0    // BOOL - If 0 (default), when pressing the use potion key the SMALLEST potions will be used first. If 1, the LARGEST potion will be used first.
 
Back
Top