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

Need Help Upgrade fo sails

Myth

Freebooter
Good evening. A friend of mine is trying to add the opportunity to increase the strength of the sails with the help of a master shipyard on a pirate island. But the problem is that editing the function
float GetRigDamage(int shootIdx, int iBallType, ref damage_chr)

does not give anything. What could be the problem?
 
Don't sails have a Sail Hitpoints (SP) in ships_init.c ?
Not sure if that works though.
Sails are much more handled through the game engine.
I remember running into trouble with applying Godmode to them too.
 
@Pieter Boelen is on the proper track with the sail hitpoints for purposes of enhancing in the shipyard. The GetRigDamage function is for determining the amount of damage a particular opponent and ammo used during a specific "hit" event during combat; it is triggered from the engine when it determines the projectile trajectory intercepts a particular sail.

The process is as follows:

Engine performs calculation to determine whether the projectile, through flight, intercepts a sail. If calculation is positive for interception, the engine kicks off event DoSailHole, then SHIP_SAIL_DAMAGE. These events are defined in the script code to correspond with script functions ProcessSailDamage, Ship_SailDamage, respectively.

SetEventHandler("DoSailHole","ProcessSailDamage",0);
SetEventHandler(SHIP_SAIL_DAMAGE, "Ship_SailDamage", 0);

The ProcessSailDamage function is the one that calls GetRigDamage where it figures a damage amount based on the type of ammo used; it has no bearing on what it appears the purpose of this development to enhance the sail strength.

Rather, what should be modified is probably the character's base ship sail points, versus the "realship" (i.e. the actual, specific ship object that belongs to a particular character)...these two attributes:

refCharacter.Ship.SP
RealShips[sti(refCharacter.Ship.Type)].SP
 
As far as I understand the damage on sails is considered a percentage. And that is the problem. They tried to raise the sail strength to 120 for all ships, but it didn't seem to help. Let's try again.
 
Back
Top