Config
Log for #openttd on 10th October 2021:
Times are UTC Toggle Colours
00:04:52  *** Gustavo6046_ has joined #openttd
00:08:56  *** Gustavo6046 has quit IRC
00:10:50  *** Gustavo6046_ is now known as Gustavo6046
00:13:24  *** Tirili has quit IRC
00:14:54  *** snail_UES_ has joined #openttd
00:16:21  *** Gustavo6046_ has joined #openttd
00:18:55  *** Gustavo6046 has quit IRC
00:18:55  *** Gustavo6046_ is now known as Gustavo6046
00:40:34  *** Gustavo6046_ has joined #openttd
00:45:26  *** Gustavo6046 has quit IRC
00:45:26  *** Gustavo6046_ is now known as Gustavo6046
01:23:01  *** Wormnest has quit IRC
01:41:54  *** snail_UES_ has quit IRC
01:57:48  *** geli has joined #openttd
02:04:23  *** Gustavo6046_ has joined #openttd
02:05:11  *** gelignite has quit IRC
02:08:56  *** Gustavo6046 has quit IRC
02:08:56  *** Gustavo6046_ is now known as Gustavo6046
02:20:25  *** WormnestAndroid has quit IRC
02:30:54  *** Gustavo6046_ has joined #openttd
02:30:54  *** Gustavo6046 has quit IRC
02:30:54  *** Gustavo6046_ is now known as Gustavo6046
02:33:27  *** _aD has quit IRC
02:54:24  *** D-HUND has joined #openttd
02:57:27  *** geli has quit IRC
02:57:45  *** debdog has quit IRC
03:19:57  *** Gustavo6046 has quit IRC
03:22:27  *** Gustavo6046 has joined #openttd
03:29:47  *** Gustavo6046 has quit IRC
03:32:47  *** Gustavo6046 has joined #openttd
03:39:36  *** glx has quit IRC
03:44:20  *** tokai has joined #openttd
03:44:20  *** ChanServ sets mode: +v tokai
03:51:20  *** tokai|noir has quit IRC
03:58:15  *** Flygon has joined #openttd
04:05:54  *** D-HUND is now known as debdog
06:12:37  *** Gustavo6046_ has joined #openttd
06:15:19  *** Gustavo6046 has quit IRC
06:15:19  *** Gustavo6046_ is now known as Gustavo6046
07:08:37  *** nielsm has joined #openttd
07:13:46  *** Wolf01 has joined #openttd
07:15:40  *** andythenorth has joined #openttd
07:27:09  *** andythenorth has quit IRC
07:29:28  *** andythenorth has joined #openttd
07:32:57  <TrueBrain> "if the game was £29.99 i'd buy 2 copies. " <- so who wants to cash in? :P
07:49:59  *** Gustavo6046 has quit IRC
07:50:16  *** Gustavo6046 has joined #openttd
07:56:00  <andythenorth> but we don't make Simutrans
07:58:22  *** Gustavo6046 has quit IRC
08:14:58  <DorpsGek> [OpenTTD/nml] andythenorth opened issue #240: Recurse when checking is_read_only (correct title?)  https://git.io/JozCN
08:17:16  *** Etua has joined #openttd
08:21:05  *** Etua has quit IRC
08:22:31  <DorpsGek> [OpenTTD/nml] andythenorth opened issue #241: Attempt to warn when use of ternary op might fail due to over-writing temp register (?) https://git.io/Jozgk
08:24:37  <andythenorth> good times in nml :)
08:24:57  * andythenorth was about ready to quit yesterday, but the issues were found, always nice
09:10:17  *** gelignite has joined #openttd
09:10:35  * andythenorth needs help with probability
09:10:55  <andythenorth> Eddi was my outboard brain for all maths problems, where has Eddi gone? :P
09:11:00  *** nielsm has quit IRC
09:16:39  *** Samu has joined #openttd
09:21:11  *** reldred_ has joined #openttd
09:21:18  *** twpol has quit IRC
09:22:45  <andythenorth> max 1 industry per town can increase production each month
09:22:56  <andythenorth> chance is 25% (if some other pre-condition is met)
09:23:10  <andythenorth> industries are evaluated sequentially, by industry type ID
09:23:23  <andythenorth> so if potash mine is ID 1
09:23:28  <andythenorth> and salt mine is ID 10
09:24:09  <andythenorth> the salt mine chance has 1 / n! or nCr or something
09:24:12  *** reldred has quit IRC
09:24:12  *** reldred_ is now known as reldred
09:24:28  <andythenorth> potash mine increases will be much more common than salt mine increases
09:32:35  *** sla_ro|master has joined #openttd
09:33:38  *** twpol has joined #openttd
09:50:42  <andythenorth> maybe I can round-robin them somehow
09:51:04  <andythenorth> prevent the same industry getting an increase twice in a row
09:51:18  * andythenorth not aware of any grf-readable UUID for industries
09:51:37  <andythenorth> oh maybe? https://github.com/OpenTTD/nml/issues/218
09:53:44  <DorpsGek> [OpenTTD/nml] andythenorth commented on issue #218: Request: Add variable for xy coordinates of industries https://git.io/JGqZ1
10:18:00  *** WormnestAndroid has joined #openttd
10:30:24  <DorpsGek> [OpenTTD/nml] glx22 commented on issue #241: Attempt to warn when use of ternary op might fail due to over-writing temp register (?) https://git.io/Jozgk
10:32:26  <andythenorth> fixed the original post
10:36:55  *** twpol is now known as Guest2400
10:37:05  *** twpol has joined #openttd
10:39:13  *** Guest2400 has quit IRC
10:45:59  <michi_cc> andythenorth: 0x80 for industries is the TileIndex, which will be unique unless somebody codes stacking industries for OTTD :)
10:48:27  <dP> michi_cc, can't there already be industries with same tile? pretty sure that tile can be empty on industry layout
10:52:24  <michi_cc> Okay, if the anchor tile can indeed be empty, you could have to industry layouts that slot right into each other. Easy to avoid within one industry NewGRF, though.
11:08:07  *** frosch123 has joined #openttd
12:18:13  <andythenorth> thanks :)
12:24:19  <andythenorth> ok so FIRS primary industries now increase production (random chance) if the town is 'optimistic'
12:24:44  <andythenorth> the implementation is https://sweatpantsandcoffee.com/wp-content/uploads/2018/09/940x450-This-is-fine.jpg
12:24:48  <andythenorth> but it works
12:32:04  <andythenorth> oof no comment https://steamcommunity.com/app/1536610/discussions/0/3087772148437661807/
12:41:52  <dP> openttd does look like a competitive game on a surface
12:41:58  <dP> until you learn how it all really works
12:47:41  *** WormnestAndroid has quit IRC
12:48:54  <andythenorth> bad those mods :)
12:49:03  <andythenorth> no editing of an open source game :)
12:54:52  <dP> huh? ppl play vanilla competitively more than anything
13:10:50  *** glx has joined #openttd
13:10:50  *** ChanServ sets mode: +v glx
13:14:39  *** roadt has joined #openttd
13:16:12  *** HerzogDeXtEr has quit IRC
13:21:46  *** HerzogDeXtEr has joined #openttd
13:24:06  <DorpsGek> [OpenTTD/nml] glx22 opened pull request #242: Fix #240: Incomplete read only checks https://git.io/JooIW
13:29:15  <andythenorth> \o/
13:29:45  <glx> and the test case is exactly what you found in FIRS I think
13:30:14  <glx> (with more indirection maybe, but same effect)
13:31:43  <glx> for the ternary issue, I'm looking into auto translating the problematic ternary into a procedure call
13:31:53  <glx> should be better than a warning
13:36:25  <andythenorth> thanks :)
13:36:29  * andythenorth BBL
13:36:31  *** andythenorth has quit IRC
13:42:34  *** sla_ro|master has quit IRC
14:00:38  <Samu> glx, how should I test smarter_ships branch?
14:01:59  <Samu> in which situations do ships smart reverse?
14:02:43  <glx> when they enter a dead end, can be docks, coast, ...
14:04:04  <glx> they used to do a basic reverse, now they can choose between the usually 3 possible tracks
14:04:26  *** WormnestAndroid has joined #openttd
14:04:33  <Wolf01> :D
14:04:42  <Wolf01> Windows 11 on lumia
14:05:01  <Wolf01> Is there an arm version of OTTD?
14:06:16  <glx> simple test case I made was a dock where the ship stops on the side facing the dock, then I immediatly built a dock behind the ship to trap it
14:06:29  <frosch123> Wolf01: there actually is, but i think it is untested
14:06:58  <glx> without smarter_ship it will just bounce between the 2 docks
14:07:23  <Wolf01> Now I need to finish the initial config then enable dual boot
14:13:26  <Samu> nice test
14:13:43  <Samu> that's why you wanted my savegame
14:13:53  <Samu> now I see
14:18:06  <Samu> that's actually an amazing fix! it would render many of my patches pointless if ships can smart reverse
14:19:23  <Samu> wait, maybe there's some situation where it can't be fixed
14:19:27  <Samu> gonna test, brb
14:20:45  <Samu> hah, it fixes it too!
14:21:02  <Samu> amazing, PR it
14:25:07  <Samu> 					/* Test if continuing forward would lead to a dead-end, moving into the dock. */ this test could be removed now, right?
15:19:15  *** Wormnest has joined #openttd
15:19:58  *** jottyfan has joined #openttd
15:27:21  *** iSoSyS has joined #openttd
15:35:37  *** iSoSyS has quit IRC
15:58:49  *** dwfreed has quit IRC
16:00:25  *** dwfreed has joined #openttd
16:08:43  *** tokai|noir has joined #openttd
16:08:43  *** ChanServ sets mode: +v tokai|noir
16:12:57  *** sla_ro|master has joined #openttd
16:15:40  *** tokai has quit IRC
16:16:02  *** gelignite has quit IRC
16:30:19  *** kaomoneus has joined #openttd
16:31:25  <kaomoneus> Hi folks! Question about _date_fract. In definition I found comment that it is increased by 885 and we once we got an overflow new day begins. But...
16:32:52  <kaomoneus> https://github.com/OpenTTD/OpenTTD/blob/master/src/date.cpp#L277 here I see that it is incremented normally, and once it's greater thant 74, we make it zero.
16:34:11  <kaomoneus> And yet 885 magic is still used somewhere..
16:34:17  <LordAro> kaomoneus: where is this 885 comment?
16:34:32  <LordAro> days are divided into 74 ticks, as you have found
16:36:35  <kaomoneus> LordAro: in date_type.h, https://github.com/OpenTTD/OpenTTD/blob/8b157c9bdf882600d919e98dbe3a530d81684a78/src/date_type.h#L23
16:36:49  <LordAro> right
16:36:57  <LordAro> ah, 885 logic is still used within NewGRFs
16:37:09  <LordAro> which are ancient and "Compatibility Must Be Maintained"
16:37:21  <LordAro> s/which are/the format of which is/
16:37:28  <kaomoneus> https://github.com/OpenTTD/OpenTTD/blob/8b157c9bdf882600d919e98dbe3a530d81684a78/src/newgrf.cpp#L6287
16:38:07  <kaomoneus> This is pretty hackish (and smart though)..
16:38:26  <LordAro> a remnant of the original TTD, i suspect
16:38:34  <kaomoneus> but, why just not to use _date_fract % DAY_TICKS
16:39:00  <kaomoneus> Now it's always less than DAY_TICKS though..
16:39:33  <kaomoneus> Well, anyways, now it makes sence. Thanks!
16:41:30  <kaomoneus> But I would replace https://github.com/OpenTTD/OpenTTD/blob/8b157c9bdf882600d919e98dbe3a530d81684a78/src/newgrf.cpp#L6287
16:41:40  <kaomoneus> with
16:41:49  <kaomoneus> assert(_date_fract < DAY_TICKS)
16:41:59  <kaomoneus> *value = _date_fract;
16:42:12  <LordAro> that... is not the same
16:42:28  <LordAro> newgrfs expect the old uint16-overflow method of calculating date_fract
16:42:39  <LordAro> so the current date_fract value is multiplied by 885 (as specified in the comment)
16:43:17  <kaomoneus> LordAro: so you mean, that newgrf overrides "_date_fract++" logic?
16:43:40  <LordAro> no
16:44:17  <LordAro> newgrfs expect 0, 885, 1770,
16:44:35  <LordAro> but that (hacky) method of fractional dates is no longer used (probably not for 15 years now)
16:44:41  <LordAro> but the newgrf spec cannot be changed
16:44:52  *** andythenorth has joined #openttd
16:45:44  <andythenorth> yo
16:45:48  <LordAro> lo andy
16:45:54  <kaomoneus> Aaagh.. Now I see.
16:46:18  <andythenorth> some of the grf debug window lets values be edited (click on the value to edit)
16:46:21  <andythenorth> e.g. parameters to vars
16:46:29  <andythenorth> could persistent storage be editable?
16:46:38  <andythenorth> I have cases where e.g. I want to zero it
16:46:43  <kaomoneus> We just convert _date_fract into _hackish_date_fract_80386_friendly.
16:46:46  <andythenorth> or put specific values in a register to trigger a behaviour
16:47:53  <andythenorth> this is for debug + testing
16:50:04  <kaomoneus> LordAro: what is main use case of _date_fract by newgrf? Is it more for introducing new vehicles or industries or some animation?
16:55:57  <DorpsGek> [OpenTTD/nml] andythenorth commented on pull request #242: Fix #240: Incomplete read only checks https://git.io/JoPOY
16:56:11  <andythenorth> if anyone could approve that one...would be good :)
16:59:48  *** Strom has quit IRC
17:01:29  *** Strom has joined #openttd
17:10:14  <LordAro> kaomoneus: i have no idea
17:10:34  <LordAro> animations, perhaps?
17:11:00  *** nielsm has joined #openttd
17:14:03  *** Flygon has quit IRC
17:20:42  <DorpsGek> [OpenTTD/OpenTTD] James103 commented on issue #8869: Setting resolution really small in openttd.cfg crashes the game https://git.io/JqF5J
17:25:15  *** snail_UES_ has joined #openttd
17:30:37  <DorpsGek> [OpenTTD/nml] glx22 opened pull request #243: Add: Warn when ternary operator results are not read only https://git.io/JoP7L
17:34:50  <DorpsGek> [OpenTTD/nml] LordAro approved pull request #242: Fix #240: Incomplete read only checks https://git.io/JoPb8
17:35:27  <DorpsGek> [OpenTTD/nml] LordAro approved pull request #243: Add: Warn when ternary operator results are not read only https://git.io/JoPNT
17:35:47  *** snail_UES_ has quit IRC
17:36:46  <DorpsGek> [OpenTTD/nml] LordAro approved pull request #239: Fix: example_train grf triggering an error message in OpenTTD https://git.io/JoPAK
17:38:03  <DorpsGek> [OpenTTD/nml] LordAro approved pull request #236: Add: show an error if a required property is not set for objects (feature 0F) https://git.io/JoPpe
17:38:24  <DorpsGek> [OpenTTD/nml] LordAro approved pull request #224: Fix: Reject empty arrays of expressions https://git.io/JoPpu
17:39:19  *** Gustavo6046 has joined #openttd
17:39:27  <DorpsGek> [OpenTTD/nml] LordAro approved pull request #220: Fix #209: Cargo 'profit' callback applied a unit conversion, when there was no unit. https://git.io/JoPhu
17:39:45  <LordAro> your turn, glx :p
17:40:02  <LordAro> and #231 needs updating, andythenorth :p
17:40:18  <kaomoneus> What is the game common way to convert integer to string? strstream?
17:40:39  <LordAro> if it actually needs to be a string? strtoi, probably
17:40:47  <LordAro> if you're just printing it, use printf & friends
17:42:12  <DorpsGek> [OpenTTD/nml] glx22 merged pull request #242: Fix #240: Incomplete read only checks https://git.io/JooIW
17:42:17  <DorpsGek> [OpenTTD/nml] glx22 closed issue #240: Incomplete checking of is_read_only https://git.io/JozCN
17:42:23  <kaomoneus> LordAro: I want to make dropdown with minutes. I seed that for months, days and years it goes through localized string IDs. But woudln't it be overkill to do same for minutes?
17:42:51  <LordAro> surely it doesn't do that with years
17:42:57  <LordAro> given there are 5000000 possibilities
17:43:35  <glx> no need to convert int to string if you use normal strings
17:43:46  <glx> {NUM} will work
17:43:52  <LordAro> ^
17:45:30  <glx> and I think there's already existing dropdowns with list of numbers, they can be used as inspiration
17:46:07  <DorpsGek> [OpenTTD/nml] glx22 closed issue #241: Attempt to warn when use of ternary op might fail due to side effects https://git.io/Jozgk
17:46:10  <DorpsGek> [OpenTTD/nml] glx22 merged pull request #243: Add: Warn when ternary operator results are not read only https://git.io/JoP7L
17:47:36  <DorpsGek> [OpenTTD/nml] glx22 merged pull request #239: Fix: example_train grf triggering an error message in OpenTTD https://git.io/JzmU1
17:52:27  <DorpsGek> [OpenTTD/nml] glx22 closed issue #191: Does not error when defining an object without a size https://git.io/Jt9bE
17:52:30  <DorpsGek> [OpenTTD/nml] glx22 merged pull request #236: Add: show an error if a required property is not set for objects (feature 0F) https://git.io/JEFYE
17:53:20  <DorpsGek> [OpenTTD/nml] glx22 merged pull request #224: Fix: Reject empty arrays of expressions https://git.io/JchcC
17:56:17  <DorpsGek> [OpenTTD/nml] glx22 closed pull request #212: Fix #209: Sign-extend value before cargo_profit callback result calculation https://git.io/JO9VQ
17:56:23  <DorpsGek> [OpenTTD/nml] glx22 merged pull request #220: Fix #209: Cargo 'profit' callback applied a unit conversion, when there was no unit. https://git.io/JG5mG
17:56:26  <DorpsGek> [OpenTTD/nml] glx22 closed issue #209: Cargo callback "profit" probably broken https://git.io/JODbP
17:57:58  <andythenorth> \o/
18:07:44  *** Wormnest has quit IRC
18:10:16  <kaomoneus> Is here a way to hide some widget and all its children? Is LowerWidget a correct method for it?
18:11:59  <dP> kaomoneus, use NWID_SELECTION
18:12:03  <dP> for example https://github.com/OpenTTD/OpenTTD/blob/master/src/company_gui.cpp#L226
18:15:14  <kaomoneus> dP: thanks!
18:19:30  * andythenorth proposes new industry flags
18:19:42  <andythenorth> "don't include in map totals when considering whether to construct more industry"
18:19:55  <andythenorth> "try to locate at least one of these in every town"
18:31:47  <dP> IND_FLAG_TOWN_HACK? :p
18:33:46  *** gelignite has joined #openttd
18:34:34  *** kaomoneus has quit IRC
18:46:40  <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/Jo1LR
18:46:41  <DorpsGek>   - Update: Translations from eints (by translators)
19:00:38  *** WormnestAndroid has quit IRC
19:00:59  *** WormnestAndroid has joined #openttd
19:12:16  *** tokai has joined #openttd
19:12:16  *** ChanServ sets mode: +v tokai
19:19:11  *** tokai|noir has quit IRC
19:21:51  *** virtualrandomnumber has joined #openttd
19:22:46  *** virtualrandomnumber has quit IRC
19:41:57  *** jottyfan has quit IRC
20:02:54  *** Gustavo6046 has quit IRC
20:04:47  *** Gustavo6046 has joined #openttd
20:23:16  *** frosch123 has quit IRC
20:33:40  *** Gustavo6046_ has joined #openttd
20:37:51  *** Gustavo6046 has quit IRC
20:37:51  *** Gustavo6046_ is now known as Gustavo6046
20:41:16  *** gelignite has quit IRC
20:44:40  *** Gustavo6046_ has joined #openttd
20:46:51  *** Gustavo6046 has quit IRC
20:46:51  *** Gustavo6046_ is now known as Gustavo6046
20:50:34  *** Gustavo6046_ has joined #openttd
20:54:55  *** Gustavo6046 has quit IRC
20:54:55  *** Gustavo6046_ is now known as Gustavo6046
21:06:22  *** Wolf01 has quit IRC
21:30:26  *** nielsm has quit IRC
21:31:26  *** Samu has quit IRC
21:36:03  *** andythenorth has quit IRC
21:51:15  *** Gustavo6046_ has joined #openttd
21:56:03  *** Gustavo6046 has quit IRC
21:56:03  *** Gustavo6046_ is now known as Gustavo6046
22:51:03  *** HerzogDeXtEr has quit IRC
23:00:23  *** sla_ro|master has quit IRC

Powered by YARRSTE version: svn-trunk