• 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!

Feature Request More need to rest after battle

Hi Pieter,

HP heals anytime you stand around, and pretty quick. I remember people mentioning here that when boarding a ship, they just press R to accelerate time and wait on the current deck until fully healed, then proceed with the boarding. ;)
 
Is that with the Toughness perk by any chance?
I think without that, it doesn't happen.
 
Is that with the Toughness perk by any chance?
I think without that, it doesn't happen.
it happened to me without that perk ( i was on of those who used that trick when boarding when i get a hold of a nice good ship in iron mod while afraid i might lose it XD)
 
Pieter, Toughness only speeds healing up, it happens when you sit around even without it.

I would favor removing natural healing even with toughness, and instead toughness could give some other kind of boost, like slightly more of a boost to max hp. Everyone will end up purchasing toughness anyway, and being tough shouldn't make you regenerate stab wounds. ;)
 
Pieter, Toughness only speeds healing up, it happens when you sit around even without it.

I would favor removing natural healing even with toughness, and instead toughness could give some other kind of boost, like slightly more of a boost to max hp. Everyone will end up purchasing toughness anyway, and being tough shouldn't make you regenerate stab wounds. ;)
couldn't agree more !!
 
In that case, please make a Bug Tracker entry about HP increasing per time to remind us to look up the responsible code.

Or use the Windows Search Index trick to find where Toughness does its job.
Probably that is the same spot where you want to disable the rest.
 
See discussion here:Feature Request - More need to rest after battle | Page 3 | PiratesAhoy!

From Pieter:
"In that case, please make a Bug Tracker entry about HP increasing per time to remind us to look up the responsible code.

Or use the Windows Search Index trick to find where Toughness does its job.
Probably that is the same spot where you want to disable the rest."


Currently natural HP recovery occurs anytime the player stands, and toughness speeds it up. I would like a toggle to disable natural HP recovery if the player chooses, forcing reliance on bandages, even with the toughness perk (and letting toughness give a bit more max HP).

Just the requested reminder to look at the code. and consider the issue.
 
Just made the requested reports Pieter.

I can look at it myself too, but my wife is saying I need to get off the forums and start playing with her now, so I have to wrap things up in 5 minutes. We are going away together for the weekend, so I won't have much time for a couple of days.

Thanks for all your help and kind advice by the way. :)
 
If you use Windows Search for Toughness, does that allow you to track down the relevant code?
 
No worries. Tomorrow is another day.
I'm quickly running out of time myself and am still not up to date with all recent posts at all. :cheeky
 
I haven't checked, but I am pretty sure I have seen it before.

I can find it and post it here next week when I return from my trip, but have to rejoin my wife now. She says my forum time is at an end for the night. ;)

If someone else hasn't already found it by next week, I'll do so. Have a great weekend!
 
Here's where I see toughness multiplier working. I would propose (at least as an easy modification), set the toughnes multiplier to 1.0, so healing remains slow, and then make it give slightly larger increase to max hit points (maybe an extra 5% or 10% on top of what it already gives or so). Everyone gets toughness for their fighters pretty quick anyway.

That way at least you would have to be intentionally exploitive (pressing the R key or something) to rely on natural healing too much.

One downside I thought of that leads me to think entirely disabling natural healing would be a bad idea--Officers don't use bandages or healing items if they are only missing a few hit points. So we'd better leave natural healing in place, so they can heal up the remaining hit points over time. It could be reduced to one half or something, but if a player is going to press R that won't change things for them, and we might as well let them play in whatever manner they find fun. :)

Internal settings

#define TOUGHNESS_REGEN_MULT 10.0 // FLOAT - Faster HP regen for toughness perk, default 2, Build 13 was 80

Leveling.c

