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

Game lockups, and goods moving speed

Igor

Landlubber
I need some help with the latest build mod (version 12). I've noticed that unlike the unmodded version of the game, there's sometimes a brief to very long "lock up" when you deal with merchants and shipwrights, when you click their buttons and select ships to repair, etc.


For example, if i go to repair one of my ships, and click on the one i want to repair in the repair screen, the game will sometimes (more often than not, actually) lock up for a period of time, and i can do nothing but wait. Sometimes it takes up to 10 seconds, which is VERY annoying. This also happens when you trade goods with merchants. When you're in the goods list, scrolling through the avaliable goods and click on one of them, you will sometimes experience the same lockups. So i was wondering if there was a way to fix this.



As for the goods moving speed, it's WAAAAAAAY too slow. I'm referring to the speed at which the number of goods you want to buy or sell increases, or decreases, when you hold the arrow button that sells or buys the goods down. When you want to buy large ammounts of goods it takes AGES for it to reach the desired number, and you're left having to sit there for several minutes holding the mouse button down for the number to go up to a few hundred. BOOOORING! So i was wondering if there was a way to mod the speed at which the number increases or decreases when you hold the button down. Or maybe even add a right click function that buys/sells 10 goods per click as opposed to 1 good per click with the left button.


Any help would be apreciated. Thanks.
 
I suppose you could disable these features... I don't think they're in the on/off file so you'd have to dig into the code a bit, and carefully. But the respective causes are:

1) The goods in the ship's hold are tallied up so you get their prices when selling a ship, instead of just the price of the ship.

2) Someone decided there should be a bit of time delay to reflect the "moving" of the cargo, though I agree the moving of ammo (which I guess takes longer because of its theoretical weight) takes too dang long.
 
Nathan Kell devised a kind economic system for Potc: the population and wealth of towns changes according to trading, availlability of food and ransackings. This in turn influences trading prices and it is that calculation that takes some time if you talk to merchants or shipwrights.


There is a tweak for the loading delay in buildsettings.h :

#define TIME_MOVEGOOD 30 //time in minutes for 1 crewman to move 1 unit of a good. Also, no matter the crew, this * goods qty /10 is added in minutes
 
I already changed the line that says:


#define TIME_MOVEGOOD 30 //time in minutes for 1 crewman to move 1 unit of a good. Also, no matter the crew, this * goods qty /10 is added in minutes


to 0 minutes, but that din't help. I don't mind the lockups that much, what i really want to change is the speed at which the NUMBER of goods changes when you hold the mousebutton down. You know, when you select a good and click the left or right arrow button to transfer it. It only transfers about 10 goods per second, which means you have to hold the button down for almost 1 minute just to transfer 500 goods. THAT'S what i want to change. I would like to add some kind of code that enables me to for example right click to tranfer 10 goods at a time. That would dramatically speed it up. Or maybe adda textbox that lets me enter the exact number of goods i want to transfer, so i can transfer it all at once. Is that possible? Thanks.
 
Commenting out the line doesn't work. It just causes the game to crash whenever you try to trade goods. Someone please help, i REALLY want to be a trader in the game, but when it takes forever just to watch the stupid number go up it really sucks. There has to be another way! Someone help me out here...

Is the right click thing i suggested earlier really not possible? Because that would be all i'd need to fix the problem.

Thanks.
 
Does ye pronouce yer name `EYE-gore` or `EEE-gore`, matey? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
You can try using the "`auto-buy`" button in the trader's interface. That automatically sells everything on board and buys everything you need (cannon balls, sailcloth, food for your crew, etc.). That way, you only need to press one button and be done. Hope this helps you.
 
<!--QuoteBegin-"Fred_Bob"+--><div class='quotetop'>QUOTE("Fred_Bob")</div><div class='quotemain'><!--QuoteEBegin-->Does ye pronouce yer name `EYE-gore` or `EEE-gore`, matey?  :?<!--QuoteEnd--></div><!--QuoteEEnd-->


The latter.



Anyways, the autobuy button doesn't help me, since like i said i want to be a trader, and you can't make a profit trading cannonballs ;)


Like for example, i have a Galleon. I want to buy 500 Coffee. I click on the coffee icon. I click and hold the the arrow that increases the number to buy. It only increases at a rate of 10 per second. I have to sit there for 50 seconds just staring at the damn number. The number just changes TOO damn slow! And i just noticed something while playing. When you dump cargo through the "ship cargo" screen, the number increases MUCH faster, at the same rate as the unmodded game. So i figure there has to be something in the mod that makes the cargo number increase so slowly. Now i'd REALLY like to know how to fix it, as it is driving me somewhat mad.


Thanks.
 
Could it be going slowly because the game does so much calculating while changing the number, that you computer can't keep up with it? I do get the impression PotC runs slower on your computer than on mine. If so, maybe there are some calculations that could be turned off. Unfortunately, I wouldn't know which ones or how to do it. I'm sorry I can't be of any help... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
 
