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

May I present:

Inspired by KNB and his wonderful reworking of cannons, may I present:

DESTROYABLE CANNONS!

That, and some other fixes, are in NK_b13pre_050419.zip on the FTP.
If you started a new game with my last codebase upload, you shouldn't need to do so now (but please reinit!!).

Same requirements as last time (Pieter's modpack, Screwface's islands, Vassal's muskets, CCC's tut deck, and whatever else I said then)

List of stuff-I-remembered-to-write-down:
(included in the zip)
My three new characters (well, two and a four-in-one)

Added auto armor, changed armor order so better is later.
Added FBQ character inits to NK_Characters.c so reiniting them not necessary on gamestart.
fixed black bars bug by creating shipstats array for temporary ship refs with true stats.

changed town funcs to not always reget town aref.
Changed store pricecheck to use average if qty high enough. Also to use global arStoreTown, not reget town each time.

---new since last upload:

Add toggle RELEASE_AT_SEA to change ransom to release while at sea.
Add release button. Has unworking add ship code for when at sea, currently commented out.

add procEvntQuestCompleteDirect and event EvntQuestCompleteDirect for direct complete quest.
Add delay on divide plunder (REFIT_TIME days), using a fader.

Add quest case "updatedays" which adds pchar.updatedays days, and if pchar.updatedays.disableDCU and/or disableIT will turn them off for the the update.

Added new functions GetWeekDay(int day, int month, int year) and GetMonthName(int month) and GetDayName(int day) to Calendar.c
Added date and time to F2 menu.

added rank based scaling to surrender check

added crew hire cost to auto hire crew in shipyard.

removed crew qty damage scale
added decreasing cannon numbers due to damage and crew. Sadly only via ball (not TOUCH or STORM or whatever).
changed addball to only add correct number of balls
added back some reload time tweak if crew > min for all cannon

fixed Ship_DetonateSmall to not repeat forever.

fixed officers lost on sell ship

added function GetCharPriceMod(ref chr, int price_type, bool summon) rather than have all the different commerce interfaces use their own identical price-buy-com-skill/perk calculations. Applied this to shipyard too.

added canqty handling to cannon.c, shipyard.c

add PROSHIPDEF_NOCRITCH for chance for a crit to be avoided if captain has prof ship def. Stock was always.

changed findotherballtype to be a little faster, and to always return BOMBS if fort. Also fixed so that ships (without bombs) don't always get told bombs.

Added "magazine catches fire" event if fire left to burn too long
Tried different method of dousing fire particle systems
-----------

Notes on destroyable cannon, and changes to KNB's mod:

For every ship in ships_init.c I have added ship-specific and arc-specific cannon quantities (ship.cannons.borts.cannonX.qty, where X is F,B,L,R). I only manually specify bow and stern chasers; the post-init loop at the end auto-calculates broadside qtys.

When you assign a ship to a character, you may specify, in the char.ship.stats attribute tree, different quantities for those arcs (they will supercede the ship-side stats like any other PRS3 local ship stat).
On adding ship to sea, if attribute char.ship.cannons.borts.cannonX.qty does not exist it is created based on the above two-step check (local, then ship base).
During combat, that qty can be reduced (a check is made whenever HP is damaged and the cause is BALL--sorry, no cannon damage from collisions yet).
In addition, the max firable cannon qty is stored as *.curqty, and that is based on *.qty * crew ratio, so if you don't have enough crew you can't man all guns.

When fantoms of type trade are created, they are given a random less than max number of guns in the broadside and stern arcs (not bow, since there are only ever 2 bow chasers).

If you want to see what's happening, uncomment the trace() in AIBalls.c's Ball_AddBall() function, and the trace near the bottom of Ship_ApplyHullDamage() in AIShip.c. That will tell you the ball vs. ship angle.

Note that whenever a gun is destroyed, that /will/ be traced. Nothing to re-enable.

