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

"Modify Ship" function from the shipyard (In Prog)

Kazmeister

Landlubber
Well, well, well.

Before I ever even knew about these forums or the Build Mod, I had already added a few "new" blades and ships to PotC. Now that I've seen some of the outstanding mods put forth by you all, I'm thinking much bigger.

So what's the logical next step after learning to add new ships and items?

Hey, I know! Let's add a completely new aspect to the gameplay! Let's add a 'modify ship' function to the shipyard interface! It'll be <i>great</i>!

It'll also be damn near impossible. But maybe not quite. After looking over some of Akella's code, I'm astounded by the haphazard way it's thrown together. Maybe it's just because I'm not russian, but <i>wow</i> this is going to be way more difficult than modding other games I'm familiar with. This will definitely prove to be the hardest bit of mod-work I've ever done.

All that said, I'm not giving up. This thread will be a running account of the "Modify Ship" modding experience, until it's either completed or I've died of frustration. At any rate, hopefully other folks will be able to learn from my mistakes, because I'm going to make quite a few in my stumbling efforts to make this work.

So let's get started, shall we?

As this is going to be a pretty complicated task (Esp. for me <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> ) I'm first going to break down what needs to be done into some smaller parts.

1: Learn the code. (Yep... Pretty important step, neh?)

2: Learn what files affect what. And figure out everything I'll have to change to pull this off.

3: Add a button to the shipyard interface to call a new interface which I'll call the "Modify Ship" interface (Well, what else would I call it? <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> )

4: Build the Modify Ship interface, this would seem to be most easily accomplished if it's based on the shipyard interface I think.

5: Add a bunch of new buttons to the modify ship interface, such as: Replace Holds with Berthing (Decrease cargo space and increase max crew), Replace Berthing with Holds (opposite of the former), Fortify Ship Superstructure (Increase hull but add weight and decrease speed), Streamline Hull (Decrease cargo space to increase speed), Reengineer Sailplan (Reduce SP to increase speed), Reengineer Keel and Rudder (Improve turning radius but decrease... Something.), Rig for Fishing (This would enable the ship to replenish it's own food supply -Superambitious and probably impossible-), Convert to Merchant Ship (Disable cannon and increase cargo space)... And so on, and so on.

6: Charge for each and pass time, similar to the way ship repairs are with b12.

Wow. Sounds simple, right? <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />

To make any of this work though, first I need to figure out how to "permanently" change the statistics of the player's ships on the fly (while the game is running). And I'm not even sure if this is possible. It seems to me the only things that can be changed on the fly right now are the hp and sp (As a result of damage) and I still have to find out how even that works. But even these "alterations" are completely undone when you click that "repair all" button. So if repair all sets a ship to it's default state, this mod may be screwed.

Of course, a much easier but far more time consuming way would be to create a few thousand ships that reflect each modification and just replace the old ship with the new "modified" one. I'd like to avoid this like the plague though.


So to start with, if anyone knows how to alter a ship's stats through an in-game interface (or even if it's possible) please let me know.

As a matter of fact, if any of you experienced PotC modders have <i>any</i> advice or constructive criticism (note the <i>constructive</i> part) to offer... Well I'll take any help I can get.

*sigh* Well here goes.


-James-


