Back to Home / #openttd / 2016 / 10 / Prev Day | Next Day
#openttd IRC Logs for 2016-10-06

---Logopened Thu Oct 06 00:00:57 2016
01:34-!-andythenorth [~Andy@cpc87153-aztw31-2-0-cust212.18-1.cable.virginm.net] has joined #openttd
01:34-!-andythenorth is "Andy" on #openttd
01:35-!-andythenorth [~Andy@cpc87153-aztw31-2-0-cust212.18-1.cable.virginm.net] has left #openttd []
01:36-!-orudge [~orudge@000128f1.user.oftc.net] has quit [Remote host closed the connection]
02:20-!-Knogle [Knogle@x1-6-28-c6-8e-97-e8-d2.cpe.webspeed.dk] has joined #openttd
02:20-!-Knogle is "..." on #openttd.notice #openttd.dev #openttd
02:42-!-keoz [~keikoz@pha75-1-81-57-54-15.fbx.proxad.net] has joined #openttd
02:42-!-keoz is "Grmph" on #openttd
02:53-!-keoz [~keikoz@pha75-1-81-57-54-15.fbx.proxad.net] has quit [Ping timeout: 480 seconds]
03:15-!-Supercheese [~Superchee@cpe-76-178-137-142.natnow.res.rr.com] has quit [Ping timeout: 480 seconds]
03:41-!-FLHerne [~flh@cpc4-papw5-2-0-cust175.5-3.cable.virginm.net] has joined #openttd
03:41-!-FLHerne is "Francis Herne" on #openttd
05:39-!-FLHerne [~flh@cpc4-papw5-2-0-cust175.5-3.cable.virginm.net] has quit [Read error: No route to host]
05:57<argoneus>good morning train friends
06:25-!-Samu [~oftc-webi@po1-84-91-250-188.netvisao.pt] has joined #openttd
06:25-!-Samu is "OFTC WebIRC Client" on #openttd
06:29-!-Wolf01 [~Wolf01@host24-112-dynamic.116-80-r.retail.telecomitalia.it] has joined #openttd
06:29-!-Wolf01 is "Wolf01" on #openttd
06:29<Wolf01>o/
06:47<Samu>hi
07:01-!-zeknurn` [~sup@host-85-30-181-191.sydskane.nu] has joined #openttd
07:01-!-zeknurn` is "..." on #openttd
07:05-!-zeknurn [~sup@host-85-30-181-191.sydskane.nu] has quit [Ping timeout: 480 seconds]
07:05-!-zeknurn` is now known as zeknurn
07:08-!-Snail [~jacopocol@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
07:08-!-Snail is "Jacopo Coletto" on #openttd
07:09-!-Mazur [~mazur@5ED2923C.cm-7-3c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
07:16-!-Snail_ [~jacopocol@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
07:16-!-Snail_ is "Jacopo Coletto" on #openttd
07:16-!-Snail [~jacopocol@cpe-98-14-137-148.nyc.res.rr.com] has quit [Read error: Connection reset by peer]
07:16-!-Snail_ is now known as Snail
07:19-!-Mazur [~mazur@5ED2923C.cm-7-3c.dynamic.ziggo.nl] has joined #openttd
07:19-!-Mazur is "Stefan Linnemann" on #oolite #openttd @#openttdcoop @#openttdcoop.stable
07:34-!-Snail [~jacopocol@cpe-98-14-137-148.nyc.res.rr.com] has quit [Quit: Snail]
08:02-!-zeknurn [~sup@host-85-30-181-191.sydskane.nu] has quit [Ping timeout: 480 seconds]
08:12-!-zeknurn [~sup@host-85-30-181-191.sydskane.nu] has joined #openttd
08:12-!-zeknurn is "..." on #openttd
08:13-!-Arveen [~Arveen@ip-178-202-138-209.hsi09.unitymediagroup.de] has joined #openttd
08:13-!-Arveen is "Arveen" on #openttd
09:09-!-Extrems [super@presper.ipv6.extremscorner.org] has quit [Ping timeout: 480 seconds]
09:10-!-Extrems [super@presper.ipv6.extremscorner.org] has joined #openttd
09:10-!-Extrems is "https://www.extremscorner.org/" on #gcc #openttd
09:19<Samu>who's a date expert? I need to create a "IsLastDayOfTheMonth" bool
09:24<Milek7_>Samu: look at IncreaseDate
09:25<Milek7_>date.cpp:293
09:26<Samu>bool new_month = ymd.month != _cur_month;
09:27<Samu>hmm
09:27<Samu>that's like the last tick of the month
09:28<Samu>it should suffice, I guess, must try it
09:29<Milek7_>no that's first day of next month
09:30<Milek7_>i think
09:30<Milek7_>_month_date_from_year_day[_date + 1] != _cur_month
09:32<Milek7_>no
09:32<Milek7_>_month_date_from_year_day[_date + 1] >> 5 != _cur_month
09:33<Samu>actually, forget about it, I'm gonna try a different approach
09:34<Samu> /* Check for bankruptcy each month */
09:34<Samu>i want to do this check BEFORE computing the new statistics for the company
09:35<Samu>static void CompaniesGenStatistics() line 655
09:35<Samu>bankrupt check is done after the computations, i'm trying to switch
09:36<Samu>my goal here is to avoid AI companies from bankrupting because they work too close to the money limit
09:37<Samu>if the computations are done after the bankrupt check, I am saving many false bankrupts
09:37<Milek7_>how this will change that?
09:38<Samu>on the last day of the previous month, the company is healthy
09:38<Samu>but then those subtracts from maintenance costs and so
09:38<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
09:39<Samu>it triggers a bankrupt warning
09:39<Samu>by accumulation, they can bankrupt, even if they have giant profits
09:39<Samu>it's the case of EpicTrans
09:41<Samu>There are other AIs too with this issue, forgot who they are
09:41<Milek7_>but it anyway bankrupts at 6-9 consecutive months with negative profits
09:41<Milek7_>s/profits/balance/
09:42<Milek7_>but if you want you can just move
09:42<Milek7_>FOR_ALL_COMPANIES(c) { CompanyCheckBankrupt(c); }
09:42<Milek7_>before: if (!_settings_game.economy.infrastructure_maintenance) {
09:46<Samu>there was some road vehicle ai that bankrupted with over 2600 vehicles and profits of £1000k
09:46<Samu>forgot who it was, but it wasn't epictrans
09:47-!-keoz [~keikoz@pha75-1-81-57-54-15.fbx.proxad.net] has joined #openttd
09:47-!-keoz is "Grmph" on #openttd
09:49-!-sim-al2 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has quit [Ping timeout: 480 seconds]
09:50<Samu>i still dont understand how this works
09:50<Samu>company backup byte
09:50<Samu>Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
09:50<Samu>cur_company.Restore();
09:51<Milek7_>what?
09:52<Samu>there's that envolving the infrastructure maintenance
09:52<Samu>but bankrupt checking isn't being included
09:52<Samu>i'm not sure how to move the coude before it
09:53<Milek7_>doesn't matter if you move bankrupt check before or after backup
09:54<Milek7_>but if you want before, you'll also need to move Company *c; definition before it
09:54-!-ialokin [~pi@223.180.16.62.customer.cdi.no] has joined #openttd
09:54-!-ialokin is "pi" on #openttd
09:56<Samu>gonna find some bankrupt saves
09:56<Samu>brb
09:58<Samu>here it is one such save https://www.tt-forums.net/viewtopic.php?p=1170913#p1170913
09:59<Samu>https://www.tt-forums.net/viewtopic.php?p=1170380#p1170380
10:03<Samu>debug is so darn slow :(
10:06-!-ialokin [~pi@223.180.16.62.customer.cdi.no] has quit [Remote host closed the connection]
10:10<Samu>arf, i dont have a good savegame to test this
10:13<Samu>gonna try aroai save
10:18<Samu>waiting for new month
10:18<Samu>running openttd debug with an AI running is utterly slow
10:19<Milek7_>why not compile release?
10:19<Samu>i am using breakpoints, see if it's doing everything correctly
10:26-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
10:26-!-mode/#openttd [+o Alberth] by ChanServ
10:26-!-Alberth is "purple" on @#openttd
10:26<Samu>awesome
10:27<@Alberth>yay!
10:27<Samu>AroAI didn't bankrupt!
10:27<Samu>https://www.tt-forums.net/viewtopic.php?p=1170864#p1170864
10:27<Samu>used this save
10:27<Samu>hi Alberth
10:28<@Alberth>o/
10:33<Samu>this looks good
10:33<Samu>think i'm posting the patch
10:42<Samu>https://paste.openttdcoop.org/p4dbm4xw1
10:42<Samu>does it look good?
10:45-!-srhnsn [~srhnsn@HSI-KBW-109-192-199-246.hsi6.kabel-badenwuerttemberg.de] has joined #openttd
10:45-!-srhnsn is "-" on #osrm #osm-dev #osm-de #osm #debian #openttd
10:52<Samu>ST2: halp
10:53<ST2>o.O
10:53<ST2>:)
10:53<ST2>what you need?
10:53<Samu>i need your feedback on that patch, since u own competitive servers
10:53<Samu>https://www.tt-forums.net/viewtopic.php?f=33&t=75342
10:53<ST2>hard to check it now :(
10:53<ST2>@ work
10:53<Samu>t.t
10:53<Samu>oki
10:54<@Alberth>what does the code at line 24 do?
10:54<ST2>we don't run AI's on our servers anyway
10:55<Samu>yeah, well but the change is company based, doesnt' care if it's ai or not
10:55<Samu>line 24? that's a svn patch line
10:56<Samu>perhaps my comment is misleading
10:56<Samu>shouldn't have mentioned AI in it
10:57<@Alberth>I know it's the svn patch line, but what does the code there do?
10:57<@Alberth>it looks like infra structure calculations, maybe payments?
10:57-!-innocenat [sid8070@id-8070.ealing.irccloud.com] has quit [Ping timeout: 480 seconds]
10:58<Samu>yes, it's infrastructure maintenance costs being subtracted
10:58<@Alberth>why do you remove the bankrupt check after subtracting those payments
10:58<@Alberth>?
10:59<Samu>i moved it up
10:59-!-theholyduck [sid10277@id-10277.ealing.irccloud.com] has quit [Ping timeout: 480 seconds]
10:59<Samu>checks for bankruptcy first before subtracting infrastructure costs
11:00<@Alberth>I know what you did
11:00<@Alberth>I ask why
11:00<@Alberth>since payments could drive you into bankruptcy
11:00<@Alberth>and with your patch you don't check that any more
11:01<Samu>brb
11:01<Samu>are u sure?
11:01<Samu>i don't get what you say :(
11:02<@Alberth>suppose at line 21 you have 1 dollar left
11:02<@Alberth>so your moved check says "all is well"
11:02<@Alberth>right?
11:02<Samu>yeah
11:02<@Alberth>then we do infra structure checks, they cost say 100 dollar
11:03<@Alberth>so at line 27, balance of the company is -99, right?
11:03<Samu>it becomes -99
11:03<Samu>yes
11:03<@Alberth>in the old situation, line 30 declares bankruptcy then
11:03<Samu>gains 1 more month then
11:03<@Alberth>in your patched situation, that check isn't there
11:04<Samu>it will check bankruptcy at the start of the next month
11:05<Milek7_>he wants to prevent bankruptcy of ai who spend always all available money
11:05<Samu>if it's still negative, it adds a month of bankruptcy
11:06<Samu>but the problem might be that humans will take advantage of it as well, hmm i see
11:06<Milek7_>imo this is ai fault that it don't reserve money for maintenance
11:07<@Alberth>you have 3 months or so to sort out your balance, afaik
11:08<@Alberth>maybe even more
11:08<@Alberth>so one month postponing after it already had 3 months?
11:09<Milek7_>if ai always drain available money for building eg. railway it will bankrupt even if it makes much profit
11:10<Samu>it's unfair for ais to bankrupt because they're a few miliseconds into negative
11:10<@Alberth>it will always bankrupt even if you give it 5 years
11:10<Samu>and then for the rest of the month they're positive
11:12<Samu>https://www.tt-forums.net/viewtopic.php?p=1170864#p1170864 - this savegame is prepared to bankrupt AroAI next month
11:12<Samu>how would u deal with this :(
11:12<Milek7_>fix ai
11:12<@Alberth>that would seem like the proper action indeed
11:13<@Alberth>it is known how openttd computes finances, it can handle accordingly
11:15<Samu>He has a £1,100k profit and 2600 road vehicles when this happens.
11:15-!-Arveen [~Arveen@ip-178-202-138-209.hsi09.unitymediagroup.de] has quit [Quit: Nettalk6 - www.ntalk.de]
11:15<Samu>t.t
11:16<Samu>i dunno it's just wrong
11:16<Samu>makes no sense
11:19<@Alberth>I always drive below the speed limit, except this once
11:19<@Alberth>I still get the fine
11:20<Samu>http://imgur.com/a/pKJIz - :|
11:20<@Alberth>if it's making that much money, it's being stupid of getting near the limit that close
11:20<@Alberth>it should just do nothing for a month, and use 1,000k pound as limit
11:20-!-theholyduck [sid10277@id-10277.ealing.irccloud.com] has joined #openttd
11:20-!-theholyduck is "Martin Frydenlund" on #openttd #openttdcoop
11:21<Samu>it's not the only ai doing it
11:21<Samu>syntrans
11:21<Samu>epictrans
11:21<Samu>there's some others, i forgot now who they are
11:22<Samu>epictrans was at 4900 road vehicles, then bankrupted
11:22<Samu>i look at it and it makes no sense
11:23-!-frosch123 [~frosch@00013ce7.user.oftc.net] has joined #openttd
11:23-!-frosch123 is "frosch" on #openttdcoop.devzone #openttd.dev #openttd
11:24<@Alberth>welcome to the world of computers where sense has no meaning
11:24<@Alberth>hola
11:25-!-innocenat [sid8070@id-8070.ealing.irccloud.com] has joined #openttd
11:25-!-innocenat is "innocenat" on #openttd #openttdcoop
11:31<Samu>hmm so that means my patch sucks
11:32<@Alberth>there is a boundary somewhere
11:33<@Alberth>you can move the boundary, but that means additional space for the AIs, so some authors will take advantage of it
11:33<@Alberth>and you're back to square one
11:33<frosch123>maybe meaning has a sense then
11:34<frosch123>moi
11:37<Samu>the situation gets worse the higher the infrastructure amount of a company :(
11:37<Samu>oh well, so it's the ai's author to deal with it?
11:37<Samu>LordAro: fix ur ai!
11:38<Milek7_>you can also fix it ;p
11:39<Samu>I did this swap, but apparently it's a bad idea
11:41<@Alberth>it's just not the right solution. I doubt the solution should be in OpenTTD, for the above reason.
11:41<@Alberth>we've had the same rule for a decade or so, it should be known by now :)
11:43<@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
11:44-!-keoz [~keikoz@pha75-1-81-57-54-15.fbx.proxad.net] has quit [Ping timeout: 480 seconds]
11:44<@Alberth>but if you insist on living on the edge, occasionally you fall :)
11:46<LordAro>Samu: D:
11:46<@Alberth>hi hi
11:46*LordAro is in a lecture
11:46<@Alberth>own code, or did you some a library for handling money?
11:46<LordAro>so, i'm on irc
11:46*LordAro waves
11:46<LordAro>Samu: what's up with my ai?
11:47<Samu>http://imgur.com/a/pKJIz
11:47<LordAro>last i checked it was dumb, but stable
11:47<Samu>it bankrupts because money
11:47<LordAro>doesn't look like it's bankrupting to me
11:48<LordAro>it'll pay off the loan at some point
11:48<LordAro>i don't recall what the threshold is
11:48<@Alberth>apparently it's dipping below 0 just when the bankruptcy calculation is
11:49<@Alberth>(didn't check that)
11:49-!-Gja [~Martin@93-167-84-102-static.dk.customer.tdc.net] has joined #openttd
11:49-!-Gja is "Martin" on #bcache #openttd
11:49<LordAro>:/
11:49<@Alberth>it lives a bit too close to the edge :p
11:50<LordAro>teehee
11:50<Samu>https://www.tt-forums.net/viewtopic.php?p=1170861#p1170861 - i posted my reports there
11:50<Samu>just without the screenshot
11:52<LordAro>i'm not sure i've touched the code in 5 years
11:53<@Alberth>expanding yourself into bankruptcy :p
11:53<LordAro>gawd, has it been that long?
11:53<@Alberth>yep
11:55<@Alberth>freerct started in 2011
11:57<LordAro>#old
11:58<@Alberth>ha!
11:59<LordAro>:p
12:11<Samu>LordAro: https://hg.openttd.org/trunk.hg/file/66fec4eea8bb/src/economy.cpp#l651
12:11<Samu>on new month
12:11<Samu>that happens
12:12*LordAro mumbles something about a function that takes no parameters and returns nothing
12:17<frosch123>abort()
12:19<Milek7_>egrep "void .+\(\)" -r . | wc -l
12:19<Milek7_>2159
12:19<LordAro>ottd was made to work with c++, not use it well :>
12:19<Eddi|zuHause>what's wrong with that? plenty of ways to have side effects
12:20<LordAro>it's considered a "code smell" as it's decidedly inclear from the function call what the function does and what it modifies
12:21<Samu>SynTrans also suffers from working too close to max loan
12:21<Eddi|zuHause>i don't agree with that logic. it may apply to some specific cases, but not in general
12:23<Milek7_>and requires stuff like Backup<CompanyByte>
12:25<Eddi|zuHause>well, that's a workaround resulting from using global variables (instead of other context-wrapping systems like object-orientation)
12:26<LordAro>most consider such systems to be better than global variables :)
12:29<Samu>back, so it's just 3 AIs with this problem with inflation turned off
12:30<Samu>AroAI, SynTrans and EpicTrans
12:30<Samu>i have yet to test inflation turned on
12:30<Samu>i thought there was more :(
12:31<Samu>with inflation turned on, i know that EpicTrans doesn't have this problem
12:31<Samu>he doesn't loan
12:33<Milek7_>Samu: do you maintain some ai benchmark list? :D
12:33<Samu>hmm kinda
12:34<Eddi|zuHause>LordAro: sure, but it's difficult to transition from one system to another
12:35-!-sla_ro|master [slamaster@31.5.74.162] has joined #openttd
12:35-!-sla_ro|master is "slamaster" on #sla #openttd #love
12:35<Milek7_>rather that once it works nobody have incentive to touch it
12:36<LordAro>oh, i entirely agree
12:36<LordAro>doesn't mean it shouldn't be done though ;)
12:38-!-KenjiE20 [~kenji@vps.longbowslair.co.uk] has quit [Remote host closed the connection]
12: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
12:39-!-Wolf01 [~Wolf01@0001288e.user.oftc.net] has quit [Ping timeout: 480 seconds]
12:39-!-KenjiE20 [~kenji@vps.longbowslair.co.uk] has joined #openttd
12:39-!-KenjiE20 is "kenji" on #openttd
12:39-!-Wolf01 [~Wolf01@host24-112-dynamic.116-80-r.retail.telecomitalia.it] has joined #openttd
12:39-!-Wolf01 is "Wolf01" on #openttd
12:40<Samu>i'm currently testing 6 ais
12:40<Samu>actually 2 ais, but different tests with them
12:41<Samu>I suspect AIAI inclusion of mail trucks is done wrong
12:41<Samu>will know for sure when it reaches 2051
12:44<Samu>WmDOT requires luck to avoid a bankrupt
12:44<Samu>he still masses ships that cross the world one side to another
12:47<Samu>i don't like AIAI station spreading at all :(
12:48<Samu>seems unfair
12:51-!-smoke_fumus [~smoke_fum@dynamic-vpdn-93-125-62-132.telecom.by] has joined #openttd
12:51-!-smoke_fumus is "KVIrc 4.2.0 Equilibrium http://kvirc.net/" on #qemu #oolite #openttd
13:02-!-TheMask96 [martijn@wrath.vhost.ne2000.nl] has quit [Ping timeout: 480 seconds]
13:04<Wolf01>BBL, maybe
13:04-!-Wolf01 [~Wolf01@0001288e.user.oftc.net] has quit []
13:08-!-TheMask96 [martijn@envy.vhost.ne2000.nl] has joined #openttd
13:08-!-TheMask96 is "Martijn Zweistra" on #openttd.notice #openttd
13:10-!-HerzogDeXtEr [~farci@i59F6A42F.versanet.de] has joined #openttd
13:10-!-HerzogDeXtEr is "purple" on #openttd
13:19<Eddi|zuHause>yes, that should be possible
13:19<Eddi|zuHause>but i don't think it's worth it
13:20<Eddi|zuHause>because you need to pass the company recursively to all commands
13:21<Milek7_>and?
13:22<Eddi|zuHause>that means whatever new system you're trying to introduce, it won't work until you completely converted everything
13:24<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
13:45<@DorpsGek>Commit by translators :: r27658 trunk/src/lang/danish.txt (2016-10-06 19:45:36 +0200 )
13:45<@DorpsGek>-Update from Eints:
13:45<@DorpsGek>danish: 1 change by Knogle
13:49-!-glx [~glx@000128ec.user.oftc.net] has joined #openttd
13:49-!-mode/#openttd [+v glx] by ChanServ
13:49-!-glx is "Loïc GUILLOUX" on +#openttd
14:05-!-ricus [~ricus@chunli.enric.me] has quit [Quit: 'Til next time!]
14:06-!-Supercheese [~Superchee@cpe-76-178-137-142.natnow.res.rr.com] has joined #openttd
14:06-!-Supercheese is "Supercheese" on #openttd #openttdcoop.devzone +#openttd.dev
14:08-!-Progman [~progman@p57A199C1.dip0.t-ipconnect.de] has joined #openttd
14:08-!-Progman is "Peter Henschel" on #openttdcoop.dev #openttdcoop #openttd
14:20-!-gelignite [~gelignite@x4db5af1d.dyn.telefonica.de] has joined #openttd
14:20-!-gelignite is "gelignite" on #openttd #openttdcoop.devzone
14:21-!-andythenorth [~Andy@cpc87153-aztw31-2-0-cust212.18-1.cable.virginm.net] has joined #openttd
14:21-!-andythenorth is "Andy" on #openttd
14:22-!-ricus [~ricus@chunli.enric.me] has joined #openttd
14:22-!-ricus is "ricus" on #openttd #awesome
14:30-!-f6b7 [~admin@ns344761.ip-94-23-36.eu] has joined #openttd
14:30-!-f6b7 is "Got ZNC?" on #openttd
14:30<f6b7>it is a me Mario !
14:33-!-f6b7 [~admin@ns344761.ip-94-23-36.eu] has left #openttd []
14:38<andythenorth>o/
14:38<andythenorth>Thursday cat
14:38<frosch123>thunder cat?
14:39<andythenorth>well played
14:45<Milek7_>hmm
14:45<Milek7_>newgrf can alter vehicles added by other newgrfs?
14:46<frosch123>let's say, they can reimplement them
14:46<frosch123>differently
15:20-!-frosch123 [~frosch@00013ce7.user.oftc.net] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
15:37-!-sla_ro|master [slamaster@31.5.74.162] has quit []
15:41<Samu>jun
15:45-!-Supercheese [~Superchee@cpe-76-178-137-142.natnow.res.rr.com] has quit [Ping timeout: 480 seconds]
15:48<Samu>dec bankrupt
15:50-!-HerzogDeXtEr [~farci@i59F6A42F.versanet.de] has quit [Read error: Connection reset by peer]
15:50<Samu>think i'm gonna reduce the counting of months of bankruptcy from 10 to 9
15:51<Samu>shift all monthly cases by -1
15:51<Samu>probably going to need a savegame conversion t.t
15:52-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
15:53-!-andythenorth [~Andy@cpc87153-aztw31-2-0-cust212.18-1.cable.virginm.net] has left #openttd []
15:54<Samu>jun
15:55<Samu>strange, this doesn't match my expectation
15:56<Samu>if the company is bankrupting in december, then something's wrong
15:56<Samu>i failed somewhere
16:01<Samu>dec bankrupt :/
16:01<Samu>where did I fail?
16:27-!-Eddi|zuHause [~johekr@p5DC6768E.dip0.t-ipconnect.de] has quit []
16:28-!-Eddi|zuHause [~johekr@p5DC6768E.dip0.t-ipconnect.de] has joined #openttd
16:28-!-Eddi|zuHause is "Johannes E. Krause" on #openttd
16:29<Samu>damn network queueing of commands
16:29<Samu>grrr
16:32-!-sim-al2 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has joined #openttd
16:32-!-sim-al2 is "sim-al2" on #openttd @#/r/openttd
16:40-!-keoz [~keikoz@pha75-1-81-57-54-15.fbx.proxad.net] has joined #openttd
16:40-!-keoz is "Grmph" on #openttd
16:58<Samu>nevermind, i understand now
16:58<Samu>just a bad example :(
17:00-!-ricus [~ricus@chunli.enric.me] has quit [Quit: 'Til next time!]
17:00<Samu>I had no infrastructure
17:02<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?
17:06<Samu>even inflaction is accounted after bankrupt checking
17:07<Samu>look at line 1948 economy.cpp
17:09<Samu>on the other hand, infrastructure costs evades the inflation adjustments
17:09<Samu>since it happens before inflation
17:09<Samu>hmm...
17:09<Samu>fiscal evasion...
17:11-!-Wolf01 [~Wolf01@host24-112-dynamic.116-80-r.retail.telecomitalia.it] has joined #openttd
17:11-!-Wolf01 is "Wolf01" on #openttd
17:11<Wolf01>o/
17:12<Samu>who's an economist expert?
17:13<Wolf01>Deja vu
17:13-!-FLHerne [~flh@cpc4-papw5-2-0-cust175.5-3.cable.virginm.net] has joined #openttd
17:13-!-FLHerne is "Francis Herne" on #openttd
17:15<Samu>openttd companies practice fiscal evasion :p j/k
17:15<Samu>but look at it, someone
17:16<Samu>what is the correct order for accounting costs and inflation?
17:16<Wolf01>Nah, all OTTD companies are registered in Ireland
17:26<sim-al2>Infrastructure costs with inflation would get brutal quickly...
17:29<Samu>there's always infrastructure costs
17:29<Samu>ah, i don't mean the infrastructure maintenance game setting
17:29<sim-al2>oh
17:30<sim-al2>There is a constant monthly costs of like 500 pounds or so
17:30<Samu>but they're still accounted like the others
17:30<sim-al2>Even if there's no company property at all
17:32<Samu>https://hg.openttd.org/trunk.hg/file/89ed4f06672c/src/economy.cpp#l662
17:32<Samu>those costs are the "other" category, they're done after inflation
17:32<Samu>line 662 is for the infrastructure costs
17:33<sim-al2>Ah ok
17:33<Samu>the "other" category is ... somewhere else, let me find
17:34-!-srhnsn [~srhnsn@HSI-KBW-109-192-199-246.hsi6.kabel-badenwuerttemberg.de] has quit [Quit: srhnsn]
17:34<Samu>https://hg.openttd.org/trunk.hg/file/89ed4f06672c/src/economy.cpp#l1943
17:34<Samu>Pay Interest includes the "other"
17:35<Samu>and the loan interest
17:36<Samu> 1948 CompaniesGenStatistics(); - infrastructure costs are here
17:36<Samu>1949-1952 - inflation stuff
17:37<Samu>1953 CompaniesPayInterest(); - loan interest and "other"
17:37<Samu>shouldn't inflation be the first thing to compute?
17:38<Samu>who's an economy expert :(
17:52<Samu>either the first or the last, not in-between
17:52<Samu>unless it makes sense from an economist expert
17:52<Samu>point of view
18:00-!-Progman [~progman@p57A199C1.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
18:20<Samu>no one has an opinion? :(
18:27<ST2>it's hard to have an opinion when most of the people is already sleeping :P
18:27<Samu>hi there :)
18:28<ST2>been busy lauching our test server #XX
18:28<ST2>and work not ended yet :S
18:35<Samu>this is quite confusing during network mode
18:36-!-keoz [~keikoz@pha75-1-81-57-54-15.fbx.proxad.net] has quit [Ping timeout: 480 seconds]
18:36<Samu>there are variables that are sent into a queue, like costs
18:36<Samu>others are changed immediately
18:37<Samu>like month of bankruptcy
18:39<Samu>i wonder how everything keeps synced, it's weird that it's sync'ed
18:40<FLHerne>Everything executes identically on every client, all the time
18:40<FLHerne>The only things that need to be synced are things the user does
18:41-!-Knogle [Knogle@x1-6-28-c6-8e-97-e8-d2.cpe.webspeed.dk] has quit [Read error: Connection reset by peer]
18:42<Samu>i'm trying to subtract money from a bankrupted company
18:42<Samu>this is really weird
18:43<Samu>nevermind, it's not yet bankrupted
18:43-!-Snail [~jacopocol@cpe-98-14-137-148.nyc.res.rr.com] has joined #openttd
18:43-!-Snail is "Jacopo Coletto" on #openttd
18:43<Samu>it will be next month, i wonder if it will do that
18:44<Wolf01>I think a company should not bankrupt if the profit is positive but bank balance is negative for 3 months
18:46<FLHerne>Wolf01: That would allow you to invest almost infinitely in infrastructure
18:46<Samu>okay, the bankrupt command was sent into a queue
18:46<FLHerne>Wolf01: You could cover the entire map in the first day, provided it was profitable by the three-month limit
18:47<Wolf01>But if you become very large you have really high infrastructure cost
18:47<Samu>and now... i'm subtracting money from a company that is queued as bankrupted
18:47<Samu>weird stuff
18:47<FLHerne>Sure, but it makes money completely meaningless
18:48<Wolf01>And you can't profit with just few vehicles with a large infrastructure
18:48<FLHerne>ah, no
18:48<Samu>it really is doing this.. it's so weird
18:48<FLHerne>I should sleep before arguing, missing the very obvious
18:50<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
18:51-!-gelignite [~gelignite@x4db5af1d.dyn.telefonica.de] has quit [Quit: http://bit.ly/1kso8Ta]
18:53<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
18:56<Samu>alright, with my patch, company bankrupted in december, now let's try with original code
18:59<Samu>months of bankruptcy kicked in february
18:59<Samu>2+9 = 11
19:00<Samu>i expect bankrupt in november with original code, let's see if that happens
19:00-!-Supercheese [~Superchee@50-37-112-200.mscw.id.frontiernet.net] has joined #openttd
19:00-!-Supercheese is "Supercheese" on #openttd #openttdcoop.devzone +#openttd.dev
19:08<Samu> }
19:08<Samu>a 31 days month takes 71,668 ms seconds to pass
19:09<Samu>oops 71s 668ms
19:09<Samu>30 day month takes 69s 343ms
19:10<Wolf01>'night
19:10<ST2>and what causes that "delay"?
19:10<ST2>gn8 :)
19:10-!-Wolf01 [~Wolf01@0001288e.user.oftc.net] has quit []
19:11<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
19:11<Samu>bankrupted in november
19:11<Samu>alright, i think i know how to fix this
19:12<Samu>instead of counting to 10, i count to 9
19:12<Samu>but will need a savegame conversion :(
19:14<Samu>original code starts the counter in february
19:14<Samu>my patch starts the counter in march
19:14<Samu>2+10-1 = 11
19:15<Samu>3+9-1 = 11
19:26-!-FLHerne [~flh@cpc4-papw5-2-0-cust175.5-3.cable.virginm.net] has quit [Ping timeout: 480 seconds]
20:38-!-HerzogDeXtEr [~farci@i59F6A42F.versanet.de] has joined #openttd
20:38-!-HerzogDeXtEr is "purple" on #openttd
20:44-!-tokai|noir [~tokai@00012860.user.oftc.net] has joined #openttd
20:44-!-mode/#openttd [+v tokai|noir] by ChanServ
20:44-!-tokai|noir is "Christian Rosentreter" on +#openttd
20:46<Samu>@calc 3 * 30 * 74 / (15 - 1)
20:46<@DorpsGek>Samu: 475.714285714
20:51-!-tokai [~tokai@00012860.user.oftc.net] has quit [Ping timeout: 480 seconds]
20:53-!-Supercheese [~Superchee@50-37-112-200.mscw.id.frontiernet.net] has quit [Quit: Valete omnes]
21:06-!-Samu [~oftc-webi@po1-84-91-250-188.netvisao.pt] has quit [Remote host closed the connection]
21:30-!-Supercheese [~Superchee@cpe-76-178-137-142.natnow.res.rr.com] has joined #openttd
21:30-!-Supercheese is "Supercheese" on #openttd #openttdcoop.devzone +#openttd.dev
21:49-!-HerzogDeXtEr [~farci@i59F6A42F.versanet.de] has quit [Read error: Connection reset by peer]
22:10-!-glx [~glx@000128ec.user.oftc.net] has quit [Quit: Bye]
23:58-!-Snail [~jacopocol@cpe-98-14-137-148.nyc.res.rr.com] has quit [Quit: Snail]
23:58-!-Knogle [Knogle@x1-6-28-c6-8e-97-e8-d2.cpe.webspeed.dk] has joined #openttd
23:58-!-Knogle is "..." on #openttd.notice #openttd.dev #openttd
---Logclosed Fri Oct 07 00:00:58 2016