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

Few minor modifications/additions/`bug-fixes` for PotC

<!--`QuoteBegin-alan_smithee`+--><div class='quotetop'>QUOTE(alan_smithee)</div><div class='quotemain'><!--QuoteEBegin-->Is the cannon problem you're talking about the model in the shop, Pieter? Inez made a new one months ago that doesn't disappear at certain angles.[/quote]Yes it is. The file from Inez was smaller (in actual size; not filesize) than the one used in your blacksmiths, so I didn't replace it. I was hoping yuo could...

<!--`QuoteBegin-Petros`+--><div class='quotetop'>QUOTE(Petros)</div><div class='quotemain'><!--QuoteEBegin-->EquipCharacterByItem(pchar, FindCharacterItemByGroup(pchar, PISTOL_ITEM_TYPE)); // equips your pistol[/quote]Thanks a lot for finding that. That is <i>SO</i> stupid of me. "PISTOL_ITEM_TYPE" should have read "GUN_ITEM_TYPE". <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
I'll be looking into your QC blacksmith not working. I just tested it with my PotC version, but it does seem to work, so I'll go and make a clean install and see what happens.

<!--`QuoteBegin-CatalinaThePirate`+--><div class='quotetop'>QUOTE(CatalinaThePirate)</div><div class='quotemain'><!--QuoteEBegin-->I have a problem with the idea that you should pay the blacksmiths out of your personal wealth.[/quote]I'll try to make it switchable in BuildSettings.h then until a better solution is found. I reckon I should be able to manage that.
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->The file from Inez was smaller  <!--QuoteEnd--></div><!--QuoteEEnd-->

Can't imagine why it would be smaller - anyway, with the tool you can resize it to whatever size you want.
I'll check it when I have time.
 
<!--`QuoteBegin-Petros`+--><div class='quotetop'>QUOTE(Petros)</div><div class='quotemain'><!--QuoteEBegin-->Next problem, the blacksmith at QC does not appear.[/quote]Problem found: Another stupid fault of mine. I forgot to put in the Quabradas Costillas character init file. Jeez. If you ever need someone stupid: Be sure to call on me! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
Anyway: Thanks a lot for finding these bugs. I'll be working on making the blacksmith payment switchable now and when I'm done I'll put up a new version.

<!--`QuoteBegin-Inez` Dias+--><div class='quotetop'>QUOTE(Inez Dias)</div><div class='quotemain'><!--QuoteEBegin-->Can't imagine why it would be smaller - anyway, with the tool you can resize it to whatever size you want.  
I'll check it when I have time.[/quote]Where might I refind that cannon model? I know you had it for download somewhere, but I don't have it anymore. I'll have a look at your tool when I have the time and the cannon model. It can be found somewhere in the "Tool for making characters and converting VRML files to gm" thread, right? The tool that is... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
<!--`QuoteBegin-Pieter` Boelen+--><div class='quotetop'>QUOTE(Pieter Boelen)</div><div class='quotemain'><!--QuoteEBegin-->I'll try to make it switchable in BuildSettings.h then until a better solution is found. I reckon I should be able to manage that.[/quote]<b>NOT!</b> Been trying and trying and failing and failing. Someone please help me how I should do this. Why doesn't this code work and how SHOULD I get it to work??? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// Get the player's money (as int)

if (BLACKSMITH_PAY_OUT_WEALTH == 1)

{

    int PlayerMoney = sti(MainChar.wealth);

}

else

{

    int PlayerMoney = sti(MainChar.money);

}<!--c2--></div><!--ec2-->Thanks in advance!
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->It can be found somewhere in the "Tool for making characters and converting VRML files to gm" thread, right?  <!--QuoteEnd--></div><!--QuoteEEnd-->

