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

Importing models into the TOOL

Kazeite

Privateer
Storm Modder
Um, hello there, everyone, and congratulations on making such terrific tools and mods for POTC.

I have a problem. You see, I've decided to make me a new, shiny personal ship. I used my trusty 3DsMax 8 to model it and made it into two pieces: hull, using custom texture, and deck using stock deck texture (just like stock models are).

After I scaled it to the best of my knowledge (and figuring that I can always go back and rescale it if necessary), I've exported my ship to VRML format.

However, after opening it in the TOOL something was wrong. For starters, entire ship was off-center, and hull was not lined correctly with the deck.
[attachmentid=605]
What's more, I couldn't control the scale of my ship - after realizing it was way too big (by applying locators from other ship and watching them in GM Viewer), I've resized it to 50% of previous size - however there was no noticeable difference between the scale of the this smaller model and previous one.

So... I'm stumped. What am I doing wrong?
 
I do believe I know what I was doin' wrong now: I was trying to import VRML file exported by 3DsMax8. <img src="style_emoticons/<#EMO_DIR#>/icon_sad.gif" style="vertical-align:middle" emoid=":sad" border="0" alt="icon_sad.gif" />

Unfortunately, TOOL seems to be unable to properly read said file. So, I had to use yet another program to read said VRML file and re-save it. This time TOOL managed to read it, and so I was able to get my ship into the game.

So, here it is: <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

[attachmentid=609]

Now I've "only" have to give her correct ropes, sails, flags, and ratlines <img src="style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" />
 
WOW
IT IS THE PEARL!!!!!!!! this rocks, and in so short period!

this is beautifull, the only thing i can do is skinning (see my photobucket)
 
<img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />

Good eye, <b>Thomas</b> <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

"short period"? Why do I get the feeling you guys are confusing me with someone else? <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> (although, now that I see the date my reference folder was created, it took me 16 days)

(By the way, is it possible to change ones display name? It seems that registration form proved to be superior to my intellect and thus I filled it not quite how I wanted... <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />)
 
