• 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 how to edit repair costs

tiger

Landlubber
iv been stuck with low money and a ship that needs repairs and crew but the repairs cost way to much like 2-3 times more then what i can earn this is with the Corsairs Ship Pack mod

this tag was the only that would let me post
 
ok i found it in scripts this is the line of code if any one whats to mess with it

int GetSailRepairCost(int shipType, int repairPercent, ref _shipyard) { float fConstanta = 0.02; float fSkillDepend = fConstanta + (SKILL_TO_OLD*2.0) - (GetSummonSkillFromNameToOld(pchar, SKILL_REPAIR) + GetSummonSkillFromNameToOld(pchar, SKILL_COMMERCE)); fSkillDepend *= 0.1 + (MOD_SKILL_ENEMY_RATE*3 * 0.01); float SailRepairCoeff = 0.05 * fSkillDepend; int shipPrice = GetShipPriceByType(shipType, _shipyard); if(shipPrice<=0) return 0; ref shref = GetRealShip(shipType); float scost = SailRepairCoeff * (shipPrice*SAIL_COST_PERCENT+99.0)/100.0; if (CheckAttribute(shref, "HullArmor") && shref.HullArmor == "S") scost *= 3; // СФ return makeint((scost*repairPercent+99.0)/100.0); } int GetHullRepairCost(int shipType,int repairPercent, ref _shipyard) { float fConstanta = 0.05; float fSkillDepend = fConstanta + (SKILL_TO_OLD*1.75) - (GetSummonSkillFromNameToOld(pchar, SKILL_REPAIR) + GetSummonSkillFromNameToOld(pchar, SKILL_COMMERCE)); fSkillDepend *= 0.1 + (MOD_SKILL_ENEMY_RATE*3 * 0.01); float HullRepairCoeff = 0.05 * fSkillDepend; int shipPrice = GetShipPriceByType(shipType, _shipyard); if(shipPrice<=0) return 0; ref shref = GetRealShip(shipType); float scost = HullRepairCoeff * (shipPrice*HULL_COST_PERCENT+99.0)/100.0; if (CheckAttribute(shref, "HullArmor") && shref.HullArmor == "S") scost *= 3; // СФ return makeint((scost*repairPercent+99.0)/100.0); }

this is not the OG code this is what i edited but i change the float fconstanta from 4 to 0.05 and float hullrepaircoeff to 0.05 and the sail is the same as the hull
the file is shipsutilites.c
 
Back
Top