IRC logs for #openttd on OFTC at 2018-09-11
⏴ go to previous day
00:02:51 <Samu> the actual costs can vary on the fly
00:03:45 <Samu> if a tree is being born or dies in a tile, it could affect the costs
00:05:45 <Samu> but the major discrepance is on sloped tiles
00:05:56 <Samu> how am I gonna handle this
00:18:17 <Samu> oh, the pathfinder computes frontwards
00:18:23 <Samu> the pathbuilder builds backwards
00:20:02 <Samu> if I reverse the order, slopes might solve themselves, let's test
01:23:17 <Eddi|zuHause> bot announcements still broken?
01:24:06 <glx> no changes in the bot source so...
01:24:52 <LordAro> no they magically fixed themselves
01:25:38 <Eddi|zuHause> i've had bosses that seemed to think like that... "why is this still not working?" "well... nobody worked on it?"
01:50:16 <Samu> sec, let me open visual studio
01:50:25 <Samu> will tell you where I get that from
01:52:03 <Samu> there is no uint16 operator conversion thing
01:52:10 <Samu> when doing the * operation
01:52:20 <Samu> so i transformed uint16 to int
01:54:39 <Samu> station.cpp line 555, where I got that >> 3 thing
02:05:22 <Samu> as for the other questions
02:06:19 <Samu> the cost grow per number of pieces of road / rail
02:06:29 <Samu> it's not the same as airport
02:07:19 <Samu> getting the cost of a road piece or a road tunnel or so will not be a fixed value, it depends on the amount of infrastructure count :(
02:16:57 *** snail_UES_ has joined #openttd
02:18:35 <Samu> yep, the more you have the more it costs per piece
02:19:02 <Samu> just confirmed, so it's pointless to do it for road and rail,
03:05:14 *** Supercheese has joined #openttd
03:58:59 *** Supercheese has joined #openttd
05:28:20 *** haudrauf has joined #openttd
05:40:24 *** Mahjong has joined #openttd
07:45:50 *** Flygon_ has joined #openttd
07:55:02 *** Supercheese has joined #openttd
08:55:01 *** ChanServ sets mode: +v tokai
09:31:37 *** andythenorth has joined #openttd
10:06:39 *** blathijs has joined #openttd
10:13:20 *** snail_UES_ has joined #openttd
11:40:47 <Samu> sorry about the url, i'm terrible
11:45:44 <Samu> how do i quote multiple lines in a url
11:47:40 <Samu> i don't want to quote only /**
11:57:06 <LordAro> what do you think it wrong with the url?
11:58:18 <LordAro> Samu: can you not use something like TestMode to work out the costs?
11:58:26 <LordAro> it's awkward to use, i know, but..
11:59:02 <Samu> that's the construction cost, not the maintenance cost
11:59:03 <LordAro> maybe a better solution would be to add a getcost function
11:59:19 <LordAro> then you can write your own maintenance cost function
12:00:24 <Samu> I wanted to quote lines 550 to 567
12:00:28 <Samu> only line 550 was quoted
12:05:56 <Samu> write my own maintenance cost in openttd code or in the ai code?
12:06:53 <andythenorth> snail_UES_: drawn any wagons yet?
12:07:22 <snail_UES_> andythenorth: my wagons are finished already...
12:07:30 <andythenorth> got any covered hoppers?
12:07:37 <snail_UES_> unless you came up with yet any new cargoes :D
12:07:42 <snail_UES_> I have silo wagons...
12:07:51 <andythenorth> I am trying to figure out liveries for silo wagons
12:07:58 <andythenorth> whether I show the cargo somehow
12:08:23 <snail_UES_> mine are simple grey silos, with a colored stripe around their maximum radius (they’re vertical silos)
12:08:35 <snail_UES_> I change the color of the stripe according to the cargo type
12:08:39 <Samu> well, in the AI side, i would have to predict the exact number of road/rail/canal pieces in a route
12:08:59 <andythenorth> snail_UES_: how many different cargo colours have you got?
12:09:08 <snail_UES_> only three I believe…
12:09:11 <Samu> road is complicated, because i don't think it's possible to retrieve the number of bit pieces with the AI
12:09:15 <snail_UES_> let me check the code (I’ve got it handy)
12:10:20 <Samu> haven't really looked through, but ...
12:11:03 <Samu> i know beforehand that predicting number of pieces would be too tough to do right
12:11:10 <snail_UES_> oh, nope that was my original idea
12:11:25 <snail_UES_> I eventually coded them in the same color to simplify stuff :p
12:11:30 <Samu> predicting it for airports is just straigth forward
12:11:47 <Samu> just need to know which airport type I wanna predict it for
12:11:54 <snail_UES_> but my idea would have been something like, yellow for grain, orange for food, grey for everything else
12:12:50 <andythenorth> yeah I'm thinking I do them all same colour
12:12:59 <andythenorth> I've tried colours per cargo, but somehow it doesn't work
12:13:09 <andythenorth> it does work for tank wagons though
12:14:00 *** Progman has joined #openttd
12:14:36 <snail_UES_> maybe I’ll change it back to my original idea :p shouldn’t be too hard
12:14:54 <snail_UES_> for tank wagons I’ve also got different colors for different cargoes
12:15:09 <snail_UES_> with random kind-of-realistic color schemas for petrol...
12:15:20 <snail_UES_> such as Shell, BP, Aral...
12:16:06 <andythenorth> but most of the cargos for covered hopper are white or yellow :)
12:16:11 <andythenorth> so it doesn't really help player
12:20:29 <andythenorth> snail_UES_: so what colours might work? o_O
12:21:17 <snail_UES_> in my tank wagons, I'
12:21:40 <snail_UES_> one is main and the other one is a square-like symbol on one side (i.e. the petrol company logo)
12:21:49 <snail_UES_> let me double-check which colors I use...
12:22:16 <snail_UES_> I use main blue, white logo (Aral)
12:22:23 <snail_UES_> main blue, red logo (ELF)
12:22:31 <snail_UES_> main yellow, red logo (Shell)
12:22:42 <snail_UES_> and main green, white logo (BP_)
12:23:07 <snail_UES_> a train is uses each of these for all of the wagons, with 25% probability each
12:24:31 <snail_UES_> for other cargoes, I use dark grey (oil), light grey, brown or green (fertilizer), yellow (edible oil, chemical products), or white (water, milk)
12:25:59 <snail_UES_> but my tank wagons are smaller than yours, since they’re narrow gauge, so I have less real estate to play with :p
13:07:52 <LordAro> andythenorth: thanks for elaborating :)
13:49:47 *** Fantasp has joined #openttd
13:50:05 <Fantasp> Hello, what do you enjoy about openttd?
13:50:33 <Samu> i think he wants to destroy an area of tiles without destroying the land-owned tiles
14:29:22 <Samu> if (counter == stationTile == null ? 500 : 1)
14:29:29 <Samu> is this gonna work the way I think it works?
14:34:19 <LordAro> maybe, but it's sorely lacking some parens
14:34:42 <LordAro> actually, definitely not
14:34:57 <LordAro> you'll end up with if (false == null ? 500 : 1)
15:00:44 <Samu> if (counter == (stationTile == null ? 500 : 1))
15:06:50 <Samu> if i am expanding a station, retry 1 time, else I am building a new station, retry 500 times
15:07:48 <Samu> i'm trying to speed up exanding station code, it takes too much time
15:08:52 <peter1138> max = (stationTile == null) ? 500 : 1;
15:08:58 <peter1138> if (counter == max)
15:10:25 <peter1138> Put the first line before your counter loop, else you'll be evaluating whether to count to 500 to 1 every time you loop.
15:11:10 <LordAro> peter1138: hardly the modt computationally expensive thing on the world
15:12:01 <peter1138> Sure but don't scripts have execution limits?
15:18:14 <Samu> i have vehicles waiting 6 years in depots
15:18:27 <Samu> because of the expanding code :(
15:18:42 <Samu> trying to do it for the 83 routes
15:23:30 <Samu> function buildTownStation is a gigantic piece of code atm :(
15:25:01 *** snail_UES_ has joined #openttd
15:36:09 <Samu> i pintpointed the source of the slowdows
15:36:11 <Samu> if (Utils.AreOtherStationsNearby(tile, cargoClass, stationId)) {
15:46:33 <Samu> the AI has is_friendly turned off
15:46:49 <Samu> so it's the part before the else
15:47:13 <Samu> or it could be the finalizing part after the if/else
15:51:43 <LordAro> Samu: check the size of the rectangle
15:53:03 <Samu> it's 7x7 or 13x13 if im not mistaken
15:53:25 <LordAro> are you sure of that?
15:54:16 <Samu> coverage of a bus station is 3
15:55:49 <Samu> if the tile is at 3,3 coordinates, the offset will have top tile at 0,0, bottom tile at 6,6
15:58:35 *** argoneus has joined #openttd
16:00:45 <Samu> maybe the getValidOffsetTile could be improved
16:07:32 *** wodencafe has joined #openttd
16:15:46 *** argoneus has joined #openttd
16:19:53 <Samu> there is another rectangle
16:23:00 <Samu> code that matters is between lines 27 - 42
16:23:39 <Samu> this is the function that is used to expand stations
16:24:02 <Samu> but the major slowdown is between 27-44
16:46:37 *** Wormnest has joined #openttd
16:47:35 <Samu> but then, it can barely expand :(
16:51:37 <planetmaker> hm... where is the OpenTTD code gone that's not the game code, like master server. osie etc?
16:52:05 <planetmaker> that is: where are the missing parts of the svn repo? :D
16:52:40 *** synchris has joined #openttd
16:53:56 *** argoneus has joined #openttd
16:57:22 *** andythenorth has joined #openttd
16:57:44 *** Alberth has joined #openttd
16:57:44 *** ChanServ sets mode: +o Alberth
16:59:08 *** Wacko1976 has joined #openttd
17:02:48 <Samu> cargodist and train renewed?
17:03:19 <planetmaker> Alberth, do you know where I currently get / clone from the openttd extra stuff like osie and master server and such?
17:03:36 *** rocky113844 has joined #openttd
17:04:33 <Alberth> only place I can think of is in another repo in the openttd organization
17:05:25 <Alberth> but no idea if it's actually there
17:05:27 <planetmaker> but hg.o.o and svn.o.o both direct to github
17:07:07 <Alberth> but I don't see it tbh
17:08:13 <planetmaker> hm, ok. Seems I'm at least not blind
17:09:29 <Alberth> you're not the only blind person, at least :)
17:11:32 <planetmaker> Samu, interesting... though I'm not sure it is because it seems the person *wants* the vehicles to load there
17:11:47 <Samu> that guy screenshots show the depot behind the station, seems to be the same symptom he's having
17:16:08 <planetmaker> good point. Let's see what he replies
17:26:10 <LordAro> #6898 is a bit weird... everything i can find about the seed implies it's a uint32
17:31:39 <Alberth> so the print routine would be wrong then?
17:31:52 <LordAro> aha, commandline parser is using atoi
17:32:05 <LordAro> out of range is apparently UB
17:33:05 <LordAro> should probably be strtoul
17:33:19 <Eddi|zuHause> maybe we should be switching to a language that isn't filled with UB traps?
17:33:23 <LordAro> or even strtoull, with some bounds checking
17:33:57 <LordAro> oh hey, that article is old enough to drink now
17:34:40 <Eddi|zuHause> LordAro: so we need a language without UB that is also fully backwards compatible with C++? :p
17:35:07 <Alberth> good luck designing that :)
17:35:46 <Eddi|zuHause> but seriously, range checking is basically a noop nowadays
17:36:07 <Eddi|zuHause> modern compilers can put them in places where the CPU otherwise would wait for memory access to return
17:36:14 <Alberth> hmm, simplest solution is to use a compiler implementation as the standard
17:36:33 <Alberth> not very compatible in time though
17:36:36 *** argoneus has joined #openttd
17:37:33 <Eddi|zuHause> i think it's more a bureaucratic problem of eliminating some UB traps in the C++ standard
17:37:57 <LordAro> tbf, this is a C issue
17:37:57 <Eddi|zuHause> i hear microsoft is pushing a bit in that direction
17:38:02 <LordAro> we should upgrade to C++ first
17:38:32 <Alberth> not really, C++ is designed to be very flexible, so you won't get a C++ standard that defines everything
17:38:45 <planetmaker> eh, what is the actual issue with 6898? That the input is limited to MAX_INT?
17:38:46 <Eddi|zuHause> not everything, but some more things...
17:39:27 <Eddi|zuHause> planetmaker: eh, no, that the program does random things before it manages to check for MAX_INT
17:40:14 <LordAro> planetmaker: yeah, commandline input is limited to MAX_INT32, whereas it should be MAX_UINT32
17:40:18 <LordAro> or whatever the constant actually is
17:40:39 <Eddi|zuHause> Alberth: many of these UB traps are missing range checks in the library, not a compiler issue
17:42:26 *** GroovyNoodle has joined #openttd
17:43:24 <Alberth> and library isn't updated for backwards compability :p
17:46:10 *** OsteHovel has joined #openttd
17:56:06 *** Smedles has joined #openttd
18:17:36 *** innocenat has joined #openttd
18:17:36 *** reldred has joined #openttd
18:17:36 *** ccfreak2k has joined #openttd
18:17:36 *** mindlesstux has joined #openttd
18:17:36 *** techmagus has joined #openttd
18:17:36 *** TrueBrain has joined #openttd
18:17:36 *** lethosor has joined #openttd
18:17:36 *** Extrems has joined #openttd
18:17:36 *** greeter has joined #openttd
18:17:36 *** Hobbyboy has joined #openttd
18:17:36 *** Antheus has joined #openttd
18:17:36 *** Gustavo6046 has joined #openttd
18:17:36 *** V453000 has joined #openttd
18:17:36 *** Stimrol has joined #openttd
18:17:36 *** Lejving_ has joined #openttd
18:17:36 *** Sheogorath has joined #openttd
18:17:36 *** Tharbakim has joined #openttd
18:17:36 *** synchris has joined #openttd
18:17:36 *** Wacko1976 has joined #openttd
18:17:37 *** Smedles has joined #openttd
18:17:37 *** rocky113844 has joined #openttd
18:17:37 *** wodencafe has joined #openttd
18:17:38 *** HeyCitizen has joined #openttd
18:17:38 *** quiznilo has joined #openttd
18:17:38 *** rocky1138 has joined #openttd
18:17:38 *** Maarten has joined #openttd
18:17:38 *** TinoDidriksen has joined #openttd
18:17:38 *** OsteHovel has joined #openttd
18:17:38 *** GroovyNoodle has joined #openttd
18:17:38 *** Wormnest has joined #openttd
18:17:38 *** Mahjong has joined #openttd
18:17:38 *** Hirundo has joined #openttd
18:17:38 *** ZirconiumX has joined #openttd
18:17:38 *** gnu_jj_ has joined #openttd
18:17:38 *** KenjiE20 has joined #openttd
18:17:38 *** tyteen4a03 has joined #openttd
18:17:38 *** LordAro has joined #openttd
18:17:38 *** michi_cc has joined #openttd
18:17:38 *** ^Spike^ has joined #openttd
18:17:38 *** DorpsGek_II has joined #openttd
18:17:38 *** Alkel_U3 has joined #openttd
18:17:38 *** milek7_ has joined #openttd
18:17:38 *** FLHerne has joined #openttd
18:17:38 *** IgnoredAmbience has joined #openttd
18:17:38 *** gelignite has joined #openttd
18:17:38 *** argoneus has joined #openttd
18:17:38 *** magnet.oftc.net sets mode: +vv tokai michi_cc
18:18:00 *** ChanServ sets mode: +v peter1138
18:23:46 *** frosch123 has joined #openttd
18:25:32 <frosch123> planetmaker: migration of extra is in trello
18:25:38 <frosch123> currently you have to use svn-archive
18:28:26 *** argoneus has joined #openttd
18:57:12 <Samu> anyway, it was supposed to be a rectangle of size 25x25
18:58:47 <Samu> so, it's attempting to expand stations inside this rectangle, but the station spread value is 12
18:59:20 <Samu> it tries to expand from within the tile with the name
18:59:45 <Samu> looks like the rectangle doesn't need to be that big
19:03:34 <Samu> half the value of station spread
19:04:44 <Samu> not really what I should do. It's a moving rectangle
19:04:51 <Samu> but meh, for now it suffices
19:09:02 *** rocky113844 has joined #openttd
19:10:10 *** Wormnest has joined #openttd
19:10:37 *** andythenorth has joined #openttd
19:17:15 <frosch123> if you remove plastics you can add stuff like brass and pewter
19:26:51 <andythenorth> that is the olde-worlde economy frosch123
19:26:54 <andythenorth> lead, wax, sisal
19:27:02 <andythenorth> jute, hemp, brass
19:27:08 <andythenorth> alchemical supplies
19:30:44 <Samu> local squareSize = AIGameSettings.GetValue("station_spread") / 2; if (AIGameSettings.GetValue("station_spread") % 2 == 0) { squareSize = squareSize - 1; }
19:34:51 <andythenorth> glue from horses
19:34:58 <andythenorth> urine for tanning leather
19:35:08 <andythenorth> corpse for medical research
19:38:41 <frosch123> that's noe olde worlde
19:39:51 *** HerzogDeXtEr has joined #openttd
19:41:48 <Samu> retesting the ai in a 4k map again, should be managing expanding road stations faster
19:43:57 <andythenorth> did we do prisoners and prison transport?
19:44:41 <frosch123> prisoners were consumed by mines iirc
19:45:10 <frosch123> anyway, i am watching old-stuff-restoration videos, and encounter unusual material vocabulary
19:46:08 <andythenorth> child #1 is learning about the linguistic paradoxes arising from special relativity where two observer frames are both in motion
19:46:53 <andythenorth> when I was 8, I just wanted to know the fastest train
19:47:08 <Wolf01> I thought he was learning about GHOTI
19:47:52 <frosch123> when i learned left/right, i thought they were geographical directions like west/east, and always tried to determine my orientation compared to the place where i learned left/right
19:48:18 <Wolf01> I don't remember what I did :(
19:49:16 <frosch123> andythenorth: what vocabulary does that involve?
19:50:07 <frosch123> or is it about figureing out whether your train moves or the one you see through the window?
19:50:20 <andythenorth> it's that sort of thing
19:50:31 <andythenorth> and how time passes for each observer
19:50:45 <andythenorth> who gets younger relative to who etc
19:50:56 <frosch123> oh, that kind of relativity
19:51:29 <frosch123> well, fat people age slower, iirc
20:07:27 *** tokai|noir has joined #openttd
20:07:27 *** ChanServ sets mode: +v tokai|noir
20:35:05 *** Supercheese has joined #openttd
20:50:36 *** gelignite has joined #openttd
21:08:11 *** Thedarkb-T60 has joined #openttd
21:20:34 *** Stimrol_ has joined #openttd
21:35:27 *** wodencafe has joined #openttd
21:35:27 *** HeyCitizen has joined #openttd
21:35:27 *** quiznilo has joined #openttd
21:35:27 *** rocky1138 has joined #openttd
21:35:27 *** Maarten has joined #openttd
21:35:27 *** TinoDidriksen has joined #openttd
22:14:43 <Eddi|zuHause> haha, "a million production" when it's just 1000, with a weird unit inflation
22:15:01 <Eddi|zuHause> probably has nothing to do with the problem
22:16:24 <LordAro> someone should download the save and see :p
22:16:46 <Eddi|zuHause> uhm, that file was tagged as "contains a virus"
22:21:52 <Eddi|zuHause> AI bought exclusive transport rights
22:22:31 <Eddi|zuHause> that's why no cargo
22:24:22 <LordAro> perhaps there should be a message in the station window
22:34:47 <Eddi|zuHause> there is, when you click on "transported"
22:35:10 <LordAro> someone else can close it :p
23:00:07 <andythenorth> wonder if there's a var for 'vehicle is loading'
23:00:12 <andythenorth> specifically loading, not unloading
23:01:00 <Eddi|zuHause> i remember that being tricky to distinguish even in the code
23:01:26 <Eddi|zuHause> closest would be the code that displays the up/down arrows next to the loading-%
23:04:41 <andythenorth> it's not essential
23:04:55 <andythenorth> I have closed hoppers which are loaded through roof doors
23:05:00 <Eddi|zuHause> none of newgrf spec is "essential"
23:05:12 <Eddi|zuHause> it would still be nice to have
23:05:20 <andythenorth> it will look weird to have open roof hatches when unloading
23:05:26 <andythenorth> although actually realistic in some cases
23:10:11 <LordAro> Eddi|zuHause: amusingly, chrome won't even let me download that file
23:13:07 <Eddi|zuHause> i don't know what signature it picked up on, though, there's only the sav file in there
23:13:20 <LordAro> zip file from a dodgy site, i think
23:14:44 <andythenorth> "Upload your file for zipping here, plus bonus malware"
23:21:02 <Samu> expanding stations seems faster, but not as fast as I would hope
23:21:19 <Samu> management is still rather slow
23:22:09 <Samu> gives the AI less air time for aircraft
23:54:16 *** Progman has joined #openttd
23:56:19 <LordAro> that's why my original music isn't working
23:56:41 <LordAro> it's looking for GM_TT00.GM, and my files are gm_tt00.gm
23:57:55 <LordAro> though hmm, that is how they're specified in the orig_win.obm
23:59:27 <nielsm> there are some annoyances with upper/lower case yes
23:59:54 <LordAro> did it look case insensitively before you made your changes, ooi?
23:59:59 <LordAro> because these files haven't changed in years
continue to next day ⏵