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!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
@Jack Rackham, would you know how to approach something like that?I'm thinking is it possible to create a potion with damage reduction for a few seconds?
void LAi_UseHealthBottle(aref chr, float healthInBottle)
{
if(healthInBottle <= 0) return;
if(CheckPerkForGroup(chr, "ImprovePotions")) healthInBottle = healthInBottle * 1.1;//partywide boost
if(!CheckAttribute(chr, "chr_ai.hp_bottle"))
{
chr.chr_ai.hp_bottle = "0";
}
chr.chr_ai.hp_bottle = stf(chr.chr_ai.hp_bottle) + healthInBottle;
}
Exactly, damage reduction when hit. For example at ~40%, when a bad guy hits you with 20 damage, you only take 12. Like in the case of ship defense skill(s). But since they are always on, and perk-dependant, I don't know if it would be possible to get dmg. reduction for 4 (or so) seconds instead of plain healing.The original request is for a potion which reduces damage. @Rolee9309, does that mean you want a potion which reduces damage when you are hit, as opposed to one which heals damage already taken?
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
}
I am unfamiliar with the mechanism of HP, but the "Toughness" perk already does something similar to what you want your perks to do - it boosts maximum HP by 10%. "Toughness" takes its effect in function 'float ResetMaxHP(ref chr)', which you'll find in "PROGRAM\Characters\Leveling.c":Try doing something similar in the same part of 'ResetMaxHP', but don't copy the 'chr.chr_ai.hp_dlt' line.Code: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 }
float ResetHP(ref chr)
{
if(CheckAttribute(chr,"old.chr_ai.hp"))
{
DeleteAttribute(chr,"old.chr_ai.hp");
DeleteAttribute(chr,"old.chr_ai.hp_max");
}
ResetMaxHP(chr);
float HP = stf(chr.chr_ai.hp_max);
chr.chr_ai.hp = HP;
return HP;
}