IRC logs for #openttd on OFTC at 2018-12-28
⏴ go to previous day
00:03:07 <glx> hmm it should be possible to add a regression project in the solution
00:03:11 <TrueBrain> meh; more debugging is difficult
00:05:15 *** Thedarkb-T60 has joined #openttd
00:05:53 <TrueBrain> I see the line of code that fails in the source code, but not really a way to debug it :D
00:14:16 <TrueBrain> okay .... guess the only solution is to make our own task, which is a copy of theirs, and add debugging :P
00:20:55 <TrueBrain> funny ... depending on the API version I use, I can access the API or not
00:52:21 *** sla_ro|master2 has quit IRC
00:57:41 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #6996: Fix: [AzurePipelines] download the correct Windows Dependency artifact https://git.io/fhkis
01:00:25 <TrueBrain> so creating my own task also kinda fails
01:02:46 <Samu> i'm getting a weird behaviour with my ai. I'm managing road vehicles, selling old vehicles, but suddenly I spot some few aircrafts also being sold
01:02:54 <Samu> can't figure out the cause of the issue
01:06:41 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #6996: Fix: [AzurePipelines] download the correct Windows Dependency artifact https://git.io/fhkis
01:12:01 <TrueBrain> glx: manually triggered your build
01:12:06 <TrueBrain> I have a good idea what is going wrong
01:12:12 <TrueBrain> but .. that is something for tomorrow :)
01:12:42 <glx> btw my PR was not MSVC related ;)
01:25:26 <Samu> i catched one of the aircrafts that is sold by mistake, but still can't figure why it happens
01:27:58 <Samu> i think i have an idea... autorenew seems to be getting in the way?
01:28:23 <Samu> when a vehicle is autorenewed, does it get to keep the same id?
01:47:51 <Samu> I don't understand what is happening
01:48:01 <Samu> the SellVehicle function isn't even called
01:48:10 <Samu> and the aircraft is still sold
01:48:30 <Samu> gonna try kill the other AI
01:48:38 <Samu> see if it makes a differenc
01:54:18 <Samu> i killed AdmiralAI, and it appears it's not happening
01:54:31 <Samu> he's selling my aircraft somehow?
01:56:45 <Samu> i dunno, it could be something related to vehicle IDs
01:57:40 <Samu> gonna try disabling autorenew
01:59:02 <Samu> the SellVehicle function isn't even run
01:59:11 <Samu> not called, and the aircraft poofs
02:12:07 <Samu> where is the autorenew code?
02:58:53 *** Thedarkb-T60 has joined #openttd
03:02:26 *** rocky1138 has joined #openttd
03:20:29 <Samu> at the start of the management cycle the AI had 4415 aircraft
03:21:14 <Samu> at the end, we'll see with autorenew on and autorenew off
03:56:53 <Samu> it's autorenew that's causing the problem :(
08:09:23 *** andythenorth has joined #openttd
08:18:19 <DorpsGek_II> [OpenTTD/OpenTTD] James103 commented on issue #6032: Crash while loading savegame from 0.6 in 1.4 https://git.io/fhkFh
08:28:16 *** sla_ro|master has joined #openttd
08:42:29 <maddy_> I am trying to convert my logic signals patch to current openttd version
09:07:52 *** ChanServ sets mode: +v tokai
09:50:26 *** Wacko1976 has joined #openttd
10:04:00 *** Progman has joined #openttd
10:22:24 <maddy_> I am guessing this does not work? uint red_signals = SignalOnTrack(track) & ~GetSignalStates(tile);
10:22:58 <maddy_> i.e. if there is no signal at all, it will be calculated as a red signal by that code?
10:43:10 <maddy_> yeah, seems that was the problem
11:07:33 <maddy_> How do I make a dynamic caption for a window?
11:13:35 <maddy_> I see industries, towns etc. use that, and I see a placeholder in english.txt, but how do I fill in the data?
11:26:22 <TrueBrain> okay, Artifacts in Azure Pipelines are a no-go .. forks don't get the API token needed to fetch them (for good reason), and for some reason (despite it being a public artifact) it needs a valid API token .. so .. lets release the Windows Dependencies on GitHub
11:26:26 <TrueBrain> that should make things a bit easier
11:31:08 <maddy_> how do I set a string parameter with SetDParamStr so that I actually need to build it, e.g. sprintf, without actually allocating memory permanently?
11:43:33 <maddy_> I found that already... seprintf
11:44:32 *** Progman has joined #openttd
11:46:45 <maddy_> no, it crashed my game :(
11:47:39 *** andythenorth has joined #openttd
11:52:55 <andythenorth> so many pony troubles
11:55:33 <TrueBrain> hmm, indeed .. as you can of course not really remove a tag from a repository
11:55:39 <TrueBrain> that is evil .. I wanted to be evil ... owh no :(
11:56:53 <andythenorth> you can't remove it, or won't remove it? o_O
11:58:22 <TrueBrain> in git world, once something is published, it is always published
11:58:30 <TrueBrain> removing tag .. or worse, changing them, is .. well .. evil :D
11:58:35 <andythenorth> unless you rewrite history :P
11:59:48 <maddy_> I am trying to set a string to the caption of a widget in SetStringParameters, but openttd crashes in Utf8Decode(string.cpp)
12:00:37 <maddy_> it's just a tile inded I am creating in the window constructor: seprintf(this->name, lastof(this->name), "0x%X", this->program->tile);
12:09:27 <maddy_> no-one here knows how to output a string? that is surprising
12:10:02 *** Thedarkb-T60 has joined #openttd
12:25:32 <DorpsGek> andythenorth: supermop was last seen in #openttd 25 weeks, 1 day, 17 hours, 58 minutes, and 23 seconds ago: <supermop> i want rich tree biome simulation in openttd
12:25:44 <DorpsGek> andythenorth: pikka was last seen in #openttd 10 weeks, 1 day, 23 hours, 1 minute, and 8 seconds ago: <Pikka> yo
12:29:03 <TrueBrain> WHAT HAVE YOU DONE TO THEM
12:33:12 <andythenorth> people leave us TB :(
12:33:19 <andythenorth> I just talk at them, and they go :P
12:36:12 *** HerzogDeXtEr has joined #openttd
12:38:37 <TrueBrain> so tempted to leave now :D
12:44:00 <andythenorth> is Eddi still lost to TF?
12:44:20 * andythenorth trying to work out how to trick purchase menu into giving railtype of depot
12:50:51 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #6996: Fix: [AzurePipelines] download the correct Windows Dependency artifact https://git.io/fhkis
12:51:10 *** Progman has joined #openttd
12:52:46 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #6996: Fix: [AzurePipelines] download the correct Windows Dependency artifact https://git.io/fhkis
12:55:59 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #6996: Fix: [AzurePipelines] download the correct Windows Dependency artifact https://git.io/fhkis
12:59:41 <TrueBrain> CD works very well on Azure Pipelines :)
12:59:47 <TrueBrain> and now the OpenTTD CI is also kicking ass again :)
13:01:22 <peter1138> My review: It probably works but I've no idea what I'm looking at.
13:01:47 <peter1138> windows-dependencies.zip
13:02:04 <peter1138> isn't that handled by vcpkg now?
13:02:30 <peter1138> i'm guessing if i had been following i would know why you need it but i've not.
13:02:40 <TrueBrain> basically, that zip file is a cache
13:02:44 <peter1138> in summary: this is why i don't often review. I have nfi;.
13:02:48 <TrueBrain> in there is vcpkg with the dependencies pre-compiled
13:03:03 <TrueBrain> (it speeds the CI up with ~10 minutes)
13:03:50 <peter1138> so is this change switching from vcpkg to the cached builds?
13:03:52 <TrueBrain> so we download the vcpkg cache, instead of compiling it ourself again :) OpenTTD-CF makes sure the cache is up-to-date :)
13:04:08 <TrueBrain> no, this change is switching from BuildArtifact from Azure Pipelines to Releases from GitHub
13:04:15 <TrueBrain> the first was giving issues ..
13:04:21 <TrueBrain> so the location of the cache changed
13:04:28 <TrueBrain> (DownloadBuildArtifact vs curl)
13:04:50 <peter1138> ah the location changed and because(?) it's not github the method to grab it is different?
13:05:13 <TrueBrain> yeah, there is no built-in task to download a GitHub release
13:05:16 <TrueBrain> so I just bashed it together
13:05:32 <TrueBrain> Azure Pipelines has a lot of tasks done for you
13:05:51 <TrueBrain> (I try to use those when possible; but here it isn't, so bash it is :D)
13:06:22 *** Alberth has joined #openttd
13:06:22 *** ChanServ sets mode: +o Alberth
13:07:02 <Alberth> he, tb, exactly the person I needed :)
13:07:16 <TrueBrain> yes, I did. But had no time to look at it :(
13:07:30 <TrueBrain> I was heavily distracted by some new shiny CompileFarm :P
13:07:44 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN approved pull request #6996: Fix: [AzurePipelines] download the correct Windows Dependency artifact https://git.io/fhIfe
13:07:51 <Alberth> lots of polishing going on eh? :)
13:07:54 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain merged pull request #6996: Fix: [AzurePipelines] download the correct Windows Dependency artifact https://git.io/fhkis
13:08:10 <peter1138> TrueBrain, thanks for explaining it
13:09:41 <TrueBrain> okay, so if people rebase, PRs should work again too :) Sweet!
13:09:56 <TrueBrain> Alberth: I first want to look at moving parts of our hosting to DigitalOcean, as that is long overdue
13:10:03 <TrueBrain> after that I will have time to look over your PR
13:10:09 <TrueBrain> but I think that will be next week somewhee
13:10:19 <TrueBrain> sorry, bit limited in time and things I want to do :D
13:10:32 <Alberth> sure, as long as it's in the backlog somewhere :)
13:10:34 <TrueBrain> (but I am really happy you took a few steps there :D)
13:11:37 <Alberth> just fleshing out some things, authentication needs a lot of work still, but no clue how to do that at all
13:12:14 <Alberth> just make sure you catch all the moving things first :)
13:13:51 <Alberth> do you have any input on the bananas 2 thing? frosch wrote some stuff, it might need a more concrete experiment I was thinking?
13:18:27 *** Wacko1976 has joined #openttd
13:22:22 <LordAro> someone should fix that win64 warning
13:25:17 <Alberth> and fix all the false positives :p
13:25:36 <Alberth> preferably by prs on the compilers
13:27:51 <peter1138> 6>c:\users\peter\source\repos\openttd\src\tunnelbridge_cmd.cpp(707): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data
13:29:04 <Borg> uh oh.. someone have bad habbit of keeping data on C: ;P
13:29:18 <peter1138> Replacing SmallVector would probably fix it.
13:43:31 <peter1138> Borg, nah, my data is on the NAS, but that kinda sucks for building source code on, so yeah, stuff like git repos are on an SSD.
13:47:05 <Borg> peter1138: my data is distributed here and there.. but its not the point.
13:47:24 <Borg> C: is for OS only.. if I need to do reinstall.. no bother.. I can format it right away
13:47:32 <Borg> everything else is on other partitions.. good habbit..
13:47:38 <Borg> not that I reinstall OS often..
13:53:45 <TrueBrain> there are also some warnings on the other targets btw
13:53:56 <TrueBrain> they are only not reported as pretty
13:54:26 <TrueBrain> that is a long URL :D
13:54:41 <TrueBrain> the worst is .. the error was "fixed" by adding a comment
13:54:58 <TrueBrain> there are better ways of doing that :D
13:55:06 <LordAro> ah yes, i did that one :)
13:55:15 <LordAro> frosch signed off on the PR :p
13:55:46 <TrueBrain> make a define that reads something like IGNORE_RESULTS, and make the compiler not warn .. that is better :P
13:55:57 <TrueBrain> (depending on the compiler, the define looks different, but meh)
13:56:02 <LordAro> int dummy is probably easier
13:56:04 <TrueBrain> also lot of OSX warnings
13:56:19 <LordAro> all deprecation warnings, right?
13:56:23 <TrueBrain> but yeah, enabling Werror would be nice :)
13:56:48 <LordAro> -Werror -Wno-error-deprecated-declarations
13:57:04 <LordAro> hmm, -Wno-error=.. i think
13:58:03 <LordAro> at least it's all stuff "first deprecated in macOS 10.12"
13:58:08 <LordAro> and not anything older
13:58:37 <LordAro> TrueBrain: the ld warnings at the end of the osx log are a bit odd
13:59:09 <TrueBrain> no clue what is going on there
13:59:14 <TrueBrain> feel free to investigate :D
14:01:49 <TrueBrain> new setup is pretty nice .. experimenting is pretty easy
14:01:54 <TrueBrain> you can just set it up on your own fork
14:01:57 <TrueBrain> and run the CI on your branch
14:02:11 <TrueBrain> (you just need to create a microsoft account :D)
14:04:51 <LordAro> or i could open a PR :p
14:05:27 <TrueBrain> you can, but for experiementing that is annoying :D
14:08:20 <TrueBrain> but okay, patchpacks can too :D
14:10:58 <maddy_> can someone help me with my string problem please? I don't understand why game is crashing
14:13:20 *** Thedarkb-T60 has joined #openttd
14:15:00 <maddy_> string is defined like this: {BLACK}Logic Signal Program {RAW_STRING}
14:18:31 <Alberth> LinkCount returns a stored string pointer(I think you need that?) as well?
14:19:24 <maddy_> they use different function, SetDParam vs SetDParamStr
14:20:06 <maddy_> I find similar usage of SetDParamStr elsewhere, so I don't understand that's wrong
14:20:50 <Alberth> start with finding out which one is actually crashing, I
14:21:14 <Alberth> ie replace one string by something harmless
14:22:21 <Alberth> it's been several years since I last looked at string, details are a bit rusty :)
14:26:33 <Alberth> but yeah, I have no doubt it crashes :)
14:28:56 <Alberth> that stack dump doesn't tell you which string is crashing, unless you find the index of the widget in NWidgetLeaf at #8
14:29:26 <Alberth> the simpler check is to replace one of the strings by a constant text, and test
14:33:08 <Alberth> utf decode crash suggests you have incorrect utf text, which is most likely caused by reading random data, eg beyond 'name'
14:33:56 <maddy_> I replaced it with "abc" and it still crashed the same, I think it's something else not the content of the string
14:35:06 <Alberth> it could crash in other window widgets of course
14:43:12 <maddy_> I changed {RAW_STRING} to {STRING} in language file and it stopped crashing, so it's progress, but I don't get the string I am writing, I get something random like 'Mail' or 'Nothing'
14:43:56 <Alberth> probable a previous value printed from another window
14:44:26 <Alberth> NWidgetCore::index has the widget number
14:46:00 <Alberth> try this->name[15] = '\0' ?
14:47:05 <Alberth> or debug utfdecode, checking if you're running out of the 'name' array
14:47:32 <maddy_> hmm, but I don't even have the name array now, I have this: SetDParamStr(0, "abc");
14:49:22 <Alberth> oh right, it crashed with that as well
14:49:40 <Alberth> check the widget index, to make sure you're actually hunting the right problem
14:50:12 <Alberth> maybe you have other widgets that need a parameter or so
14:54:52 <maddy_> yes I have multiple widgets of the same type, but doesn't the SetStringParameters always work on the current instance? I really don't know how these widgets work
14:56:21 <Alberth> yes, just before the draw call you have to set the parameters
14:56:40 <maddy_> oh, now I figured it out
14:57:43 <maddy_> I am not defining a widget index when I am defining my gui, I was referring to WWT_CAPTION as the index
14:58:58 <Alberth> your SetStringParameters does that for 2 widgets, but you may have more perhaps widgets that need a sring
14:59:18 <Alberth> WWT_CAPTION is a widget type, not a tring index
15:00:06 <Alberth> WID_PROGSIG_LINK_COUNT <-- that looks like a widget index, by convention WID_ prefix is used
15:00:27 <maddy_> yes :) bit of a silly mistake
15:01:13 <Alberth> ah well, it happens, I was clarly also not too awake :p
15:08:25 <maddy_> new problem: Assertion failed at line 744 of c:\users\pekka\documents\openttd_src\src\newgrf_text.cpp: _grf_text[stringid].grfid != 0
15:10:58 <Alberth> no grfid specified in the newgrf that you use?
15:12:33 <maddy_> I had to go back to RAW_STRING from STRING in the language file, now it seems to work
15:24:04 <maddy_> thanks so much for help Alberth
15:26:36 <Alberth> making a new programmable signals thingie?
15:27:39 <maddy_> updating it to current codebase, and making few tweaks while I edit it
15:29:23 <Samu> 504 Gateway Time-out what does it mean?
15:29:52 <peter1138> It means it couldn't reach the backend server.
15:32:28 <Samu> was wondering if I had answers between then and now, and can't read the log t.t
15:33:33 <Alberth> maddy_: you know it's in JGR patchpack too, oyu may want to start from there
15:36:06 <Samu> anyways, I question why doesn't the Autorenew dude update the vehicle_id indexes of stuff that was referring to it
15:37:40 *** andythenorth has joined #openttd
15:39:12 <Samu> if on january I create a list of vehicles I send to depots, that list will be meaningless later on in august, because autorenew was "renewing" vehicles, giving out different indexes
15:40:21 <andythenorth> railtype depot disturbs me greatly
15:42:02 <Samu> i want to use autorenew to speed up AI management, but if it shuffles the indexes, I can't keep track of my vehicles :(
15:44:12 <maddy_> Alberth: no, that patch pack has the "programmable signals" patch I think, which is different?
15:46:24 <andythenorth> are multi-mode engines just a bad idea? o_O
15:46:40 <andythenorth> (power varies by railtype - elrail, non-elrail etc)
15:51:03 <peter1138> Probably okay if you are simulating a real engine.
15:51:27 <andythenorth> RL seems to think they're the bees knees right now
15:51:33 <andythenorth> but in game, they're confusing
15:51:54 <andythenorth> the power in purchase menu is quite often just lies
15:52:05 <Alberth> maddy_: ok, no idea tbh, I think programmable signals are a bridge too far
15:52:17 <Alberth> you can drive on both track types, andy?
15:52:40 <andythenorth> the engine works, the problem is the UI
15:52:59 *** wodencafe has joined #openttd
15:53:02 <andythenorth> changing the UI is TMWFTLB
15:53:14 <andythenorth> so I'm considering deleting the engines
15:54:06 <Alberth> maybe RL is missing the "upgrad tracks" button :)
15:55:44 <Alberth> the only feasible option could be if you have special track-types or so, with a speed limit or something?
15:56:30 <peter1138> Extra text that lists the power on different rail types?
15:56:45 <Alberth> otherwise I see no useful reason to have more than one type of track, especially if you change engine properties imho
15:57:41 <Alberth> but it depends on how much track types differ from each other, I guess
16:00:33 *** Wacko1976_ has joined #openttd
16:01:33 <andythenorth> and should the default power be the higher or the lower value?
16:09:54 <Alberth> doesn't matter much does it, first tile it switches to whatever the tracktype says, I would think
16:10:39 <Alberth> obviouslt, any manufacturer will use the highest number, if only for advertising :p
16:29:02 <andythenorth> affects things like sort order
16:46:40 <Samu> void AIList::KeepList ( AIList * list ) Keeps everything that is in the given list from this list (same item index that is).
16:46:52 <Samu> which one is the given list, and which one is the from list?
16:47:17 <Samu> sentToDepotList.KeepList(vehicleList);
16:50:20 *** Wormnest has joined #openttd
16:53:08 <Alberth> I would guess the return value would be the second list?
16:54:04 <Alberth> but since list typically doesn't have holes, no idea what that call does
16:54:31 <Alberth> ignore that, return type if 'void'
16:54:51 <Alberth> so there is only one list
16:55:49 <Alberth> maybe there is also a call that does not keep list, that may give you clues what it does
16:59:11 <Alberth> hmm, maybe it's a method that applies at another list?
16:59:11 <Alberth> looks like it, "this list" is the list you work on, ie "sentToDepotList", and given list is then the parameter
17:00:33 <Samu> I see, gonna test it anyway
17:40:59 <andythenorth> I need to make one of those multi-headed train things
17:41:03 <andythenorth> there's probably docs :P
17:42:48 <nielsm> as in, two-part loco where wagons go between? like TIM/AsiaStar etc
17:42:50 <Borg> where is maddy_ !!! I like his Logic Signals Patch..
17:46:48 <Eddi|zuHause> that was like 10 years ago?
17:48:28 <Borg> but I saw him today on IRC... talking about it..
17:51:04 <Samu> i dont understand why this isn't working
17:51:16 <Samu> i have defined a group specifically for vehicles i'm sending to depots
17:51:56 <Samu> route.nut must retrieve the group id from main.nut, but I get invalid group, why
17:56:55 <Samu> i have line 27 defining invalid group
17:57:04 <Samu> then it defines itself later at line
17:57:59 <Samu> but then, line 147 returns 65535 as the group, which is the GROUP_INVALID
17:58:05 <Samu> why is it still invalid?
17:59:23 <Samu> the group is created, I see it in the list of vehicles when testing, but route.nut still sees it as invalid
18:14:50 <Borg> btw, anyone know what GS is run in BTPro.nl City Builder?
18:21:28 <Samu> i dont know how to solve this, need help
18:48:31 <andythenorth> nielsm: yes like AsiaStar etc
19:12:43 *** gelignite has joined #openttd
19:26:29 *** Thedarkb-T60 has joined #openttd
19:33:46 <glx> there's an updated readme
19:34:01 <nielsm> did you install vcpkg, install the required packages, and do the vcpkg system integration?
19:34:36 <Samu> me? vcpkg? i don't think so, don't even know what it is
19:35:11 <glx> you want to read the one in docs
19:38:58 *** Thedarkb-T60 has joined #openttd
19:42:03 <Samu> Windows® Server 2003 SP1 Platform SDK Web Install are you sure this is what I need to install? seems old
19:42:20 <nielsm> how did you arrive at that?
19:42:42 <glx> it's a link on top of the readme
19:43:06 <nielsm> that link should just be removed
19:43:22 <nielsm> vs2017 includes everything you need
19:43:39 <nielsm> you can get the win10 platform sdk if you for some reason want the build tools without the IDE
19:49:49 <Samu> ah, forgot to install MFC thing
19:50:04 <DorpsGek> andythenorth: 0.206896551724
19:50:12 <andythenorth> 20% of Horse engines begin with the letter 'S'
19:50:44 <andythenorth> maybe it's a theme :P
19:52:28 <nielsm> try to build strgen and languages, if that works you only need vcpkg
19:52:41 <nielsm> well vcpkg and the deps it can install
19:53:44 *** sla_ro|master has joined #openttd
19:58:06 * andythenorth wonders when we're doing action 0 props as lists, with predicates
19:58:09 <andythenorth> instead of static values
19:58:58 <Eddi|zuHause> that's called a callback?
20:00:01 <andythenorth> what if I could optionally suppress certain properties in the purchase menu?
20:00:12 <andythenorth> and provide them myself in extra text?
20:00:49 <Eddi|zuHause> what kind of property?
20:01:20 <Eddi|zuHause> all callbacks have a purchase list version
20:01:58 <andythenorth> specifically I want to suppress power
20:02:47 <Samu> hmm nop, im failing to do this
20:03:06 <andythenorth> unrelated: if breakdowns are disabled, we should possibly be suppressing 'reliability'
20:03:13 <andythenorth> as it's confusing and pointless
20:03:15 <Samu> Applied user-wide integration for this vcpkg root.
20:03:25 <Samu> i thought this was all I had to do, but apparently not
20:04:29 <nielsm> how about adding a fourth choice for breakdowns: disabled but low reliability increases running costs
20:04:46 <Samu> vcpkg install freetype:x64-windows-static liblzma:x64-windows-static libpng:x64-windows-static lzo:x64-windows-static zlib:x64-windows-static
20:04:53 <andythenorth> nielsm: interesting
20:05:01 <andythenorth> I could try and find the bug with RV routing
20:05:08 <andythenorth> which means that breakdowns could be used
20:05:25 <andythenorth> also we could 'fix' PBS for trains and their inability to find depots
20:06:07 <nielsm> I forget, does breakdowns support/handle one of multiple engines in a multi-loco train breaking down, so the train has lower power but not entirely stopped?
20:09:07 <nielsm> also those options shouldn't be called "reduced" and "normal", but "normal" and "extreme"
20:09:38 <andythenorth> eh we could fix tree generation and remove original land generator too :)
20:10:01 <nielsm> fixing that would be denying the heritage
20:11:39 <andythenorth> suppressing 'power' display doesn't help sorting
20:11:47 <andythenorth> why do we allow modifying vehicle properties at all?
20:11:49 <andythenorth> it never works :P
20:12:05 <andythenorth> is it because there weren't enough IDs?
20:12:44 <nielsm> remember it all started as ttdpatch hacks
20:14:02 <andythenorth> I should get over this issue with bi-mode engines
20:14:08 <andythenorth> I just don't like UIs that lie :)
20:14:16 <nielsm> for a new design that didn't have integrating in a 1994 game via binary hacking it would obviously all look different
20:16:05 <nielsm> hopefully it's all become easier to get running with vcpkg
20:16:20 <nielsm> than with the old openttd-useful thing
20:16:29 <Samu> must try the x32 too, brb
20:18:24 <Samu> nielsm: can u make autorenew maintain the same vehicle ids?
20:18:33 <Samu> it's what's ruining my lists
20:20:06 <Samu> blow vehicles past max age
20:24:00 <nielsm> that might actually be interesting
20:24:40 <nielsm> similar effect to a crash (vehicle stops and goes gray) except nobody dies
20:26:03 <nielsm> that's a warning everyone gets :)
20:29:17 <andythenorth> 'vehicle failed'
20:30:47 * andythenorth wonders if there's any room to reserve a value for power
20:31:05 <andythenorth> which causes a string to be displayed instead
20:31:15 <andythenorth> and sorts to the start or end of lists
20:33:32 <Samu> uninstalling visual studio 2015
20:33:33 <andythenorth> maybe set a register during the CB?
20:34:10 *** Wolf01 is now known as Guest1248
20:36:22 <nielsm> maybe I should try the vs2019 preview...
20:37:52 <Samu> i hope uninstalling 2015 it doesn't break 2017
20:38:53 *** Wolf01 is now known as Guest1249
20:48:22 *** Wolf01 is now known as Guest1250
20:53:20 <planetmaker> <maddy_> [14:12:33] I had to go back to RAW_STRING from STRING in the language file, now it seems to work <-- {RAW_STRING} may only appear in english.txt. In all other languages it is replaced by {STRING}
20:59:04 * andythenorth had the most hideous livery matching idea
21:02:30 <andythenorth> option B: check the ID of the first trailing vehicle, and whether it is flipped
21:04:14 <nielsm> just let the player run unmatched liveries
21:07:04 <andythenorth> I think this will end up at B, "because I can" :P
21:07:08 <andythenorth> not because I should
21:07:25 <andythenorth> it's too much fun to tinker with BAD FEATURES
21:08:52 *** Wolf01 is now known as Guest1252
21:09:27 <andythenorth> hmm do vehicles have storage? O_O
21:09:46 * andythenorth has discovered a tri-mode engine with electric, diesel, and battery
21:09:55 <andythenorth> battery power would be an interesting challenge in game :P
21:10:39 <andythenorth> maybe we should adjust breakdowns to be 'fuel range'
21:10:56 <andythenorth> visit a depot, or get capped to a minimum speed
21:11:25 <Eddi|zuHause> on a scale from christmas eve to new years eve, how drunk are you?
21:11:48 <andythenorth> I don't know the parameters of the scale
21:11:53 <andythenorth> it seems to have high locality
21:12:13 <andythenorth> but using my own localised scale, 'not very'
21:17:45 <Eddi|zuHause> if you're using variables in the callback that are not available in the purchase menu, you need a special purchase callback
21:18:29 <Eddi|zuHause> that includes "what railtype am i running on?"
21:19:17 <andythenorth> there's an issue about it
21:20:53 *** Wolf01 is now known as Guest1253
21:43:43 <Eddi|zuHause> andythenorth: before i would even attempt that, i would need an improved railtype fallback mechanism if the exact railtype is not in the RTT
21:44:01 <andythenorth> isn't their some kind of hideous compatibility system?
21:44:07 <andythenorth> there / their /s
21:44:24 <Eddi|zuHause> yes, but it doesn't work backwards, which is needed here
21:44:53 <Eddi|zuHause> and it mathematically cannot work backwards
21:48:52 <andythenorth> so what would define the fallback?
21:48:59 <andythenorth> the vehicle grf, or the railtype grf?
21:51:11 <Eddi|zuHause> ideally, it would be derived from the mechanism that is already there. but that misses some key properties, particularly transitivity, that any sane algorithm would require
21:52:16 <andythenorth> ^ allow that, or use wagon attach cb to prevent it?
21:53:05 <andythenorth> I'm favouring 'allow', similar to TTD
21:54:23 <Eddi|zuHause> most existing uses of the wagon callback are a bit too strict, like the DBSet's ICE doesn't allow another ICE to be attached to make dual combos
21:55:04 <andythenorth> I'd have to write a string for it :P
21:55:16 <andythenorth> I see no harm in allowing that to happen
21:56:19 <Eddi|zuHause> it doesn't apply to CETS because it doesn't have dualheaded vehicles, these things are coded as articulated
22:13:09 <andythenorth> the 'power' value is also lies if I do the powered wagon hack
22:13:26 <andythenorth> for high speed trains with powered pax cars
22:27:20 <Eddi|zuHause> but it will say "additional power per wagon"?
22:28:18 <Eddi|zuHause> of all the things you could bring up with the powered wagons, that is the least problematic, imho
22:28:32 <andythenorth> what are the other problems? o_O
22:28:36 <andythenorth> before I implement them :P
22:29:16 <Eddi|zuHause> the cheapness of wagons, the unintuitiveness what wagons that applies to, ...?
22:29:37 <andythenorth> I thought I had a better solution
22:30:05 <andythenorth> where high speed trains are just built as articulated vehicles of 2 x 8/8
22:30:14 <andythenorth> each with, e.g. 1200HP
22:30:24 <andythenorth> and then the graphics magically draw the cabs on each end
22:30:32 <andythenorth> but it's a PITA to build them
22:30:51 <andythenorth> they all have to be dragged into one line to form the consist
22:31:03 <planetmaker> I very much like the simplicity of what-you-click-is-what-you-get train composition :)
22:33:51 <andythenorth> it's really simple to understand
22:34:37 <andythenorth> but...to create train 1 requires dragging 4 times to train 2
22:34:57 <andythenorth> hard to put into words, I should make a gif :P
22:35:01 <planetmaker> click-click-click-click is easier :)
22:35:17 <nielsm> I think I remember ttdpatch having a key you held down to build a wagon-like engine
22:35:24 <planetmaker> than click-click-click-click then drag-drag-drag
22:35:51 <andythenorth> I like the idea that power scales linearly with train length
22:36:15 <andythenorth> but if powered wagons are evil, I am out of ideas for how to do this :(
22:36:25 <planetmaker> Na, not sure they are evil
22:36:41 <planetmaker> but why does it need to be articulated?
22:36:46 <nielsm> it really depends on the type of train you want to model
22:37:05 <planetmaker> the turbo train in default openttd has sth similar - or do I err?
22:37:13 <nielsm> like the IC125 shouldn't have power increasing with length
22:38:12 <nielsm> (it only has locos on each end)
22:38:42 <nielsm> but shinkansen has power on every axle so it would have power increasing with length
22:40:18 <andythenorth> it's the second case I am using for very high speed
22:40:19 <nielsm> ICE1 and swedish X2 also just have power on one end afaik, ICE3 has power on some axles afaik
22:40:40 <andythenorth> I think it's interesting to be able to build arbitrary length train with linear power increase
22:40:58 <nielsm> the danish ER has power on 2 of 5 bogies
22:41:13 <planetmaker> though ICE1 has power on both ends IIRC
22:41:18 <andythenorth> so how did the TTD modifier work?
22:41:29 <nielsm> (sets of 4 cars with shared bogies)
22:41:56 <andythenorth> I considered making these as 32/8 long, 4 cars
22:42:05 <andythenorth> but if you are playing strict TL5 rules, that's no help
22:42:27 <andythenorth> TL rules mean articulated consists can't be longer than 16/8
22:43:42 <planetmaker> it would just mean you cannot use them in too-short stations. And <4 is anyway rediculous
22:43:54 <planetmaker> well. Then don't make TL5
22:44:02 <andythenorth> it's an argument yes
22:44:07 <andythenorth> what's current coop standard?
22:44:12 <nielsm> have two matched trainset types, 24/8 and one 32/8
22:44:29 <planetmaker> If you use TL N, then you have no issue to use trains with TL N-1
22:44:52 <Eddi|zuHause> <nielsm> I think I remember ttdpatch having a key you held down to build a wagon-like engine <-- that was an even worse hack than anything we're discussing here
22:44:56 <planetmaker> coop has no standard. It's agreed-upon on game start
22:45:13 <planetmaker> Anything between 3 and 8, I'd recon
22:45:35 <nielsm> I really like how the danish MF and ER trains work together, it's actually diesel and electric train sets (of the same family) that can run in multiple configurations, with both diesel and electric sets providing power at the same time
22:45:43 <Eddi|zuHause> but even if we added in ctrl+click as "buy and attach to existing train", only a tiny fraction of people will ever know that even exists
22:45:46 <nielsm> the MF are 3 cars long and ER are 4 cars long
22:46:10 <andythenorth> if the odd-numbered TL thing is a false argument, I can make longer articulated consists
22:47:02 <andythenorth> when are we doing vehicle groups in buy menu? o_O
22:47:10 <andythenorth> could just buy the exactl needed length then
22:47:18 <Eddi|zuHause> <andythenorth> can't make TL5 <-- why? 5 is a very fine train length
22:47:47 <andythenorth> I agree, but you need 1 tile trains or 5 tile trains to do it
22:47:51 <andythenorth> or 3 tile and 2 tile :P
22:47:54 <Eddi|zuHause> most of my trains i ever built were either 3,5,8 or 12
22:48:04 <andythenorth> or, for completeness, 4 tile and 1 tile, but that's redundant
22:48:11 <planetmaker> we need to make sure that TL (in tiles) != TL (in half tiles)
22:48:23 <planetmaker> when I talk of TL, I usually mean "length in tiles"
22:48:59 <Eddi|zuHause> i was also talking in tiles
22:49:06 <planetmaker> But odd number ... why not, when you can couple together several ones
22:49:19 <planetmaker> (just making sure we talk of the same thing when saying TL :) )
22:49:51 <Eddi|zuHause> also, when the entire point of the last year was "make it integer length", why suddenly change it to "make it even length"?
22:50:10 <andythenorth> because the other options are being eliminated
22:50:28 <andythenorth> option 1) 16/8 articulated units, and lots of dragging
22:50:38 <andythenorth> option 2) engines + powered wagons
22:50:55 <andythenorth> option 3) 32/8 articulated units, and some dragging
22:51:02 <andythenorth> option 4) delete this type of train
22:51:08 <andythenorth> I have no option 5 yet
22:51:37 <andythenorth> consists where power grows linearly with TL seem impossible
22:51:50 <andythenorth> given the constraints
22:51:54 *** Thedarkb-T60 has joined #openttd
22:52:07 <Eddi|zuHause> i'm currently undecided between 2 and 4
22:52:17 <planetmaker> why doesn't "linear with power" work when having powered wagons?
22:52:24 <planetmaker> which need not even be articulated
22:52:25 <Borg> I mostly build 5,7 and 14 TL trains
22:52:35 <andythenorth> option 4 doesn't offend me btw, nothing is drawn yet, and all code dies
22:52:35 <Eddi|zuHause> 3 makes even less sense than 1
22:52:37 <Borg> on the begining... 3 TL.. because weak engines
22:53:12 <Borg> also 4 TL and 6 TL... 6 TL usualy for livestock + grain.. to equalize
22:54:25 <andythenorth> what newgrf has powered wagons? :P
22:54:59 <nielsm> 2CCinNML has powered and unpowered multiple unit wagons
22:55:05 <nielsm> used by all MU train types
22:55:31 <andythenorth> I don't understand NUTS right now :P
22:57:04 <andythenorth> ok so there's no way to know about powered wagons
22:57:13 <andythenorth> nothing in the UI to explain them to player
22:57:19 <andythenorth> no way to know which engines gain from them
22:57:26 <andythenorth> nothing that says how much power is added
22:58:49 <andythenorth> looks like that is the solution
23:02:34 <planetmaker> though not sure... if you tell the wagon to add power X... doesn't purchase menu tell?
23:02:45 <andythenorth> I thought it did
23:02:50 <planetmaker> dunno... I just checked, I haven't actively used it in any of my sets
23:02:53 <andythenorth> but 2CC-nml doesn't seem to
23:02:57 <planetmaker> maybe I should :*
23:03:18 <andythenorth> might be implemented as cb36 in 2CC, not the native support
23:03:48 <planetmaker> I think that's the preferred approach: using CB36
23:04:08 <planetmaker> from what I recall frosch saying
23:04:10 <andythenorth> it's weird, the Horse railcars are 8/8 powered units, and have to be dragged for longer trains
23:04:16 <andythenorth> but those don't seem annoying
23:04:23 <andythenorth> I think they match the expectation
23:04:25 <andythenorth> and aren't weird
23:04:40 <andythenorth> it's only dragging 2 or 3 usually
23:06:43 * andythenorth wonders what happens if a vehicle has 0HP when built :P
23:07:05 <planetmaker> V would know :P I'm pretty sure he once did
23:07:36 <planetmaker> but it would be a wagon... if the property power is 0
23:07:59 <planetmaker> it would be an engine, if the property power is != 0, but the CB sets its power to 0. Then it just wouldn't start.
23:08:18 <andythenorth> so in an otherwise empty depot they build as a single consist
23:08:28 <andythenorth> now if only there was a 'turn on the power' button :P
23:09:00 * andythenorth considering some CB36 evil
23:09:20 <andythenorth> where purchase power is 0, and when built, power is reset to correct value
23:10:26 <planetmaker> for a powered wagon?
23:10:32 <andythenorth> basically, I need some hack that acts equivalently to a flag we don't have
23:10:52 <andythenorth> "attach this vehicle to engine in depot, even if powered"
23:11:16 <andythenorth> that avoids the draggning
23:11:35 <planetmaker> I think that might be a problem of OpenTTD. Not of a NewGRF
23:12:07 <planetmaker> or simply indeed the distinction of design power by property which differs engines and wagons. So yes... why not
23:12:10 <andythenorth> generally, if one builds engines, does one expect them to go to a new depot line?
23:12:34 <andythenorth> so changing that expectation is not in scope
23:12:39 <andythenorth> I think that's fair
23:12:51 <planetmaker> Though one could argue for more advanced logic: yes, when last vehicle was wagon. Same line, when previous one was engine
23:13:20 <andythenorth> I had a look at the depot handling the other day
23:13:24 <planetmaker> changing that expectation... could... with some argument :)
23:13:24 <andythenorth> it's pretty clever
23:13:51 <andythenorth> I don't know how it could be better, improvements in one direction are probably losses in another
23:14:26 <andythenorth> I think tomorrow is a test of powered wagons (or CB36 flavour of powered)
23:15:21 <andythenorth> so how do I label them?
23:15:26 <andythenorth> if the train is "Helm Wind"
23:15:29 <Eddi|zuHause> <planetmaker> though not sure... if you tell the wagon to add power X... doesn't purchase menu tell? <-- it should tell on the engine, but not on the wagon
23:15:38 <andythenorth> is it "Helm Wind cab car" and "Helm Wind intermediate car" ?
23:16:09 <planetmaker> that's where I have no language competence :)
23:17:20 <andythenorth> the cab car is the essential part
23:17:43 <andythenorth> "Helm Wind engine" and "Helm Wind carriage" runs counter to them all being powered
23:17:53 <andythenorth> buy menu vehicle groups anyone? :P
23:18:00 <andythenorth> on a disclosure widget
23:18:04 <planetmaker> Helm Wind powered carriage
23:18:13 <planetmaker> Helm Wind unpowered carriage
23:18:28 <planetmaker> that's what I'd understand clearly as non-native speaker :)
23:19:09 <Samu> i managed to get the group to pass around
23:19:25 <Samu> i'm passing around constructor classes thing
23:19:33 <Samu> and it's finally reaching destination
23:20:24 <Samu> soon, I will be able to get rid of depot orders, which slow down the AI so much
23:21:40 <Samu> if only the game provided an easier way to get the list of vehicles that are currently heading to a depot...
23:23:06 <Samu> because it cancels the sending to depot
23:24:09 <andythenorth> which is also how trams do it :P
23:25:20 <Eddi|zuHause> i wouldn't use that kind of term for trains after 1990 or so
23:26:34 <Samu> could you guys create a new vehicle state?
23:26:42 <Samu> VS_IN_DEPOT is not sufficient :(
23:26:59 <Samu> need something like VS_HEADING_TO_DEPOT
23:27:42 <Samu> heading to stop at a depot
23:29:15 <Samu> would save some headache for ais
23:30:17 <andythenorth> Eddi|zuHause: any suggestions on names? o_O
23:34:38 <andythenorth> "Helm Wind Engine (Electric)" and "Helm Wind Powered Carriage (Electric)"
23:37:51 <andythenorth> "Helm Wind - Cab (Electric)", "Helm Wind - Middle (Electric)"
23:37:53 <planetmaker> replace the (Electric) by an icon
23:38:00 <planetmaker> like 2CC does it in the purchase menus
23:38:38 <planetmaker> Engine and carriage are - to me - the nicer words compared to cab and middle
23:39:48 <andythenorth> the challenge is that carriages aren't powered :(
23:40:10 <andythenorth> but then they need the word
23:40:20 <andythenorth> but then you can't see it in purchase menu
23:41:26 <planetmaker> Also add the icon there. No powered icon = no power
23:42:04 *** Thedarkb-T60 has joined #openttd
23:42:05 <planetmaker> I really like the way like the 2CC indicates quickly at a glance the type of powered-ness (steam, diesel, electric)
23:42:17 <planetmaker> much better than text
23:42:34 <planetmaker> more effort as it needs adjusted purchase sprites. But not so much, I recon
23:42:49 <andythenorth> do you find it more intuitive?
23:43:29 <planetmaker> an image sais more than 1000 words :P. It's just quicker to see. You don't need to read anything to see what vehicles has which type of power (or none at all)
23:43:46 <nielsm> it'd be really cool if there was a general way to include sprites inside text layouts
23:44:03 <nielsm> and even more really cool if there was a way to make them scalable with font sizes
23:44:10 <planetmaker> there... is ... in a limited way. But not the way we need here
23:44:39 <planetmaker> the rail / road / ship / plane icons used in GUI are really glyphs which are sprites
23:44:57 <planetmaker> so you can encode them in strings
23:45:13 <planetmaker> so... one could possibly allow NewGRFs access to a few self-defined. Possibly
23:45:13 <andythenorth> there was some minor drama years ago about text offsets iirc
23:46:04 <nielsm> yes I know those icons are sprites :)
23:46:16 <nielsm> I was also thinking it'd be nice to allow those to scale with font size
23:46:16 *** Progman has joined #openttd
23:46:20 <andythenorth> ok it's definitely fine to build the cabs + middle cars separately
23:46:26 <andythenorth> it's more buy menu crap
23:46:44 <nielsm> but the main idea would be to somehow encode arbitrary sprites for display in strings
23:46:48 <andythenorth> the 'just 10 trains' idea for Horse went off to die a long time ago
23:46:55 <nielsm> I can imagine there'd be some issues with baseline alignment
23:47:04 <andythenorth> sounds like CSS :P
23:47:23 <andythenorth> much troubles aligning sprites with text
23:47:30 <nielsm> all text layout is hell
23:47:31 <planetmaker> well... you "just" have to make requirements
23:48:20 <andythenorth> ok so tomorrow I have to figure out powered wagons :P
23:48:36 <andythenorth> and see how pendolino trains look when they haul oil tankers :P
23:49:02 <nielsm> define a new sprite type (somehow) that's actually truetype font outlines, which can then be passed into freetype (or maybe win32) and rendered via that to an appropriately scaled bitmap
23:49:33 <nielsm> maybe allow multiple outlines to be included, each to be rendered in a separate color and then layered in some order
23:49:45 <nielsm> to get colored custom glyphs
23:50:22 <andythenorth> are we also allowing the translators to move them around?
23:50:24 <nielsm> (make a tool to convert from svg to that)
23:50:26 <andythenorth> to suit RTL etc?
23:50:40 <andythenorth> render SVG at runtime :P
23:50:41 <nielsm> you mean like mirroring them? :D
23:51:13 <andythenorth> offset: (10px, 2em)
23:51:38 <andythenorth> culturally appropriate colour remapping
23:51:46 * andythenorth thinks the last one might be nonsense
23:52:04 <nielsm> the reason I specifically suggests truetype outlines is because of hinting, which would definitely be important for rendering icon-ish glyphs
23:53:00 <nielsm> otherwise any simple outline format would do, like a simple list of polygons
23:53:18 <planetmaker> if we want to do that, we also want to include our own truetype font basically. At least the existing icons. That sounds easily like a 1st-class project of getting a tt-engine into OpenTTD
23:53:39 <planetmaker> But I might be wrong...
23:53:41 <andythenorth> how about a bitmap? o_O
23:53:48 <nielsm> freetype is already a soft dependency
23:54:14 <planetmaker> I know. And used as soon as you use some language which has glyphs not supported by standard sprite fonts.
23:55:52 <andythenorth> some props can't be read in cb36, to prevent loops
23:56:20 * andythenorth had a lazy idea for reading value for wagon power directly from lead engine
23:56:27 <andythenorth> 'what could go wrong with that' :P
23:58:26 <andythenorth> for starters, it could be the wrong lead engine :P
continue to next day ⏵