...I just now thought of something. Some perks effectively change a ship's characteristics. Wonder if I can use that to my advantage... Maybe the ships could be improved by the same system that changes character's skills... On the other hand, maybe I'm <i>completely</i> wrong. <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
i posted this in another topic, but only just noticed that a topic was made especially for it, so:
i have an idea about how to get this mod to work; Why not try to clone the code that makes cannons selectable, and jst switch it with copper, IE 4 inch copper plating: slows down ship by 5 %, increases ships HP by 10 %...
and change the options so that it reads: no copper plating [stock], 4 inch copper plating [6th-1st rates], 8 inch copper plating[5th-1st rates], 12 inch copper plating[4th-1st rates], 14 inch copper plating[3rd-1st rates], 16 inch copper plating [also 3rd-1st rates], 18 inch only appliable to frigates and first rates [battleships, MOWs], 20 inch copper plating [only appliable to first rates with good speed stats, because it would slow down the ship quite alot, lets say 40 % and boosts its HP by about 50 % .
as for other modifications, why not make an option to inlarge the rudder, in feet, lets say [no rudder enlargement= stock, 6 feet rudder enlargement= 10 % manouverability increase.....]
and for speed, enlarge sails...
then again, we could just use that percentage thing from the repair screen, but i think the first one would make it more enjoyable.
what does everyone think of these ideas?
P.S: Kaz, you said that you made a few ships for POTC, could you show them to us?
even if its not in game, we would like to have look
 
<!--quoteo(post=144075:date=Mar 31 2006, 02:24 AM:name=Where the f*ck is my eye?!)--><div class='quotetop'>QUOTE(Where the f*ck is my eye?! @ Mar 31 2006, 02:24 AM) [snapback]144075[/snapback]</div><div class='quotemain'><!--quotec-->
........
5: Add a bunch of new buttons to the modify ship interface, such as: Replace Holds with Berthing (Decrease cargo space and increase max crew), Replace Berthing with Holds (opposite of the former), Fortify Ship Superstructure (Increase hull but add weight and decrease speed), Streamline Hull (Decrease cargo space to increase speed), Reengineer Sailplan (Reduce SP to increase speed), Reengineer Keel and Rudder (Improve turning radius but decrease... Something.), Rig for Fishing (This would enable the ship to replenish it's own food supply -Superambitious and probably impossible-), Convert to Merchant Ship (Disable cannon and increase cargo space)... And so on, and so on.

.......
To make any of this work though, first I need to figure out how to "permanently" change the statistics of the player's ships on the fly (while the game is running). And I'm not even sure if this is possible. It seems to me the only things that can be changed on the fly right now are the hp and sp (As a result of damage) and I still have to find out how even that works. But even these "alterations" are completely undone when you click that "repair all" button. So if repair all sets a ship to it's default state, this mod may be screwed.
.......

So to start with, if anyone knows how to alter a ship's stats through an in-game interface (or even if it's possible) please let me know.

.....
<!--QuoteEnd--></div><!--QuoteEEnd-->

The player ships data are in the object mchref, IIRC you get that data calling GetCharacterIndex or something similar.

When POTC "creates" a new ship (either to fill the shipyard's selling list, either to create a Fantom) NK created some code to:
- produce an aleatory variation in the characteristics
- include some national characteristics (ie. Pirates are faster but weaker)

One thing you'll have to consider is that if you are going to allow this improvements for non-player ships.
Also you have to consider what is going to happen when berthing a modified ship.

<!--quoteo(post=144075:date=Mar 31 2006, 02:24 AM:name=Where the f*ck is my eye?!)--><div class='quotetop'>QUOTE(Where the f*ck is my eye?! @ Mar 31 2006, 02:24 AM) [snapback]144075[/snapback]</div><div class='quotemain'><!--quotec-->

...I just now thought of something. Some perks effectively change a ship's characteristics. Wonder if I can use that to my advantage... Maybe the ships could be improved by the same system that changes character's skills... On the other hand, maybe I'm <i>completely</i> wrong. <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->

The perks modify the behaviour of ships because, in the code to update the situations (ShipUpdateParameters or something like that) you have code to check those characteristics... they are linked to the player, and not to the ship (i.e you board a ship, swap it, and "voila" the new ships share the perks of the old)

Back at home I'll check the code and will try to find places where we could insert code to do that.


Kblack
 
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> there, mate.

If you get the chance check out the Russian SLiB mod. It's got a customise ship feature.

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->
QUOTE(Thomas the Terror @ Mar 8 2006, 02:27 AM)

I very like the idea of "tuning"your ship, so you don`t have a ship that every one else has, so you can increase hitpoints ship to ad copper on it. or faster, or or what a dream!!



Absolutely.

This is a feature in the SLiB Mod. There is a French shipyard (same as FdF) where, for a price, you can customise gun calibre, speed, manoeuvrability, cargo hold and crew capacity. The price is usually very high and you also have to provide the shipwright with certain materials for the upgrades.

An excellent feature, although I'm sure there is a fair amount of coding involved and, as the SLiB coding is hidden in their dll files, not easy to replicate for the Build. Maybe some of our regular modders like CCC, Maximus, KK, Screwface or Captain Hawk might have an idea. I know Alan Smithee plays the SLiB Mod a bit... any thoughts?

Cheers
<!--QuoteEnd--></div><!--QuoteEEnd-->

Cheers <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Some time ago I've got idea about adding new option for shipwrights to change look of the ship. For example, if one captures 'Mefisto' which has good sailing properties but looks ugly, it enables changing look of the hull to one from other frigate designs, however, without changing any parameters of the ship.

The idea of rebuilding and customizing ships is great, and I would want to create such mod, but lets we publish Build 13 first. I can promise that I won't forget about it and take care for this.

pirate_kk
 
Ship's data is on these structs, you get them with these calls:

ref chref = GetCharacter(chrIdx); (any character)
ref mchref = GetMainCharacter(); (player's data)

You can trace these structs with the DumpAttributes(aref attr_root) function

Some info from struct mchref:

Companion ships
<blockquote><i>shipslot1 =
type = 1000
name = NoName
shipslot2 =
type = 1000
name = NoName
shipslot3 =
type = 1000
name = NoName
</i></blockquote>


Berthed ships
<blockquote><i>port4 =
slot1 =
status = 2
shipname = Monique
shiptype = 70
captainindex = 416
daysinberth = 332
dailycost = 3
nowdue = 996
crewnowdue = 10978
stats =
nation = 3
maxcaliber = 12
weight = 3735
capacity = 945
maxcrew = 121
mincrew = 24
speedrate = 15.4880810
turnrate = 49.8040581
price = 36564
hp = 1451
</i></blockquote>

Player's ship data
<blockquote><i>ship =
type = Corvette5_44
idx = 60
name = Aphrodite
</i>
.....
<i> hp = 3569.8544922
sp = 100.0000000
ang =
y = -5.99457
x = 0.0696922
z = -0.0690579
impulse =
rotate =
x = 0.0000000
y = 0.0000000
z = 0.0000000
speed =
x = 0.0000000
y = 0.0000000
z = 0.0000000
lastballcharacter = -1
speed =
z = 11.6863
y = 0
x = 0</i>
......
<i> stats =
nation = 0
weight = 11628
capacity = 1653
maxcrew = 178
mincrew = 45
speedrate = 15.9818697
turnrate = 38.5716667
price = 118422
hp = 3928</i>


</blockquote>

About where to code the EFFECT of those mods, it will depend of with mods and side effects you're gonna to set. But, these pieces of code seem interesting:

In AIShip.c you have Ship_UpdateParameters that controls the sailing behaviour

<blockquote><i> // EVENT, calculate dynamic parameters for ship, one per second
void Ship_UpdateParameters()
{
......
arCharShip.MaxSpeedZ = fMaxSpeedZ * RS_CalcSpeedScalar(fClosestPoint, fBestPoint, rigtype, fOffWind, fWindPower) * fK * fSpeedPerk; // 04-09-19 now a function
<b>arCharShip.speedmult</b> = fMaxSpeedZ * fK * fSpeedPerk * GetSailPercent(rCharacter) / 100.0; // NK 04-09-21
.......
<b>arCharShip.MaxSpeedY</b> = fTRResult * fMaxSpeedY * fTurnPerk * fFastTurn180;

</i></blockquote>


In Ship.c, this one is where you set national characteristics, and a certain amount of randomness between ships

<blockquote>/<i>/ NK PRS3 -->
void SetRandomStatsToShip(aref chrship, int idx, int nat)
{
</i></blockquote>


In Ship_init.c you have the National Characteristics

<blockquote><i>//English
shipstatsmult.n0.MaxCaliber = 1.00;
shipstatsmult.n0.Weight = 1.00;
shipstatsmult.n0.Capacity = 0.9;
shipstatsmult.n0.MaxCrew = 0.95;
shipstatsmult.n0.MinCrew = 1.05;
shipstatsmult.n0.SpeedRate = 1.05;
shipstatsmult.n0.TurnRate = 1.05;
shipstatsmult.n0.Price = 1.00;
shipstatsmult.n0.HP = 1.00;

//French
shipstatsmult.n1.MaxCaliber = 1.00;
shipstatsmult.n1.Weight = 1.00;</i></blockquote>


Hope it helps.

Kblack

BTW Nathan, feel free to correct me... after all, most of it is your code <img src="style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" />
 
Which things to modify?

My proposals:

- Copper plates
More speed, less inertia, more turning speed
<blockquote>(Comment: In fact, copper plates should decrease the amount of seawood (¿?) adhered to the hull, but we can't right now to model this effect)
(Comment: In the era there wasn't metal armor above waterline. And the copper plates were not armor)</blockquote>

- bronze cannons
<blockquote>Better accuracy and less time to reload ?, cannons more expensive, more prone to break, less weight
(Comment: Bronze cannons weight much more less that the iron ones. OTOH they were less durable, and they cost much more - and you'll have to compete against the army.
So, less weight means
- less people to handle them
- it's easier to elevate or to aim
- it's easier to bring it back and forth when reloading
)</blockquote>


- longer and better top-masts (not sure about the word, I mean the mast over the mast, where the topsails, topgallant and royal sails are)
More speed, less acceleration inertia, more prone to sailing damage/breaks


- New sails - high quality sails
More speed, more sail hp. sails less prone to damage /breaks in high winds

- New /high quality ropes, lines and cables
Less prone to sail damage in high winds, more turning ability ¿? , less inertia ¿?
<blockquote>(Comment: These means ropes with less knots, ropes well grased, so easier to handle, less accidents when a rope breaks or slips...)
</blockquote>


- Good quality gunpowder
Better accuracy
<blockquote>(Comment: More than good quality, I wanted to mean "homogenous quality". If the same amount of powder has a similar power, then you can correct the aim between shots easily. Also, the guns will fire with a more homogeneous power... not sure if i have managed to explain myself)
</blockquote>


- Staysails
Better turning ability. Smaller wind angles but only with minimal sails
<blockquote>(Comment: Staysails IIRC appeared in mid 1700. With them, you get better behavior at small wind angles. This means also that, in turning - specially against the wind - you can keep better the impulse, so ending sooner the manouvre)
</blockquote>

- Chains for the yards
Much more sail HP. Less possibility of critical damage in rigging. Less speed¿?
<blockquote>(Comment: The warships used chains before combat to fix the yards and avoid that a shot will drop the yard and the sail. OTOH, this will mean that was harder to move the yard to better catch the wind)
</blockquote>


- Reinforced frames and beams:
More HP, more calibers. More weight, more inertia
<blockquote>(Comment: the gun calibers in a ship were limited, not only by the weight, but also by the recoil stress on the ship's structure. Reinforced frames and beams - or the connection between them, "knees" maybe¿? - will support more stress, thus allowing better, bigger and longer guns)
</blockquote>

Just my 0.02 € <img src="style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" />
 
<!--quoteo(post=144121:date=Mar 31 2006, 01:01 PM:name=Lord Nelson)--><div class='quotetop'>QUOTE(Lord Nelson @ Mar 31 2006, 01:01 PM) [snapback]144121[/snapback]</div><div class='quotemain'><!--quotec-->
i posted this in another topic, but only just noticed that a topic was made especially for it, so:
i have an idea about how to get this mod to work; Why not try to clone the code that makes cannons selectable, and jst switch it with copper, IE 4 inch copper plating: slows down ship by 5 %, increases ships HP by 10 %...
and change the options so that it reads: no copper plating [stock], 4 inch copper plating [6th-1st rates], 8 inch copper plating[5th-1st rates], 12 inch copper plating[4th-1st rates], 14 inch copper plating[3rd-1st rates], 16 inch copper plating [also 3rd-1st rates], 18 inch only appliable to frigates and first rates [battleships, MOWs], 20 inch copper plating [only appliable to first rates with good speed stats, because it would slow down the ship quite alot, lets say 40 % and boosts its HP by about 50 % .
as for other modifications, why not make an option to inlarge the rudder, in feet, lets say [no rudder enlargement= stock, 6 feet rudder enlargement= 10 % manouverability increase.....]
and for speed, enlarge sails...
then again, we could just use that percentage thing from the repair screen, but i think the first one would make it more enjoyable.
what does everyone think of these ideas?
P.S: Kaz, you said that you made a few ships for POTC, could you show them to us?
even if its not in game, we would like to have look
<!--QuoteEnd--></div><!--QuoteEEnd-->
now, kblack's answer was much better in terms of the names and options, but what about implementing?
has anyone thought about my idea?
 
<!--quoteo(post=144178:date=Mar 31 2006, 07:43 PM:name=Lord Nelson)--><div class='quotetop'>QUOTE(Lord Nelson @ Mar 31 2006, 07:43 PM) [snapback]144178[/snapback]</div><div class='quotemain'><!--quotec-->
.....
now, kblack's answer was much better in terms of the names and options, but what about implementing?
has anyone thought about my idea?
<!--QuoteEnd--></div><!--QuoteEEnd-->

well, thats depend in which options and its effects

lets say cooper plates:

if(CheckAttribut(mchref.ship.stats.cplates) && mchref.ship.stats.cplates) {
arCharShip.MaxSpeedZ= arCharShip.MaxSpeedZ*1.10;
arCharShip.MaxSpeedY= arCharShip.MaxSpeedY*1.10;
}

ale-hop! We have a ship with a 10% speed and turning ability improvement

But:

- First we have to check if its possible to add attributes to mchref, and make them pervasive
- Then, we have to decide the modifications and its effects. And to consider if the AI ships can be also modified
- Third, We have to decide how and where to store the modifications
- Then, we will start to code, one people the interface section, others the ship modification code, others the behavior code,...

In the meantime, I will investigate the code to start imagining (¿?) mechanisms and functions to code several "would be" modifications.

Kblack
 
All you guys talk about is great wit copper stuff and things like that, but thats just ship upgrades. Granted, enabling them s we could upgrade the ship other than just the cannons would be great, but I dont think this mod is ment to do that, but rather allow you to 'twek' your ship - just like performance tuning in racing games (hope I got it right :p ).

Now, how about making another sklider screen (like the 'Sounds' options menu) and have:

<b>Speed:</b>
Speed <---------|-------> Freight Size
Maneouvrebility <----------|-----------> Cannon number

<b>Freight Size:</b>
Cargo <-----------|----------> Crew

<b>Cannons:</b>
Accuracy <----------|-----------> Power


Or somehtign along those lines.
 
but then you would be limited by those options, rather than being able to precisely set what you would want in your ship.
various buttons on one interface screen linking the modifications together [like the sail integrity-hull integrity-skills-crew-cannon buttons over your ship condition screen], and have the modifications themselves in the form of percentages.
like for example, copper plating : 20 % [what happens to other attributes in a box next to it]
copper plating-----cargo capacity-----sails
copper plating: [20%]
[-----------------------------------------]
[speed: +5 % manouverability: +5 %]
[hull strength: +10% .....................]
[-----------------------------------------]

that was an example of what i had in mind
 
<!--quoteo(post=144182:date=Mar 31 2006, 08:29 PM:name=kblack)--><div class='quotetop'>QUOTE(kblack @ Mar 31 2006, 08:29 PM) [snapback]144182[/snapback]</div><div class='quotemain'><!--quotec-->
- First we have to check if its possible to add attributes to mchref, and make them pervasive
<!--QuoteEnd--></div><!--QuoteEEnd-->

Adding attributes is possible, of course. But recently, problems with those attributes occured. Often program seems to "forget" their values and error.log file is full of errors about "missing attributes". When I wanted to create attribute for PChar which was to remember boarding model, I've observed such errors although a couple of lines above, in the same function, during the same execution, I LogIt()-ed their values and they were correct.

What's worse, this doesn't happen only to PChar. Sometimes, after battles, I find those errors referring to ships parameters. Its presence is totally random: when I find it, I remove error.log file. After couple of other battles (or even on next one), when I enter 3D sailing mode, error.log appears again with "missed attribute" errors. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />

pirate_kk
 
Me -------> <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />

Yep, I'm pretty much just grinning like an idiot at all this. Picture me just nodding with a blank look going, "uh-huh, uh-huh, uh-huh". lol. You guys are <i>light years</i> ahead of me on all this stuff. I've been busy just trying to refamiliarize myself with coding in C. Up til now I've just been copying and pasting code, changing a few values, and tossing in a line of script here and there. What really complicates Akella's code for me is the fact that very little is commented, so everything has to be painstakingly tracked down.

Obviously, one of you will no doubt come up with a workable product long before me, and I'm more than willing to 'leave it to the experts' as it goes, but I'm going to keep plodding along at the speed of mud til I figure all of this out anyway. If nothing else it will serve as a good learning experience for me.

I'm happy to have stirred up the pot and had a hand in getting the ball rolling on this idea again. I'll help out in whatever (admittedly small) ways I can. In the meantime I'll keep learning how this game ticks, because to me that's half the fun of it.

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->The perks modify the behaviour of ships because, in the code to update the situations (ShipUpdateParameters or something like that) you have code to check those characteristics... they are linked to the player, and not to the ship (i.e you board a ship, swap it, and "voila" the new ships share the perks of the old)<!--QuoteEnd--></div><!--QuoteEEnd-->

This makes sense. I hadn't thought about that. Obviously this way won't work.


<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--> All you guys talk about is great wit copper stuff and things like that, but thats just ship upgrades. Granted, enabling them s we could upgrade the ship other than just the cannons would be great, but I dont think this mod is ment to do that, but rather allow you to 'twek' your ship - just like performance tuning in racing games (hope I got it right :p ). <!--QuoteEnd--></div><!--QuoteEEnd-->

Yes, this <i>is</i> what I was shooting for. Only not so much a slider idea (this would make everything balance out at an equal rate, one for one) as actually choosing (via button) specific "mods" which would increase one thing (or more than one thing) while decreasing another (or more than one other thing), to preserve game balance. For example:

Fortify Ship Superstructure: This mod would increase the Hull (hp) of the ship, but as a result of the thicker planking, additional bulkheads, etc. it would add to the ship's weight, making it more sluggish. The actual effects being similar to what kblack suggested. Say +20% to the Hp of the ship but -15% to the ship's max speed.
(Although technically this would be incorrect, because the max speed irl is affected only (mainly) by lwl or length at waterline, sail area, and the rigging or sailplan of the vessel, as well as of course the total wetted area, displacement, and hull shape. Weight really has no bearing on max speed, just turning and acceleration. In other words, the ship could still go (theoretically) the same top speed, but would take longer to get there, suggesting what would actually be affected would be the ship's susceptability to the laws of inertia. But I as yet have no idea how the physics engine works, so to simplify it we could just reduce the max speed. Wow that was a mouthful. Class dismissed, everybody can wake up now. <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> )

By the way, I really like the idea of a few straight-up upgrades, but they would have to be super expensive to make up for the lack of drawbacks.

Overall though, I just would like to see the end product as a simple "click <i>this</i> to get <i>that</i>". We don't want to bog down the gameplay unnecessarily, do we?

Anyway, it's all moot until we (by <i>we</i> I mean someone better at this than me *cough*kblack*cough* <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> ) can get past this issue:

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--> - First we have to check if its possible to add attributes to mchref, and make them pervasive <!--QuoteEnd--></div><!--QuoteEEnd-->

So let's not get too far ahead of ourselves. We can work out the details later.

Overall, as I've so subtly hinted <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> , I think kblack is all over this mod like white on rice, so I'll politely bow out and just concentrate on what I'm good at.

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--> P.S: Kaz, you said that you made a few ships for POTC, could you show them to us?
even if its not in game, we would like to have look <!--QuoteEnd--></div><!--QuoteEEnd-->


Not exactly. What I actually said was:

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--> I have a pretty extensive collection of ships I've created in .obj and .3ds format already <i>but none of them were designed with PotC in mind</i> and they'll no doubt require extensive modification to work with the available animations and such. <!--QuoteEnd--></div><!--QuoteEEnd-->

Italics added for emphasis. But sure, I'll dig up some of the stuff I've made, toss it on a subdomain of my website, and post a link. I've modeled all kinds of stuff, not just ships, it's a hobby of mine. Actually, most of my ship models are more modern in design than the PotC timeframe. However, if anyone wants me to make a specific type of ship and has a blueprint available, I'd be happy to whip up a model. I still need to get some tools that will allow me to export to a file extension recognized by PotC though, and someone else will probably have to add all the code for the ship... Because as I've said, I'm still way behind probably 90% of the people that post in this forum.

I'll need to find some good textures too. And does anyone have an average poly count for the ships in the game? Can I use polys with more than three sides? These are all things I'll have to know. Actually, there's even more than that, but one thing at a time.

But making the model? I can do that in a night or two, provided my irl work doesn't drag out too long.

Anyway, I'm getting off topic... <i>Again.</i> And if I spend all my time in the forum I'll never get <i>anything</i> accomplished, so time for me to go.

Thanks for sitting through my prattling. <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> Long live the 'modify ship' mod!

-James-

Edit: Stupid quote thingy... The quotes were by: kblack, Galliente, kblack, Lord Nelson, and me, repectively. Sorry, I'm a bit tired right now. <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
Bloody hell. It's gonna take me a while to get some material dug up and posted, so I'll probably do that tomorrow. I really want to dig into this coding some more tonight. In the meantime, just to show that I'm not just running my mouth about my ability to model, here's a link to some eyecandy I call "The Palace Cyclos Project" on my website:

<a href="http://www.kazplanet.com/palacecyclos.html" target="_blank">http://www.kazplanet.com/palacecyclos.html</a>

There's no ships in there but there is a lot of water and pretty architecture. Enjoy!

-James-
 
<!--quoteo(post=144216:date=Apr 1 2006, 01:28 AM:name=Where the f*ck is my eye?!)--><div class='quotetop'>QUOTE(Where the f*ck is my eye?! @ Apr 1 2006, 01:28 AM) [snapback]144216[/snapback]</div><div class='quotemain'><!--quotec-->
.....
You guys are <i>light years</i> ahead of me on all this stuff. I've been busy just trying to refamiliarize myself with coding in C.
....
<!--QuoteEnd--></div><!--QuoteEEnd-->


Well, IMHO Akella is not so hard... it's more a matter of time spending perusing the code... so, plz, keep trying.... we need more coders

I suggest this topic
<a href="http://forum.piratesahoy.net/index.php?showtopic=318" target="_blank">http://forum.piratesahoy.net/index.php?showtopic=318</a>

mainly now that Nathans Kell and others are posting again



<!--quoteo(post=144216:date=Apr 1 2006, 01:28 AM:name=Where the f*ck is my eye?!)--><div class='quotetop'>QUOTE(Where the f*ck is my eye?! @ Apr 1 2006, 01:28 AM) [snapback]144216[/snapback]</div><div class='quotemain'><!--quotec-->
....
Overall, as I've so subtly hinted <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> , I think kblack is all over this mod like white on rice, so I'll politely bow out and just concentrate on what I'm good at.
<!--QuoteEnd--></div><!--QuoteEEnd-->


Well, thanks. But, there is a BIG problem: I've no idea about interfaces and textures and...

so I can code the behaviours and effects, but I need help for the interfaces part.


In addition, I would prefer that the community will decide which features to code... I could decide them by myself, but that's not the idea... I don't want MY mod, I want something that a lot of people wants to play.
 
If you need help with interfaces, Maximus is the person to ask. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
Well, since I got a message (from kblack) to help decide what to code for changes, I'll say what I know from history and game balance. (By the way, I appreciate the confidence in my expertise, but most of what I have said so far was really just paraphrasing things that were said earlier, or putting ideas together from different sources.)

History:

Brass hull plate was used, some at least, to reduce leakage from hits below the waterline. Brass would bend rather than splintering, and so even if the brass dented and the boards on the other side turned to toothpicks, no water would run in. Of course, it took a lot of brass to stop a cannonball, even with two feet of oak on the other side, so it was a killer on max weight - i.e. cargo capacity, and possibly performance. (I say possibly - it was just a question of weight. The ship performed the same with two tons of brass hull plate or two tons of cargo. That's just physics.) Iron plate could not be used, for reasons of saltwater - salt-resistant alloys and/or paints just did not exist yet. A few brigs, and a few frigates/corvettes used such plates in historical military operations. Their effectiveness was the subject of much debate.

Pirates removed bulkheads from trade ships to increase space for cannon (specifically space for gun crews to work). British warships removed the bulkheads when the went to battle stations - theirs could be removed with a hammer in under a minute. However, the British replaced the bulkheads after battle, to stop cannonballs from rolling around if the sea got rough. I don't think we can do anything specifically with that.

Pirates often added cannons or swivel guns in general - usually by scattering them all over the top deck. Professional navy sailors tried not to do this. Generally, the weight of weapons reduced range or performance of the ship in the long run (which was critical if you have to sail from England with a full load of food and ammo). Unless you also increased the gun crews, it also was bad for reload time. However, pirates thought it was a cool trick - they would turn a ship that normally had 6-12 guns into a 14-16 gun ship. Thing would barely float, but that first broadside made most people think they had jumped on a frigate instead of a sloop. (Historical note - the ships on this game are already a bit over-gunned. Most caravels didn't have more than 8 guns.) There's some good material on the PA history section, labeled "true view of a pirate ship and crew", that mentions some of this - don't know who wrote that article, but it was pretty good.

When I say most ships on this game are overgunned - consider: USS Constitution was, I guess, the toughest thing ever built when it was comissioned in 1797. (That's a good deal more advanced than the period we are working with.) It had a crew of 450. It carried 32 long guns (24 pounder) and 20 carronades (32 pound) on the sides, plus two 24 pound bow chasers (extra-long guns, for extreme range). With those armaments, it ATE British frigates for breakfast in the War of 1812. For more than 50 years, there was nothing in the sea that could match guns with it (until the ironclads and breech-loading guns appeared), and that's only a TOTAL of 54 guns.

Speaking of gun types, if somebody wants to get ambitious: Plot every gun on the ship, its type and weight. Allow multiple sizes and types of guns. Figure out a way to fire some of them instead of all at once. That would add history, and make for thousands of possible ship combinations. Who knows, we might even be able to add swivel guns and small arms to the ship duels eventually.

Anyway, as for things we can modify besides trading cannons and hull plate for cargo space:

Some pirate ships tried adding an extra mast. For technical reasons, this usually did not help - the original shipbuilders knew more about fluid dynamics of airflow over sails than the pirates did.

You can't really do much with the rudder or sails. The original designs were about optimized already. Increased rudder size would not change much, or they would have already done it. Shipbuilders were, after all, competing for some very profitable contracts.

We should be able to trade crew/extra people for cargo space, but it should not require modifying the ship. Hammocks can be strung as easily as barrels can be tied down. Tragic, I know, but crew bunkrooms and cargo storage were generally identical, and often one had to share space with the other. (Actually, hammocks and cargo nets were often the same nets.) However, crew more than the maximum should be used as reserve - they don't really count for anything until the original number goes down. (That would also allow ships to transport colonists, if we ever get the new base mods working, or marines if we can change ground combat to allow for that.)

We need a fishing mod. Everybody has thought of this at some time or another. It can be a ship modification, or a perk, or both. Both whale harpoon and net fishing were business of the time, and at very least, could be used to replace food supplies. A command that uses 12 hours and produces a somewhat random ammount of fish. Again, to make that useful, we also need the earlier discussed mod of making more things edible, plus the addition of fish as a trade good. That would be an alternative to packing huge loads of food, if you have time to stop and drop some nets. I mean, after all, what is the most logical business for a small ship? Fishing boat, right?

Reinforced walls around the cannon were an option. However, usually this was done with sandbags. This was only done if the ship was running light, and if so, the sandbags replaced ballast stones. It did not require a shipyard. This is the sort of thing that the "defense" skill was made to represent.

Aside from armor plate, hulls could not really be re-designed. If you wanted a different hull, that was a different kind of ship.

If we could add small boats - rowboats that could be used to board enemy craft or set off explosives - then adding small boats or the capability to store them would be an issue. However, right now the landing boat is a given, and there is no tactical use of small craft, so the point is on hold.

Give me a little time, and I'll see if I can think of anything else.
Ron
 
I have to agree with Ron here, if there were things that would help with no disadvantages, they would have already done it. What's the cost of an extra mast as opposed to building a new ship on which to use it?

Also, there is one other important issue, abilites that are effected by changes need to be locked - i.e. more firepower would decrease speed and not just cargo space. Otherwise people would just kill cargo space to get superbly heavily armed and fast gunships. Thus, some facts must be defined

As, for example
"Gunpower decreases speed (or maneouvrability)"
This is just meant to restrain people from making ships 'godlike' and there should be a set of rules like that that would be un-alterable by the player.
 
I want to make a working proposal of tunable and modifiable ship characteristics.

My sources are, all of them, secondary sources (i.e. not original reports from that time). Mainly are the Patrick O'Brian series, and two spanish books: "Cabo Trafalgar" from Arturo Perez-Reverte, and "La caceria" from Alejandro Paternain

They availability will be in a shipyard, and will depend on town size and, maybe, level, reputation, relations...

<b>- Modifiable characteristics:</b>
They are "add-ons": You buy them, and install them. After that, you can remove them and return to the original state
When you install them, you'll get a random amount of change of the ships characteristics (i.e: You install copper plates, the max amount of improvement in speed is a 5%. You get an improvement of 4%. If you remove later the copper plates, you'll lose that 4% - not a 5%)

- Copper plates
<blockquote>Speed - +5%
Turning- +2%
Inertia - -5%
(this is gonna to be pretty expensive in time, materials and money - because: it wasn't common, bronze was very needed for army guns, needs a drydock)</blockquote>

- Bronze cannons
<blockquote>Accuracy - +5%
Reload time - -5%
Probability to lost a cannon when hit - +10%
Weight - 2/3 of original cannons weight (fixed)
Very expensive</blockquote>

- Good quality chasers
<blockquote>Accuracy + 10%
Range +10%
Probabiliy of sails critical hit (on target)- + 10%
Only when firing from bow or stern
Rather expensive
Not know if it will be possible</blockquote>

- New sails - high quality sails
<blockquote>Speed + 5%
Sail hp + 5%
Probability of sail critical hit (on your ship) - -5%</blockquote>

- New /high quality ropes, lines and cables
<blockquote>Sail hp +5%
Acceleration inertia -10% (modelling quicker sail handling)</blockquote>

- long top-masts
<blockquote>Speed +5%
Acceleration inertia -10%
Probability of sails critical hit - +10%</blockquote>

- Staysails
<blockquote>Turning +5%
Closest wind attitude -5% (only with battle sails)
Very very rare chance of availability</blockquote>

- Reinforced frames and beams
<blockquote>Hull HP +10%
Caliber guns - Up one category
Inertia +10%</blockquote>


<b>- Tuneable characteristics</b>
This ones are to try to change the ship's behavior. Some of them are random, and trying to get back can't guarantee the original state
<i>Example: Touch the sails to get better speed - this means as collateral effects that the wind angle will downgrade, and the turning ability may downgrade, or, witha small probability and amount, improve.
There are a maximum amount of change on this chars, lets imagine +10/-10 %
You try and get a +3 in speed, a -2 in turn, and a tremendous -10 in angle ....Glups, bad! So try to get back... and you end with a -1, 0, 0 end result.
Of course, this mechanism has to be balanced and made dependent on certain abilities/perks</i>

- Crew/load
<blockquote>More crew - less load / More load - less crew
Fixed amount of change - lets say 1 ton per 10 crew ¿?</blockquote>

- Overload /overcrowd
<blockquote>More load, or more crew - less speed, less turning, less HP, more inertia
Maximum more load or crew +5%
Speed -5%
Turning -10%
HP - -5%
Inertia + 10%</blockquote>

-Overgunned
<blockquote>Increase 1 category the guns caliber
Hull HP -5%
Caliber guns - Up one category
Inertia +10%</blockquote>

- Tweaking sails
<blockquote>you can tweak to get either speed, turn, or wind angles
Wind angle - more means less speed, less means more speed
Turn - more mean less speed usually , can mean more speed. Less turn will mean the opposite
Speed - more mean less turn and wind angles, can mean more. Less will mean the opposite
<i>(Reasoning: There is a lot of thing you can do in a sailing ship trimming the sails... you can incline forward or backwards a mast; you can increase the sails in the mizzen mast, thus gaining turning, but then you can't use those sails with long winds (from near the stern) because will made turn the ship; you can increase the sails in the fore mast, and the jibs, thus incresing the speed with long winds, but maybe risking to decrease turning ability)</i></blockquote>

- Tweaking load and ballast
<blockquote><i>You can move the load and ballast to get a better "sit" of the hull on the water. This can mean less cargo. also, you can try to load more uniformely, thus gaining load storage, but maybe the balance will not be the optimum.
An optimun balance can mean a better "sit" (waterline) gaining speed, or less likely, turning</i></blockquote>

<blockquote>Speed - can mean less load
Turning - can mean less load.</blockquote>

<blockquote>You can't try to decrease speed to get more load space than listed in the ship characteristics.</blockquote>


Well, this is my proposal.
I'm checking the feasibility of these ideas and already designing the mechanism of some of them.

Waiting for comments (and collaborators)

Kblack
 
Back
Top