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

Mast HP

Luke159

Buccaneer
Storm Modder
Well i finally located some code for the mast hp its self, that shows that the sail and mast hp are not one although more searched showed that a sail can only take so much damage before it falls, so the sail hp is linked to the mast hp however for the real time battle mod i want the masts to last long periods of time but thats a different story and i won't go in to that as there is already a topic which you can view HERE

The code bellow is the original code for the ships masts.
Code:
float Ship_MastDamage()
{
int iDamageType = GetEventData();
int iMastNum = GetEventData();
float x = GetEventData();
float y = GetEventData();
float z = GetEventData();
float fDamage = GetEventData();
aref rCharacter = GetEventData();

switch (iDamageType)
{
case SHIP_MAST_TOUCH_ISLAND:
fDamage = fDamage + 0.25;
break;
case SHIP_MAST_TOUCH_SHIP:
//aref rCollideCharacter = GetEventData();

fDamage = fDamage + 0.2;
break;
case SHIP_MAST_TOUCH_BALL:
int	iBallType = sti(AIBalls.CurrentBallType);   //ñïîðíî, òê ýòî íå ÿäðà, òîãî êòî ñòðåëÿë, à ñêîðåå ÿäðà ÃÃ
switch (iBallType)
{
case GOOD_BALLS:
fDamage = fDamage + 0.1;
break;
case GOOD_GRAPES:
fDamage = fDamage + 0.05;
break;
case GOOD_KNIPPELS:
fDamage = fDamage + 0.25;
break;
case GOOD_BOMBS:
fDamage = fDamage + 0.15;
break;
}
break;

I don't know how tis code works if decreasing the value's will reduce damage or increase the damage, i expect reducing value's to reduce the dame those shot types do but i thourght i would make sure first.

While searching files i found this code.
Code:
object	Sail, Rope, Flag, Vant;

#define MIN_ENEMY_DISTANCE_TO_DISABLE_MAP_ENTER				850.0
#define MIN_ENEMY_DISTANCE_TO_DISABLE_MAP_ENTER_FORT		1250.0
#define MIN_ENEMY_DISTANCE_TO_DISABLE_ENTER_2_LOCATION		1000.0

bool	bAbordageShipCanBe = false;
int		iAbordageShipEnemyCharacter;

I figure that might be of some use to someone, perhaps making the minimum distance larger means more ships are loaded into the game which could lead to more ships been seen whilest in real time sailing. Or maybe it could help in some other way but anyway for anyone wanting to look further into this file AIShip.c in Age Of Pirates 2\program\SEA_AI.
 
Eventually, it would be a good idea to compile your findings into a tutorial for others who are interested in modding COAS.
 
Pieter and I took a look at the code for the masts damage in the Build Mod and could not make any sense out of it... hope you have more luck ;)
 
Back
Top