You can`t change your name, but it was a short period <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> . You can change your name under your avatar in your controls

did you use the lineship or the frigate as base ship?
 
The hull itself (just like most of the ship) was built from scratch. Only the keel and part of hull below waterline was taken from the stock <i>Black Pearl</i> (which is a lineship <img src="style_emoticons/<#EMO_DIR#>/smile2.gif" style="vertical-align:middle" emoid=":))" border="0" alt="smile2.gif" />
 
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> there and welcome aboard, matey.

Excellent work there, mate. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" /> She does indeed look like "The Pearl", and I think there will be many here who would like to be sailing her. <img src="style_emoticons/<#EMO_DIR#>/sailr.gif" style="vertical-align:middle" emoid=":sail" border="0" alt="sailr.gif" /> Will you be putting the finished product on the ftp soon? <img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" /> Got any more ships planned?

Cheers <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->wow, you know how to 3d max, and how did you add the texture?<!--QuoteEnd--></div><!--QuoteEEnd-->
I do believe that TOOL automatically binds ship to the texture of the same name <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> But in 3Dsmax... well, you just add the texture map, and apply it to the model. I'm sorry for such cryptic answer, but I just don't quite understand your question <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> there and welcome aboard, matey.<!--QuoteEnd--></div><!--QuoteEEnd-->
Thanks <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Will you be putting the finished product on the ftp soon? <img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
Hell yeah!... As soon as I add missing stuff, that is.

As of right now, my <i>Pearl</i> uses Super Frigate files (since I wanted to see her in game as fast as possible, and since it's the closest match in size and sail layout). But ideally, I'd like her to have own slot, or, better yet, replace stock <i>Pearl</i>. I just have to figure how to do it...

At this point, I've managed to line all masts, ropes and ratlines correctly, as you can see here:
[attachmentid=610] (incidentally, I think I've figured out what "camera" locator is responsible for <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />)

But first, I believe I should go back two steps and add chase guns: the "real" <i>Black Pearl</i> has only 32 guns, and no chase guns whatsoever. But since every POTC ship has them...

Bow chasers I could put on forecastle, to spare me the troubles of modelling extra holes in the hull (besides, it's no like there is any place for them), there's also place for stern chasers, but only two of them - I've tried and four guns are just placed too close to each other.

The next task would be making path model and walk file.

And last, but not least, would be deleting unecessary sails, and adding missing ones, together with some extra ropes and ratlines.

Therefore, I have some questions:

Is ships waterline hardcoded into the model? In other words, is there a way to manipulate it, say, in TOOL?

If I move mast locators in main model file, do I have to reposition locators in <i>mast</i> and <i>rey</i> files?

Does the game treats all individual models (ship+masts+yards) as a whole when drawing lines and sails? In other words, can I have, say, line starting in one file (ropebXX) and ending in another (ropeeXX)? I'm guessing yes, since this is what I've observed with ratlines, but I'd like to be sure.

Can I simply remove or replace gun locators with rope or ratline locators? Do I have to change other files when changing number of guns?

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Got any more ships planned?<!--QuoteEnd--></div><!--QuoteEEnd-->
... Maybe <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />
 
WOW! This is excellent! People have been having serious difficulty getting their ships again, so I'm really impressed with how fast you managed to get her ingame! <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />

I have been using the TOOL with 3DS MAX as well last week. I noticed that importing the VRML file works much better if you merge all submodels together in 3DS MAX.

Please make this ship available to all of us once you've got her done. That is one ship we all want to see in our game! <img src="style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" />

About your display name on the forum: Forum members can't change them theirselves. However, moderators can. So I can change it for you: Just tell me what name you'd like instead. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />

If you need any help with anything, just say so and we'll try to help. I do have knowledge of modeling, but I never did try to get a ship into PotC, so I don't know too much about the locators.

<!--quoteo(post=159784:date=Aug 27 2006, 08:34 PM:name=aspiring modeler)--><div class='quotetop'>QUOTE(aspiring modeler @ Aug 27 2006, 08:34 PM) [snapback]159784[/snapback]</div><div class='quotemain'><!--quotec-->
Does the game treats all individual models (ship+masts+yards) as a whole when drawing lines and sails? In other words, can I have, say, line starting in one file (ropebXX) and ending in another (ropeeXX)? I'm guessing yes, since this is what I've observed with ratlines, but I'd like to be sure.
<!--QuoteEnd--></div><!--QuoteEEnd-->
I think it does, yes. For more info about locators and rigging, ask Captain Hawk.
 
Ooookay...

I went back to basics and added chase guns, change rope railings to shave some vertices and then exported again, saved as .gm... and POTC refused to load my ship. Sure, I could see her silhuette at the port (you know, when you're standing at the pier, next to the boat), but any attempt to board her was ending in game crash. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />

After emitting Vaderesque <i>"Nooooooooooo!"</i> I went back to basics again, messed with the model a little, and this time, thankfully it worked. The model is missing anchors, though, but I'm not sure the're worth the effort...

Anyway, I've relocated locators, removed unecessary sails, added necessary ones plus some ropes and ratlines... however, when I tried to import custom path, I've failed.

I definitely need your help on this one - how do I have to set up path file for POTC?

(And, for the next step, which walk file precisely Super Frigate uses)

(And for some eyecandy, here's how <i>Black Pearl</i> looks right now <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> In case you haven't noticed, I've also gave her custom patched sails <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> )
[attachmentid=611]
 
Aye mate,very nice indeed, <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" /> <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Bloody marvelous! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" /> Keep up the great work. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

Cheers <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
<!--quoteo(post=159872:date=Aug 29 2006, 12:21 AM:name=aspiring modeler)--><div class='quotetop'>QUOTE(aspiring modeler @ Aug 29 2006, 12:21 AM) [snapback]159872[/snapback]</div><div class='quotemain'><!--quotec-->
After emitting Vaderesque <i>"Nooooooooooo!"</i> I went back to basics again
<!--QuoteEnd--></div><!--QuoteEEnd-->
LOL! <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

<!--quoteo(post=159872:date=Aug 29 2006, 12:21 AM:name=aspiring modeler)--><div class='quotetop'>QUOTE(aspiring modeler @ Aug 29 2006, 12:21 AM) [snapback]159872[/snapback]</div><div class='quotemain'><!--quotec-->
I definitely need your help on this one - how do I have to set up path file for POTC?
<!--QuoteEnd--></div><!--QuoteEEnd-->
What exactly do you mean with a "path file"? Do you mean the texture path? If so: All the textures for the ships are in RESOURCE\Textures\Ships. I don't think it's possible to put the textures in any subfolders.
If you mean the walk file that defines where the crew or the player can walk: That is quite difficult. We keep having difficulty with that. There have been very few people who managed to make them. Only Inzane for the HMS Surprise and Captain Augast for his Bermuda Sloops, I think. There is a tool and tutorial for making walk files <a href="http://robotsdontbleed.com/wacko/wakka.php?wakka=UnderstandingAndMakingShipWalkFiles&v=6b6" target="_blank">here</a>, but I don't know how to use it.

<!--quoteo(post=159872:date=Aug 29 2006, 12:21 AM:name=aspiring modeler)--><div class='quotetop'>QUOTE(aspiring modeler @ Aug 29 2006, 12:21 AM) [snapback]159872[/snapback]</div><div class='quotemain'><!--quotec-->
And, for the next step, which walk file precisely Super Frigate uses
<!--QuoteEnd--></div><!--QuoteEEnd-->
I think the Super Frigate uses the normal frigate's walk file. That is the Frigate_walk.c file, I think. Not entirely sure though. See what happens if you remove the Frigate_walk code from PROGRAM\SEA_AI\shipWalk.c . If the Super Frigate then has no crew on deck anymore, it is the right file. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

<!--quoteo(post=159872:date=Aug 29 2006, 12:21 AM:name=aspiring modeler)--><div class='quotetop'>QUOTE(aspiring modeler @ Aug 29 2006, 12:21 AM) [snapback]159872[/snapback]</div><div class='quotemain'><!--quotec-->
And for some eyecandy, here's how <i>Black Pearl</i> looks right now <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> In case you haven't noticed, I've also gave her custom patched sails <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
EXCELLENT! I noticed that she only has custom patched sails on two sails. Try to add the refShip.EmblemedSails.normalTex = "ships\[SAILNAMEHERE].tga"; line to your ships_init.c entry to make all the sails use your custom patched sail texture.

Looking forward to any new updates!!! <img src="style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" />
 
Ok, I need your help, guys. I've tried to add <i>Black Pearl</i> to the ship's registry on my own, but I have failed miserably.

So... what do I need to do to add a new ship?
 
What do you mean with the "ships registry"? What happened when you tried?

<b>What you need to do:</b>
- Add a new chunk of code for your ship in <i>ships_init.c</i>
- Rename the ship's folder in <i>RESOURCE\MODELS\SHIPS</i>
- Use the new foldername as <i>refShip.Name</i> and <i>refShip.SName</i> in your <i>ships_init.c </i> entry
- Make sure the filenames in the model folder start with the exact same name as the foldername itself does (<-- Important! The game will crash otherwise. Had that problem myself once)
- Make sure your ship doesn't overwrite any textures used by other ships
- Add an entry into RESOURCE\TEXTS\INI\ENGLISH\common.c:
string = [Foldername],"[Ingame name]" // Kazeite

I think those are all the steps. Unless you have a custom walk file. If you do, you need to edit the PROGRAM\SEA_AI\shipWalk.c file as well and add the walk file itself into the <i>walk</i> subfolder.

<b>Useful lines to add in your ships_init.c entry:</b>

<i>refShip.EmblemedSails.normalTex = "ships\[sailname].tga";</i>
You can use this line to use custom patched sails on all the sails.

<i>refShip.Walk = "[Walkfile name]";</i>
You need this line if you use a custom walk file.

<i>refShip.unique = true; // PRS3</i>
This prevents "national modifiers" being applied to your ship and will make sure that the stats of your ship are the same ingame as they are in ships_init.c. Otherwise you might, for example, encounter a Dutch version of the Pearl with a higher speedrate, but lower HP as defined at the top of <i>ships_init.c</i>.

<i>// NK cannon qtys 05-04-18 -->
refShip.Cannons.Borts.cannonf.qty = 2;
refShip.Cannons.Borts.cannonb.qty = 2;
// NK <--</i>
This is required to make the bow and stern chasers fire in the Pre Build 13 modpack. Make sure the number of cannons is correct.
 
By saying "ship registry" I mean, well, list of ships available ingame <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

Well, I've added ship's entry to <i>ships_init.c</i>. Could you look it over and tell me if I made some silly mistakes or not? <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />

//-------------------------------------------------------------------------
// The Black Pearl
//-------------------------------------------------------------------------
makeref(refShip,ShipsTypes[n]);
n++;
refShip.Name = "theBlackPearl"; <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->(This should be the same as foldername, right? (and the foldername is <i>theBlackPearl</i> <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> )<!--colorc--></span><!--/colorc-->
refShip.all = "frigate1";
refShip.SName = "theBlackPearl";
refShip.id = "theBlackPearl";
refShip.Class = 5; <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->(for now - I want her available early, since my char has low level)<!--colorc--></span><!--/colorc-->
refShip.Cannon = CANNON_TYPE_LONG_LBS24;
refShip.MaxCaliber = 32;
refShip.Weight = Tonnes2CWT(1100);
refShip.Capacity = 2200;
refShip.CannonsQuantity = 36; <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->(Since <i>Pearl</i> does have 36 cannons (including chase guns))<!--colorc--></span><!--/colorc-->
refShip.Cannons.Borts.cannonf.qty = 2;
refShip.Cannons.Borts.cannonb.qty = 2;
refShip.MaxCrew = 300;
refShip.MinCrew = 6; <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->(At least according to the movie <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> )<!--colorc--></span><!--/colorc-->
refShip.SpeedRate = 16.8;
refShip.TurnRate = 36.5;
refShip.Price = 180000;
refShip.HP = 7000;
refShip.SP = 100;
refShip.AbordageLocation = "BOARDING_CORVETTE";

refShip.Type.Trade = true; <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->(Since I do want her to be buyable and encounterable for now)<!--colorc--></span><!--/colorc-->
refShip.Type.War = true;

if(REALISTIC_SHIP_PURCHASE) refShip.CanBuy = true;

refShip.WaterLine = 0.3;
refShip.SpeedDependWeight = 0.3;
refShip.SubSeaDependWeight = 1.0;

refShip.InertiaAccelerationX = 0.4; refShip.InertiaBrakingX = 2.0;
refShip.InertiaAccelerationY = 10; refShip.InertiaBrakingY = 4;
refShip.InertiaAccelerationZ = 4.0; refShip.InertiaBrakingZ = 2.0;

refShip.Height.Bombs.Y = 1.0; refShip.Height.Bombs.DY = 0.5;
refShip.Height.Grapes.Y = 2.0; refShip.Height.Grapes.DY = 1.0;
refShip.Height.Knippels.Y = 10.0; refShip.Height.Knippels.DY = 8.0;
refShip.Height.Balls.Y = 1.0; refShip.Height.Balls.DY = 0.5;

refShip.GeraldSails.rey_b2 = 1;
refShip.GeraldSails.rey_b3 = 1;
refShip.Type.Trade = false;
refShip.Type.War = true;
//

Whew...

So, let me see:
Renaming folder - check.
Renaming individual files - check.
Making her use custom or shared textures - check.
Adding an entry into RESOURCE\TEXTS\INI\ENGLISH\common.c - not checked... Will do it as soon as you look this entry and tell me whether it's wrong or not <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

Thanks for the mini-tutorial <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
I see no obvious errors, really. If the code is missing from common.ini, that will not cause a crash. It will only cause your ship's name to not appear ingame. If the game still crashes, please do the following:
Run tools\PotCModHelper.exe, point it to your PotC folder, go to the settings tab and enable the Debug mode. Save the settings. Then load your savegame and play until the error occurs. Then show the error.log, system.log and compile.log that are generated in the main PotC folder.

That might give a clue as to why the game is crashing. If that still doesn't help you, you can upload your files onto the <a href="http://www.piratesahoy.com/forum/index.php?showtopic=7703" target="_blank">PirateAhoy! Public FTP</a> and I'll have a look at your files and try to get her to work.
 
Damn nice boat ye have there!

Hmm looks like you got some seeeeerious talent dude..
Maybe planning on doing the interceptor next?

Can't have the pearl without the interceptor man =D it's called POTC for a reason ye know <img src="style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" />

Keep up the good work lad!

-Shifty out <img src="style_emoticons/<#EMO_DIR#>/ph34r.gif" style="vertical-align:middle" emoid=":ninja" border="0" alt="ph34r.gif" />
 
Back
Top