float ResetMaxHP(ref chr)
{
float HP = CHAR_START_HITPOINTS;
if(!CheckAttribute(chr,"old.chr_ai.hp"))
{
//First let's save the percentage of HP we have at the moment.
float HPper = 1;
if(CheckAttribute(chr,"chr_ai.hp") && CheckAttribute(chr,"chr_ai.hp_max")) HPper = stf(chr.chr_ai.hp)/stf(chr.chr_ai.hp_max);
int type = 0;
int PlayerHPperLevel = CHAR_HITPOINTS_PER_LEVEL;
float level = makefloat(GetLevel(&chr));
if(!CheckAttribute(chr,"FakeLevels")) chr.FakeLevels = 0; //Levis
level = level + sti(chr.FakeLevels); //Levis
if(CheckAttribute(chr, "HPBonus")) HP += stf(chr.HPBonus);
HP += GetHPBaseBonusOT(chr);
//For now friendly and not friendly are the same, might change later.
if(CharacterIsFriend(chr))
{
//Friendly
PlayerHPperLevel = (PlayerHPperLevel+1)-GetDifficulty()+GetHPLevelBonusOT(chr);
}
else
{
//Not Friendly
PlayerHPperLevel = (PlayerHPperLevel)-(4-GetDifficulty())+GetHPLevelBonusOT(chr);
}
HP += (level-1) * PlayerHPperLevel;
if(IsCharacterPerkOn(chr, "Toughness"))
{
HP = HP * 1.1; // 10% health bonus for the tough guys
chr.chr_ai.hp_dlt = LAI_DEFAULT_DLTHP * TOUGHNESS_REGEN_MULT; // higher regeneration rate, default is 0.1 - LDH 14Apr09
}
if(CheckAttribute(chr,"chr_ai.hpchecker")) //Check if there is an hpchecker, if so we need to change that too
{
float diff = stf(chr.chr_ai.hp_max) - stf(chr.chr_ai.hpchecker);
if((HP - diff) < 20) //Check if we are below 20 (to have some margin)
{
chr.chr_ai.hpchecker = 20;
}
else
{
chr.chr_ai.hpchecker = HP - diff;
}
}
if(HP < 20) //Incase a very large negative modification is applied
{
HP = 20;
}
chr.chr_ai.hp_max = HP;
//Apply the percentage again to the new HP (if we have any change)
chr.chr_ai.hp = HP * HPper;
}
else
{
HP = stf(chr.chr_ai.hp_max);
}
return HP;
}
 
Last edited:
Player might as well not use health items for the last few pints either, right? Bit of a waste...
Maybe there should be another way of increasing the HP again? For example, only do it once per day?
 
True, their behavior is correct. :)

Once a day makes sense. Or natural healing is only enabled in towns. Or there is a function where resting in the tavern completely heals player and all passengers, inside or outside the shore party.
 
I was considering that last suggestion of yours as well.
Weird though to reset HP for officers that aren't even ashore.
Would make sense if the Tavern were a hospital. But only having it at the Apothecary would be quite annoying.
And sleeping at the Tavern for now is still relatively on the useless side.
So I'm not entirely sure what to think....
 
I would conceptulize the tavern as "time spent resting", and your officers pay for their own rooms or rest on the ship. Maybe the healing should be limited, enough to top off their health to full but not enough to replace bandages.
 
How much HP do officers have to lose before using a health item?
Maybe have the Tavern do plus that only?
 
My rough impression is they don't use a healing item if any portion of it would be wasted. Meaning , whatever a bandage heals minus 1 I think is he max amount of health they won't heal.

At least, that's what it looks like when fighting.
 
Code:
if(!LAi_IsBottleWork(chr))
    {
        if(LAi_GetCharacterRelHP(chr) < 0.6)
        {
            dhlt = LAi_GetCharacterMaxHP(chr) - LAi_GetCharacterHP(chr);
            btl = FindHealthForCharacter(&Characters[sti(chr.index)], dhlt);
            DoCharacterUsedItem(&Characters[sti(chr.index)], btl);
        }
    }
    //Текущее действие
    if(chr.chr_ai.tmpl == LAI_TMPL_FOLLOW)
    {
        if(dist < 6.0)
        {
            LAi_type_officer_FindTarget(chr);
        }
    }else{
        if(chr.chr_ai.tmpl == LAI_TMPL_FIGHT)
        {
            //Смотрим на использование бутылочки
            if(!LAi_IsBottleWork(chr))
            {
                if(rand(100) < (50 + 49*LAi_GetCharacterFightLevel(chr)))
                {
                    int tmp; // NK
                    float hlt = MinHealthPotionForCharacter(&Characters[sti(chr.index)], &tmp); // NK changed this function to also get idx. 04-09-08
                    if(LAi_GetCharacterRelHP(chr) < 0.9) hlt = dhlt;
                    dhlt = LAi_GetCharacterMaxHP(chr) - LAi_GetCharacterHP(chr);
                    if(hlt <= dhlt)
                    {
                        btl = FindHealthForCharacter(&Characters[sti(chr.index)], dhlt);
                        DoCharacterUsedItem(&Characters[sti(chr.index)], btl);
                    }                   
                }
            }
[...]

So if a officer drops below 60 percent it will always use a healing potion if it can find one.
if its fighting for some reason it can also use it at random ... (altough it will still check if the potion is usefull)
 
Back
Top