For disabling storms, find this in
PROGRAM\WorldMap\worldmap_encgen.c
:
Code:
void wdmStormGen(float dltTime, float playerShipX, float playerShipZ, float playerShipAY)
{
ref mc = GetMainCharacter();
bool encoff = false;
if(GetAttribute(mc,"worldmapencountersoff") == 1) return;
if(CheckAttribute(mc,"ship.SubmergeDutchman")) return; // PB: No encounters or storms while you are submerged
int numStorms = wdmGetNumberStorms();
if(numStorms < 1)
{
wdmTimeOfLastStorm = wdmTimeOfLastStorm + dltTime*WDM_STORM_RATE*1000.0;
if(rand(1001) < wdmTimeOfLastStorm)
{
wdmCreateStorm();
wdmTimeOfLastStorm = 0.0;
}
}else{
wdmTimeOfLastStorm = 0.0;
}
}
Change it to this:
Code:
void wdmStormGen(float dltTime, float playerShipX, float playerShipZ, float playerShipAY)
{
ref mc = GetMainCharacter();
bool encoff = false;
return;
if(GetAttribute(mc,"worldmapencountersoff") == 1) return;
if(CheckAttribute(mc,"ship.SubmergeDutchman")) return; // PB: No encounters or storms while you are submerged
int numStorms = wdmGetNumberStorms();
if(numStorms < 1)
{
wdmTimeOfLastStorm = wdmTimeOfLastStorm + dltTime*WDM_STORM_RATE*1000.0;
if(rand(1001) < wdmTimeOfLastStorm)
{
wdmCreateStorm();
wdmTimeOfLastStorm = 0.0;
}
}else{
wdmTimeOfLastStorm = 0.0;
}
}
I can't try it myself right now but that should disable storms on the map.
For disabling falling masts, find this in
PROGRAM\SEA_AI\AIShip.c
:
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();
rCharacter.seatime.lasthit = GetSeaTime(); // NK 04-09-16, to set time when last hit
// NK -->
float hp = GetCharacterShipHP(rCharacter);
hp = sqrt(sqrt(pow(hp,2.5)))/82.0;
hp = 1.0/hp;
float collhp = sqrt(hp);
ref rBall; makeref(rBall, AIBalls); // KK
if(!bSeaActive) return makefloat(0);//MAXIMUS
switch (iDamageType)
{
case SHIP_MAST_TOUCH_ISLAND:
if(!IsMainCharacter(rCharacter)) return 0.0; // PB: Collision damage for player ship only
fDamage = fDamage + MAST_ISLAND_SCL * collhp;
break;
case SHIP_MAST_TOUCH_SHIP:
// if(!IsMainCharacter(rCharacter)) return 0.0; // PB: Collision damage for player ship only, GR: disabled, let NPC take damage
//aref rCollideCharacter = GetEventData();
fDamage = fDamage + MAST_SHIP_SCL * collhp;
break;
case SHIP_MAST_TOUCH_BALL:
//Log_SetStringToLog("Captain, we hit their mast!");
int iBallType = sti(rBall.CurrentBallType);
float fMult = 1.0;
int bidx = -1;
ref rBallCharacter;
if(CheckAttribute(rCharacter,"Ship.LastBallCharacter"))
{
bidx = sti(rCharacter.Ship.LastBallCharacter);
if(bidx >= 0)
{
rBallCharacter = GetCharacter(bidx);
if(sti(rBallCharacter.index) != GetMainCharacterIndex() && CheckAttribute(rCharacter,"surrendered")) return fDamage; // NK because AI doesn't respect surrender. 05-04-23
rBallCharacter.Ship.lasttgt = sti(rCharacter.index); // NK 04-09-22 to see who AI is attacking
ref rCannon; if(USE_REAL_CANNONS) rCannon = GetCannonByType(CANNON_TYPE_LONG_LBS4); // KNB
else rCannon = GetCannonByType(CANNON_TYPE_CANNON_LBS12);
if(CheckAttribute(rBallCharacter,"Ship.Cannons.Type")) {rCannon = GetCannonByType(sti(rBallCharacter.Ship.Cannons.Type)); } // NK bugfix 04-06
fMult = stf(rCannon.DamageMultiply);
fMult *= MAST_MULT_SCL;
} else {
bidx = -1;
}
}
/* if(USE_REAL_CANNONS) // Reduce effects of perks // wasn't included in effects of original Ship Defence perks
{
if (sti(GetAttribute(rCharacter, "TmpPerks.Rigging"))) fMult *= 0.85; // -15%
if (sti(GetAttribute(rCharacter, "TmpPerks.RiggingAdvance"))) fMult *= 0.75; // -25%
}
else
{
if (sti(GetAttribute(rCharacter, "TmpPerks.Rigging"))) fMult *= 0.8; // -20%
if (sti(GetAttribute(rCharacter, "TmpPerks.RiggingAdvance"))) fMult *= 0.6; // -40%
} */
switch (iBallType)
{
case GOOD_BALLS:
fDamage = fDamage + MAST_BALL_SCL * hp * fMult;
break;
case GOOD_GRAPES:
fDamage = fDamage + MAST_GRAPE_SCL * hp * fMult;
break;
case GOOD_KNIPPELS:
fDamage = fDamage + MAST_CHAIN_SCL * hp * fMult;
break;
case GOOD_BOMBS:
fDamage = fDamage + MAST_BOMB_SCL * hp * fMult;
break;
}
// KK --> //KB - Tuning ships - Now hits at masts have a chance of critical hit, higher from chasers, even higher from gchasers. No matter calibers, but yes range
if (bidx != -1 && iBalltype != GOOD_GRAPES) { //Grapes can't bring down a mast... never!!!
float endmastchance = 0.0;
float mastchance = MASTCRIT / 100;
if (CheckAttribute(rBall,"quad")) {
if (rBall.quad == "cannonf") { //KB It's a chaser
mastchance = CMASTCRIT/100;
if (CheckTun(bidx, "gchasers")) mastchance = GCMASTCRIT/100;
if (CheckTun(bidx, "ltopmasts")) mastchance = mastchance + TMSAILCRIT/100;
}
}
//Checking crit mast fall
float fShotDistance = Ship_GetDistance2D(rBallCharacter, rCharacter);
if(fShotDistance <= 0) fShotDistance = 1.0; // NK for when dist < 0 05-04-15
float exponent = (fShotDistance/100) -1;
endmastchance = mastchance / pow(2,exponent); // decreasing with range
if (iRealismMode == 0 || Ship_GetDistance2D(GetMainCharacter(), rCharacter) < GetVisibilityRange(1)) { // KK: Mast fall can be seen from LONG range
if ( frnd() < endmastchance ) { // KB - bring down a mast
//Trace("KB - Tuning - Critical on mast");
PlaySound("objects\shipcharge\hurrah.wav");
fDamage = 1.0;
}
}
}
//KB - END Tuning ships // <-- KK
break;
}
fDamage = Clampf(fDamage);
// if mast fall - play sound
if (fDamage >= 1.0)
{
Play3DSound("mast_fall", x, y, z);
if(AUTO_SKILL_SYSTEM)
{
// LDH divide experience between cannons and accuracy - 27Dec08
Ship_AddDelayedCumXP(rCharacter, "Cannons", makeint(fDamage*50));
Ship_AddDelayedCumXP(rCharacter, "Accuracy", makeint(fDamage*50));
}
} else {
if(AUTO_SKILL_SYSTEM)
{
// LDH divide experience between cannons and accuracy - 27Dec08
Ship_AddDelayedCumXP(rCharacter, "Cannons", makeint(fDamage*25));
Ship_AddDelayedCumXP(rCharacter, "Accuracy", makeint(fDamage*25));
}
}
return fDamage;
}
Change it to this:
Code:
float Ship_MastDamage()
{
return 0;
}
Again, can't try it myself right now, but that should prevent masts from falling.
For the rest of the Build 14 stuff, I can't be of more help since I don't play it so I don't really know exactly what has and hasn't been changed. I did talk with others who play Build 14 and Build 15 and they don't have any issues with sinking ships or black screens. In any case, someone who plays or develops for Build 14 would have to reply about the ship and the officers.
Wow! THANK YOU SO MUCH! I would never have been able to ferret this out of that tornado of code that PotC has become. Has anyone considered cleaning out the obsolete trash and slimming this Hurricane down to a simple compilation? A noble deed indeed if anyone is Hero enough to slay this code dragon. Enough metaphors... appreciate your kind guidance how in the world do you have such intimate knowledge of code you haven't been involved in creating? You are truly a Wizard of C to have so much talent. I'm blessed by your association and through you will have a much more enjoyable experience on the Spanish Main... Yarrr Maties!
I understand to delete all code from open "{" to the final close "}" and replace with:
"float Ship_MastDamage()
{
return 0;"
...correct?
All this to negate the
Internalsettings table of mast damage that was so much smaller and concise? Was this done intentionally to negate user mods to the game by creating a hidden override? The effect of this change is absurd... e.g., a 4# ball from a skiff on the first volley takes down the mainmast on a Barfluer Ship of the Line! Doesn't anyone Beta test these builds before release?
The
term code quality describes the general evaluation of a piece of software
code's effectiveness, reliability, and maintainability. The main qualities of
code quality are readability, clarity, reliability, security, and modularity to name a few. These qualities make the
code easy to understand, change,
Okay, I'll get off my "Soap Box" now... just a lifetime of dedicated QA work in a multitude of official positions with huge responsibility and consequences has made me a zealot for proper coding etiquette. nobody should take this as personal criticism I'm just expressing my emotional angst.
However, I might point out this is B14
v24 British thanks to my Brit Mate...
not v22(=bland US version...) fellow voyeurs on the Spanish Main you must check out this Brit version... a lot more fun for sure!
Rightly should have its own forum topic since it is not a twin but a relative?
I believe the best forum location for such user mods is the forum Pieter created for such user mods personalizing game play... that's where this belongs...right?
Now my problem is how to capture all this wonderful info in a doc I can download and print out or refer to while accomplishing your guidance. Not familiar enough yet to know how to capture and download from these pages.
Think I got it wordpad to PDF995 to Office Word 2007... hope so...
THANKS MATE !
btw... ANY EASIER WAY? I'D BE GLAD TO KNOW...
Indeed it doesn't make sense that it doesn't work if the only change is a newer version, but at the same time most players don't seem to have these problems. I for instance can't recreate these issues as both B14 and B15 ran fine for me.
I've never used "optimizers" and "boosters" on any of my own computers, but from what I've seen on others' computers, they are never of any help and if anything only hurt performance. It's one's own choice, but I would never use them.
I don't think there's a program that can help with troubleshooting such particular situations, but I might point to Ultimate Boot CD for help with diagnosing hardware problems:
Ultimate Boot CD - Overview
That is a useful collection to have in one's toolbox. It can be burned to a CD and also be made to run from a USB flash drive. One example of a useful tool is MemTest86 to check for faulty memory - which obviously would cause problems with the operating system and other software.
Your first question is valid and I agree that it is strange as it should work. Your second question I would take as an insult if I were Hammie. It implies that he's acting with malicious intent and would need to assure the community that he is not, when he has been contributing and helpful in the community for years.
The entire Build 15 source code including the engine is available here:
Contribute to PiratesAhoy/new-horizons development by creating an account on GitHub.
github.com
Game engine behind Sea Dogs, Pirates of the Caribbean and Age of Pirates games. - PiratesAhoy/storm-engine
github.com
Anyone could look at it and compile it themselves.
Also anyone could contribute to B15 just as they can to B14. Hammie has brought it to the new engine, but he doesn't need to be the only developer.
Your Ultimate Boot sounds like a very good tool to have in the toolbox. Visited the link and since the download is an ISO file which I rarely have used I would appreciate some guidance in getting this downloaded safely. Does it need to be directly downloaded to a CD in my drive or can it be a file to be burned onto a CD? Since you've experience in this process please advise me how to proceed... Thanks
While it normally does lock the map, in this case, due to a fault in the code execution, which happens a lot due to the huge volume of code to download and install, errors happen on a statistical basis that corrupt and the only troubleshoot is to delete and download until you get an execution that performs as it should. No checksum validation of downloads leaves this consequence.
NZAR A83 Cannon ball sizes Borgards standardised ordnance
Researched and compiled by Dr John Osborne MG DTT PhD FSG April 1994, reviewed March 2016.
In 1712, Colonel Albert Borgard was appointed Chief Firemaster and later, in 1718, Assistant Surveyor of
Ordnance. He rationalized the multitude of gun types then in the Royal Ordnance and specified a complete
system of artillery.
His designs were accepted in 1716. Few of his gun designs were successful and they were
redesigned when Armstrong was appointed Surveyor of Ordnance in 1722. But Borgard's effort to standardize
the Ordnance had long lasting effect.
Borgard dispensed with the historic names for the types of guns, such as Falcon, Minion, Saker, Demi‐Culverin
etc. and
specified each type by the weight of the round cast iron shot (cannonball) they fired. He further
limited the number of cannonball weights to a strict set of values:
The large gun values were 4, 6, 9, 12, 18, 24, 32 and 42 pounds (lb), where 1 lb = 0.45 kg
Ball weight, not cannon bore caliper (caliber) was used to categorize.
Shouldn't the listings in the code be consistent with this fact?