Newcargos profit problem with the nightlies redux

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Newcargos profit problem with the nightlies redux

Post by PikkaBird »

I haven't had one of these in a while.

Edit: Actually, I can reproduce it. Build a train that carries a new cargo. Let it make a trip or two. Save and reload the game. This bug is currently making any game using newcargos unplayable. :cry:
Attachments
Cargos modified by the grf (eg, iron ore) are worth about twice as much as they should be.
Cargos modified by the grf (eg, iron ore) are worth about twice as much as they should be.
Image1.gif (5.9 KiB) Viewed 5525 times
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

Bump.

Also, I don't get this if I have noinflation turned on.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

Config attached. I've been using my grf posted here.
Attachments
ttdpatch.cfg
(35.92 KiB) Downloaded 270 times
User avatar
Csaboka
Tycoon
Tycoon
Posts: 1202
Joined: 25 Nov 2002 16:30
Location: Tiszavasvári, Hungary
Contact:

Post by Csaboka »

Another 2.5 bug, entirely my fault again. Should be fixed in the next nightly.

(Note to self: don't try to write clever code, it can backfire too easily. Just play it safe.)
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

And there was much rejoicing. :D
Greno Zee
Engineer
Engineer
Posts: 45
Joined: 07 Jun 2005 09:35
Skype: Grenozee
Location: Belgium
Contact:

Post by Greno Zee »

Csaboka wrote: (Note to self: don't try to write clever code, it can backfire too easily. Just play it safe.)
Being a developer myself, I've gotta tell you: this is good for a boss. If you are master of your time (meaning you decide what to dare for and what not), go for the clever code, it's so much more fun.

Great work overall, devs!
User avatar
Csaboka
Tycoon
Tycoon
Posts: 1202
Joined: 25 Nov 2002 16:30
Location: Tiszavasvári, Hungary
Contact:

Post by Csaboka »

You're right, clever code is usually funnier to write, but in this particular case, it cost me a lot of time. The original price factor code was clever, that is, it calculated in some obscure way to save some instructions. It turned out to be incorrect (see link in the first post), and I thought I had fixed it by tweaking my clever code a bit. Now it turned out that the tweak didn't fix the problem either, and I decided to rewrite the thing in a non-obscure way. So clever code made me debug my code twice, I could have avoided that by writing it the safe way.

Clever code is OK if you're 100% sure of what you're doing (which I wasn't), and you don't expect others to modify your code. Otherwise, it's better to be boring and correct :)
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: Semrush [Bot] and 0 guests