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

Money from Capturing ships

Doober

Buccaneer
Storm Modder
What part of code would I need to change to alter the amount of money that can be gotten from surrendering captains? I found some code that appears to be a modifier for it in the cabinfight_dialog.c file:

switch(Rand(5))
{
case 0: NPChar.wealth = sti(NPChar.money)*2.3; break;
case 1: NPChar.wealth = sti(NPChar.money)*3.3; break;
case 2: NPChar.wealth = sti(NPChar.money)*4.3; break;
case 3: NPChar.wealth = sti(NPChar.money)*5.3; break;
case 4: NPChar.wealth = sti(NPChar.money)*6.3; break;
case 5: NPChar.wealth = sti(NPChar.money)*7.3; break;
}

But I haven't been able to figure out where this NPChar.money is generated. Any ideas? <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />

Also does anyone know where the personal money for the NPC's are generated? Some people only carry 10 gold, but others carry alot more.
 
It's in a generate random character function somewhere, but I don't know where it is. Non-random characters have it set in the character init files.
 
I found out where the NPC's get their gold from, but I haven't been able to figure out where the surrendered captains get their gold from when you demand gold in the first dialog with them. They always seem to be able to pull out 100,000 or some very large amount of gold. I was hoping to be able to slightly reduce this for my own personal use.
 
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Doober

If that is considered the money you get from capturing the ship, and not the captain himself, I would think it is what is referenced in "Internalsettings.h" file:

#define SHIPMONEY_MULT 0.01 // FLOAT - multiplier to how much money you get on boarding

I always change this to 0.005 to get half the amount from capturing a ship.
 
I'm not actually sure if that does anything, Petros. I have mine set to 0.00 and I still get tons of gold.
 
what happens when you set it to 0.001 ? having it at 0.00 might be why you are getting so mush gold....I've never gotten 100,000 for a ship capture etc.
 
No, no matter what I set it to, I get tons of gold. It is when I am talking to the captain immediately after his surrender and demand gold, after that I throw him in my hold and can get anywhere from 60,000 to 100,000 in gold. After that, the ship sinks and I get another 7,000 approximately.
 
In case any one else cares, the calculations appear to be in the cabinfight_dialog.c file. In my own game, I was able to drastically reduce the amount of money by putting in at /50 after every piece of code that said MakeMoneyShow(sti(NPChar.wealth) like so.

MakeMoneyShow(sti(NPChar.wealth)/50

Is is a very drastic change and if you wanted to, you could change it to much less by putting in a smaller number than 50. My primary concern was making money as difficult to get as possible. (Don't smack me, Hook, I know your feelings on people complaining about the excess money! <img src="style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" /> )
 
I would put the numbers in the other direction...I'm a PIRATE ...I LOVE ME <b>GOLD</b> !
 
<!--quoteo(post=175255:date=Dec 10 2006, 12:19 PM:name=Doober)--><div class='quotetop'>QUOTE(Doober @ Dec 10 2006, 12:19 PM) [snapback]175255[/snapback]</div><div class='quotemain'><!--quotec-->
In case any one else cares, the calculations appear to be in the cabinfight_dialog.c file. In my own game, I was able to drastically reduce the amount of money by putting in at /50 after every piece of code that said MakeMoneyShow(sti(NPChar.wealth) like so.

MakeMoneyShow(sti(NPChar.wealth)/50

Is is a very drastic change and if you wanted to, you could change it to much less by putting in a smaller number than 50. My primary concern was making money as difficult to get as possible. (Don't smack me, Hook, I know your feelings on people complaining about the excess money! <img src="style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" /> )
<!--QuoteEnd--></div><!--QuoteEEnd-->

What I like to do with those problems, is instead of dividing by 50, I take the square root (times a bit)

eg:
MakeMoneyShow(<b>sqrt</b>(sti(NPChar.wealth))<b>*50</b>)


this means at low levels when you're only getting small amounts to start with you get about the same or a little more, but at high levels, it seriously reduces the gold.

So using the above formula:

1000 gold becomes 1581 gold

10,000 gold becomes 5,000 gold

and

100,000 gold becomes 15,811 gold.


I've done that with the XP from trade missions in build 14alpha.

I've also used it in a mod I made which means you get less XP in combat at high levels.
<a href="http://members.optusnet.com.au/~jaldridge1/POTC/ReducedFightXP.zip" target="_blank">ReducedFightXP.zip</a>
(If anyone wants it)


Edit: Oh, if you're playing build 14alpha, we upped the salary by 3, and you also have to pay for unassigned officers. so you might find you need that money <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
But the player level is not taken into account in that line you post above, is it? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
<!--quoteo(post=175279:date=Dec 10 2006, 11:47 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Dec 10 2006, 11:47 PM) [snapback]175279[/snapback]</div><div class='quotemain'><!--quotec-->
But the player level is not taken into account in that line you post above, is it? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->

I think the player level is taken into account when the fantom (NPChar) is created. It'd be a better idea to put all this money adjusting code in there, where-ever the create Npchar code is. (Instead of adjusting the money after the fact in <i>cabinfight_dialog.c</i>.)
 
Good idea Jonathan! I didn't know how to do square roots, but that seems to work very well.
 
Yes, much better than a linear increase <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
<!--quoteo(post=175282:date=Dec 10 2006, 08:01 AM:name=Jonathan Aldridge)--><div class='quotetop'>QUOTE(Jonathan Aldridge @ Dec 10 2006, 08:01 AM) [snapback]175282[/snapback]</div><div class='quotemain'><!--quotec-->
<!--quoteo(post=175279:date=Dec 10 2006, 11:47 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Dec 10 2006, 11:47 PM) [snapback]175279[/snapback]</div><div class='quotemain'><!--quotec-->
But the player level is not taken into account in that line you post above, is it? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->

I think the player level is taken into account when the fantom (NPChar) is created. It'd be a better idea to put all this money adjusting code in there, where-ever the create Npchar code is. (Instead of adjusting the money after the fact in <i>cabinfight_dialog.c</i>.)
<!--QuoteEnd--></div><!--QuoteEEnd-->

I agree with this, JA. Due to my newbishness, I was unable to find where it all originated, so I therefore did it at the cabinfight_dialog.c, but if you can find the correct place, it would be much better, IMHO. <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Back
Top