Correct - there you find the link to the tool and to the model also.
(It is <a href="http://home.arcor.de/swigard/Downloads/" target="_blank">http://home.arcor.de/swigard/Downloads/</a>)
 
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// Get the player's money (as int)

int PlayerMoney;

if (BLACKSMITH_PAY_OUT_WEALTH == 1)

{

  PlayerMoney = sti(MainChar.wealth);

}

else

{

  PlayerMoney = sti(MainChar.money);

}<!--c2--></div><!--ec2-->

Not sure, but worth a try...
 
I at least updated the file to fix the bugs Petros found and I added Catalina's quest check for the Fred Bob quest. Having the blacksmith payment toggleable will have to be postponed until someone has come round to help me; I don't seem to be managing on my own... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
<span style='color:red'>Edit:</span> I was a bit late with this post. By the time I had posted it, Inez had already posted her help (thanks!), so I'll have the switchability up soon (somewhere later today)! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/bounce.gif" style="vertical-align:middle" emoid=":b:" border="0" alt="bounce.gif" />
 
<!--`QuoteBegin-Inez` Dias+--><div class='quotetop'>QUOTE(Inez Dias)</div><div class='quotemain'><!--QuoteEBegin-->Not sure, but worth a try...[/quote]DEFENITLY worth a try! It WORKS! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
Thank you ever so much!!! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" />
 
Now that it works you'll want to know why:

If the "int playerMoney" is inside the curly braces the variable will also only be known inside those braces, but not outside.
 
Aha! That explains a lot! Once again: Many, many thanks to you indeed! <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" />
 
<!--`QuoteBegin-Pieter` Boelen+--><div class='quotetop'>QUOTE(Pieter Boelen)</div><div class='quotemain'><!--QuoteEBegin--><!--`QuoteBegin-Inez` Dias+--><div class='quotetop'>QUOTE(Inez Dias)</div><div class='quotemain'><!--QuoteEBegin-->Not sure, but worth a try...[/quote]DEFENITLY worth a try! It WORKS! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
Thank you ever so much!!! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" />[/quote]<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/danse1.gif" style="vertical-align:middle" emoid=":dance" border="0" alt="danse1.gif" /> That's GREAT, thanks, Inez, and Pieter! <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" />
 
Here it is, thanks to Inez Dias: The long (few hours) awaited <a href="http://millenniumdock.bravepages.com/storage/others/PotCMods.zip" target="_blank">update</a> enableing you to toggle whether you want the blacksmith be paid out of your person wealth or your party's money in BuildSettings.h . I also found some code that displays the price after the "You get your blade back one day later", which I have removed, because it didn't make much sense. I haven't done the most thorough of testing, but I reckon it should work. Hope you'll have some fun with it. <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" />
BTW: I didn't comment these changes, because that would've been about as much work as making the changes themself. Hope nobody minds...

BTW 2: You reckon I should add v_Grimmelshausen's ship class name changes?
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> Not sure Grimm is done with them yet! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Wheew, you are just too fast for an old fart like me: I came here to report on your last compilation only to find that there is already a new one <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" />

Your last compilation worked fine for me, only that we have different buildsetting files led to some confusion: first my (new) mods wouldn't run with your buildsetting, then with my buildsettings your mods wouldn't. Well, a mix of both fixed that.
Great work. So you have already made the prototype of a Buildupdate <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" />

<!--`QuoteBegin-Pieter` Boelen+--><div class='quotetop'>QUOTE(Pieter Boelen)</div><div class='quotemain'><!--QuoteEBegin-->
BTW: I didn't comment these changes, because that would've been about as much work as making the changes themself. Hope nobody minds...
[/quote]
Out of my own painful experience(now i really sound `old-fartish` <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" /> ) I recommend very much that you comment everything you make, even if it is only a temporary change for yourself. You will soon loose track of the things you have done, believe me. The time that you spend for proper documentation will be saved several times over during debugging, changing and compiling. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
End of sermon <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" />
 
Can't you make some code like this?<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->#define STSTBLADE (1+ rand(9))

GiveItem2Character(Pchar, "blade"+ STSTBLADE ); // gives you blade1, blade2... or blade10

EquipCharacterbyItem(Pchar, "blade"+ STSTBLADE);<!--c2--></div><!--ec2-->
[/quote]
Well, you were almost there. I think that
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->int stsblade = (1+ rand(9));

GiveItem2Character(Pchar, "blade"+ stsblade ); // gives you blade1, blade2... or blade10

EquipCharacterbyItem(Pchar, "blade"+ stsblade);<!--c2--></div><!--ec2-->
would have worked.

Small lesson on variable definitions:

#define VARIABLENAME value (or "text")
That's to define a fixed variable that can be used in every part of the game. FAIK can't be changed or calculated later (hence your problem) Use that only sparingly, e.g. buildsettings

int variablename = integer value (or calculation)
Defines an variable that can be an integer number. Every variable that you use must be defined once -and only once- in every codesection or function. You can also split the definition and the assignation of the value:
int stsblade;
stsblade = (1+ rand(9));

Instead of int there are
float for noniteger numeric values
string variablename = "text" for textvariables
ref or aref for objects (for attributes)

However, I found some code that did do the trick:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->GiveItem2Character(Pchar, "blade"+ (1+ rand(9)) ); // gives you blade1, blade2... or blade10

EquipCharacterByItem(pchar, FindCharacterItemByGroup(pchar, BLADE_ITEM_TYPE)); // equips your blade<!--c2--></div><!--ec2-->My first bit of working code. [SHOCK] <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" />
Congratulations <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" /> Don't know what it would do if you had several blades, but as this runs at the very beginning of the game it is a great solution.
 
<!--QuoteBegin-CouchcaptainCharles+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->Wheew, you are just too fast for an old fart like me:<!--QuoteEnd--></div><!--QuoteEEnd-->Welcome to the club, CCC, I can't keep up with them, either! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> <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#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" />
 
<!--QuoteBegin-CatalinaThePirate+--><div class='quotetop'>QUOTE(CatalinaThePirate)</div><div class='quotemain'><!--QuoteEBegin--><img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> Not sure Grimm is done with them yet! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

Why, sure I´m done. At least as far as the names are concerned, they work for me since some weeks already. That was easy enough, only that one file named by emrep to change. There is something still, in the transfer screen (transfer beteewn ships) there aren´t the names displayed all through the game, but the model names. It´s a minor thing, however.

The statistics are another topic. I haven´t had the opportunity to test whether I can so easily change them as I thought in that topic (if you know anything about that, Pieter, I´d be most glad if you shared your knowledge) and accordingly I haven´t tested them, gameplay balance- like.
 
<!--QuoteBegin-v_Grimmelshausen+--><div class='quotetop'>QUOTE(v_Grimmelshausen)</div><div class='quotemain'><!--QuoteEBegin-->if you know anything about that, Pieter, I´d be most glad if you shared your knowledge<!--QuoteEnd--></div><!--QuoteEEnd-->You're joking, right? Of course I don't. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_eek.gif" style="vertical-align:middle" emoid=":shock:" border="0" alt="icon_eek.gif" /> I'm still much of a newby here plus I don't have much historical knowledge either. I am sorry I can't help you, though. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/ohmy.gif" style="vertical-align:middle" emoid=":eek:" border="0" alt="ohmy.gif" />
One thing I did notice: I don't understand why you changed the Brig into a Brigantine and the Barque into a Brig. For all I know, the Brig and Brigantine in the game are actual Brig(antine)-like ships. I could be mistaken here quite badly though... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
<!--QuoteBegin-CouchcaptainCharles+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->Wheew, you are just too fast for an old fart like me: I came here to report on your last compilation only to find that there is already a new one <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->LOL. <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" /> Don't worry: My holidays are about over, so I won't be bothering you quite as much as I did the past few days anymore.

<!--QuoteBegin-CouchcaptainCharles+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->Your last compilation worked fine for me, only that we have different buildsetting files led to some confusion: first my (new) mods wouldn't run with your buildsetting, then with my buildsettings your mods wouldn't. Well, a mix of both fixed that.<!--QuoteEnd--></div><!--QuoteEEnd-->That is probably because I didn't add the yet unused settings from your BS2.h to BS.h, right? I can add those back in if you like...
BTW: My compilation thingey wasn't made to cooperate with yet unreleased mods, so it might cause some more trouble when it overwrites the modding work you've done.

<!--QuoteBegin-CouchcaptainCharles+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->Great work. So you have already made the prototype of a Buildupdate <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->I do my best. Since I am doing this for myself to get the game to work properly with as many features as possible, I thought I might as well provide it to you too. The more I do, the less you have to. <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" />

<!--QuoteBegin-CouchcaptainCharles+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->Out of my own painful experience(now i really sound `old-fartish` <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" /> ) I recommend very much that you comment everything you make, even if it is only a temporary change for yourself. You will soon loose track of the things you have done, believe me. The time that you spend for proper documentation will be saved several times over during debugging, changing and compiling. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
End of sermon <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" /><!--QuoteEnd--></div><!--QuoteEEnd-->I did comment about all changes I made, except for the toggleability changes in the blacksmith.c files. But you'll notice them soon enough: they are the lines with "PAY_BLACKSMITH_FROM_WEALTH" in it.

Also thanks a lot for your explanation on the coding. I didn't know that. But I hardly know anything about coding anyway, so that was to be expected. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" />

<!--QuoteBegin-CouchcaptainCharles+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->Congratulations <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" /> Don't know what it would do if you had several blades, but as this runs at the very beginning of the game it is a great solution.<!--QuoteEnd--></div><!--QuoteEEnd-->If you have several blades, it will select what the game thinks is the best one. However, I doubt it takes the quality in account, so I doubt it would totally properly. But like you said: since it's in the begin of the game, it works just fine.
 
<!--QuoteBegin-Pieter Boelen+--><div class='quotetop'>QUOTE(Pieter Boelen)</div><div class='quotemain'><!--QuoteEBegin--><!--QuoteBegin-v_Grimmelshausen+--><div class='quotetop'>QUOTE(v_Grimmelshausen)</div><div class='quotemain'><!--QuoteEBegin-->if you know anything about that, Pieter, I´d be most glad if you shared your knowledge<!--QuoteEnd--></div><!--QuoteEEnd-->You're joking, right? Of course I don't. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_eek.gif" style="vertical-align:middle" emoid=":shock:" border="0" alt="icon_eek.gif" /> I'm still much of a newby here plus I don't have much historical knowledge either. I am sorry I can't help you, though. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/ohmy.gif" style="vertical-align:middle" emoid=":eek:" border="0" alt="ohmy.gif" />
One thing I did notice: I don't understand why you changed the Brig into a Brigantine and the Barque into a Brig. For all I know, the Brig and Brigantine in the game are actual Brig(antine)-like ships. I could be mistaken here quite badly though... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

Joking? No, not exactly. But since you did a bugfix I thought you knew something about this. The historical point is, for now, second to the technical one. After all, what use is having all the historically correct data if I can´t edit it into the game?

The naming, well, these ships HAVE to have any names, don´t they? And they are Brig/Brigantine- like, but I thought, as a Brigatine is the larger of the two, it should be named thus. I´ll leave that to the historians here, who´ll without a doubt be sharpening the axe to make me a head shorter for such historical ignorance.
 
Back
Top