The correct cannon qty is always shown (in interface, in spyglass); on the ships interface you can also see the arc-by-arc breakdown.

When a cannon is destroyed it is checked whether it is placed as "fixable" or really destroyed. The next time a day goes by and you do auto-repair, all fixable guns are re-mounted. This is based on repair skill and defense perks.

In order to repair/re-add all the guns, buy cannons at the shipwright (the price will be correct for how many you need--if you want to stay at the same caliber just buy that caliber, you now can).

So, about qty. When you (or another captain) fires an arc, you will only be able to fire the number of guns that are manned. The red bar will still go down and you'll have to wait for it to "recharge", but you will not lose the ammo.
Yes, this is a kludge (it's done via interrupting Ball_AddBall() ); but it works...

You will get a log message when you personally have lost a gun. The crew will also tell you if it's fixable.
 
The "One-page-summary-on-the-top", i.e. the highlights.
Now when you divide the plunder it takes two months (and everything is updated each day, that's why the fader takes so long)*.
Added release button (Grimm, you were the one who proposed it, right?) and thus redid prisoner interface a bit.

And the Destroyable cannon thing.

*Yes, this means if any of you want to do some code behind a Loading... fader, it's possible and I think I now know how well enough to do it again. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Wow, you sure have been busy while I was away !

Destroyable cannons will make the battles much more interesting. I have missed the possibility of silencing your opponent more and more. And that a shortage of crew also means fewer operational guns only makes sense.
 
<!--QuoteBegin-NathanKell+Apr 20 2005, 06:47 AM--><div class='quotetop'>QUOTE(NathanKell @ Apr 20 2005, 06:47 AM)</div><div class='quotemain'><!--QuoteEBegin-->The "One-page-summary-on-the-top", i.e. the highlights.
Now when you divide the plunder it takes two months (and everything is updated each day, that's why the fader takes so long)*.
Added release button (Grimm, you were the one who proposed it, right?) and thus redid prisoner interface a bit.

And the Destroyable cannon thing.

*Yes, this means if any of you want to do some code behind a Loading... fader, it's possible and I think I now know how well enough to do it again. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />  <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
<div align="right">[snapback]101942[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" /> Great work! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/buds.gif" style="vertical-align:middle" emoid=":drunk" border="0" alt="buds.gif" /> Outright fantastic! I´m looking forward to test it, as soon as I come back. Are the cannons destroyed by critical hits (to have the "blowing up" effect) or by regular hits as well?

As you posted the files needed to run your codebase in the temporary forum, which now is gone, it would be nice to post here again what files are needed to run it properly (apart from those mentioned in your opening post)
 
Indeed you've been extremely productive (as usual). <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" /> OUTSTANDING! (I need to get the rest of the smileys up, we need that exploding cannon guy!) WTG, Nathan! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
Tell me, Nathan and others, why am I not looking forward to it ? I think it will bring again rather more trouble into the game than entertainment. Instead of necessity of replenishing wheat, crew, repairing of hulls and sails, now we will be having to replenish our cannons yet. I hope it will be optional. Even wooden hulls can ´t be substantially visibly damaged in the game ( and it´s really pity, I think). And as several times before I am afraid all this matter have a chance to be somehow exaggerated. Sorry for my skepticism. I know, I should look forward to it, I am not different from you, but I can´t. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
Well, the proof of the pudding is in eating, isn´t it?

Have you played Pirates! or Pirates! Gold, or even Port Royal? I played all of them and I like the idea that round shot should be useful for more than ust sinking an enemy - on the contrary, sinking (or damaging and thus reducing its resale value) the ship might be an unwelcome side-effect from trying to weaken its firepower.
 
Yes, I played Pirates and Port Royal too. But those games are completely different from PoTC. Pirates, it was like a humorous farce. Or do you believe that in the course of a battle the ship lost regularly half or even all the cannons? The cannons was quite expensive matter and their production was a little complicated and prolonged process. In the battle sometimes some guns were destroyed but it were their wooden gun-carriage which were damaged or destroyed rather than their own bronze or later cast-iron barrels. When some cannon was hit it was rather overturned and thrown away and wooden gun-carriage was damaged or maybe even destroyed but own gun barrel only very sparsely, I think. What was presented in Pirates was complete bullshit. Anyway, I think the most thus "destroyed" cannons could be repaired again by placing on the new carriage. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />
 
Hi NK

I installed your NK_b13pre_050419.zip and I must say that it's look very nice... but I can't figure out why but the world map is very weird... The ship don't move as it have been used to and I don't see other island than Conceicao and Douesen... and I only see the fort of them... not the "island"...

i guess there is something that doesn't work! hehehe I only wanted to tell you as a "beta" tester...
 
Hey, then here's something I'd like to see do-able if you damage an enemy more than what leaves him worth taking: Canibalizing captured ships for repair parts. Say you need extra planks or sailcloth, cannons* or even masts and spars, if you have sufficient repair skill (or some ability maybe) you could spend a few days or weeks in just that spot at sea getting the parts you need out of the vanquished hulk.

* Could cannons be made transferrable between ships too, so you wouldn't have to go buy them all the time?
 
Thanks, folks. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
Gotta say, this was about the most fun mod I ever did. Fun to use, I mean--coding was <img src="http://www.ganotherapyusa.com/extras/modding.gif" border="0" class="linked-image" />. I never knew I could make so many angle errors with so little code! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
But that has its charm too. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />

Grimm:
Cannons can be destroyed on regular hits.
Just added a separate chance for always-destroy-gun-on-crit.
Also added some FX.
(Will be up shortly, with CCC's, Screwface's, and Pieter's new stuff too I hope)

Re: needed to run this. Yeah, but I seem to have misplaced the post. But IIRC the above list (restated here) is correct:
1. Pieter's Modpack
2. Screwface's A&M islands
3. Vassal's muskets
4. CCC's new tut_deck_l.gm (from the root of the FTP).

Rad: Yup, you can turn it off by setting the destroy chances to 0.
 
Nathan, maybe it will be good but not in the style of Sid Meyer´s Pirates, I hope. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
dHerblay, you need Screwface's port of the A&M worldmap. Install that before this.

Alan: Neat! I agree, that'd be swell; and I certainly intend to make cannon individually buyable _and_ assignable. What I have in the thing right now is just a hack to make repairing guns possible so they don't stay always damaged.
Plus being able to use multiple calibers.
We could probably add a button to the ransack interface for cannibalize pretty easily; the problem is getting the button to look nice (i.e. reorganize it so all buttons fit).
 
Yeah the ransack interface is getting full... can we dump cargo during ransack yet, or swap the new ship with one you've already got an officer on?

(And what about KAM and seeing if he could turn shipberthing into sending prizes home?)
 
I can see your point, Rad... The cannons might not be completely lost, but repairable just like the sails and your hull. Good thought!!! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
I like it too. Most likely it would be the carriage on which the gun is mounted that gets destroyed, not the barrel itself, and as that´s made of wood it should be possible to be replaced. A very good point indeed <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" /> .

NK: How difficult would it be to connect the cannon destruction to a critical hit? I especially like the idea because in that case the "critical hit" skill would make more sense and we have an explosion animation for free.
 
Yes, thank you all of you. And if it will be optional in the style yes or not, in this case I think it will be good. We will try it and will see if we will like it. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" />
 
Few questions:
Stupid Question #1: What does IIRC mean? I see the abbreviation used quite frequently, but don't know what it means.
Question #2: Haven't tried the mod yet, but how can you get new cannons after some of them are destroyed? Buy them from traders/repair them/get them from a blacksmith?
 
Since there's no thread about the Pre Build 13, I thought I'd mention it here: Once again, the introductory movies have gone the way of the dodo and I don't know where they went.
 
Back
Top