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

Solved worldmap encounters

SRACon17

Sailor Apprentice
another question. in worldmap ecounters with other fleets, why do i have the option to disengage when others attack me? and sometimes, why can i not choose to disengage? isn't it better if i always have no choice but to engage when others attack me? they were the ones who attacked, so they probably had the weather gage. how can i make it so that disengaging from encounters is not an option? :)
 
You can escape if your fleet is faster than theirs.

This function in PROGRAM\MAXIMUS_Functions.c calculates if you can escape or not:
Code:
void CalculateEncInfoData()
{
   ref mainCh = GetMainCharacter();
   mainCh.ShipEnc = "none";
   mainCh.CanEscape = 1;
   EncRecalcReloadToSea();

   float modifier = 1.0;
   if (checkAttribute(mainCh, "Perks.List.ShipSpeedUp")) {
     if (sti(mainCh.Perks.List.ShipSpeedUp) != 0) modifier += 0.2;
   }
   if (checkAttribute(mainCh, "Perks.List.ShipTurnRateUp")) {
     if (sti(mainCh.Perks.List.ShipTurnRateUp) != 0) modifier += 0.15;
   }
   if (checkAttribute(mainCh, "Perks.List.SailingProfessional")) {
     if (sti(mainCh.Perks.List.SailingProfessional) != 0) modifier += 0.65;
   }
   ref MyShipType = GetShipByType(GetCharacterShipType(mainCh));
   aref arship; makearef(arship, mainCh.ship);
   float SpeedMod = stf(GetLocalShipAttrib(arship, MyShipType, "SpeedRate")) / 12 / stf(mainCh.EncSpeed);
   float sailmod = sqrt(GetSummonSkillFromName(mainCh, SKILL_SAILING)) * 16 * modifier * SpeedMod;
   if (sti(sqrt(GetSummonSkillFromName(mainCh, SKILL_SNEAK))) != 0) {
     if (rand(100) / (sqrt(GetSummonSkillFromName(mainCh, SKILL_SNEAK)) * 3.2) > sailmod) mainCh.CanEscape = false;
   }
}
Change to:
Code:
void CalculateEncInfoData()
{
   ref mainCh = GetMainCharacter();
   mainCh.ShipEnc = "none";
   mainCh.CanEscape = 1;
   EncRecalcReloadToSea();

   float modifier = 1.0;
   if (checkAttribute(mainCh, "Perks.List.ShipSpeedUp")) {
     if (sti(mainCh.Perks.List.ShipSpeedUp) != 0) modifier += 0.2;
   }
   if (checkAttribute(mainCh, "Perks.List.ShipTurnRateUp")) {
     if (sti(mainCh.Perks.List.ShipTurnRateUp) != 0) modifier += 0.15;
   }
   if (checkAttribute(mainCh, "Perks.List.SailingProfessional")) {
     if (sti(mainCh.Perks.List.SailingProfessional) != 0) modifier += 0.65;
   }
   ref MyShipType = GetShipByType(GetCharacterShipType(mainCh));
   aref arship; makearef(arship, mainCh.ship);
   float SpeedMod = stf(GetLocalShipAttrib(arship, MyShipType, "SpeedRate")) / 12 / stf(mainCh.EncSpeed);
   float sailmod = sqrt(GetSummonSkillFromName(mainCh, SKILL_SAILING)) * 16 * modifier * SpeedMod;
   if (sti(sqrt(GetSummonSkillFromName(mainCh, SKILL_SNEAK))) != 0) {
     if (rand(100) / (sqrt(GetSummonSkillFromName(mainCh, SKILL_SNEAK)) * 3.2) > sailmod) mainCh.CanEscape = false;
   }
   mainCh.CanEscape = false; // PB: Set this to ALWAYS false
}
See if that works for you.
 
Back
Top