IRC logs for #openttd on OFTC at 2018-02-17
            
00:13:31 <Samu> are tram vehicles supposed to reverse on stations?
00:14:27 <Wolf01> No clue, that's what you need to check against trunk
00:14:52 <Samu> they can reverse anywhere apparently, i clicked reverse button
00:15:03 <Samu> i don't know, never played with trams before
00:15:33 <Wolf01> Clicking on reverse forces reverse anywhere
00:15:39 <Wolf01> Even in trunk
00:15:48 <Samu> seems strange that they can do it, they go out of their tracks
00:16:30 <Wolf01> In NRT is known that an electric tram can reverse when reaching the end of the electrification even if the track continues
00:17:06 <Wolf01> No clue if we need to solve it graphically or changing the vehicle code
00:18:37 <Wolf01> BTW, I suggest you to run 2 similar games, one with NRT, one with trunk, and check if the vehicles behave in the same way
00:18:51 <Wolf01> No unwanted reverse etc
00:19:27 <Wolf01> Also, 'night
00:19:29 <Samu> i dont know what's the equivalent trunks
00:19:30 *** Wolf01 has quit IRC
00:19:36 <Samu> newgrfs
00:22:09 *** Wormnest has quit IRC
00:27:07 *** supermop has joined #openttd
00:29:59 *** snail_UES_ has joined #openttd
00:50:10 *** snail_UES_ has quit IRC
00:52:20 *** Progman has quit IRC
01:36:11 *** HerzogDeXtEr has quit IRC
02:00:28 *** FLHerne has quit IRC
02:03:27 <Samu> woah, why can I upgrade town roads? that's unfair
02:04:18 <Samu> it's not my road
02:06:42 <Samu> sounds broken
02:06:57 <Samu> other companies can also upgrade town roads
02:08:45 <Samu> upgrade wars... abuse in multiplayer, recipe for hell :(
02:09:19 <ST2> disable it :p
02:10:25 <Samu> i'm testing the NRT
02:18:34 *** Samu has quit IRC
02:18:48 *** Gja has quit IRC
02:57:53 *** supermop has quit IRC
03:00:30 *** supermop has joined #openttd
03:08:35 *** supermop has quit IRC
03:28:32 *** supermop has joined #openttd
03:36:35 *** supermop has quit IRC
04:19:03 *** supermop has joined #openttd
04:19:19 *** Biolunar has quit IRC
04:32:07 *** glx has quit IRC
04:32:32 <supermop> i wonder if i can use > in switch results
04:33:02 <supermop> like <1: return x
04:33:08 <supermop> 1: return y
04:33:30 <supermop> instead of 0..0.99: return x
04:34:06 <supermop> because i don't thing i can use a decimal place in the results
04:50:50 *** chomwitt has quit IRC
05:28:13 *** Supercheese has joined #openttd
05:56:17 *** Supercheese has quit IRC
06:37:18 *** Supercheese has joined #openttd
07:02:11 *** Supercheese has quit IRC
07:32:27 *** som89 has joined #openttd
07:33:06 *** som89 has quit IRC
07:33:15 *** som89_ has joined #openttd
07:55:27 *** som89_ has quit IRC
08:12:32 *** supermop has quit IRC
08:45:28 *** HerzogDeXtEr has joined #openttd
08:59:16 *** supermop has joined #openttd
09:01:07 *** Gorlum has joined #openttd
09:01:50 *** Gorlum has left #openttd
09:02:38 *** synchris has joined #openttd
09:03:27 *** Cubey has quit IRC
09:06:44 *** andythenorth has joined #openttd
09:06:46 <andythenorth> o/
09:07:17 *** supermop has quit IRC
09:38:13 *** Progman has joined #openttd
09:44:00 *** chomwitt has joined #openttd
09:47:36 *** sla_ro|master has joined #openttd
10:02:03 *** gelignite has joined #openttd
10:10:45 *** sla_ro|master has quit IRC
10:54:24 *** andythenorth has quit IRC
11:01:45 *** Flygon_ has joined #openttd
11:08:25 *** tokai has joined #openttd
11:08:25 *** ChanServ sets mode: +v tokai
11:09:00 *** Flygon has quit IRC
11:15:22 *** tokai|noir has quit IRC
11:36:48 *** Wolf01 has joined #openttd
11:37:38 <Wolf01> o/
11:40:11 *** Samu has joined #openttd
11:40:19 <Samu> hi
11:40:34 *** Stimrol has joined #openttd
11:47:07 *** DDR has quit IRC
11:54:24 *** FLHerne has joined #openttd
12:00:39 *** Cubey has joined #openttd
12:01:38 *** andythenorth has joined #openttd
12:02:35 <Samu> hi Wolf01 , I think it's a bad idea to let companies upgrade town roads
12:06:44 <Wolf01> Explain
12:07:13 <Wolf01> o/ andy
12:07:29 *** FLHerne has quit IRC
12:08:49 <andythenorth> lo Wolf01
12:08:54 <andythenorth> @seen alberth
12:08:54 <DorpsGek> andythenorth: alberth was last seen in #openttd 5 days, 16 hours, 53 minutes, and 13 seconds ago: <Alberth> no, box cars are boring in game play
12:09:01 <andythenorth> alberth must be away :P
12:09:35 <andythenorth> Samu: what are the problems?
12:11:04 *** Cubey has quit IRC
12:11:38 <Samu> for multiplaying purposes, that is bad idea
12:11:58 <Samu> any company can upgrade town roads
12:12:07 <Samu> will eventually lead to abuses
12:12:29 <Wolf01> That's intended
12:12:50 <Samu> also, if I want to upgrade only my roads, i can end up upgrading town roads by mistake, because it's inside the selection area
12:13:07 <Samu> it can be annoying
12:13:31 <andythenorth> the abuses are known
12:13:46 <andythenorth> we've added them to the long list of other griefing opportunities
12:14:06 <andythenorth> I was -1 to upgrading town roads, but it's an inevitable consequence of NRT
12:14:19 <Wolf01> So you upgrade the whole map instead of selectively upgrading roads? Like everything highway?
12:14:28 <Rubidium> but then what is an upgrade?
12:15:12 *** john-aj has joined #openttd
12:15:20 <andythenorth> it's opposite to a downgrade
12:15:25 <andythenorth> logical eh? :)
12:15:42 <Rubidium> changing a concrete 80 km/h road in a town to a nice cobble stone 30 km/h can be considered an upgrade of the road (for the local community)
12:16:12 <Rubidium> but the reverse can also be considered an upgrade (for those trucking/driving through there)
12:16:44 *** Wormnest has joined #openttd
12:17:19 <Samu> make it like bridges then
12:17:29 <Samu> don't let downgrade to happen
12:17:42 <Wolf01> What is a downgrade?
12:18:00 <Samu> you can't downgrade a town bridge if the new max speed is lower than the previous
12:18:14 <Wolf01> Apply it to roads
12:19:54 <Wolf01> A -> B, A: speed limit 50, catenary, all vehicles, allows houses; B: speed limit 130, no catenary, only fast vehicles, no houses. Is it an upgrade?
12:20:09 <Eddi|zuHause> lots of roads get "upgraded" to 30km/h nowadays
12:21:12 <Eddi|zuHause> Wolf01: there can be no meaningful definition of "upgrade" if the "compatible" relationship isn't even transitive
12:22:48 <Wolf01> That's why I set it to be able to convert only if compatible
12:23:00 <Wolf01> So you won't convert a city to HAUL
12:23:32 <Eddi|zuHause> Wolf01: but you can construct a newgrf where A can run on A and B, B can run on B and C, and C can run on C
12:23:49 <Eddi|zuHause> you could "upgrade" B to C in that construction
12:23:55 <Eddi|zuHause> but A vehicles would lose their path
12:24:09 <Eddi|zuHause> and you have no chance of finding that out by the "compatible" relation
12:24:31 <Samu> abuses!
12:24:38 <Wolf01> No, I don't think it's possible right now
12:25:09 <Wolf01> That seem to be what andythenorth tried with HAUL
12:25:22 <Wolf01> Making HAUL vehicles run on road but not vice versa
12:26:22 <Eddi|zuHause> that doesn't create non-transitiveness
12:27:08 <andythenorth> wasn't the check against ROAD?
12:27:17 <andythenorth> or is it against the current type?
12:27:41 <Wolf01> It's always against ROAD
12:28:01 <Wolf01> Town roads MUST be always compatible with ROAD
12:28:42 <Eddi|zuHause> yes, that avoids the transitivity issue, but then you can "upgrade" to completely incompatible types
12:28:52 <Wolf01> Ok, if you bulldoze them and rebuild, then wtf, you are free to do it even in trunk
12:29:29 <andythenorth> incompatibility risk is a facet of shared infrastructure
12:29:43 <Wolf01> Eddi, explain me hoy I can upgrade to an incompatible type if there is an hardcoded check against ROAD which is always valid no matter what type has the town road
12:29:45 <Eddi|zuHause> you cannot solve this "correctly"
12:29:54 <Wolf01> *a
12:31:26 <Eddi|zuHause> Wolf01: you can make roadtypes B and C which are both compatible to ROAD but otherwise have nothing in common
12:31:44 <Eddi|zuHause> this would be considered an "upgrade" in your case
12:31:54 <Eddi|zuHause> but break all sorts of routes
12:31:59 <Wolf01> If they are compatible with ROAD, they can run ROAD vehicles
12:32:06 <Samu> A is road?
12:32:10 <Samu> ROAD
12:32:27 <Wolf01> And any other vehicle compatible with ROAD
12:32:49 <Wolf01> Also if I didn't it wrong, once you go electric you can't turn back
12:33:36 <Wolf01> So the new roadtype has ROAD+electric check
12:34:15 <Samu> Electric Roads?
12:34:23 <Samu> what in the world is that
12:34:37 <Wolf01> Shit Samu, we are talking about this for 2 years
12:34:48 <Eddi|zuHause> so what is it now? does it always compare to ROAD, or to the existing roadtype?
12:35:05 <Eddi|zuHause> or both?
12:35:34 <Wolf01> Upgrade of town roads: the new road MUST be compatible with ROAD and don't break compatibility with the current type
12:35:50 <Wolf01> You might get to a point where you can't convert the road anymore
12:36:05 <Eddi|zuHause> Wolf01: what i'm saying is that you cannot enforce the second part properly
12:36:23 <Samu> disallow downgrading
12:36:38 <Eddi|zuHause> which is what my A/B/C model was trying to show
12:37:05 <Eddi|zuHause> Wolf01: in that model, B is compatible with C, so you could make an "upgrade" from B to C
12:37:16 <Eddi|zuHause> Wolf01: but you still break routes of A vehicles
12:37:30 <Eddi|zuHause> because compatibility is not guaranteed to be transitive
12:37:31 <Wolf01> Too bad there isn't a A<->B, B<->C, A<-/->C model
12:39:14 <Wolf01> The only way to do that is to have ROAD->ELRD->ROAD, which is already catched
12:40:42 <Wolf01> Or something like it, you can't have, yet, a C type which is compatible with B but not A if B is compatible with A
12:41:20 <Wolf01> With "unbuildable types" if they will ever get implemented, maybe
12:42:59 <andythenorth> downgrades are part of the territory
12:45:57 <Wolf01> Also normal rules for road removal apply to conversion, if the city doesn't let you to remove roads, you can't even convert them
12:49:53 <Samu> why did it allow me to convert the entire town then?
12:50:45 <Wolf01> Because you were able to remove all the roads, the conversio doesn't lower the rating
12:51:09 <Wolf01> It's a conversion, not a removal
12:51:39 <Wolf01> Try to remove roads and houses and convert again
12:53:07 *** FLHerne has joined #openttd
12:53:21 <Samu> i just tested upgrading all road types, i can upgrade from any type to any other type
12:53:29 <Samu> no restrictions, i fail
12:53:42 <Samu> wasn't it supposed to restrict something?
12:54:36 <Wolf01> If you use all compatible types, then there is no restriction
12:54:44 <Wolf01> Try HAUL
12:54:57 <Samu> what is the name of that
12:55:08 <Samu> Heavy haul road construction?
12:55:16 <Wolf01> Maybe, who knows
12:55:52 <Samu> i could upgrade it to anything else
12:56:07 <Wolf01> No, that's not the point
12:56:17 <Wolf01> You can't upgrade town roads to HAUL
12:56:22 <Samu> ah, towns
12:56:30 <Wolf01> You can upgrade YOUR roads to whatever you want
12:56:46 <Wolf01> Just like you can upgrade rails to maglev
12:57:37 <Samu> but road vehicles of other companies will cry
12:57:51 <Samu> this is so prone to abuses
12:58:32 <Wolf01> Nobody stops you to remove your roads in trunk to stop other companies
12:58:36 <FLHerne> You can remove your own roads already
12:59:46 <Wolf01> I feel like 99% of these discussions about griefing are only whining
13:01:41 *** Biolunar has joined #openttd
13:02:29 <Samu> towns are fine
13:02:32 <Samu> apparently
13:02:56 <Samu> i upgraded to Asphalt Paved Road with Overhead Wire
13:03:04 <Samu> and can no longer downgrade them to anything
13:03:43 <Samu> oh, i'm Appalling
13:03:46 <Samu> maybe that's it
13:04:17 <Wolf01> That could be a reason, but you shouldn't be able to "downgrade" anyway
13:05:36 <Samu> planted some trees, and now it downgraded to Graded Gravel Road with Overhead Wire
13:06:05 <Samu> downgraded to stone
13:06:12 <Samu> with wire
13:06:19 <Samu> i see a trend, only roads with wires
13:06:29 <Wolf01> That's what I said
13:08:18 <Samu> don't let town roads to be downgraded to a lower speed road
13:08:22 <Samu> just like bridges
13:08:31 <Samu> and everything will be ok
13:08:44 *** Gja has joined #openttd
13:13:11 <Samu> what about roads of owner_none?
13:13:21 <Samu> if i upgrade such road, will that road become mine?
13:13:23 <Samu> ..
13:13:23 <Samu> ..
13:13:23 <Samu> ..
13:13:23 <Samu> ..
13:13:23 <Samu> ..
13:13:25 <Samu> ..
13:13:25 <Samu> ..
13:13:27 <Samu> ..
13:13:27 <Samu> ..
13:13:29 <Samu> ..
13:13:29 <Samu> ..
13:13:31 <Samu> ..
13:13:31 <Samu> ..
13:13:33 <Samu> ..
13:13:33 <Samu> ..
13:13:35 <Samu> ..
13:13:35 <Samu> ops
13:13:37 <Samu> it was my cat
13:14:04 <__ln__> "cat"
13:14:09 <LordAro> ..
13:14:52 <Samu> it was Kiko
13:15:19 <Samu> he stepped on the bottom right corner of the keyboard
13:17:29 <Wolf01> <Samu> if i upgrade such road, will that road become mine? <- yes
13:18:09 <__ln__> a coal mine or the kind of mine that explodes?
13:19:28 <Wolf01> Why don't you figure it out by yourself? :)
13:19:46 <Samu> because waiting for a bankrupt is boring
13:20:11 <__ln__> *bankruptcy
13:20:19 <Wolf01> Try making a scenario, roads placed in the editor have owner none
13:22:42 *** Laedek_ has quit IRC
13:25:15 *** som89_ has joined #openttd
13:30:20 *** Laedek has joined #openttd
13:32:20 *** andythenorth has quit IRC
13:36:33 *** andythenorth has joined #openttd
13:39:11 <Samu> gonna check why rails are counted as roads
14:04:02 <Samu> bah... DoCommand stuff is so hard to follow
14:05:56 <Wolf01> I already fixed that Samu
14:06:32 <Samu> oh, nice!
14:07:06 <Wolf01> We need to focus on worse things
14:07:19 <Samu> what was it?
14:08:16 <Wolf01> 1 loop too much on the array
14:14:53 <Wolf01> What it was the AI problem?
14:16:35 <Samu> it was that they couldn't build stations
14:16:52 <Samu> i found a fix for it yesterday
14:17:12 <Samu> @logs
14:17:12 <DorpsGek> Samu: https://webster.openttdcoop.org/index.php?channel=openttd
14:18:10 <Samu> https://webster.openttdcoop.org/index.php?channel=openttd&date=1518739200#1518816503
14:18:59 <Samu> it was the STATION_JOIN_ADJACENT flag
14:19:27 *** supermop has joined #openttd
14:25:02 *** andythenorth has quit IRC
14:29:46 *** Flygon_ has quit IRC
14:30:12 <supermop> yo
14:30:53 *** frosch123 has joined #openttd
14:32:03 *** FLHerne has quit IRC
14:32:18 *** FLHerne has joined #openttd
14:32:28 <frosch123> mo
14:39:14 <Wolf01> Quak
14:39:36 <Wolf01> uint p2 = (station_id == ScriptStation::STATION_JOIN_ADJACENT) << 2; <- Samu, this should be the fix, could you try it?
14:40:32 *** FLHerne has quit IRC
14:44:15 <Samu> ok, sec~
14:46:25 *** FLHerne has joined #openttd
14:50:11 <Samu> yes, that works too
14:52:30 <Samu> the company_gui.cpp for (RoadType rt = ROADTYPE_BEGIN; rt < ROADTYPE_END; rt++) {
14:52:44 <Samu> it was <= to < for fixing rail count, right?
14:52:59 <Wolf01> Yes
14:53:54 <Samu> nice
14:54:27 *** FLHerne has quit IRC
14:56:23 <Samu> they're building stations
14:56:53 <Samu> that was the most glaring issue, I'm unsure if there are other problems
14:58:18 <Samu> need to find some adjacent stations, can't seem to find any now
14:59:51 <Samu> ah, found one
15:02:00 <Samu> strange that AIAI isn't building any road vehicle, hmm gonna force him to only road vehicles, brb
15:03:12 <Samu> ah, he can build them
15:03:21 <Samu> must have decided not to
15:04:28 <Samu> got a weird AIAI crash, I've never seen this one before
15:06:37 *** Gja has quit IRC
15:07:08 <Samu> https://imgur.com/tJNzXbS
15:07:20 <Samu> too bad i'm not the author
15:07:29 <Samu> not sure what it was trying to do
15:07:38 *** andythenorth has joined #openttd
15:07:39 <Samu> gonna try see if it can happen in 1.7.2
15:10:06 <Samu> nope, it didn't happen
15:10:25 <Samu> smells like a NRT problem
15:10:33 <Samu> now figuring out what it was... :(
15:12:18 <Samu> compare ratt vs 1.7.2 logs
15:12:20 <Samu> https://imgur.com/HY0owR4
15:12:27 <Samu> on 1.7.2 it went through
15:12:31 <Samu> on ratt it crashed
15:12:57 *** Alberth has joined #openttd
15:12:57 *** ChanServ sets mode: +o Alberth
15:16:44 <andythenorth> lo Alberth
15:16:51 <Alberth> hi hi
15:17:31 <Samu> hi
15:19:20 <Samu> Alberth: i made a GS
15:19:25 <Samu> have yuo seen it?
15:19:29 <Alberth> :o great!
15:19:30 <Samu> on banana
15:19:53 <Alberth> I don't look often there
15:20:08 <Alberth> I read you made a company value thingie?
15:20:12 <Samu> ya
15:20:28 <Samu> because there wasn't any
15:20:55 <Alberth> that's a good reason :)
15:23:04 <Samu> but i wanted to hear opinions about it :(
15:23:18 <Samu> does it work, could be done better, etc...
15:24:41 <Alberth> the fact that there was no company value GS somewhat indicates how much it is wanted by people
15:25:16 <Samu> nobody wanted? :(
15:25:32 <Alberth> in my experience it is far simpler to make software that you believe is useful
15:25:41 <Alberth> or what you need
15:25:54 <Alberth> if others can also use it, hoooraay
15:26:02 <Alberth> if not, that's ok
15:27:09 <Alberth> most users play SP games, where company value is a non-relevant thing
15:27:38 <Alberth> maybe if you make some performance rating thingie, that might work somewhat
15:28:05 <andythenorth> Alberth: https://paste.openttdcoop.org/pucuvxx6y/z2vrfx/raw
15:28:08 <Alberth> at least you see people play the advanced performance rating maximizing game every now and then
15:28:25 <Alberth> although I think they don't do it often
15:29:08 <Samu> i tried something with the script, tried to updates as often as possible, but only if a change is detected
15:29:19 <Samu> update the progress/value
15:29:45 <Alberth> Can a cargo monitor detect origin of cargo on delivery? <-- no
15:29:49 <Samu> it updates every other tick
15:30:00 <andythenorth> hmm
15:30:12 <andythenorth> not sure how to measure continuous service between 2 towns then :)
15:30:31 <Samu> tick 1 sleep, tick 2 check for changes and update if so, tick 3 sleep, tick 4 etc...,
15:30:38 <andythenorth> subsidy does it
15:30:59 <Alberth> I think so indeed
15:31:15 <andythenorth> can it be done by analysing orders?
15:31:16 <Alberth> but it's embedded in the cargo payment code
15:31:50 <Samu> oh well i'd like Alberth to take a look at my GS code, if some improvements could be done for the future versions
15:32:20 <Alberth> it'd be simple to confuse the code with complicated enough orders, I think
15:33:30 <Alberth> I once wondered about payment schemes, where you can decide how much a player gets paid for a transport
15:33:47 <Alberth> although that's not measuring
15:34:22 <Samu> Wolf01: this is where AIAI crashed Error(AIVehicle.GetName(original) + " have no capacity for " + AICargo.GetCargoLabel(cargo));
15:34:47 <Samu> that's strange, cus i've not loaded any newgrf, all vehicles have capacities
15:34:52 <supermop> andythenorth: should slag in trucks have glowing bits?
15:35:04 <andythenorth> I use the animated fire cycle
15:35:05 <Samu> all the vanilla vehicles
15:35:06 <Wolf01> Not my problem, NRT doesn't fiddle with cargo
15:35:35 <Samu> must investigate what leads to this
15:35:56 <supermop> i think i've fixed most of the egregious issues with my RVs
15:36:29 <Samu> AIVehicle.GetName(original)
15:36:33 <supermop> was pondering some fancy cargo age switches to make them glow less with time
15:36:37 <Samu> original does not exist
15:36:52 <Samu> how was this original (not) set, brb
15:37:01 <supermop> i need to draw cars and transformers and pipes though
15:37:43 <supermop> and prevent refridgerated trucks from carrying pig iron
15:38:06 <Samu> abort("Wild cargo appeared. In case of RV there is no valid explanation.");
15:38:32 <Samu> wish i knew what AIAI is talking about
15:38:51 <Alberth> study the code
15:39:34 <Samu> but Wolf01 , this doesn't happen on 1.7.2, it is happening on NRT
15:39:56 <Samu> compare the log side by side https://imgur.com/HY0owR4
15:40:17 <Alberth> andythenorth: could work as scenario, with an otherwise empty map, and 1 town at one end
15:40:31 <Alberth> hmm, even that fails :(
15:40:45 <Alberth> could do transport within the city
15:40:47 <Wolf01> Maybe some AI is trying to build HAUL to transport something, but HAUL is only for wood
15:40:47 <andythenorth> there is a way to do this
15:40:55 <andythenorth> but I haven't figured it out yet
15:41:10 <andythenorth> I can think of complicated solutions, but not simple ones
15:41:13 <Alberth> would work with industrial cargo
15:41:15 <andythenorth> yes
15:41:29 <andythenorth> and if industries were forced to opposite ends
15:41:40 <Samu> no, it's an iron ore service
15:41:49 <andythenorth> it would also work if the payment rate was modified per town
15:42:01 <andythenorth> so there is only payment to specified locations
15:42:19 <andythenorth> if GS could query the cdist linkgraph, it would be possible
15:42:23 <Wolf01> Samu, with which roadtype, with which vehicle?
15:42:24 <Alberth> hack openttd?
15:42:37 <Samu> vanilla, no newgrfs at all
15:42:48 <andythenorth> given a pair of nodes (stations), is there a link between them, and is it > unused
15:42:48 <Alberth> linkgraph isn't always stable
15:43:01 <andythenorth> no
15:43:12 <andythenorth> but it could take a rolling average
15:43:52 <Alberth> information should be there, I just have no clue at all where or how
15:43:52 *** Gja has joined #openttd
15:44:02 <andythenorth> there are various cdist-related functions
15:44:09 <andythenorth> e.g. https://nogo.openttd.org/api/1.7.2/classGSStationList__CargoPlannedByVia.html
15:44:17 <Alberth> :O nice
15:44:55 <Wolf01> Samu, it was trying to build "orignal", I don't know what it could be, not part of OTTD
15:45:25 <Wolf01> Look at the AI code, the AI might just be incompatible and need to be fixed
15:45:42 <Wolf01> Ask the AI author to help you
15:45:50 <Alberth> so that should work, ask next hops for one of the sides
15:46:42 <Samu> which cargo is 5?
15:46:43 <andythenorth> hmm
15:46:54 <andythenorth> seems like it could be fragile?
15:47:03 <Samu> GetCargoLabel(5)
15:55:37 <Samu> + cargo_label 0x000001b66f19aca0 "GOOD" char *
15:55:40 <Samu> got it
15:55:55 <Samu> why was it looking for GOOD, it was working with iron ore
16:01:06 <Wolf01> Does it throw error every time with NRT?
16:03:12 <Samu> yes, but still investigating
16:03:37 <Samu> must figure which station index is 3
16:03:54 <Samu> the location on the map, wanna know where the AI is at
16:05:08 <supermop> accidentally made road trains cost $0
16:06:38 <Samu> ah, got the station on map
16:06:51 <Samu> so it was indeed doing what it said it was doing "working on circle around station"
16:06:59 <Samu> it failed to do it
16:07:07 <Samu> and crashed, but on 1.7.2, it managed to do it
16:07:13 <Samu> no crash
16:08:21 <Wolf01> There must be a reason other than "must be NRT"
16:08:36 <Samu> didn't connect the road
16:08:41 <Samu> so... hah
16:09:25 <Samu> following squirrel code sucks
16:09:29 <Wolf01> Also don't load back and forth the saves between trunk and NRT, they might seem compatible but they aren't
16:09:50 <Samu> i loaded and typed restart in console, should be ok
16:17:24 <Samu> AIVehicleList_Station::AIVehicleList_Station
16:25:05 * andythenorth drawing ships
16:25:13 <andythenorth> tanker ships are blah
16:27:16 <Samu> local station_list = AIStationList(AIStation.STATION_TRUCK_STOP);
16:27:45 <Samu> the AI is trying to check if it needs to add more vehicles
16:28:05 <Samu> that station is the dropoff point for the iron ore trucks
16:28:14 <Samu> but it somehow changed to goods... how
16:30:20 <Wolf01> GOODS is fallback cargo IIRC
16:31:39 *** snail_UES_ has joined #openttd
16:36:28 <Samu> he's cycling through all stations, to check if it needs to add more vehicles
16:36:48 <Samu> strange, i thought it was about failing to connect the road tile
16:36:55 <Samu> hard to follow this code :(
16:39:35 <Samu> for (local station_id = station_list.Begin(); station_list.HasNext(); station_id = station_list.Next()) { how_many += AddNewNecessaryRVToThisPlace(station_id, cargo) }
16:40:06 <Samu> and this is yet inside another for cycle
16:40:08 <Samu> for (local cargo = cargo_list.Begin(); cargo_list.HasNext(); cargo = cargo_list.Next()) {
16:51:24 <Samu> AHA
16:51:43 <Samu> i found the issue, it's still related to adjacent station issues
16:52:09 <Samu> on 1.7.2 it built a lorry station next to another, but it got a separate station_id
16:52:34 <Samu> on ratt, it built the lorry station next to the other as well, but... it joined to the other station
16:53:22 <Samu> when AIAI is checking if vehicles need more cargo, it picked a random vehicle, and assumed only one cargo was being managed by that station, but it had 2 cargoes, wood and good
16:53:31 <Samu> so... ratt is still bugged
16:53:50 <Samu> separating stations doesn't seem to work well for the AI
16:55:09 <Samu> must find where in the code the AI builds a new station
16:55:29 <Samu> he wanted it to have a new station_id, but instead... shared the id of another
16:56:44 *** snail_UES_ has quit IRC
16:57:46 *** snail_UES_ has joined #openttd
17:05:38 <Samu> Wolf01: https://imgur.com/ZjzvHUa ... on the lest, the new station is joined with the nearby one, on the right, it's a separate station_id
17:05:40 <Samu> left
17:07:02 <Samu> gonna compare how the code is followedd in visual studio
17:20:16 *** som89_ has quit IRC
17:28:54 *** som89_ has joined #openttd
17:35:03 *** ToBeFree has joined #openttd
17:36:18 <andythenorth> first ship finished in Sam
17:36:51 *** gelignite has quit IRC
17:37:42 *** andythenorth has quit IRC
17:58:26 <Samu> Wolf01: found it where it diverges
17:58:33 <Samu> it's still in the same place!
17:58:42 <Samu> uint p2 = (station_id == ScriptStation::STATION_JOIN_ADJACENT) << 2;
17:59:09 <Samu> you set no flag
17:59:23 <Samu> uint p2 = station_id == ScriptStation::STATION_JOIN_ADJACENT ? 0 : 32;
17:59:27 <Samu> this set the flag
17:59:32 *** som89 has joined #openttd
18:00:11 <Wolf01> Meh
18:00:43 <Wolf01> It's !=
18:02:15 *** som89_ has quit IRC
18:02:16 <Samu> ok, gonna try with !=
18:05:51 *** som89_ has joined #openttd
18:06:45 <Samu> good job! it werks now
18:09:39 *** som89 has quit IRC
18:09:46 <Samu> excelent! AIAI didn't crash now
18:10:44 <Wolf01> Ok, fixed AIs, fixed infrastructure count, fixed whining about griefing, time to ship to trunk?
18:13:14 <Samu> I notice small differences in the amount of money AIAI has stored, hmm wondering if road cost calculations are being done the same way
18:15:03 *** Gja has quit IRC
18:16:22 <Samu> is ratt based on r27968?
18:18:06 <Wolf01> More or less
18:18:46 <Wolf01> frosch123: https://www.tt-forums.net/viewtopic.php?p=1202803#p1202803 any idea about this?
18:21:06 <Samu> @calc 12530 + 79795
18:21:06 <DorpsGek> Samu: 92325
18:21:35 <Samu> @calc 12650 + 79923
18:21:35 <DorpsGek> Samu: 92573
18:21:52 <Samu> different construction costs
18:21:54 <frosch123> Wolf01: trams are allowed to reverse if the tile in front cannot be built on, for example when there is a radio tower
18:22:01 <frosch123> i do not know the details of the check though
18:22:20 <frosch123> compare it with trunk?
18:22:22 <Samu> every other accountings are equal
18:22:30 <frosch123> don't care if it is the same :)
18:22:47 <Wolf01> They say in trunk they cannot reverse
18:25:31 <Wolf01> I just tried it and it's the same in trunk
18:27:31 <Samu> there is a slight variance in construction costs... how am I gonna discover where it happens
18:27:36 <Samu> t.t
18:30:03 *** Gja has joined #openttd
18:31:18 <Wolf01> No clue
18:32:25 <frosch123> hmm, 200 u238, 0 u235
18:32:32 <frosch123> either i have bad luck or something is broken :p
18:37:54 <Samu> https://imgur.com/CvBNHGn first occurence of mismatching construction costs, seems to be about expanding stations?
18:38:08 <Samu> have to investigate this better
18:39:53 <Wolf01> If you find it what exactly happen I might be able to fix for this night release
18:42:20 <Wolf01> frosch123: I don't produce enough u238 but I have a surplus of like... 3.8k of u235
18:45:26 *** FLHerne has joined #openttd
18:45:34 *** gelignite has joined #openttd
18:49:59 <Eddi|zuHause> i think this discussion may be dangerous if taken in the wrong context :p
18:50:32 <Wolf01> I'm also plenty of oil
18:50:33 <Wolf01> :P
18:54:36 <Samu> aha, i found it!
18:54:57 <Samu> placing a drivethrough truck station on a road owned by you
18:55:02 <Samu> costs diverge
18:55:27 <Wolf01> Mmmh
18:56:31 *** glx has joined #openttd
18:56:31 *** ChanServ sets mode: +v glx
18:56:34 <Samu> £150 in r27968, £166 in ratt
18:56:44 *** john-aj has quit IRC
18:57:02 <Wolf01> 8 per road bit
18:57:19 <Wolf01> Maybe it's trying to pay again for the road
18:57:33 <Wolf01> 8 is base cost for road
19:03:52 *** chomwitt has quit IRC
19:04:28 <Samu> i have inflation turned on, btw
19:04:33 <Samu> or not, wait, let me check
19:04:52 <Samu> it's off
19:04:58 <Samu> construction costs are low
19:17:11 *** sla_ro|master has joined #openttd
19:32:53 *** snail_UES_ has quit IRC
19:36:49 <Wolf01> Samu: RoadConvertCost in road.h:L223
19:37:04 <Wolf01> That's what is doing now
19:37:25 <Wolf01> It's called even when placing a roadstop over an existing road
19:37:58 <Wolf01> But I think that converting to the same roadtype should cost 0
19:38:10 <Samu> :)
19:38:18 <Wolf01> frosch123: what do you think?
19:39:49 <Wolf01> Trunk was just cost.AddCost(_price[PR_BUILD_ROAD] * roadbits_to_build);
19:40:00 <Samu> uint roadbits_to_build = CountBits(rts) * 2 - num_roadbits;
19:41:05 <Samu> it subtracts
19:41:18 <Wolf01> Yes it could be 0 to 2
19:41:40 <Wolf01> 0 if there is already the road
19:41:54 <Wolf01> For each roadstop
19:43:07 <Samu> your code is counting the number of road pieces
19:43:13 <Samu> but it's not subtracting :(
19:43:30 <Samu> 8 * 2
19:43:31 <Samu> 16
19:43:36 <Wolf01> cost.AddCost(RoadBuildCost(rtid) * (2 - num_pieces));
19:44:02 <Wolf01> L971
19:44:19 <Samu> oh, i see :)
19:44:24 *** ToBeFree has quit IRC
19:45:10 <Wolf01> The problem is there: cost.AddCost(num_pieces * RoadConvertCost(rtids.road_identifier, rtid));
19:46:12 <Wolf01> The cost is different because it accounts for 1/8 of the build cost
19:49:01 <Wolf01> Just for a quick test, put "if (from == to) return 0;" as first line of the RoadConvertCost function and retry the tests
19:54:58 <Samu> ok
19:56:08 <Samu> what about the cost that is following?
19:56:36 <Wolf01> Where?
19:56:42 <Samu> cost.AddCost(RoadBuildCost(rtid) * (2 - num_pieces));
19:56:47 <Samu> ah, nevermind, that's fine
19:56:56 <Samu> there can be no more than 2 pieces
20:03:15 <Samu> we have another problem now
20:03:20 <Samu> maintenance costs
20:03:23 <Samu> differ
20:03:57 <Samu> ah, nevermind, my bad
20:04:05 <Samu> ignore
20:04:18 <Wolf01> 0 fixed it^
20:04:19 <Samu> i turned it on in one place and not the other
20:04:20 <Wolf01> ?
20:04:32 <Samu> sec, i'm restarting with the same settings
20:05:35 <Samu> wait 4 months, fast forwarding is kinda slow in debug mod
20:08:02 <Samu> meanwhile, my GS bugged out
20:08:03 *** supermop has quit IRC
20:08:04 <Samu> :(
20:11:29 <Samu> looks fixed
20:11:49 <Samu> good job!
20:12:05 <Samu> so far, AIAI got the same expenditure charts
20:18:37 <Samu> speaking of maintenance costs, perhaps i should try enabling it
20:18:50 <Samu> restarting test with them on on both
20:21:11 <Samu> woah, it differs :(
20:21:32 <Samu> the counting of pieces match, but the cost don't, it's doubled
20:23:15 <Samu> Wolf01: https://imgur.com/m6yaDs6 look at infrastructure cost details, same number of road pieces, but at different costs
20:24:04 <Wolf01> Mmmh
20:25:24 <Wolf01> That's before or after the fix?
20:25:56 *** supermop has joined #openttd
20:26:08 <Samu> that's the first time i'm checking
20:26:11 <Samu> i'm unsure
20:26:20 <Wolf01> Remove the fix and check again
20:26:24 <Samu> k
20:27:43 <Wolf01> If it's the same, I'll ship the fix and start to look at that
20:29:31 <Samu> same problem
20:29:38 <Samu> just checked
20:29:55 <Samu> £1200/yr vs £600/yr
20:30:10 <Samu> £1452/yr vs £720/yr
20:31:33 <Wolf01> Ok, so I'll ship the convert cost fix
20:38:34 <Wolf01> return (_price[PR_INFRASTRUCTURE_ROAD] * (roadtype == ROADTYPE_TRAM ? 3 : 2) * num * (1 + IntSqrt(num))) >> 9; // 2 bits fraction for the multiplier and 7 bits scaling.
20:38:38 <Wolf01> This is trunk
20:38:46 <Wolf01> return (_price[PR_INFRASTRUCTURE_ROAD] * GetRoadTypeInfo(rtid)->maintenance_multiplier * num * (1 + IntSqrt(total_num))) >> 11;
20:38:49 <Wolf01> This is NRT
20:38:52 <Wolf01> Nice
20:41:32 <Samu> haha, so different
20:44:03 *** Stimrol has quit IRC
20:45:49 *** [1]sim-al2 has joined #openttd
20:45:49 *** sim-al2 is now known as Guest4312
20:45:49 *** [1]sim-al2 is now known as sim-al2
20:49:17 *** Guest4312 has quit IRC
20:50:02 *** sim-al2 is now known as Guest4313
20:50:03 *** sim-al2 has joined #openttd
20:50:34 *** Stimrol has joined #openttd
20:50:54 <Samu> 2 * 159 * 159 >> 11
20:51:16 <Samu> ops
20:52:01 <Samu> (7 * 2 * 159 * 14) >> 11
20:52:43 <Samu> (7 * 2 * 159 * 14) >> 9
20:53:04 <Samu> (7 * 16 * 159 * 14) >> 11
20:54:52 *** Guest4313 has quit IRC
20:55:01 <Samu> 60 vs 121
20:55:27 <Wolf01> I don't think we can do a lot here, I could divide again by 2 (>>9 instead of >>11) but the part about having tram cost added is mandatory for NRT, as you will have different costs for trams and you can't just account it for 150% of road cost
20:59:58 *** Stimrol has quit IRC
21:05:30 <supermop> what is the issue?
21:05:43 <Wolf01> NRT maintenance costs are double of trunk
21:05:46 <Wolf01> With vanilla roads
21:07:16 <Eddi|zuHause> the difference between >>9 and >>11 is a factor of 4
21:07:47 <Wolf01> Yeah, I noticed
21:10:07 <supermop> hm
21:10:32 <supermop> should electrical machines be grey or green>
21:10:33 *** Stimrol has joined #openttd
21:11:22 <supermop> when i see transformers or industrial tools on trucks they are usually just shrink wrapped in white or blue plastic these days
21:11:27 <supermop> but thats boring
21:12:40 <supermop> think ill just take the steel roll, add a boxy bit on top, and a few copper knobs
21:13:58 <Wolf01> Also to divide I should do >>1 not <<1... I always get it wrong
21:14:17 <Wolf01> So it's 12
21:15:09 <Wolf01> Samu, do you agree?
21:15:47 <Wolf01> road_func.h:L166, replace 11 with 12
21:18:03 <Wolf01> Or we should review the maintenance cost multiplier of the hardcoded roadtypes in roadtypes.h
21:18:17 *** quiznilo has quit IRC
21:20:33 *** Stimrol has joined #openttd
21:24:06 *** snail_UES_ has joined #openttd
21:28:39 *** quiznilo has joined #openttd
21:40:24 *** andythenorth has joined #openttd
21:41:42 <Samu> sorry, i was having dinner
21:42:44 *** snail_UES_ has quit IRC
21:43:05 <Samu> ok, let me test 12
21:45:38 <Samu> yep, looks fine
21:45:45 <Samu> the costs match
21:48:18 <Wolf01> It won't match for the trams, but heh
21:49:23 <Samu> hmm, i dunno how to test that
21:49:40 <Samu> vanilla game has no tram vehicles
21:49:51 <Wolf01> Load a grf with trams
21:54:38 <Samu> generic tram set doesn't let me access trams
21:54:58 <Wolf01> Year?
21:55:09 <Samu> 1960
21:55:58 <Samu> Generic Tram Set v0.4
21:56:31 <Wolf01> That's the one I have
21:57:08 <Wolf01> I see 4 tramways in NRT
21:57:36 <Samu> build tramways is disabled, can't build
21:58:54 <Wolf01> Uhm, yes, you are right
21:59:03 <Wolf01> I had unspooled enabled
22:01:39 <Samu> is there a nrt version of Generic Tram Set?
22:02:15 <Wolf01> That's a vehicle set
22:02:58 *** Alberth has left #openttd
22:06:00 <Samu> i need unspooled?
22:06:09 <Samu> combine unspool with generic tram set?
22:06:16 <supermop> samu, that will work
22:06:25 <supermop> you can also use docklands instead
22:06:40 <supermop> or vanilla NRT will have tramways
22:07:06 *** Stimrol has quit IRC
22:07:09 <supermop> no one else has made a NRT tram track set yet
22:07:20 <supermop> so i'm in the lonely club
22:08:51 <Samu> a fatal NewGRF error has occurred
22:09:13 <Samu> can't load spool thing on rxxxxx
22:09:16 <Samu> t.t
22:09:32 <Samu> i have no means to compare :(
22:10:23 <supermop> you cant load a tram types grf in trunk because trunk doesn't have tram types
22:10:35 *** Stimrol has joined #openttd
22:10:35 <supermop> thats the whole point of NRT
22:11:55 *** som89_ has quit IRC
22:12:53 *** synchris has quit IRC
22:13:42 *** som89_ has joined #openttd
22:14:31 <Samu> there is something in trunk, it has costs for trams
22:17:15 <supermop> trunk has just regular tramways
22:17:39 <supermop> it doesn't support grfs which provide different tramway types
22:18:41 <Wolf01> Ok, I found what is the problem, I only have ELRL available but generic trams checks for RAIL
22:20:26 *** sla_ro|master has quit IRC
22:21:42 <supermop> unsure why 'vehicle_is_crashed' is a variable you can use
22:22:35 <supermop> what are you going to do with crashed vehicles? emit flames and smoke?
22:23:00 <supermop> change the running cost to something high to simulate paying to tow it away?
22:23:34 <supermop> Wolf01: can i add decorations to catenary poles based on date?
22:23:45 <Wolf01> Dunno
22:24:23 <supermop> can i model a lunar calendar and cover road surface in confetti and hang red lanterns for lunar new year?
22:24:42 <supermop> because that's what my street looks like today
22:24:59 <Wolf01> :)
22:25:25 <supermop> spawn AI vehicle 'lion dance costume' that walks around at 1mph blocking traffic
22:26:05 <supermop> actually it would be neat to replace the reconstruction sprites with festivals
22:26:21 <supermop> 'sponsor street fairs'
22:26:36 <supermop> equally maddening to competitors
22:29:09 <andythenorth> lots of fixes :)
22:32:06 <Samu> tram costs need to match during savegame conversion
22:32:20 <Samu> how are u gonna fix that?
22:33:24 <Wolf01> I won't
22:33:52 <Samu> rip old savegames
22:34:56 <Samu> tram counter on trunk is bugged
22:34:59 <Samu> lel
22:35:25 <Samu> oh wait, it's not
22:35:30 <Samu> i was looking at the wrong company
22:39:22 <Samu> meanwhile i'm gonna fix my GS... something in it is haunting me, i thought I had it covered
22:54:35 <andythenorth> is bed
22:54:36 *** andythenorth has left #openttd
22:56:11 <Samu> ah, of course it would bug out, I'm stupid
23:02:31 *** frosch123 has quit IRC
23:13:29 *** Flygon has joined #openttd
23:21:49 *** Cubey has joined #openttd
23:24:38 *** john-aj has joined #openttd
23:33:17 *** Biolunar has quit IRC
23:45:08 *** DDR has joined #openttd
23:51:27 <Eddi|zuHause> supermop: "organize protests"?
23:53:59 <supermop> sure why not