Config
Log for #openttd on 6th October 2016:
Times are UTC Toggle Colours
00:21:00  *** nulquen has left #openttd
00:44:34  *** tokai has joined #openttd
00:44:34  *** ChanServ sets mode: +v tokai
00:51:14  *** tokai|noir has quit IRC
01:23:57  *** LadyHawk- has joined #openttd
01:29:09  *** LadyHawk has quit IRC
01:29:10  *** LadyHawk- is now known as LadyHawk
01:49:07  *** Gja has quit IRC
01:51:33  *** glx has quit IRC
03:09:24  *** txtsd_ has joined #openttd
03:09:31  *** Snail has quit IRC
03:09:53  *** txtsd has quit IRC
03:09:53  *** txtsd_ is now known as txtsd
03:12:05  *** smoke_fumus has quit IRC
03:57:58  *** Supercheese has joined #openttd
05:34:47  *** andythenorth has joined #openttd
05:35:55  *** andythenorth has left #openttd
05:36:57  *** orudge has quit IRC
06:20:31  *** Knogle has joined #openttd
06:42:44  *** keoz has joined #openttd
06:53:47  *** keoz has quit IRC
07:15:41  *** Supercheese has quit IRC
07:41:16  *** FLHerne has joined #openttd
09:39:26  *** FLHerne has quit IRC
09:57:58  <argoneus> good morning train friends
10:25:13  *** Samu has joined #openttd
10:29:22  *** Wolf01 has joined #openttd
10:29:44  <Wolf01> o/
10:47:17  <Samu> hi
11:01:20  *** zeknurn` has joined #openttd
11:05:22  *** zeknurn has quit IRC
11:05:22  *** zeknurn` is now known as zeknurn
11:08:39  *** Snail has joined #openttd
11:09:37  *** Mazur has quit IRC
11:16:07  *** Snail_ has joined #openttd
11:16:07  *** Snail has quit IRC
11:16:07  *** Snail_ is now known as Snail
11:19:35  *** Mazur has joined #openttd
11:34:36  *** Snail has quit IRC
12:02:41  *** zeknurn has quit IRC
12:12:58  *** zeknurn has joined #openttd
12:13:56  *** Arveen has joined #openttd
13:09:22  *** Extrems has quit IRC
13:10:30  *** Extrems has joined #openttd
13:19:08  <Samu> who's a date expert? I need to create a "IsLastDayOfTheMonth" bool
13:24:58  <Milek7_> Samu: look at IncreaseDate
13:25:07  <Milek7_> date.cpp:293
13:26:37  <Samu> bool new_month = ymd.month != _cur_month;
13:27:33  <Samu> hmm
13:27:50  <Samu> that's like the last tick of the month
13:28:17  <Samu> it should suffice, I guess, must try it
13:29:29  <Milek7_> no that's first day of next month
13:30:52  <Milek7_> i think
13:30:59  <Milek7_> _month_date_from_year_day[_date + 1] != _cur_month
13:32:11  <Milek7_> no
13:32:24  <Milek7_> _month_date_from_year_day[_date + 1] >> 5 != _cur_month
13:33:53  <Samu> actually, forget about it, I'm gonna try a different approach
13:34:15  <Samu> 	/* Check for bankruptcy each month */
13:34:30  <Samu> i want to do this check BEFORE computing the new statistics for the company
13:35:19  <Samu> static void CompaniesGenStatistics() line 655
13:35:37  <Samu> bankrupt check is done after the computations, i'm trying to switch
13:36:26  <Samu> my goal  here is to avoid AI companies from bankrupting because they work too close to the money limit
13:37:05  <Samu> if the computations are done after the bankrupt check, I am saving many false bankrupts
13:37:11  <Milek7_> how this will change that?
13:38:03  <Samu> on the last day of the previous month, the company is healthy
13:38:25  <Samu> but then those subtracts from maintenance costs and so
13:38:50  <Samu> makes the new first day of the company enter into negative at times, especially for those AIs that are always working next to their money limit
13:39:09  <Samu> it triggers a bankrupt warning
13:39:24  <Samu> by accumulation, they can bankrupt, even if they have giant profits
13:39:49  <Samu> it's the case of EpicTrans
13:41:18  <Samu> There are other AIs too with this issue, forgot who they are
13:41:40  <Milek7_> but it anyway bankrupts at 6-9 consecutive months with negative profits
13:41:54  <Milek7_> s/profits/balance/
13:42:17  <Milek7_> but if you want you can just move
13:42:28  <Milek7_> FOR_ALL_COMPANIES(c) { CompanyCheckBankrupt(c); }
13:42:42  <Milek7_> before: if (!_settings_game.economy.infrastructure_maintenance) {
13:46:24  <Samu> there was some road vehicle ai that bankrupted with over 2600 vehicles and profits of £1000k
13:46:38  <Samu> forgot who it was, but it wasn't epictrans
13:47:20  *** keoz has joined #openttd
13:49:18  *** sim-al2 has quit IRC
13:50:08  <Samu> i still dont understand how this works
13:50:12  <Samu> company backup byte
13:50:22  <Samu> Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
13:50:28  <Samu> cur_company.Restore();
13:51:41  <Milek7_> what?
13:52:22  <Samu> there's that envolving the infrastructure maintenance
13:52:38  <Samu> but bankrupt checking isn't being included
13:52:51  <Samu> i'm not sure how to move the coude before it
13:53:56  <Milek7_> doesn't matter if you move bankrupt check before or after backup
13:54:31  <Milek7_> but if you want before, you'll also need to move Company *c; definition before it
13:54:49  *** ialokin has joined #openttd
13:56:38  <Samu> gonna find some bankrupt saves
13:56:40  <Samu> brb
13:58:23  <Samu> here it is one such save https://www.tt-forums.net/viewtopic.php?p=1170913#p1170913
13:59:12  <Samu> https://www.tt-forums.net/viewtopic.php?p=1170380#p1170380
14:03:56  <Samu> debug is so darn slow :(
14:06:41  *** ialokin has quit IRC
14:10:52  <Samu> arf, i dont have a good savegame to test this
14:13:45  <Samu> gonna try aroai save
14:18:33  <Samu> waiting for new month
14:18:54  <Samu> running openttd debug with an AI running is utterly slow
14:19:22  <Milek7_> why not compile release?
14:19:48  <Samu> i am using breakpoints, see if it's doing everything correctly
14:26:53  *** Alberth has joined #openttd
14:26:53  *** ChanServ sets mode: +o Alberth
14:26:56  <Samu> awesome
14:27:01  <Alberth> yay!
14:27:15  <Samu> AroAI didn't bankrupt!
14:27:29  <Samu> https://www.tt-forums.net/viewtopic.php?p=1170864#p1170864
14:27:34  <Samu> used this save
14:27:55  <Samu> hi Alberth
14:28:04  <Alberth> o/
14:33:28  <Samu> this looks good
14:33:36  <Samu> think i'm posting the patch
14:42:27  <Samu> https://paste.openttdcoop.org/p4dbm4xw1
14:42:40  <Samu> does it look good?
14:45:37  *** srhnsn has joined #openttd
14:52:56  <Samu> ST2: halp
14:53:08  <ST2> o.O
14:53:09  <ST2> :)
14:53:12  <ST2> what you need?
14:53:23  <Samu> i need your feedback on that patch, since u own competitive servers
14:53:37  <Samu> https://www.tt-forums.net/viewtopic.php?f=33&t=75342
14:53:40  <ST2> hard to check it now :(
14:53:42  <ST2> @ work
14:53:45  <Samu> t.t
14:53:47  <Samu> oki
14:54:35  <Alberth> what does the code at line 24 do?
14:54:42  <ST2> we don't run AI's on our servers anyway
14:55:19  <Samu> yeah, well but the change is company based, doesnt' care if it's ai or not
14:55:56  <Samu> line 24? that's a svn patch line
14:56:45  <Samu> perhaps my comment is misleading
14:56:54  <Samu> shouldn't have mentioned AI in it
14:57:09  <Alberth> I know it's the svn patch line, but what does the code there do?
14:57:30  <Alberth> it looks like infra structure calculations, maybe payments?
14:57:58  *** innocenat has quit IRC
14:58:14  <Samu> yes, it's infrastructure maintenance costs being subtracted
14:58:46  <Alberth> why do you remove the bankrupt check after subtracting those payments
14:58:47  <Alberth> ?
14:59:05  <Samu> i moved it up
14:59:11  *** theholyduck has quit IRC
14:59:38  <Samu> checks for bankruptcy first before subtracting infrastructure costs
15:00:02  <Alberth> I know what you did
15:00:05  <Alberth> I ask why
15:00:21  <Alberth> since payments could drive you into bankruptcy
15:00:39  <Alberth> and with your patch you don't check that any more
15:01:15  <Samu> brb
15:01:30  <Samu> are u sure?
15:01:57  <Samu> i don't get what you say :(
15:02:06  <Alberth> suppose at line 21 you have 1 dollar left
15:02:22  <Alberth> so your moved check says "all is well"
15:02:24  <Alberth> right?
15:02:33  <Samu> yeah
15:02:43  <Alberth> then we do infra structure checks, they cost say 100 dollar
15:03:04  <Alberth> so at line 27, balance of the company is -99, right?
15:03:04  <Samu> it becomes -99
15:03:18  <Samu> yes
15:03:32  <Alberth> in the old situation, line 30 declares bankruptcy then
15:03:41  <Samu> gains 1 more month then
15:03:47  <Alberth> in your patched situation, that check isn't there
15:04:56  <Samu> it will check bankruptcy at the start of the next month
15:05:15  <Milek7_> he wants to prevent bankruptcy of ai who spend always all available money
15:05:19  <Samu> if it's still negative, it adds a month of bankruptcy
15:06:35  <Samu> but the problem might be that humans will take advantage of it as well, hmm i see
15:06:47  <Milek7_> imo this is ai fault that it don't reserve money for maintenance
15:07:41  <Alberth> you have 3 months or so to sort out your balance, afaik
15:08:01  <Alberth> maybe even more
15:08:44  <Alberth> so one month postponing after it already had 3 months?
15:09:34  <Milek7_> if ai always drain available money for building eg. railway it will bankrupt even if it makes much profit
15:10:12  <Samu> it's unfair for ais to bankrupt because they're a few miliseconds into negative
15:10:22  <Alberth> it will always bankrupt even if you give it 5 years
15:10:23  <Samu> and then for the rest of the month they're positive
15:12:25  <Samu> https://www.tt-forums.net/viewtopic.php?p=1170864#p1170864 - this savegame is prepared to bankrupt AroAI next month
15:12:35  <Samu> how would u deal with this :(
15:12:43  <Milek7_> fix ai
15:12:59  <Alberth> that would seem like the proper action indeed
15:13:26  <Alberth> it is known how openttd computes finances, it can handle accordingly
15:15:07  <Samu> He has a £1,100k profit and 2600 road vehicles when this happens.
15:15:07  *** Arveen has quit IRC
15:15:11  <Samu> t.t
15:16:36  <Samu> i dunno it's just wrong
15:16:42  <Samu> makes no sense
15:19:28  <Alberth> I always drive below the speed limit, except this once
15:19:33  <Alberth> I still get the fine
15:20:14  <Samu> http://imgur.com/a/pKJIz - :|
15:20:22  <Alberth> if it's making that much money, it's being stupid of getting near the limit that close
15:20:50  <Alberth> it should just do nothing for a month, and use 1,000k pound as limit
15:20:52  *** theholyduck has joined #openttd
15:21:08  <Samu> it's not the only ai doing it
15:21:17  <Samu> syntrans
15:21:22  <Samu> epictrans
15:21:36  <Samu> there's some others, i forgot now who they are
15:22:00  <Samu> epictrans was at 4900 road vehicles, then bankrupted
15:22:13  <Samu> i look at it and it makes no sense
15:23:47  *** frosch123 has joined #openttd
15:24:00  <Alberth> welcome to the world of computers where sense has no meaning
15:24:03  <Alberth> hola
15:25:38  *** innocenat has joined #openttd
15:31:50  <Samu> hmm so that means my patch sucks
15:32:49  <Alberth> there is a boundary somewhere
15:33:22  <Alberth> you can move the boundary, but that means additional space for the AIs, so some authors will take advantage of it
15:33:31  <Alberth> and you're back to square one
15:33:59  <frosch123> maybe meaning has a sense then
15:34:18  <frosch123> moi
15:37:01  <Samu> the situation gets worse the higher the infrastructure amount of a company :(
15:37:10  <Samu> oh well, so it's the ai's author to deal with it?
15:37:47  <Samu> LordAro: fix ur ai!
15:38:15  <Milek7_> you can also fix it ;p
15:39:12  <Samu> I did this swap, but apparently it's a bad idea
15:41:16  <Alberth> it's just not the right solution.  I doubt the solution should be in OpenTTD, for the above reason.
15:41:47  <Alberth> we've had the same rule for a decade or so, it should be known by now :)
15:43:56  <Alberth> note that a few years back, the bankruptcy got fixed from "your balance is negative" to "you balance is negative after taking out the max loan", that's a big leap in making it less likely to bankrupt
15:44:19  *** keoz has quit IRC
15:44:29  <Alberth> but if you insist on living on the edge, occasionally you fall :)
15:46:12  <LordAro> Samu: D:
15:46:23  <Alberth> hi hi
15:46:33  * LordAro is in a lecture
15:46:39  <Alberth> own code, or did you some a library for handling money?
15:46:40  <LordAro> so, i'm on irc
15:46:47  * LordAro waves
15:46:55  <LordAro> Samu: what's up with my ai?
15:47:05  <Samu> http://imgur.com/a/pKJIz
15:47:06  <LordAro> last i checked it was dumb, but stable
15:47:15  <Samu> it bankrupts because money
15:47:57  <LordAro> doesn't look like it's bankrupting to me
15:48:10  <LordAro> it'll pay off the loan at some point
15:48:20  <LordAro> i don't recall what the threshold is
15:48:38  <Alberth> apparently it's dipping below 0 just when the bankruptcy calculation is
15:49:00  <Alberth> (didn't check that)
15:49:12  *** Gja has joined #openttd
15:49:18  <LordAro> :/
15:49:45  <Alberth> it lives a bit too close to the edge :p
15:50:44  <LordAro> teehee
15:50:50  <Samu> https://www.tt-forums.net/viewtopic.php?p=1170861#p1170861 - i posted my reports there
15:50:57  <Samu> just without the screenshot
15:52:57  <LordAro> i'm not sure i've touched the code in 5 years
15:53:02  <Alberth> expanding yourself into bankruptcy :p
15:53:04  <LordAro> gawd, has it been that long?
15:53:19  <Alberth> yep
15:55:13  <Alberth> freerct started in 2011
15:57:54  <LordAro> #old
15:58:23  <Alberth> ha!
15:59:31  <LordAro> :p
16:11:38  <Samu> LordAro: https://hg.openttd.org/trunk.hg/file/66fec4eea8bb/src/economy.cpp#l651
16:11:52  <Samu> on new month
16:11:56  <Samu> that happens
16:12:41  * LordAro mumbles something about a function that takes no parameters and returns nothing
16:17:06  <frosch123> abort()
16:19:05  <Milek7_> egrep "void .+\(\)" -r . | wc -l
16:19:05  <Milek7_> 2159
16:19:48  <LordAro> ottd was made to work with c++, not use it well :>
16:19:53  <Eddi|zuHause> what's wrong with that? plenty of ways to have side effects
16:20:42  <LordAro> it's considered a "code smell" as it's decidedly inclear from the function call what the function does and what it modifies
16:21:09  <Samu> SynTrans also suffers from working too close to max loan
16:21:25  <Eddi|zuHause> i don't agree with that logic. it may apply to some specific cases, but not in general
16:23:02  <Milek7_> and requires stuff like Backup<CompanyByte>
16:25:04  <Eddi|zuHause> well, that's a workaround resulting from using global variables (instead of other context-wrapping systems like object-orientation)
16:26:48  <LordAro> most consider such systems to be better than global variables :)
16:29:56  <Samu> back, so it's just 3 AIs with this problem with inflation turned off
16:30:19  <Samu> AroAI, SynTrans and EpicTrans
16:30:31  <Samu> i have yet to test inflation turned on
16:30:49  <Samu> i thought there was more :(
16:31:22  <Samu> with inflation turned on, i know that EpicTrans doesn't have this problem
16:31:35  <Samu> he doesn't loan
16:33:17  <Milek7_> Samu: do you maintain some ai benchmark list? :D
16:33:44  <Samu> hmm kinda
16:34:34  <Eddi|zuHause> LordAro: sure, but it's difficult to transition from one system to another
16:35:09  *** sla_ro|master has joined #openttd
16:35:42  <Milek7_> rather that once it works nobody have incentive to touch it
16:36:28  <LordAro> oh, i entirely agree
16:36:49  <LordAro> doesn't mean it shouldn't be done though ;)
16:38:25  *** KenjiE20 has quit IRC
16:38:38  <Milek7_> it is possible to overload no argument version to call normal version with _current_company, so old code still works and transition can be done incrementally
16:39:02  *** Wolf01 has quit IRC
16:39:06  *** KenjiE20 has joined #openttd
16:39:28  *** Wolf01 has joined #openttd
16:40:17  <Samu> i'm currently testing 6 ais
16:40:28  <Samu> actually 2 ais, but different tests with them
16:41:38  <Samu> I suspect AIAI inclusion of mail trucks is done wrong
16:41:52  <Samu> will know for sure when it reaches 2051
16:44:06  <Samu> WmDOT requires luck to avoid a bankrupt
16:44:37  <Samu> he still masses ships that cross the world one side to another
16:47:40  <Samu> i don't like AIAI station spreading at all :(
16:48:14  <Samu> seems unfair
16:51:31  *** smoke_fumus has joined #openttd
17:02:47  *** TheMask96 has quit IRC
17:04:18  <Wolf01> BBL, maybe
17:04:32  *** Wolf01 has quit IRC
17:08:26  *** TheMask96 has joined #openttd
17:10:41  *** HerzogDeXtEr has joined #openttd
17:19:03  <Eddi|zuHause> yes, that should be possible
17:19:35  <Eddi|zuHause> but i don't think it's worth it
17:20:10  <Eddi|zuHause> because you need to pass the company recursively to all commands
17:21:41  <Milek7_> and?
17:22:46  <Eddi|zuHause> that means whatever new system you're trying to introduce, it won't work until you completely converted everything
17:24:17  <Eddi|zuHause> and that means it's better to just rip the old system out and replace it with the new system in one go, because you're not limited by the "compatibility" with the old system
17:45:45  <DorpsGek> Commit by translators :: r27658 trunk/src/lang/danish.txt (2016-10-06 19:45:36 +0200 )
17:45:46  <DorpsGek> -Update from Eints:
17:45:47  <DorpsGek> danish: 1 change by Knogle
17:49:19  *** glx has joined #openttd
17:49:20  *** ChanServ sets mode: +v glx
18:05:42  *** ricus has quit IRC
18:06:44  *** Supercheese has joined #openttd
18:08:48  *** Progman has joined #openttd
18:20:31  *** gelignite has joined #openttd
18:21:45  *** andythenorth has joined #openttd
18:22:16  *** ricus has joined #openttd
18:30:42  *** f6b7 has joined #openttd
18:30:54  <f6b7> it is a me Mario !
18:33:19  *** f6b7 has left #openttd
18:38:30  <andythenorth> o/
18:38:35  <andythenorth> Thursday cat
18:38:57  <frosch123> thunder cat?
18:39:22  <andythenorth> well played
18:45:01  <Milek7_> hmm
18:45:14  <Milek7_> newgrf can alter vehicles added by other newgrfs?
18:46:08  <frosch123> let's say, they can reimplement them
18:46:35  <frosch123> differently
19:20:08  *** frosch123 has quit IRC
19:37:53  *** sla_ro|master has quit IRC
19:41:14  <Samu> jun
19:45:47  *** Supercheese has quit IRC
19:48:08  <Samu> dec bankrupt
19:50:23  *** HerzogDeXtEr has quit IRC
19:50:44  <Samu> think i'm gonna reduce the counting of months of bankruptcy from 10 to 9
19:51:04  <Samu> shift all monthly cases by -1
19:51:55  <Samu> probably going to need a savegame conversion t.t
19:52:32  *** Alberth has left #openttd
19:53:07  *** andythenorth has left #openttd
19:54:49  <Samu> jun
19:55:29  <Samu> strange, this doesn't match my expectation
19:56:19  <Samu> if the company is bankrupting in december, then something's wrong
19:56:24  <Samu> i failed somewhere
20:01:48  <Samu> dec bankrupt :/
20:01:52  <Samu> where did I fail?
20:27:42  *** Eddi|zuHause has quit IRC
20:28:11  *** Eddi|zuHause has joined #openttd
20:29:07  <Samu> damn network queueing of commands
20:29:09  <Samu> grrr
20:32:08  *** sim-al2 has joined #openttd
20:40:48  *** keoz has joined #openttd
20:58:28  <Samu> nevermind, i understand now
20:58:50  <Samu> just a bad example :(
21:00:03  *** ricus has quit IRC
21:00:18  <Samu> I had no infrastructure
21:02:31  <Samu> I'm more convinced that bankrupt checking has to be done before any accounting takes place. Accounting for loan interest and "other" costs already take place after the bankruptcy check, so why not do the same for the infrastructure costs?
21:06:26  <Samu> even inflaction is accounted after bankrupt checking
21:07:01  <Samu> look at line 1948 economy.cpp
21:09:09  <Samu> on the other hand, infrastructure costs evades the inflation adjustments
21:09:17  <Samu> since it happens before inflation
21:09:33  <Samu> hmm...
21:09:47  <Samu> fiscal evasion...
21:11:12  *** Wolf01 has joined #openttd
21:11:29  <Wolf01> o/
21:12:27  <Samu> who's an economist expert?
21:13:16  <Wolf01> Deja vu
21:13:42  *** FLHerne has joined #openttd
21:15:14  <Samu> openttd companies practice fiscal evasion :p j/k
21:15:23  <Samu> but look at it, someone
21:16:07  <Samu> what is the correct order for accounting costs and inflation?
21:16:17  <Wolf01> Nah, all OTTD companies are registered in Ireland
21:26:38  <sim-al2> Infrastructure costs with inflation would get brutal quickly...
21:29:17  <Samu> there's always infrastructure costs
21:29:44  <Samu> ah, i don't mean the infrastructure maintenance game setting
21:29:50  <sim-al2> oh
21:30:09  <sim-al2> There is a constant monthly costs of like 500 pounds or so
21:30:11  <Samu> but they're still accounted like the others
21:30:32  <sim-al2> Even if there's no company property at all
21:32:13  <Samu> https://hg.openttd.org/trunk.hg/file/89ed4f06672c/src/economy.cpp#l662
21:32:29  <Samu> those costs are the "other" category, they're done after inflation
21:32:57  <Samu> line 662 is for the infrastructure costs
21:33:10  <sim-al2> Ah ok
21:33:14  <Samu> the "other" category is ... somewhere else, let me find
21:34:04  *** srhnsn has quit IRC
21:34:36  <Samu> https://hg.openttd.org/trunk.hg/file/89ed4f06672c/src/economy.cpp#l1943
21:34:58  <Samu> Pay Interest includes the "other"
21:35:06  <Samu> and the loan interest
21:36:02  <Samu>   1948 	CompaniesGenStatistics(); - infrastructure costs are here
21:36:47  <Samu> 1949-1952 - inflation stuff
21:37:07  <Samu> 1953 	CompaniesPayInterest(); - loan interest and "other"
21:37:44  <Samu> shouldn't inflation be the first thing to compute?
21:38:16  <Samu> who's an economy expert :(
21:52:10  <Samu> either the first or the last, not in-between
21:52:30  <Samu> unless it makes sense from an economist expert
21:52:38  <Samu> point of view
22:00:45  *** Progman has quit IRC
22:20:41  <Samu> no one has an opinion? :(
22:27:02  <ST2> it's hard to have an opinion when most of the people is already sleeping :P
22:27:53  <Samu> hi there :)
22:28:17  <ST2> been busy lauching our test server #XX
22:28:27  <ST2> and work not ended yet :S
22:35:52  <Samu> this is quite confusing during network mode
22:36:34  *** keoz has quit IRC
22:36:36  <Samu> there are variables that are sent into a queue, like costs
22:36:53  <Samu> others are changed immediately
22:37:34  <Samu> like month of bankruptcy
22:39:11  <Samu> i wonder how everything keeps synced, it's weird that it's sync'ed
22:40:35  <FLHerne> Everything executes identically on every client, all the time
22:40:46  <FLHerne> The only things that need to be synced are things the user does
22:41:11  *** Knogle has quit IRC
22:42:31  <Samu> i'm trying to subtract money from a bankrupted company
22:42:39  <Samu> this is really weird
22:43:12  <Samu> nevermind, it's not yet bankrupted
22:43:27  *** Snail has joined #openttd
22:43:30  <Samu> it will be next month, i wonder if it will do that
22:44:45  <Wolf01> I think a company should not bankrupt if the profit is positive but bank balance is negative for 3 months
22:46:11  <FLHerne> Wolf01: That would allow you to invest almost infinitely in infrastructure
22:46:55  <Samu> okay, the bankrupt command was sent into a queue
22:46:59  <FLHerne> Wolf01: You could cover the entire map in the first day, provided it was profitable by the three-month limit
22:47:14  <Wolf01> But if you become very large you have really high infrastructure cost
22:47:36  <Samu> and now... i'm subtracting money from a company that is queued as bankrupted
22:47:41  <Samu> weird stuff
22:47:44  <FLHerne> Sure, but it makes money completely meaningless
22:48:01  <Wolf01> And you can't profit with just few vehicles with a large infrastructure
22:48:03  <FLHerne> ah, no
22:48:03  <Samu> it really is doing this.. it's so weird
22:48:26  <FLHerne> I should sleep before arguing, missing the very obvious
22:50:06  <Wolf01> But if you have a little company and few vehicles, and you make a mistake like purchasing an expensive train which makes your bank balance go to red, and you sell that train to start earning money again
22:51:15  *** gelignite has quit IRC
22:53:10  <Wolf01> With just some vehicles and low profits you will take ages to go green again, but this doesn't mean you are in bankrupt, you might be charged with more interests but if you still make more money, even 1000$ you are doing good
22:56:47  <Samu> alright, with my patch, company bankrupted in december, now let's try with original code
22:59:36  <Samu> months of bankruptcy kicked in february
22:59:57  <Samu> 2+9 = 11
23:00:12  <Samu> i expect bankrupt in november with original code, let's see if that happens
23:00:39  *** Supercheese has joined #openttd
23:08:27  <Samu> 	}
23:08:46  <Samu> a 31 days month takes 71,668 ms seconds to pass
23:09:00  <Samu> oops 71s 668ms
23:09:56  <Samu> 30 day month takes 69s 343ms
23:10:24  <Wolf01> 'night
23:10:27  <ST2> and what causes that "delay"?
23:10:33  <ST2> gn8  :)
23:10:39  *** Wolf01 has quit IRC
23:11:20  <Samu> i check bankruptcy before applying infrastructure costs... apparently it gains 1 more month, this is not what I intended, will try to fix it
23:11:42  <Samu> bankrupted in november
23:11:57  <Samu> alright, i think i know how to fix this
23:12:04  <Samu> instead of counting to 10, i count to 9
23:12:13  <Samu> but will need a savegame conversion :(
23:14:11  <Samu> original code starts the counter in february
23:14:18  <Samu> my patch starts the counter in march
23:14:57  <Samu> 2+10-1 = 11
23:15:10  <Samu> 3+9-1 = 11
23:26:07  *** FLHerne has quit IRC

Powered by YARRSTE version: svn-trunk