Back to Home / #openttd / 2018 / 09 / Prev Day | Next Day
#openttd IRC Logs for 2018-09-03

---Logopened Mon Sep 03 00:00:33 2018
00:57-!-Wacko1976 [] has joined #openttd
00:57-!-Wacko1976 is "The Chat Cool People Use" on #openttd #/r/openttd
01:08-!-nielsm [] has joined #openttd
01:08-!-nielsm is "Niels Martin Hansen" on #openttd #tycoon
01:08-!-APTX| [] has quit [Quit: No Ping reply in 180 seconds.]
01:09-!-APTX [~APTX@2001:470:24:137f:2ff:ffff:fe00:1] has joined #openttd
01:09-!-APTX is "APTX" on #kernelnewbies #openttd
01:17-!-agentw4b [~agentw4b@] has quit [Ping timeout: 480 seconds]
01:38-!-Wacko1976 [] has quit [Ping timeout: 480 seconds]
01:41-!-nielsm [] has quit [Ping timeout: 480 seconds]
01:51-!-Supercheese [] has joined #openttd
01:51-!-Supercheese is "Supercheese" on #openttd
02:42-!-KouDy [] has quit [Remote host closed the connection]
02:44-!-KouDy [] has joined #openttd
02:44-!-KouDy is "KouDy" on #openttd
02:58-!-sla_ro|master [] has joined #openttd
02:58-!-sla_ro|master is "slamaster" on #sla #openttd
03:23-!-Supercheese [] has quit [Read error: Connection reset by peer]
03:23-!-Supercheese [] has joined #openttd
03:23-!-Supercheese is "Supercheese" on #openttd
03:23-!-Samu [] has joined #openttd
03:23-!-Samu is "OFTC WebIRC Client" on #openttd
03:43-!-andythenorth [] has joined #openttd
03:43-!-andythenorth is "andythenorth" on #openttd
03:43-!-andythenorth [] has left #openttd []
03:49<Samu>testing a bunch of LuDIAI Afterfix's with is_friendly turned on, let's see if they build stations far from each other as I intended
04:45-!-Supercheese [] has quit [Quit: Valete omnes]
04:55<DorpsGek_II>[OpenTTD/OpenTTD] ghisvail commented on issue #6873: Jukebox not working in the flatpak version
04:57<@peter1138>Samu, so while you are iterating an array, you usually can't remove items from the same array.
04:58<@peter1138>The usual method is to iterate the array and add the indices of the items you want to delete to second array. They you go through that array, removing from the first array, and then just clear the 2nd array.
04:59<@peter1138>There may be other simpler methods though, I'm not familiar with sq.
05:35-!-Progman [] has joined #openttd
05:35-!-Progman is "Peter Henschel" on #openttdcoop #openttd
05:37<milek7_>maybe usual interating from end?
05:46<Samu>oh, hi
05:46<Samu>i fell asleep
05:47<Samu>iterate from the end to the beginning?
05:49<Samu>indexes are from 0 to 10, so if i start from 10 to 0 and i find that 6 is to be removed, I remove 6, and it can still iterate to the previous one, without issue?
05:53<Samu>for (local i = routeManager.m_townRouteArray.len() - 1; i >= 0, --i) {
05:53<Samu>like this?
05:56<Samu>or do as peter1138 say, but what if I find multiple indexes how exactly would that work
05:58<@peter1138>I guess the remove would be simpler in reverse as well.
06:01<Samu>ok, thx will test anyway
06:26-!-KouDy [] has quit [Remote host closed the connection]
06:38-!-HerzogDeXtEr [] has joined #openttd
06:38-!-HerzogDeXtEr is "purple" on #openttd
07:30-!-KouDy [] has joined #openttd
07:30-!-KouDy is "KouDy" on #openttd
08:10-!-chomwitt is "chomwitt" on #debian #debian-games
08:10-!-chomwitt [] has joined #openttd
08:19-!-andythenorth [~andytheno@] has joined #openttd
08:19-!-andythenorth is "andythenorth" on #openttd
08:21<Samu>Just medled with the TownManager.nut for the first time
08:21<Samu>trying to understand how LuDi code handles town pairs like they're just 1 entity
08:26-!-Laedek [~quassel@] has joined #openttd
08:26-!-Laedek is "Laedek" on #openttd
08:26-!-Laedek [~quassel@] has quit [Read error: Connection reset by peer]
08:43<andythenorth>@seen danmack
08:43<@DorpsGek>andythenorth: danmack was last seen in #openttd 2 weeks, 5 days, 18 hours, 21 minutes, and 22 seconds ago: <DanMacK> LOL
09:24-!-KouDy [] has quit [Remote host closed the connection]
09:44<Samu>lines 2-7
09:45<Samu>is that ok?
09:45<Samu>or milek7_
09:46-!-nielsm [] has joined #openttd
09:46-!-nielsm is "Niels Martin Hansen" on #openttd #tycoon
10:01-!-Wacko1976 [] has joined #openttd
10:01-!-Wacko1976 is "The Chat Cool People Use" on #openttd #/r/openttd
10:33-!-KouDy [] has joined #openttd
10:33-!-KouDy is "KouDy" on #openttd
10:44-!-KouDy [] has quit [Read error: No route to host]
11:01-!-sla_ro|master [] has quit []
11:19-!-andythenorth [~andytheno@] has quit [Quit: andythenorth]
11:29-!-WWacko1976-work [] has quit [Ping timeout: 480 seconds]
11:29-!-andythenorth [~andytheno@] has joined #openttd
11:29-!-andythenorth is "andythenorth" on #openttd
11:37<Samu>I'm having trouble with && and || again grr
11:39<nielsm>ah got a build working on fedora linux, and even music playback via extmidi/timidity
11:40<nielsm>(I'm not impressed with the quality of freepats, they sound strange)
11:42<@peter1138>Samu, && = and, || = or. Nothing tricky about them.
11:42-!-Wormnest [] has joined #openttd
11:42-!-Wormnest is "Wormnest" on #openttd
11:43<Samu>HALP trying to simplify it
11:43<@peter1138>&& - both sides need to be true, || - either side (or both) can be true
11:44<@peter1138>when mixing && and || you NEED to use extra parenthesis
11:46<@peter1138>And also why do you test for IsStationTile on both sides of the or?
11:46<Samu>because i am failing to simplify it
11:46<Samu>i see wrong behaviour
11:46<@peter1138>I can't really decipher what you are intending to test for.
11:47<@peter1138>Ah, there's a comment :p
11:47<nielsm>start by splitting it into multiple statements
11:47<nielsm>if (!AITile.IsStationTile(tile)) continue;
11:48<nielsm>(don't do further checks if it isn't a station tile)
11:48<nielsm>if (AITile.GetOwner(tile) != AICompany.ResolveCompanyID(AICompany.COMPANY_SELF)) return true;
11:48<nielsm>(condition fulfilled if it's someone else's station)
11:49<nielsm>if (AITile.GetOwner(tile) == AICompany.ResolveCompanyID(AICompany.COMPANY_SELF) && !AIStation.HasStationType(AIStation.GetStationID(tile), AIStation.STATION_AIRPORT)) return true;
11:49<nielsm>you really don't need to combine everything into a single huge conditional, it just becomes harder to read
11:50<nielsm>anyway, I need to debug the midi playback on non-windows because it can play the DOS version music (mpsmidi/catmidi) now but not the windows version music (smf .gm files)
11:51<nielsm>I think I uncovered some time ago it does some wrong path manipulation somewhere
11:53<Samu>gonna try this
11:53<Samu> if (AITile.IsStationTile(tile) && (AITile.GetOwner(tile) != AICompany.ResolveCompanyID(AICompany.COMPANY_SELF) || !AIStation.HasStationType(AIStation.GetStationID(tile), AIStation.STATION_AIRPORT))) {
11:53<Samu>if it still fails I'll do the split
11:54<andythenorth>so did we finish 16 cargos in/out? o_O
11:55<andythenorth>or did we get caught up on spec agony?
11:56<nielsm>nobody's discussing the spec
11:57<nielsm>the only thing I'm waiting on before calling it done is that all aspects of it actually get tested
12:00-!-KouDy [] has joined #openttd
12:00-!-KouDy is "KouDy" on #openttd
12:01<andythenorth>ok so if iirc, I/someone needs to patch nml for updated prop 28
12:03<Samu>If I am a friendly AI that builds bus stations and airports and I'm looking for a place to place my bus station, I don't want to place it near any of my competitors, or near my other bus stations
12:03<Samu>but i could place near my airports
12:04<Samu>that thing returning true means the place is bad
12:05<Samu>is that actually doing what I ask'
12:11-!-frosch123 [] has joined #openttd
12:11-!-frosch123 is "frosch" on #openttdcoop.devzone #openttd
12:32-!-Wacko1976 [] has quit [Ping timeout: 480 seconds]
12:37-!-andythenorth [~andytheno@] has quit [Quit: andythenorth]
12:41-!-sla_ro|master [] has joined #openttd
12:41-!-sla_ro|master is "slamaster" on #sla #openttd
12:53-!-Flygon [] has quit [Read error: Connection reset by peer]
12:55-!-Gja [] has joined #openttd
12:55-!-Gja is "Martin" on #ceph #bcache #openttd
12:58<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh opened pull request #6889: MIDI search path fixes
12:58-!-gelignite [] has joined #openttd
12:58-!-gelignite is "gelignite" on #openttd
12:59-!-Wacko1976 [] has joined #openttd
12:59-!-Wacko1976 is "The Chat Cool People Use" on #openttd #/r/openttd
13:09-!-Wolf01 [] has joined #openttd
13:09-!-Wolf01 is "Wolf01" on #openttd
13:13-!-GroovyNoodle [] has joined #openttd
13:13-!-GroovyNoodle is "" on #openttd
13:18-!-andythenorth [] has joined #openttd
13:18-!-andythenorth is "andythenorth" on #openttd
13:19-!-Compu [] has joined #openttd
13:19-!-Compu is "Compu" on #help #openttd #openttdcoop.stable #openttdcoop #/r/openttd
13:19-!-Compu [] has quit [Remote host closed the connection]
13:28-!-Wacko1976 [] has quit [Ping timeout: 480 seconds]
13:35<andythenorth>on my holiday
13:35<andythenorth>I read a book
13:38-!-gelignite [] has quit [Ping timeout: 480 seconds]
13:40<Wolf01>I said: 4 holiday weeks, I'll start to read the neverending story... never started
13:41<andythenorth>my book was about trains :P
13:44-!-Wacko1976 [] has joined #openttd
13:44-!-Wacko1976 is "The Chat Cool People Use" on #openttd #/r/openttd
13:46-!-gelignite [] has joined #openttd
13:46-!-gelignite is "gelignite" on #openttd
14:06-!-tokai|noir [] has joined #openttd
14:06-!-mode/#openttd [+v tokai|noir] by ChanServ
14:06-!-tokai|noir is "Christian Rosentreter" on +#openttd
14:06-!-slahhc [25bbb412@] has joined #openttd
14:06-!-slahhc is "slahhc" on #openttd #virt #qemu #freedombox #debian-next
14:11<Samu> if (AITile.IsStationTile(t) && (AITile.GetOwner(t) != AICompany.ResolveCompanyID(AICompany.COMPANY_SELF) || !AIStation.HasStationType(AIStation.GetStationID(tile), LuDiAIAfterFix.cargoClass == AICargo.CC_PASSENGERS ? AIStation.STATION_BUS_STOP))) {
14:11<Samu>big line
14:12<Samu>now for the case of airport
14:13<Samu>looking for a place to place my airport, i don't want to place it near any of my competitors, or near my other airports
14:13<Samu>should work
14:13-!-tokai [] has quit [Ping timeout: 480 seconds]
14:13<Samu>must fix
14:16<Samu>if (AITile.IsStationTile(t) && (AITile.GetOwner(t) != AICompany.ResolveCompanyID(AICompany.COMPANY_SELF) || !AIStation.HasStationType(AIStation.GetStationID(t), LuDiAIAfterFix.cargoClass == AICargo.CC_PASSENGERS ? AIStation.STATION_BUS_STOP : AIStation.STATION_TRUCK_STOP))) {
14:16<Samu>it needed to be bigger!
14:18<slahhc>who are you talking to?
14:19<Wolf01>Noone, he writes here what he does
14:19<Samu>yes... sorry
14:20<Wolf01>Teddy bear programming, but with the whole chatroom
14:20<slahhc>whats the code to get infinit money?
14:20-!-Thedarkb [] has joined #openttd
14:20-!-Thedarkb is "realname" on #/r/openttd #openttd #oolite
14:20<Wolf01>Ctrl+shift+C or some other weird combination
14:23<slahhc>im not chating with you anymore
14:25<Samu>testing AI vs AI, I see nearly 0 airports, seems that it's a bit too friendly, they null each other the chances of building an airport
14:26<Samu>i want it to behave friendly, but not too friendly :( how am I reach mid-term ?
14:28<nielsm>build up an anger-meter and when it passes some threshold relieve some anger by being unfriendly
14:29<slahhc>you need the AI to let the player think hes got a chance of making it, you need to find the sweet spot for maximizing human frustration
14:30<slahhc>that always makes them come back for more
14:30<Samu>i coult try checking how much is produced by the town
14:31<Samu>and how much is being transported
14:35-!-slahhc [25bbb412@] has quit [Quit: - A hand crafted IRC client]
14:38<Samu>the way the code is written, it feels like LuDiAI had more than 1 coder even before me
14:49-!-Thedarkb [] has quit [Ping timeout: 480 seconds]
14:49-!-Wacko1976 [] has quit [Ping timeout: 480 seconds]
15:00-!-Thedarkb [] has joined #openttd
15:00-!-Thedarkb is "realname" on #oolite #openttd #/r/openttd
15:14-!-Thedarkb [] has quit [Ping timeout: 480 seconds]
15:16-!-Gja [] has quit [Quit: Going offline, see ya! (]
15:27-!-ToBeFree [] has joined #openttd
15:27-!-ToBeFree is "Tobias "ToBeFree" Frei" on #https-everywhere #oolite-dev #openttd @#linux #oolite #oolite-ger
15:32-!-ToBeFree [] has quit []
15:47-!-gelignite [] has quit [Quit: Match found!]
15:57<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh merged pull request #6889: MIDI search path fixes
15:57<DorpsGek_II>[OpenTTD/OpenTTD] nielsmh pushed 2 commits to master:
15:57<DorpsGek_II> - Fix: Check the search paths for standard MIDI files (by nielsmh)
15:57<DorpsGek_II> - Fix: Better "temp" path for decoded MPSMIDI files when source filename has no path separators (by nielsmh)
15:57<nielsm> <- who will get number 23000 ?
15:58<nielsm>and how insignificant will it be? :D
16:04-!-HerzogDeXtEr [] has quit [Read error: Connection reset by peer]
16:04-!-KouDy [] has quit [Remote host closed the connection]
16:14-!-sla_ro|master [] has quit []
16:17-!-KouDy [] has joined #openttd
16:17-!-KouDy is "KouDy" on #openttd
16:20-!-GroovyNoodle [] has quit [Quit: Leaving]
16:28<Samu>testing another way to decide wether to build airports
16:29<Samu>if (AITile.IsStationTile(t) && (AIStation.HasStationType(AIStation.GetStationID(t), AIStation.STATION_AIRPORT) || AITile.GetOwner(tile) != AICompany.ResolveCompanyID(AICompany.COMPANY_SELF) && AIController.GetSetting("is_friendly"))) {
16:29<Samu> nearby_station = true;
16:30<Samu>AITile.GetOwner(t), not tile
16:42-!-nielsm [] has quit [Ping timeout: 480 seconds]
16:46-!-Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
16:57-!-andythenorth [] has quit [Quit: andythenorth]
17:00<Samu>darn it :(
17:01<Samu>a station that is tile walked has influence in dictating if a station is airport
17:01<Samu>no wonder I wasn't seeing many airports
17:01<Samu>the ai station spreads like a cheater
17:05<Samu>even if it would find a bus station in the tile, it would only check if that station had an airport even if the airport was station spreaded past the search radius :(
17:05<Samu>thus would not build the airport
17:06<Samu>it wasn't really checking if the tile was already belonging to an airport
17:06<Samu>bah, what can I do :(
17:09<Samu>i've been doing this wrong all along
17:11-!-frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
17:21<Samu>this is gonna be much harder to do for road station tiles than airport tiles
17:21<Samu>but at least I got an idea how to solve this issue
17:26-!-Thedarkb [] has joined #openttd
17:26-!-Thedarkb is "realname" on #oolite #openttd #/r/openttd
17:54-!-glx [] has joined #openttd
17:54-!-mode/#openttd [+v glx] by ChanServ
17:54-!-glx is "Loïc GUILLOUX" on @#opendune @#openttd.noai #openttd.notice +#openttd
18:10-!-Wormnest [] has quit [Quit: Leaving]
18:13-!-Wacko1976 [] has joined #openttd
18:13-!-Wacko1976 is "The Chat Cool People Use" on #openttd #/r/openttd
18:28<Samu>and for the airport case:
18:28<Samu>if (AITile.IsStationTile(t) && (AIAirport.IsAirportTile(t) || AITile.GetOwner(t) != AICompany.ResolveCompanyID(AICompany.COMPANY_SELF) && AIController.GetSetting("is_friendly"))) {
18:28<Samu>just 1 line
18:29<Samu>together, i shall see more airports, I hope
18:29-!-Wacko1976 [] has quit [Ping timeout: 480 seconds]
18:31-!-sim-al2 [] has quit [Ping timeout: 480 seconds]
18:44-!-Thedarkb [] has quit [Ping timeout: 480 seconds]
18:50-!-Progman [] has quit [Remote host closed the connection]
20:22-!-chomwitt [] has quit [Ping timeout: 480 seconds]
20:49-!-Samu [] has quit [Quit: Page closed]
21:17-!-Gustavo6046 [~Gustavo60@] has quit [Write error: connection closed]
21:18-!-Gustavo6046 [~Gustavo60@] has joined #openttd
21:18-!-Gustavo6046 is "Non dico nomen." on #openttd
21:31-!-glx [] has quit [Quit: Bye]
21:36-!-WWacko1976-work [] has joined #openttd
21:36-!-WWacko1976-work is "YO!" on #openttd #/r/openttd
21:53-!-KouDy [] has quit [Ping timeout: 480 seconds]
22:04-!-Flygon [] has joined #openttd
22:04-!-Flygon is "Flygon" on #openttd
22:37-!-rocky113844 [~rocky1138@] has joined #openttd
22:37-!-rocky113844 is "Your Mom" on #openttd
22:54-!-KouDy [] has joined #openttd
22:54-!-KouDy is "KouDy" on #openttd
23:02-!-KouDy [] has quit [Remote host closed the connection]
23:22-!-Supercheese [] has joined #openttd
23:22-!-Supercheese is "Supercheese" on #openttd
23:34-!-haudrauf [] has quit [Ping timeout: 480 seconds]
23:35-!-haudrauf [] has joined #openttd
23:35-!-haudrauf is "Haudrauf" on #openttd #frickelplatz @#ffod @#ffnord @#ffki @#ffhl @#ffhh @#fffl #cryptoparty @#ccchh
23:46-!-KouDy [] has joined #openttd
23:46-!-KouDy is "KouDy" on #openttd
23:53-!-KouDy [] has quit [Remote host closed the connection]
---Logclosed Tue Sep 04 00:00:22 2018