<!--QuoteBegin-"Pieter Boelen"+--><div class='quotetop'>QUOTE("Pieter Boelen")</div><div class='quotemain'><!--QuoteEBegin-->Could it be going slowly because the game does so much calculating while changing the number, that you computer can't keep up with it? I do get the impression PotC runs slower on your computer than on mine. If so, maybe there are some calculations that could be turned off. Unfortunately, I wouldn't know which ones or how to do it. I'm sorry I can't be of any help... :(<!--QuoteEnd--></div><!--QuoteEEnd-->


Well i kind of doubt my computer is the problem (AMD 2.4Ghz, 512 DDR RAM, Geforce FX5950), but i do think some calculations have something to do with it, since the unmodded game doesn't suffer from this issue. Maybe Nathan Kell (or whoever made the mod, i'm new around here so i don't know everyone :eek:ops2 ) can shed some light on this.
 
Indeed. Your PC sounds like it should be quite good enough to handle the game properly. Actually: It's about the same specifications as my own, so I don't understand why the game should lock up for a full ten seconds then. My game sometimes locks up (when reinitializing and when buying ships), but not for very long at all. Does the game otherwise run smooth?
Well.. I suppose I can't be of much assistance really until someone who actually has some knowledge about these things comes up with an answer... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />

The Build was made by a lot of different people and compiled by Nathan Kell. At least: That's what I think. I've only been around these forums for a very few months, so I don't really know much that happened before then. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
Unfortunately, Nathan Kell seems to temporily be away, but I'm sure he'll come back sooner or later.
 
Yeah, the game runs perfectly, except for the lockups whnen you buy ships and goods. But that's not my main problem. I don't mind the lockups that much. I'd much rather be able to transfer goods at a more rapid rate so i won't have to stare at the screen for a full minute just to buy 600 of a particular good :(


This is especially irritating when you have a big ship with lots of cargo capacity, and you want to fill the cargohold with up to 1000 goods at a time. Just sitting there, holding the mouse button down and waiting for the goods to increase is SOOOOOOOOO annoying and boring...
 
There should be a way, buried somewhere, to change the number of items moved at a time... I once changed my "transfer money to crew" amount from 50 to 5000 to speed things up once I'd become a `multi-zillionaire` and had no real use for my personal money anymore.

Poke around the same folder, one of the ini things I reckon. I think some of the items are already set at different values - for instance cannonballs are moved 10 or 20 at a time, right?
 
<!--`QuoteBegin-Fred_Bob`+--><div class='quotetop'>QUOTE(Fred_Bob)</div><div class='quotemain'><!--QuoteEBegin-->Does ye pronouce yer name `EYE-gore` or `EEE-gore`, matey?  :?[/quote]"`Eye-gor`!" "`Froeh-der`-ick!" <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />
 
Yep, CCC's and Pieter's surmise is indeed correct, they're both artifacts of the dynamic goods system, though as Pieter adds further your machine should indeed be fast enough.

My problem is that I'm a brute force programmer (spoiled by the speed of today's computers, rather than schooled in the days of the 8086...), so my methods are to say the least unoptimized.

One thing I'd like to do ASAP is optimize that code to get rid of the delay; but I'm somewhat limited in what I can do for the above reason and because POTC's script engine executes so darn SLOW.

Does someone know enough math (for the formulae) or coding (for the optimization) to help out? I'd be much obliged...

But none of this is to detract from your problem, which is a real one. I'll see what I can do for you. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
I think his problem is not that moving goods takes ingame time, but that it takes very long to select large amounts of goods, as the function adding goods to the selected is linear (hold button one second = add this many goods). Perhaps an exponential function would work better.
 
<!--QuoteBegin-v_Grimmelshausen+Mar 21 2005, 08:08 PM--><div class='quotetop'>QUOTE(v_Grimmelshausen @ Mar 21 2005, 08:08 PM)</div><div class='quotemain'><!--QuoteEBegin-->I think his problem is not that moving goods takes ingame time, but that it takes very long to select large amounts of goods, as the function adding goods to the selected is linear (hold button one second = add this many goods). Perhaps an exponential function would work better.
<div align="right">[snapback]99083[/snapback]</div><!--QuoteEnd--></div><!--QuoteEEnd-->


I'm glad you're looking into it Nathan. I totally forgot about this thread since i had to format my computer a few days after i made this thread, and lost all my POTC saves, and i didn't feel like starting all over again so i never bothered to reinstall it until now, because schools off and i've got nothing to do. And yes, Grimmelshausen is correct. My problem isn't that it takes in-game time. My problem is that it takes too much REAL time to move large quantities of goods. And he is also correct in suggesting an exponential function to move the goods. That would definitely help. But i think the real problem though is that the build mod implements a mod that makes it so that the time in the game changes when you move goods. For example if you move LOTS of goods it could take many hours and you could find yourself going in to the trader during the day, and come out to a pitch black night. I'm almost positive that that's the problem. The calculations that the game has to make to progress time when you move goods is what slows the transfer rate down so much. That's why it isn't as slow in the unmodded game. But like i said though, an exponential function could solve the problem. That way the speed would increase exponentially the more goods you move. And that sounds fine to me.
 
Welcome back!

There were/are two time issues:
1. I changed the get-good-price function to check current good qty vs. town size[fn1], which means that the price has to be calculated for each and every unit you're buying or selling. Thus clicking sell-all/autobuy, clicking 'sell' (which sets sell qty at max), or increasing/decreasing good qty takes a long time in realtime.
2. I added a feature wherein moving goods off or on your ship will take time in /game/time.

Those two points are completely unrelated.

I have fixed--or at least significantly improved--point one, but point two is a feature, not a bug.
{ In the current version (the postbuild12 pack) I've implemented an averaging function that drastically speeds up the getgoodprice calcs. }

The calculations necessary for point two are on the order of a half a second per day, so it's really not contributing to the speed problem.

[fn1]The reason for this is to have supply and demand influencing price--the current amount of goods in the town is checked vs the town size to see how far from the 'normal' qty, to find out what price multiplier to use.
 
Back
Top