IRC logs for #openttd on OFTC at 2019-02-01
⏴ go to previous day
00:00:00 <LordAro> spectator makes no sense for a "single player" game
00:00:26 <ST2> my vote is with LordAro's statement :)
00:01:10 <ST2> it's a game - "single player" it's because someone wants to play alone, on MP's makes sense to spectate
00:02:22 <LordAro> so run a multiplayer server
00:02:37 <ST2> start them on a local MP game and watch
00:03:19 <Samu> the company button crashes when there's nothing to list
00:03:20 <peter1138> In a while, there'll be a PR... "Allow FF in MP when no clients connected"
00:05:42 <peter1138> Hmm, I think I can do this savegame conversion without a bump.
00:06:21 <peter1138> Although, then it will always fix ships.
00:06:26 <peter1138> Even when they're not broken.
00:06:59 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #6988: Change: AI/GS ScriptBridge::GetName takes one extra parameter to refer the vehicle type https://git.io/fhy9j
00:08:06 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #6988: Change: AI/GS ScriptBridge::GetName takes one extra parameter to refer the vehicle type https://git.io/fhfaC
00:13:53 <Samu> #ifdef ENABLE_NETWORK hmm this complicates things
00:16:47 <Eddi|zuHause> <nielsm> update? <-- someone missed the yearly obiwan?
00:18:27 <peter1138> Hmm, how can I test if a ship is on the lower or uppersecond half of a slope?
00:18:50 <peter1138> first or second was right.
00:19:36 <peter1138> I know if it's going up or down, I don't know if its past the centre (in relation to the ship direction) or not.
00:21:02 <Samu> client list not needed for single player
00:23:04 <Samu> New Company widget is disabled :|
00:28:55 *** strawbs89 has joined #openttd
00:29:05 <Eddi|zuHause> there's a variable for progress through a tile, right?
00:29:32 <strawbs89> rite hi i am going from what the wiki told me to do about the casino info centre but nothing seems to happen please help
00:29:34 <Eddi|zuHause> or you need to implement a state machine
00:30:40 <strawbs89> a state machine????
00:31:42 <peter1138> I don't think progress has this info.
00:32:12 <peter1138> progress is like sub-1/16th units.
00:33:01 <strawbs89> anyone listening lol
00:33:21 <LordAro> strawbs89: your question has nearly no information in it
00:35:08 <strawbs89> ok im using openttd 1.8.0 and i want to implement a casino tourist info centre and someone sent me a wiki on it earlyer today and im doing what it said im still getting build on slope like what the hell
00:35:39 <Eddi|zuHause> peter1138: no, progress is wrong, there needs to be a position one level above that
00:36:07 <Eddi|zuHause> peter1138: but that might already be in world coordinates, not in tile coordinates, not sure
00:36:31 <peter1138> There's x_pos and y_pos obviously, but I'll to mangle them depending on the direction, and I can't think :-)
00:38:13 <Eddi|zuHause> strawbs89: it might not work with canals but needs a real shoreline
00:38:57 <strawbs89> i have shoreline tiles would that work?
00:39:24 <Eddi|zuHause> with a real seashore, the slopes count as water tiles, the industry might check those
00:40:05 <strawbs89> that's the exact wiki i am on about
00:40:41 <strawbs89> i have ecs town vector but openttd 1.8.0 don't seem to like it
00:40:48 <Eddi|zuHause> (must also demolish the purchased land to allow flooding of the shore in that case)
00:41:44 <ST2> strawbs89: maybe that tile that isn't water?
00:43:40 <strawbs89> oooh ok rite i have now demolished the brought land
00:46:32 <Eddi|zuHause> seems to work fine here with "pristine" seashore
00:46:34 <Samu> kek, playing as company 256
00:47:32 <strawbs89> will the demolished brought land flood over now then
00:48:49 <strawbs89> plus i have animated watertiles would that work if i put them down
00:49:03 <Eddi|zuHause> must be original sea
00:49:12 <Eddi|zuHause> nothing else floods
00:49:25 <strawbs89> how would i get original sea then lol
00:49:43 <peter1138> Well it has to be at sealevel.
00:49:44 <Eddi|zuHause> could use the scenario editor
00:50:08 <Eddi|zuHause> or terraform from a place that still has sea tiles
00:50:20 <peter1138> Oh, you've replaced all sea with canals?
00:50:29 <strawbs89> i'v tried to lower that bit thats on the sea and it says already at sea level
00:51:05 <ST2> just a swear about: putting our server plugins on git and I already hate it (on a good way for some code lines)
00:51:15 <ST2> don't laugh, I'm a git noob :D
00:51:45 <ST2> not on OpenTTD official git ^^
00:52:03 <ST2> a git I created to our plugin stuff
00:52:21 <peter1138> Sure, I mean what ... issues are you having?
00:52:56 <ST2> at the moment aren't real issues - so won't disturb with it
00:53:27 <strawbs89> i'v demolished the canal so should it start flooding now if its already at sealevel
00:53:42 <peter1138> It'll only flood if it's next to existing sea water.
00:53:47 <ST2> many stuff made on SVN, by diff people
00:54:57 <ST2> I'll survive, google is my friend :D
00:55:04 <ST2> thx peter1138 for asking :)
00:55:28 <peter1138> Just takes a little getting used to from svn.
00:55:31 <ST2> after you get used to it, I bet
00:55:45 <ST2> the "baby steps" aren't easy :D
00:57:29 <LordAro> it is a steep learning curve
01:01:06 <strawbs89> rite now i'v lowered things to sea level it's not showing me sea i know someone said about existing sea but is there any acutal sea tiles i can put down or can i edit my scene in scenario editor and reload my game again so it shows what i'v already built
01:01:28 <peter1138> No, you can't place sea tiles as a player.
01:01:30 <LordAro> it'll flood in from the map edge
01:03:11 <Samu> i'm failing to allow a new company to be created in single player, grr
01:03:47 <Samu> getting stuck into "this command is only for multiplayer"
01:03:51 <peter1138> Oh, it's snowing. Just noticed.
01:04:01 <LordAro> peter1138: nothing here
01:04:19 <LordAro> Samu: almost as if you're trying to overcome a fundamental assumption of the last 15 years
01:04:29 <LordAro> did you think it was going to be easy?
01:11:24 *** Thedarkb-T60 has joined #openttd
01:19:44 <peter1138> byte progress; ///< The percentage (if divided by 256) this vehicle already crossed the tile unit.
01:19:54 <peter1138> I guess I was thinking of subspeed.
01:24:15 <Eddi|zuHause> i still think that's the progress of a single movement step
01:25:14 <Samu> error C2360: initialization of 'company' is skipped by 'case' label
01:26:18 <Eddi|zuHause> i'd probably check the code that makes vehicles enter wormhole
01:26:37 <Eddi|zuHause> because it must add a special counter there that counts down until it leaves the wormhole
01:26:47 <Eddi|zuHause> that should be the right counter
01:27:00 <peter1138> Why would it add a special counter?
01:27:17 <Eddi|zuHause> i mean there should be a countdown how many steps until you leave the tile
01:27:29 <Eddi|zuHause> and that is set to a very high value on entering wormhole
01:27:46 <Eddi|zuHause> because while it's on the wormhole, it's counted as on the end tile
01:28:10 <Eddi|zuHause> but it must keep track of how far throught the wormhole it is
01:29:03 <peter1138> No, it just keeps going in its current direction until it reaches the end tile.
01:29:18 <Eddi|zuHause> a normal tile has 16 steps, a diagonal tile 8 steps, and a wormhole has 16*(length+1) steps
01:29:35 <Eddi|zuHause> or something like that
01:30:07 <Eddi|zuHause> every time progress overflows, it must decrease the counter of steps by 1
01:30:07 <strawbs89> rite i'v built a river from edge of map rite up to my town and theres two slopes there and yet its still saying must be built on sloped land
01:30:12 <glx> progress is a byte, can't be 16*length
01:30:15 <Eddi|zuHause> and if it reaches 0 it's entering a new tile
01:30:36 <Eddi|zuHause> glx: yes, progress is not the right one, it's one level too low
01:30:57 <peter1138> Trust me, there is no "wormhole counter"
01:31:33 <strawbs89> whats one level to low
01:33:23 <Samu> extern Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY);
01:33:34 <Samu> can you explain how the extern works?
01:33:44 <Eddi|zuHause> peter1138: there's a _fractcoords_enter and _deltacoord_leaveoffset
01:33:59 <Eddi|zuHause> peter1138: and some magic in VehicleEnter_Track
01:34:43 <Eddi|zuHause> that might be depot magic
01:34:57 <strawbs89> i'v built a river from edge of map rite up to my town and theres two slopes there and yet its still saying must be built on sloped land
01:35:03 <peter1138> Eddi|zuHause, there is no magic.
01:35:33 <peter1138> In a wormhole, there is no counting, it just moves forward until it reaches the tile.
01:35:45 <peter1138> It knows that by the vehicle's x and y position.
01:35:48 <glx> just TRACK_BIT_WORMHOLE when entering
01:36:12 <Eddi|zuHause> yeah, it must calculate it from the coords somehow
01:37:35 <peter1138> x / 16 and y / 16 gives you tile coords.
01:37:37 <Samu> ok toolbar is now working almost fine
01:37:47 <glx> and normal trackbit at exit
01:37:50 <Samu> no crash, i can create new company and i can spectate
01:37:55 <peter1138> when it reaches 0, it's at a tile edge.
01:38:02 <Samu> but i can't join a company ye
01:38:21 <Samu> and i can't cheat out of company 256, is this the spectator slot?
01:38:45 <Eddi|zuHause> so at 0-7 and 8-15 is the two halves
01:39:47 <Eddi|zuHause> however, that's the front of the ship, not the middle
01:40:20 <peter1138> A ship is only one piece, and its coordinates are in the centre of it.
01:40:33 <glx> COMPANY_SPECTATOR = 255, ///< The client is spectating <-- definitely 255
01:40:50 <Eddi|zuHause> how is a ship ever centered on a tile?
01:41:42 <peter1138> When it's... in the middle? :p
01:41:55 <Eddi|zuHause> but there is no middle with even steps?
01:42:16 <Samu> company 256 even has a color
01:42:22 <peter1138> Okay well half of 16 is 8.
01:42:29 <Samu> must fix the cheat gui, who would have thought
01:43:08 <Eddi|zuHause> strawbs89: all slope tiles must be shore tiles, and you have to click on the topmost tile of the area for the future industry
01:43:49 <glx> tourist stuff are beautiful, but a pain to place :)
01:45:20 <Samu> case STR_CHEAT_CHANGE_COMPANY: {
01:45:57 <peter1138> More nonexistant problems?
01:46:18 <Samu> i guess it's not a problem
01:49:11 *** snail_UES_ has joined #openttd
01:52:08 <Samu> i wanna be able to move out of company 256 though
01:52:42 <glx> I think the best to watch a 15 AI game, would be to do it in network mode
01:53:44 <glx> it already supports spectator
01:54:08 <glx> you just need an option to put an AI in company 0
01:55:31 <glx> dedicated can already have AI in slot 0, but GUI server need some work
01:56:56 <Samu> multiplayer has some debugging limitations only the cheat gui could help
01:57:13 <Samu> and can't fast forward, but it also has some advantages
01:59:19 <peter1138> Debugging with the cheat window? What?
01:59:49 <Samu> give money to AI, see how it performs, it's helpful
02:00:07 <Samu> helps find out what can be the cause of some problems
02:00:14 <glx> but server can already do that
02:00:43 <Samu> most of the time, money is the problem
02:01:28 <Samu> now they don't bankrupt that much
02:02:21 <Samu> speaking of bankrupt... i gotta check how bankrupt is handled in single player
02:03:03 <Samu> it could bankrupt all but one, if I recall
02:06:32 <glx> there's even a command for that (used by GS)
02:06:43 <glx> no need to use the cheat window
02:07:39 <glx> but indeed the command is currently only called from game script
02:08:33 <glx> you just need a console command for the server
02:11:26 *** Wormnest has joined #openttd
02:14:10 <peter1138> glx, eaiser to hack multiplayer support into singleplayer mode!
02:20:00 <Samu> i can't pass up the advantage of fast forward
02:30:33 <Samu> looks like I don't have to do anything about bankruptcy
02:30:51 <Samu> if I am in spectator company
02:31:46 <Samu> all 15 AIs can bankrupt, and be back to 0 companies, as long as I'm spectator
02:37:52 *** supermop_Home has joined #openttd
02:38:27 <peter1138> Eddi|zuHause, (v->direction == ((x < 8) ? DIR_NE : DIR_SW)) || (v->direction == ((y < 8) ? DIR_NW : DIR_SE))
02:46:13 <Samu> #ifdef ENABLE_NETWORK / #endif /* ENABLE_NETWORK */
02:58:44 <peter1138> I don't know why we bother to allow building without network support.
03:01:22 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhDyC
03:02:47 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhyQo
03:03:27 <peter1138> Oh well, way too late to bed again.
03:10:47 *** Thedarkb-X40 has joined #openttd
03:13:28 *** WWacko1976-work has joined #openttd
03:39:23 <Eddi|zuHause> peter1138: ancient platforms that we don't support anymore anyway had no network libs?
05:59:05 *** tokai|noir has joined #openttd
05:59:05 *** ChanServ sets mode: +v tokai|noir
07:51:18 <peter1138> Eddi|zuHause, right.
08:08:59 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7153: Fix engines not in current climate affecting available livery classes, and default engines not using MU class https://git.io/fhyDD
08:09:50 *** andythenorth has joined #openttd
08:19:03 <peter1138> Yes, you missed a feature that wasn't in it!
08:20:44 <andythenorth> since sliced bread
08:27:41 <peter1138> I just had an Irish potato farl instead of sliced bread.
08:30:03 <peter1138> It was reduced Tesco, and I'm a sucker.
08:39:58 <peter1138> Oh, whoops, #7153 depended on the other fix :/
09:17:17 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Change: Allow AI companies to start immediately. https://git.io/fhyd4
09:18:12 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Change: Allow AI companies to start immediately. https://git.io/fhyd0
09:51:58 <peter1138> All that snow was easy peasy on the MTB.
09:56:43 <peter1138> Ooh, my work CI caught a compile failure, whoop.
10:08:35 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhyF3
10:10:28 <peter1138> Pikka, bet you've got lots, it being January 'n all...
10:24:29 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhyFE
10:24:55 <peter1138> ^ Gotta love that screenshot.
10:26:02 * andythenorth wonders what a good UI looks like for that
10:31:07 <peter1138> Not broken, to start with.
10:32:06 <andythenorth> are templates 1:1 with groups?
10:32:12 <LordAro> presumably the basic framework of the window was copied from autoreplace window
10:32:17 <andythenorth> or for 1:1 with shared orders?
10:32:32 <peter1138> I don't think it mentions shared orders at all.
10:32:57 <andythenorth> how does it interact with autoreplace?
10:33:03 * andythenorth could just try it I guess
10:33:22 <peter1138> I suspect it interacts badly, but I don't know.
10:33:28 *** sla_ro|master has joined #openttd
10:34:32 * andythenorth thinks templates should be subsidiary to autoreplace somehow
10:35:10 <andythenorth> options: replace any vehicles A -> B | force train to match template N
10:35:43 <andythenorth> or my favourite idea, just allow autoreplace to specify: replace A with n*B
10:35:49 <andythenorth> and let players do the maths :P
10:40:54 <peter1138> You're overthinking it :)
10:41:35 <andythenorth> what's the worst we could do? o_O
10:41:47 <peter1138> We could break master!
10:42:08 <andythenorth> what's the worst template thing we could do?
10:42:28 * andythenorth just makes one new train, clones it n times, and deletes the old ones
10:42:33 <andythenorth> no templates needed
10:43:06 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7147: Change: Synchronize randomness in vehicle introduction… https://git.io/fhyF6
10:43:17 <peter1138> andythenorth, quite, but why would you want to play the game?
10:43:24 <peter1138> andythenorth, just watch 15 AIs play it instead.
10:43:39 <andythenorth> oh AIs need to be able to make train templates
10:43:42 <andythenorth> that's a good point
10:43:55 <andythenorth> pikka can do that, he has templated stations and stuff in CivilAI
10:44:06 <andythenorth> actually CivilAI makes nice horse tests, I'll run a game
10:44:14 <andythenorth> but I need 15 AIs
10:48:55 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhyFM
10:54:35 <andythenorth> consensus is pretty much when everyone has stopped disagreeing
10:54:40 <andythenorth> rather than everybody agreeing
10:55:07 <andythenorth> can I just approve the PR, and then get all the blame again?
10:58:19 <peter1138> I don't think it counts if we haven't asked anyone...
10:58:32 <andythenorth> let's do a survey!
10:58:37 * andythenorth might have an app for that :P
10:58:54 <peter1138> I wonder if it's too rigid. Maybe it should be rigid.
10:59:29 <andythenorth> I haven't tried it
11:01:20 <andythenorth> urgh this AI GUI sucks
11:01:27 <andythenorth> and I can't just spectate
11:01:58 <peter1138> Amber alert for snow!
11:02:02 <peter1138> It's... not snowing.
11:02:58 <andythenorth> I can see 10cm of snow
11:03:03 <andythenorth> don't need a warning
11:15:11 <andythenorth> having 14 AIs running really murders FFWD
11:23:18 <andythenorth> pikka AI loves food trains :P
11:24:34 <peter1138> Yeah, AIs are not multithreaded either, for obvious reasons.
11:33:08 <Pikka> I'm sure it does funny things with FIRS :)
11:33:49 <peter1138> Bah, gitea is okay, and tries to replicate git, but some stuff just isn't there.
11:34:04 <peter1138> Like, I have to manually reload pages to get the CI status! Reload! How 2000s!
11:35:53 <andythenorth> Pikka: I'm feeding it FIRS Steeltown, to see if it ever makes any cars
11:35:58 <andythenorth> quite a complex economy
11:37:36 <peter1138> Hmm, I need to figure out how to implement a resize-bar widget.
11:37:42 <Pikka> it will run trains to industries which produce food, goods, or nothing, or which happen to be in the catchment area of a station it's already built
11:37:51 <andythenorth> let's teach it more!
11:38:22 <peter1138> I shall just add enums for HRESIZE_BAR and VRESIZE_BAR and then assume it will just work, right?
11:39:04 <Pikka> I could do, but it's always been intended to do its little "civil" town-feeding
11:39:18 <Pikka> and not get in the way or compete with players building industrial or intercity train networks
11:39:24 <andythenorth> ok that makes sense
11:40:31 <peter1138> Do AIs get notified about disasters?
11:42:46 <Pikka> zellepin crashes on their airports, and their own vehicles getting destroyed
11:48:26 <andythenorth> if I take over AI company with cheat, does AI resume when I cheat back to mine?
11:49:41 <Pikka> I don't think it stops while you're in it
11:50:36 <andythenorth> oh it names them too :D
11:52:00 <peter1138> Hmm, but not a UFO destroying tracks, I guess.
11:52:20 <peter1138> Nicely random, andythenorth.
11:52:37 <peter1138> There were some AIs that did everything identically, including the same routes...
12:26:45 <andythenorth> newrgf colours resets eh peter1138 ? ^
12:37:48 <andythenorth> it's a grf that remaps the colour ranges
12:37:56 <andythenorth> makes the GUI a bit...interesting
12:38:03 <peter1138> Oh. It just adjusts the global colour remap table.
12:42:58 <peter1138> Oddly enough the company colour stuff can probably handle more. Liveries are stored as two separate bytes.
12:43:25 <peter1138> The 16x16 matrix for 2CC could be a problem.
12:43:26 <andythenorth> some of the current ranges suck a bit
12:43:42 <andythenorth> newCC proves there are some nice alternatives
12:43:57 <peter1138> Only issue is the newgrf colour callbackc which expects 16x16 colours.
12:44:11 <peter1138> If not using the callback, then it's OpenTTD internal.
12:44:58 <peter1138> OpenTTD could easily generate the required colourmaps from a short lookup table.
12:45:14 <peter1138> But backwards compatibility.
12:45:25 <andythenorth> major API change!
12:45:31 <andythenorth> semver is old news anyway :P
12:45:36 <peter1138> Rather, NewGRF compatibility.
12:46:54 <peter1138> I think pikka uses colour info to pick liveries in some places.
12:48:30 <Pikka> but what of AIs picking company colours? ;)
12:48:37 <andythenorth> I considered the idea of reading the colour info :P
12:48:43 <andythenorth> then changing the pixels to suit my prejudices
12:48:53 <andythenorth> would rather offer buy menu groups for that
12:50:01 <Pikka> the only place I can think of where I did livery-by-cc was pineapple trains, where for some bizarre reason I decided to make seperate sprites for each colour and blow out the file size
12:50:22 <Pikka> NARS2 has multiple liveries for some locos, but I think that just works by company ID
12:53:55 *** tyteen4a03 has joined #openttd
13:03:23 <peter1138> Should have a better colour picker :p
13:10:14 *** tyteen4a03 has joined #openttd
13:46:49 *** Mahjong1 has joined #openttd
13:57:55 <peter1138> Salad & cheese & pickle sandwich has been successfully installed. Would I like to reboot?
13:58:22 <peter1138> No, just installing the packet of crisps update.
14:13:36 <Samu> * There are no spectators in single player, so we must pick some other company. */
14:14:02 <andythenorth> run AIs in scenario editor
14:14:08 <andythenorth> then you can mess with landscape like a god
14:15:17 <peter1138> Hmm, how can I see how many commits behind master my current branch is?
14:15:32 <Samu> time is stopped for them
14:18:15 <peter1138> andythenorth, anyway, as I'm hacking around colour maps for RGB support, it's not that much of a stretch to make dynamic 8bpp colour maps too.
14:25:30 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7152: Fix 23960d0f2c: Scrollbar was broken for non-group liveries. https://git.io/fhyAj
14:25:45 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7152: Fix 23960d0f2c: Scrollbar was broken for non-group liveries. https://git.io/fhy1G
14:34:15 <andythenorth> time is stopped peter1138
14:34:28 <andythenorth> how do we know what time is?
14:34:33 <andythenorth> can causality run backwards?
14:34:45 <andythenorth> and other philosophy degree questions :P
14:41:11 <peter1138> How gnarly is that!?
14:41:43 <peter1138> Needs a few magic numbers to be unmagicked.
14:43:39 <peter1138> Good first issue? Lol
14:43:53 <planetmaker> just adding padding by a scale?
14:51:26 <andythenorth> should I make an AI? o_O
14:55:59 <andythenorth> I like the trains CivilAI builds? o_O
14:56:17 <andythenorth> can an AI cheat money?
14:56:54 <andythenorth> considering building an AI to test newgrfs :P
14:59:08 <andythenorth> one of the AIs has built hoverzellepins :)
14:59:22 <andythenorth> the others prefer small boats
14:59:45 <andythenorth> the names pikka :P
14:59:50 <andythenorth> such a good detail
15:07:30 <andythenorth> can an AI flip vehicles in depot? :P
15:12:55 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7151: Change: Allow AI companies to start immediately. https://git.io/fhyxp
15:19:03 <Gabda> i have a few c++ style, logic question, I wrote them into PR #7120 if someone in interested in these type of questions
15:20:29 <peter1138> Hmm, not sure, I don't see a problem with using classes.
15:20:43 <peter1138> We generally don't because historically it was all C code, not C++.
15:21:06 <peter1138> I haven't looked at the code in question of course.
15:21:13 <Gabda> my main problem is right now, if I make an instance of it, I cannot use the public functions
15:21:33 <Gabda> as I cannot forward declare them in the header
15:22:30 <Gabda> and if someone want to make a second instance, they might collide, and it can be a problem :)
15:26:36 *** Mahjong has joined #openttd
15:27:27 *** Mahjong has joined #openttd
15:28:19 *** octernion has joined #openttd
15:30:51 <LordAro> Gabda: that sounds like you're doing something wrong...
15:32:53 <Gabda> well, I am storing the data in a global variable, so that part is terrible, and I have to move it into the class, if I want to proceed with this approach
15:33:15 <Gabda> but I don't know wheter this is a good direction
15:35:23 <Gabda> and maybe someone with more experience can see it with a glance
15:39:50 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Change: Allow AI companies to start immediately. https://git.io/fhyUY
15:39:55 <Samu> hi Gabda, have you fixed max no competitors already? :p
15:41:17 <Gabda> hi :) I have a fix for that as a PR, but so far it didn't get much attention
15:42:19 <Samu> have you copied the behaviour from settings gui? that part over there seems to know how to do it
15:43:21 <Gabda> no, i've looked through the windon and widget functions, and selected one that seems appropriate
15:43:31 *** synchris has joined #openttd
15:44:27 <Samu> I'll take a look at it soon, have to check what happens when clicking a button over there, where the code is heading to
15:44:29 <Gabda> I wanted something that works even is the value is changes over rcon while the ai settings window is open
15:45:08 <planetmaker> would a dedicated server even have an OnMouse Loop?
15:45:32 <planetmaker> seems wrong for sth which changes settings
15:46:13 <Gabda> but a dedicated server doesn't have ai window
15:46:18 <planetmaker> ofc a dedicated ... ^^
15:47:32 <Gabda> it should only change the state of buttons, and not something with game logic, only inerface
15:48:41 <peter1138> Samu, what's a good AI to play against?
15:48:48 <planetmaker> ehm... in MP, no client (except the host) can change any server setting. except if used via rcon. can it?
15:49:35 <planetmaker> everything else would be a severe bug :)
15:49:50 <planetmaker> (as rcon requires password)
15:50:06 <Gabda> but even on a sever bug like this, the fix would work :)
15:50:25 <peter1138> Remind me what the goal is?
15:51:01 <Gabda> to disable/enable a little not that important button in the ai/game script config window
15:51:59 <peter1138> That's pretty vague.
15:52:10 <planetmaker> I don't quite get it.
15:54:07 <planetmaker> I still don't get it.
15:54:26 <planetmaker> I launch OpenTTD. If I'm server: ok, I can change it. Nothing needs sending as I am the server
15:54:34 <planetmaker> if I'm not the server... I cannot change it
15:54:51 <peter1138> It's the usual UI-acting-as-if-DoCommandP-result-is-valid stuff.
15:55:41 <Samu> the ai config window is only accessible for non-dedicated server
15:56:14 <Samu> (and singleplayer, of course)
15:56:39 <Samu> it's not accessible for a client playing in a server
15:57:17 <planetmaker> lol. "No AI available" window pop ups here. Yet I can continue to change competitor number. But I then have to close the pop-up later as many times as the "No AI available" window pop ups ;)
15:57:27 <planetmaker> at the very identical position on the window
15:57:33 <planetmaker> s/window/screen/g
15:57:38 <peter1138> Oh, it doesn't even send a DoCommand.
15:57:42 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7145: TBTR 2.0 (Template-based Train replacement) https://git.io/fhyhJ
15:57:49 <peter1138> It does IConsoleSetSetting
15:59:17 <Samu> you must start a server game from gui
16:04:56 <planetmaker> peter's comment is indeed the important thing: it needs DoCommand usage
16:05:18 <peter1138> I don't think it does, but it's still related.
16:05:20 <planetmaker> I wonder when IConsoleSetting is acceptable
16:06:52 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7154: Fix #6438: Properly invalidate AI Settings window when max no. competitors setting is changed https://git.io/fhyhY
16:08:51 <peter1138> The callback was already there, fortunately.
16:09:20 <andythenorth> I had some mac+cheese with ham and tomatoes
16:09:26 <andythenorth> but it's just a snack really
16:09:32 <peter1138> Now is... high tea?
16:09:32 <andythenorth> ham was dated Jan 14th
16:10:24 <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker approved pull request #7154: Fix #6438: Properly invalidate AI Settings window when max no. competitors setting is changed https://git.io/fhyh3
16:10:43 <peter1138> planetmaker, that was a quick test ;)
16:12:12 <peter1138> I guess this is where having fairly in-depth knowledge of the code helps.
16:12:24 <peter1138> And a decent description of what the problem actually is.
16:12:47 <peter1138> Hopefully Samu will get better at it!
16:14:53 <planetmaker> When I saw your patch I also knew it was right... we identical patches for identical bugs before. More than once
16:15:12 <planetmaker> common oversight it seems
16:15:42 <planetmaker> but I didn't recall this before I saw the patch :|
16:17:32 <Gabda> well, this solution is really the proper way
16:18:06 <glx> so many incorect invalidation and missing window closing in the code :)
16:18:30 <peter1138> Yeah, there'll be others. Hence why I am cautious about Samu's return DoCommandP() in #7151.
16:18:45 <Gabda> you can close PR #7064 now
16:18:54 <glx> makes me think I need to fix a thing in option window
16:20:27 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed pull request #7064: Fix #6438: raising/lowering 'Maximum no. competitors' setting in multiplayer https://git.io/fhCGC
16:20:56 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7154: Fix #6438: Properly invalidate AI Settings window when max no. competitors setting is changed https://git.io/fhyhY
16:20:58 <Samu> wow, was that it? weird, i thought it was some syncing issue
16:21:00 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed issue #6438: raising/lowering 'Maximum no. competitors' setting in multiplayer https://git.io/fhyhw
16:21:13 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7064: Fix #6438: raising/lowering 'Maximum no. competitors' setting in multiplayer https://git.io/fhyhr
16:22:24 <Samu> damn visual studio hanging when I least expect it
16:22:42 <Samu> how do I unhang without terminating it
16:23:25 <peter1138> Very clunky workaround :)
16:24:21 <Gabda> well, it is really new for me that settingsDesc can call funtions on value change
16:25:02 <Gabda> and looked through all the window and widget funtions for one that makes updates
16:27:39 <planetmaker> it's not easy to find all the places for all stuff, Gabda. You can work for years on OpenTTD and not have seen each file :)
16:27:56 <peter1138> Gabda, yeah, I'm not saying you should know it :)
16:28:09 <peter1138> I've been here 14 years...
16:28:10 <planetmaker> so please don't feel discouraged :)
16:28:15 <glx> and GUI is not an easy thing to understand
16:28:16 <Gabda> planetmaker: that is for sure :)
16:28:32 <peter1138> Mmm, "real lancashire" eccles cake. Very much mass-produced "real"...
16:28:36 <Samu> gonna remove my trash fix from my pr
16:28:39 <peter1138> But still, it's warm, and I'm ... installing it.
16:29:17 <peter1138> You had a PR for it as well?
16:29:32 <peter1138> Or was it in some big one with tons of other changes where it probably wouldn't've been spotted.
16:29:41 <Gabda> but one of the reasons I started to work on it is to learn
16:29:47 <Samu> it was in the big gui pr
16:29:51 <peter1138> Gabda, yup, and you have :)
16:30:01 <peter1138> Samu, yeah. That's why we don't like big PRs.
16:30:20 <peter1138> Sometimes you need them.
16:30:42 <peter1138> Although I'd rather that was kinda split but I gave up trying to disentangle it.
16:30:58 <Samu> an invalidate window invalidating another window is a bit... overdoing it imo, but let's see
16:31:03 <planetmaker> fwiw: I've written similar constructs only to see them replaced by similar one-line fixes :P
16:31:20 <peter1138> Yeah, I mean, look how messed up the group-livery window was!
16:31:53 <glx> and how many not spotted errors ;)
16:33:08 <Samu> hope that fix doesn't break something on my gui patch
16:33:47 <glx> else you did something very wrong in your patch
16:34:14 <Samu> no, i mean, i hope the invalidate don't trigger some closures
16:35:14 <peter1138> Invalidate means to update yourself, not close.
16:36:12 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #7155: Fix: close Textfile windows when closing Option window https://git.io/fhyjv
16:36:58 <planetmaker> I belive that's correct, too. Shall I approve untested? :)
16:37:11 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7151: Change: Allow AI companies to start immediately. https://git.io/fhyjf
16:37:15 <andythenorth> - make enterprise software?
16:37:18 <andythenorth> - do some Horse?
16:37:55 <planetmaker> you need to remember from time to time why you do all the other stuff
16:38:08 <andythenorth> I might make some enterprise software though :P
16:38:55 <DorpsGek_II> [OpenTTD/OpenTTD] planetmaker approved pull request #7155: Fix: close Textfile windows when closing Option window https://git.io/fhyjT
16:39:31 <peter1138> I've got 6 PRs awaiting approval on $WORK's platform.
16:40:37 <peter1138> Does anyone do that?
16:41:03 <peter1138> I currently have master be my development ... branch...
16:41:35 <planetmaker> the graph looks identical when you do s/master/releases/g and s/develop/master/g
16:41:46 *** Wormnest has joined #openttd
16:41:47 <planetmaker> and change a few arrow directions
16:42:20 <planetmaker> I wonder what we will do at OpenTTD
16:42:21 <andythenorth> feature -> milestone -> master
16:42:44 <andythenorth> there are 3 main strategies, there's a github or bitbucket page
16:42:47 <peter1138> planetmaker, well we already develop on master, so I guess your way is more likely.
16:43:04 <planetmaker> the question is how to deal with the releases, though
16:43:30 <Gabda> annotated tags for releases?
16:43:36 <peter1138> planetmaker, we could create a branch from the last 1.8 release.
16:43:39 <planetmaker> do a separate branch for each?
16:43:47 <peter1138> and then use that as "release"
16:43:54 <peter1138> and then from there, branch release-1.9 branch
16:44:16 <planetmaker> continuing our current release model, we simply branch-off 1.9 somewhen now
16:44:21 <peter1138> cos i assume we still want to do backporting to support 1.9.x
16:44:50 <planetmaker> and then tag in the 1.9 branch the releases for 1.9
16:45:07 <planetmaker> and do a separate branch next year for 1.10 (or 1.A? 2.0?)
16:45:13 <peter1138> well, tags refer to specific commits rathe than branches.
16:45:25 <peter1138> obviously if the commit is only in that branch then it kinda does
16:45:48 <Samu> conflicts... always conflicts
16:45:52 <planetmaker> releases need to be tagged. And the release-branches contain all the fixes and tags for major and its bug-fix releases.
16:45:57 <planetmaker> That's ... how we did it
16:46:15 <glx> for release there is a special commit, fixing some stuff for rev.cpp
16:46:48 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 merged pull request #7155: Fix: close Textfile windows when closing Option window https://git.io/fhyjv
16:47:18 <Gabda> what is the problem with the check at PR #7120?
16:47:29 <Gabda> it is hard to decode those messages
16:48:39 <peter1138> After clicking on Details, click on the grey "view more details on Azura Pipelines" link at the bottom.
16:48:56 <peter1138> Then you'll see the build that failed, so click on that.
16:49:08 <peter1138> Then you'll see build and test failed... so, er, click on that.
16:49:18 <peter1138> And finally in there...
16:49:22 <peter1138> 2019-02-01T14:23:49.4293059Z *** b/src/town_voronoi.cpp:82: Trailing whitespace: ' * From a given tile, finds the first tile (while moving in the X direction) that is '
16:50:38 <planetmaker> yep.. the way to find the actual error is *very* unwieldy
16:50:51 <glx> yes error reporting is suboptimal ;)
16:51:03 <andythenorth> we could parse it
16:51:09 <andythenorth> or we could wait for azure to be less shit
16:51:18 <glx> and I don't understand how it counts warnings
16:51:40 <andythenorth> not in a way where the total corresponds to what's shown
16:52:31 <peter1138> Each line with ##[error] has a code.
16:52:43 <glx> only 11 warnings when almost all lang files warn
16:52:47 <peter1138> There are 11 of them
16:53:25 <Gabda> thanks, now I know where to look
16:53:42 <peter1138> Ok, it does for errors, but not for warnings.
16:54:42 <andythenorth> maybe horse then
16:55:41 <andythenorth> vehicle costs are a total PITA
16:55:50 <andythenorth> they have to be low enough that you can make money at game start
16:55:58 <andythenorth> whenever you start
16:56:12 <andythenorth> which means that vehicles absolutely print money
16:56:34 <andythenorth> it's not a big deal, just tedious to balance
16:56:43 <peter1138> This is what the inflation setting is for.
16:57:02 <andythenorth> yeah, but then you can only play for about 70 years
16:57:25 <planetmaker> disaster vehicles can yet not be made to do anything non-default, can they?
16:57:44 <peter1138> There's no feature for them, I think.
16:57:58 <peter1138> But the vehicles are kind of a side for disasters.
16:58:21 <peter1138> E.g. not all disasters have them.
16:59:03 <planetmaker> yep. I was thinking during breakfast about some ... disaster GS. Or means for a GS to display some sprites at certain locations
16:59:31 <planetmaker> let's say "sorry, a tornado is rampaging through town XZ. Please provide emergency service. We need X,Y,Z in the next 12 months"
16:59:32 <nielsm> hm langfiles don't have a way to specify that printing a number should be skipped for certain plural forms, right?
16:59:39 <planetmaker> and we display a tornado sprite over the town or so
17:00:12 <glx> you can specify the {NUM} to reference IIRC
17:00:14 <planetmaker> nielsm, a number? can you give an example what you exactly want?
17:00:29 <nielsm> since I'd like a string to ideally take form "Det sidste sekund er der..." (singular) / "De sidste 5 sekunder er der..." (plural)
17:00:45 <nielsm> it sounds strange with "Det sidste 1 sekund er der..."
17:01:08 <nielsm> STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION
17:01:57 <peter1138> I don't think you'll ever see 1.
17:02:00 <nielsm> (I guess in practice it will never display 1 in that string, so it's not worth spending energy on)
17:02:08 <Samu> decrements always from 1 to 0, if i'm not mistaken
17:03:27 <glx> Samu: that's not the "issue"
17:03:33 <peter1138> It may be you should keep the game_mode test before the decrement.
17:03:42 <peter1138> And then it doesn't need to be inside the loop either.
17:04:15 <peter1138> It is kinda interesting that CanStartNew() is called before the game_mode test though.
17:04:27 <glx> before your change decrement happens only when AI::CanStartNew() && _game_mode != GM_MENU is true
17:04:46 <glx> now it's always decremented
17:04:59 <peter1138> Ok, CanStartNew is only a test.
17:05:07 <peter1138> You don't need to move that either.
17:05:38 <peter1138> So that if condition should just stay the same.
17:06:03 <peter1138> And in the loop it's just testing MaybeStartNewCompany()
17:07:02 <andythenorth> meh naming of parts: I have a running cost baseline, which varies by type of vehicle (steam, diesel, electric etc)
17:07:02 <peter1138> Hmm, how can I hide conversations on github?
17:07:18 <andythenorth> and I have running cost variable, which is a function of power, speed etc
17:07:38 <glx> indeed AI::CanStartNew() result won't change while you are in the function
17:08:06 <andythenorth> peter1138: can't see a way
17:08:55 <Samu> AI CanStartNew can be outside the Do loop too?
17:09:35 <glx> yes keep the if as it was before the change
17:10:11 <peter1138> Er, with correct indenting.
17:11:13 <peter1138> heck, you could do...
17:11:37 <peter1138> do { } while (MaybeStartNewCompany() && AI::GetStartNextTime() == 0);
17:11:42 <peter1138> But that's kinda ugly.
17:12:13 <peter1138> probably don't need the do { } either...
17:12:21 <peter1138> while (MaybeStartNewCompany() && AI::GetStartNextTime() == 0);
17:12:32 <peter1138> That'd be very confusing, I don't recommend it.
17:12:59 <peter1138> src/viewport_func.h: while (DoZoomInOutWindow(how, w)) {};
17:14:00 <peter1138> That appears to be the only place.
17:15:16 *** HerzogDeXtEr has joined #openttd
17:18:50 <glx> hmm maybe a comment for the max() above
17:19:14 <nielsm> eints could really use a translation memory feature
17:19:39 <nielsm> (i.e. dictionary with translation notes)
17:20:49 <glx> like when I looked at all Click[+-] stuff for french
17:22:30 <nielsm> I may still not have fixed all the signal terms in the danish tl, but hopefully most... and some are just impossible to get really right since ttdp used signalling terms wrong from the outset
17:22:36 <glx> and eints should auto "remove" outdated strings with strgen command errors
17:22:50 <glx> not from the interface but from the commit
17:23:33 <peter1138> I removed this one once when they were all out of date, but some of them are not now.
17:23:46 <peter1138> Not going to bother doing that again if eints just messes it up.
17:24:28 <glx> well I think eints already marks strings as outdated on english.txt change
17:24:46 <nielsm> yeah you get presented the bad string for fixing
17:24:58 <nielsm> but it should really leave it out of its commits when it's invalid
17:25:22 <glx> and eints tells you there's an error when you are translating
17:25:32 <nielsm> it also seems to have lost history of most strings?
17:25:39 <planetmaker> it only commits changes
17:26:04 <glx> outdated+errors should be considered as a change
17:26:22 <glx> peter1138: changes from translators, not from outside ;)
17:26:43 <peter1138> It committed the broken translations, which are not changes.
17:27:17 <glx> but outdated without errors are acceptable I guess
17:28:14 <glx> sometimes they are, I remember fixing an outdated string by just pressing the button
17:28:29 <peter1138> Yes, isn't that the point though?
17:28:40 <planetmaker> it should not do anything about strings which don't fit anymore because English changed.
17:29:18 <glx> if they are broken they won't be visible in openttd
17:29:36 <glx> and cause "useless" warnings
17:29:37 <nielsm> but when english changed the inserts in a string, making it not just potentially wrong, but also technically mismatched
17:30:27 <planetmaker> even then... it should not decomission strings
17:31:02 <nielsm> what if a string was changed from using {STRING} to {COMPANY}?
17:31:10 <nielsm> that would probably cause asserts
17:31:14 <peter1138> nielsm, it would be an error.
17:31:14 <planetmaker> then it's your duty to remove translations
17:31:22 <glx> strgen fails for that nielsm
17:31:30 <peter1138> planetmaker, whose duty?
17:31:45 <nielsm> peter1138 removed translations from the langfiles and eints inserted them back
17:31:52 <planetmaker> the one completely changing the english string should then remove translations in a commit of that patch
17:32:01 <nielsm> when a string was changed to include an insert it did not have before
17:32:05 <peter1138> planetmaker, I did that for STR_LIVERY_CAPTION.
17:32:16 <planetmaker> for all languages? Or for some?
17:32:21 <peter1138> planetmaker, then eints went and put every single wrong translation back.
17:32:47 <peter1138> Maybe you are describing how it should work, not how it is working :-)
17:32:54 <glx> and that's where the suggestion of not adding outdated+errors come
17:33:00 <planetmaker> I was hoping that it were only those where the string was changed by a translator that day
17:34:09 <peter1138> Maybe it's the first mass-remove since switching to git?
17:34:23 <glx> or to the switch to eints
17:34:24 <peter1138> Pretty sure it used to work back on svn.
17:34:27 <nielsm> I've done mass removes
17:34:32 <peter1138> Dunno when that was done.
17:34:34 <nielsm> but the original string was also removed from english.txt
17:35:12 <glx> yes eints doesn't add strings not in english
17:35:42 <glx> I think we triggered a never tested case :)
17:36:21 <glx> WT2 had no issue with removals
17:36:44 <glx> but that was way less friendly for translators
17:36:56 <glx> had to redo the line completely
17:38:47 <glx> so eints keeping the broken string internally is nice, just don't put it back while not fixed
17:40:25 <Samu> _next_competitor_start = max(1, AI::GetStartNextTime() * DAY_TICKS); // insert comment for max
17:41:05 <glx> somthing about 0 as a special value from AI::GetStartNextTime()
17:41:18 <Samu> min value of 1 because 0 can happen
17:41:25 <Samu> see? Im bad with comemnts
17:41:39 <peter1138> Agreed, you are. :p
17:41:58 * andythenorth pisses about with costs
17:42:53 <Samu> because if it's 0, --_net_competitor_start becomes a big number
17:43:09 <glx> that's the effect, not the reason
17:43:34 <glx> it can be 0 because 0 means start immediately
17:47:36 <glx> but documenting the special case seems a good idea
17:48:57 <glx> hmm 0 seems to be a valid result for "Get the number of days before the next AI should start"
17:49:11 <glx> even if it never happened before
17:49:49 <glx> because the setting was clamped to 0
17:50:44 <glx> so maybe no need for a comment
17:51:23 <glx> or just /* AI::GetStartNextTime() can return 0 */
17:51:44 <glx> enough to explain the max
17:53:56 <Samu> _next_competitor_start = max(1, AI::GetStartNextTime() * DAY_TICKS); // AI::GetStartNextTime() can return 0
17:54:05 <Samu> oh, you mean above this line?
17:55:19 *** WWacko1976-work has quit IRC
17:55:57 <Samu> isn't it implied down below with } while (AI::GetStartNextTime() == 0);
17:56:51 <glx> maybe, but a comment has no cost :)
17:57:30 <peter1138> It's only implied because you're looking at it now and "understand" it
17:57:38 <peter1138> When somebody else looks back in 12 months time...
17:58:49 <glx> after a quick check to the diff, use /* */ else the line may be "too long"
18:03:02 <peter1138> Ah, it was cirdan with the map array changes.
18:03:40 <peter1138> Looks to be not updated any more.
18:04:27 <peter1138> Possibly gave up when we restarted our git.
18:04:42 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7151: Change: Allow AI companies to start immediately. https://git.io/fhyUY
18:04:50 <peter1138> On the other hand, that means it's not a moving target ;)
18:05:50 <glx> hey you could have kept the if like it was
18:06:18 <glx> but it's more logical that way
18:06:50 <peter1138> Hmm, definitely some dubious changes in that repo.
18:07:47 <Samu> so, AIs can start in the editor?
18:08:08 <glx> yes they can start in editor
18:08:32 <Samu> if (_game_mode == GM_EDITOR) return;
18:08:43 <glx> ah there's a check somewhere else
18:10:34 <glx> hmm the test should be == GM_NORMAL and not != GM_INTRO I think
18:11:45 <peter1138> I'd advise not changing the if condition at all.
18:11:59 <peter1138> It comes can unrelated change/cleanup.
18:12:13 <Samu> but... it's already ensured that it's not GM_EDITOR
18:12:32 <glx> may be GM_BOOTSTRAP ;) (probably never)
18:12:38 <andythenorth> 14 instances of CivilAI
18:12:47 <peter1138> And there's a difference between starting a company, and letting a company run.
18:12:47 <andythenorth> are slowly turning all town buildings into RV depots
18:13:27 *** Progman has joined #openttd
18:13:28 <peter1138> andythenorth, they overbuild? haha
18:13:33 <peter1138> That's not very... civil.
18:14:20 <andythenorth> I am not testing anything
18:14:27 <andythenorth> I just loaded 14 of them and let them run
18:14:45 <glx> I guess the if (_game_mode == GM_EDITOR) return; should be if (_game_mode != GM_NORMAL) return; and no need to check _game_mode later, but as peter1138 said it's not related to this feature
18:14:52 <andythenorth> the complete nerf of FFWD is the most interesting 'test' result :P
18:15:53 <glx> oh no I'm wrong, the function is required for the intro game
18:16:23 <glx> because it's a "real" game
18:16:49 <glx> so yes don't change the conditions :)
18:17:04 <planetmaker> actually... the introgame can also contain AI.
18:17:14 <planetmaker> it can contain everything a normal game can
18:17:20 <planetmaker> We just don't ship any with extensions
18:18:07 <peter1138> We'd then have to include an AI with the game, which... we don't do.
18:18:16 <Samu> "create an AI for the intro game!"
18:18:44 <planetmaker> but maybe it would be indeed an interesting idea... Then something could in principle be built.
18:18:55 <glx> right it can have a running AI, but don't start a new one
18:20:29 <glx> an AI working only in the visible section of the map, and maybe a game script to give it money when needed ;)
18:20:33 *** gelignite has joined #openttd
18:20:51 <planetmaker> yep... but a GS could do that alone actually
18:20:58 <planetmaker> at least *I think so*
18:21:28 <planetmaker> and it can switch to company context
18:21:36 <planetmaker> and throw away your money by bulldozing sea :P
18:21:50 <glx> no need it can take your money directly :)
18:21:56 <planetmaker> or better killing houses and additionally reducing your standing with local authority
18:22:23 <planetmaker> yes, it could do that. But where's the fun in that? :P Make it look like *you* are stupid ;)
18:22:47 <planetmaker> GS_evil_employee :P
18:23:13 <glx> "hey player, it's time to pay your GS tax"
18:24:12 * andythenorth has been thinking about newgrf spec
18:24:45 <glx> a tax for properties, a tax for vehicle pollution, ...
18:25:17 <planetmaker> "sorry, this vehicle has been shut down, permission to use it revoked" ;)
18:28:23 <DorpsGek_II> [OpenTTD/DorpsGek-github] pyup-bot opened pull request #22: Scheduled monthly dependency update for February https://git.io/fhSvB
18:28:27 <DorpsGek_II> [OpenTTD/DorpsGek-github] pyup-bot commented on pull request #21: Scheduled monthly dependency update for January https://git.io/fhSvR
18:28:28 <DorpsGek_II> [OpenTTD/DorpsGek-github] pyup-bot closed pull request #21: Scheduled monthly dependency update for January https://git.io/fht9w
18:29:18 <DorpsGek_II> [OpenTTD/DorpsGek-irc] pyup-bot opened pull request #18: Scheduled monthly dependency update for February https://git.io/fhSvu
18:29:19 <andythenorth> oh pyup is scary :P
18:29:21 <DorpsGek_II> [OpenTTD/DorpsGek-irc] pyup-bot commented on pull request #17: Scheduled monthly dependency update for January https://git.io/fhSvz
18:29:22 <DorpsGek_II> [OpenTTD/DorpsGek-irc] pyup-bot closed pull request #17: Scheduled monthly dependency update for January https://git.io/fht9o
18:29:34 <andythenorth> all your upstream belongs to us :P
18:30:19 <DorpsGek_II> [OpenTTD/DorpsGek-runner] pyup-bot opened pull request #13: Scheduled monthly dependency update for February https://git.io/fhSvg
18:30:20 <planetmaker> 33$ bill for our CDN from DigitalOcean for January...
18:30:23 <DorpsGek_II> [OpenTTD/DorpsGek-runner] pyup-bot commented on pull request #12: Scheduled monthly dependency update for January https://git.io/fhSv2
18:30:24 <DorpsGek_II> [OpenTTD/DorpsGek-runner] pyup-bot closed pull request #12: Scheduled monthly dependency update for January https://git.io/fht9i
18:30:25 <planetmaker> not too little tbh
18:30:46 *** octernio_ has joined #openttd
18:31:11 *** octernio_ is now known as octernion
18:32:04 <andythenorth> kind of wondering about reference grfs
18:32:13 <andythenorth> shipped with nml maybe
18:32:23 <andythenorth> not just the tutorials, but specific test cases
18:32:49 <planetmaker> the regressions folder of NML is a good case. There is (was?) an examples folder, too
18:33:08 <andythenorth> yes, I've been somewhat maintaining them
18:33:53 <andythenorth> which would be better, a reference grf per feature? Or a single reference grf covering all features?
18:34:20 <Samu> hmm i have a problem loading a savegame in multiplayer and making the server start as spectator
18:34:51 <Samu> i am in some weird mode between spectator and company 1
18:34:56 <Samu> not really one or the other
18:35:08 <glx> GUI server assume you are in company 1 at start
18:35:41 <glx> dedicated has no active client until first connection
18:35:59 <planetmaker> andythenorth, I think smaller grfs would work better. Especially wrt maintaining it
18:36:09 <Samu> it's a server still, but with gui
18:36:33 <glx> yes not dedicated assume there's a client (you) connected to first company
18:39:13 <andythenorth> peter1138 newgrf spec changes, what's your ideal reference grf look like?
18:39:36 <andythenorth> I hate testing newgrf PRs, it's really fiddly to set everything up
18:41:31 <Samu> must be somewhere about client #1 being defined as playing in company 1, where is it
18:43:22 <Gabda> is it possible to delete town in scenario editor?
18:44:00 <Eddi|zuHause> there should be a hard to overlook "delete" button in the town window
18:45:40 <Gabda> I searched in the town generation window
18:46:34 *** Vasatko has joined #openttd
18:50:57 <Samu> it's somewhere else than there
18:51:36 <glx> then something is done based on LocalCompany value
18:51:54 <glx> but the starting point is there
18:56:14 <Samu> that works for single player load game
18:56:43 <Samu> for multiplayer load game, gui thinks i'm spectator, network things i'm playing on company 1
19:01:00 <glx> what's the value of _local_company ?
19:02:25 <Samu> i'm 80% sure it's COMPANY_SPECTATOR
19:07:48 <Samu> changed line 806 of afterload.cpp a bit
19:08:06 <Samu> it's still not totally fixed, something yet is defining me as playing in company 1
19:14:05 <Samu> ah, think i found something
19:15:34 <Gabda> question about deleting a town: if the CmdDeleteTown starts with "_game_mode != GM_EDITOR && !_generating_world" it means that town cannot be deleted from game script?
19:16:14 <Gabda> if (_game_mode != GM_EDITOR && !_generating_world) return CMD_ERROR; to be more specific
19:16:43 <glx> seems a good location Samu
19:16:55 <peter1138> It means it must be either in the editor, or generating the world.
19:17:21 <peter1138> GS won't be running in either of those conditions, of course.
19:17:37 <Gabda> and is there any other place a town can be deleted?
19:18:22 <Gabda> I mean is there an other function that can do this?
19:18:37 <Gabda> (I really hope that there isn't)
19:19:06 *** Thedarkb-T60 has joined #openttd
19:19:22 <Samu> yep, this was it, i'm finally 100% spectator (I think)
19:19:24 <peter1138> No, looks like the code to do the actual deletion is also in that command.
19:20:59 <Gabda> thanks for confirming :)
19:21:49 <glx> but there should be no company at all if you start a newgame in this case
19:22:27 <Samu> there was a human company in the savegame
19:22:41 <Samu> i loaded this save in multiplayer
19:22:48 <Samu> and im finally put into spectator
19:23:00 <glx> you should have tested with a new game, easier to spot :)
19:23:36 <Samu> with a newgame there was no problem, or was there?
19:23:48 <Samu> now you got me thinkng...
19:25:32 <peter1138> Oh, I have to rebase 7148 :(
19:25:51 <peter1138> Which "ironically" is there to make rebases easier :p
19:28:51 <andythenorth> made running cost of £1.3m for a train
19:29:20 <andythenorth> oh super realistic
19:29:30 <andythenorth> it's the exact RL cost of running a pixel train
19:29:32 <Gabda> burn money instead of coal
19:29:59 <glx> Samu: was a company created with newgame ?
19:30:54 <Samu> no company was created on new game, but... i didn't check 'clients'
19:31:02 <Samu> wondering what would it say
19:31:18 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhDIU
19:31:47 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhSfo
19:34:00 <Samu> no companies, and yet I'm in company 1
19:36:13 <Samu> which index is company 0?
19:37:53 <Samu> so yeah, it was also wrong
19:39:58 <Samu> ci->client_playas = _network_dedicated || _settings_client.gui.ai_developer_tools ? COMPANY_SPECTATOR : COMPANY_FIRST;
19:40:11 <Samu> ps: have yet to create the setting
19:40:11 <TrueBrain> planetmaker: please be careful reading the wrong things into PDFs :) The CDN is only 5 dollar; the rest is the new infrastructure :)
19:41:32 <Wolf01> andythenorth: ford mustang
19:43:02 <Samu> i had a weird idea for the intro game
19:43:37 <glx> Samu: MakeNewGameDone() creates a company unless it's a dedicated server, but it doesn't check _network_dedicated
19:46:16 <Samu> i've edited that part already glx
19:46:18 <Samu> if (!_settings_client.gui.ai_developer_tools) {
19:46:18 <Samu> /* Create a single company */
19:46:46 <Samu> that's not going to be the final setting, i'm just too lazy to create the real setting
19:47:15 <peter1138> There are of course new blitters since I wrote it. Oh well.
19:49:21 <Samu> cheat_gui.cpp is where I need to make the most drastic changes, apparently
19:49:45 <Samu> playing as company 256 when it's actually not a company, that's the spectator slot
19:50:58 <Samu> haven't tested heightmap yet
19:51:07 <Samu> hope it's the same as play scenario
19:52:22 <Samu> there is no multiplayer mode for scenario editor from what I can gather
20:00:02 <andythenorth> Wolf01: any pics yet, besides Liebherr video?
20:00:45 <Samu> play heightmap in multiplayer is doing fine too
20:00:54 <Samu> play scenario in multiplayer is doing fine
20:00:59 <Samu> load game in multiplayer is doing fine
20:02:04 <Samu> i guess it's time to actually stop being lazy and create a setting
20:03:05 *** Gustavo6046 has joined #openttd
20:07:12 <Wolf01> Some pics from the video...
20:12:14 <Samu> it's been a while last time I created a setting, i'm rusty
20:16:04 <andythenorth> consistency is over-rated
20:16:31 <peter1138> Hmm, just dug something out the bottom of the freezer.
20:16:33 <andythenorth> they're internally consistent, it's two action dialogs, and one message
20:16:40 <peter1138> Best before 2013...
20:17:14 <andythenorth> was it pork medalions, in butter, lime, rosemary, curry leaves, with rice and greek salad?
20:17:28 <peter1138> There is some very old meat though :(
20:17:31 <peter1138> I suspect it'll be dog food.
20:17:36 <Samu> bool start_as_spectator; ///< activate a spectator slot in single player and start every game mode as a spectator
20:17:38 <andythenorth> meat tends to freezer burn after 3 years or so
20:17:44 <andythenorth> fibres break out
20:18:13 <Samu> game mode may be the wrong wording
20:18:15 <andythenorth> this week has been a big week for food
20:18:17 <peter1138> nielsm, try making them match, but I think it'll also look weird as we're used to their colours.
20:18:21 <andythenorth> usually I eat fishfingers
20:18:30 <peter1138> I keep buying stuff :(
20:18:33 <peter1138> I haven't needed to.
20:19:38 <nielsm> peter1138 yeah I'm matching the Abandon Game dialog
20:20:40 <nielsm> just thought of an annoying thing... also have to handle the overwrite case where the user typed an existing name but did not click a file
20:22:19 <peter1138> You mean you check for an overwrite by just testing if a file is clicked? Haha!
20:22:43 <nielsm> that's actually what the previous unique ID patch does
20:22:44 <peter1138> Probably better just to check if the file can be opened, then it's only one test.
20:22:51 <nielsm> it doesn't even check if you changed the name after clicking
20:23:11 <nielsm> if (FioCheckFileExists(_file_to_saveload.name, Subdirectory::SAVE_DIR)) ask_user()
20:23:29 <peter1138> Looks simple enough.
20:29:22 <nielsm> and because of changing "Overwrite file?" to "Overwrite File" in english.txt everything must be rebuilt
20:30:54 <nielsm> and it should probably _not_ write the file if you click No
20:33:13 <peter1138> Hmm, so it still overwrote the file anyway?
20:33:36 <nielsm> forgot to test the "confirmed" variable in the callback
20:33:38 <Wolf01> <nielsm> it doesn't even check if you changed the name after clicking <- looks like windows XP
20:34:28 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh opened pull request #7156: Add: Warn before overwriting an existing save file https://git.io/fhSJr
20:34:56 *** Guest73 has joined #openttd
20:34:59 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh closed pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting https://git.io/fhPV0
20:35:00 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7128: Add: Unique ID to savegames to prevent accidental overwriting https://git.io/fhSJo
20:35:18 *** frosch123 has joined #openttd
20:35:36 <peter1138> Yeah this is much simpler :)
20:56:39 <LordAro> andythenorth: you can horse when there are less than 40 PRs
20:57:24 <peter1138> There are less than 40 PRs...
20:59:55 <andythenorth> algorithmic run costs are a total PITA
21:03:20 <TrueBrain> okay, NL mirror was broken, nightlies were not published; fixed now \o/
21:03:32 <TrueBrain> just when you land on the website, it doesn't invalidate the content .. so you dont see it till you reload
21:03:52 <TrueBrain> ETag should take care of that, tbh
21:04:06 <peter1138> Have some of this chocolate cake.
21:04:11 <peter1138> Otherwise I'll eat it and then regret it.
21:04:19 <TrueBrain> now I am regretting eating it :(
21:04:56 <Eddi|zuHause> TrueBrain: there was a question about updating finger.openttd.org
21:05:15 <TrueBrain> there was an issue I answered
21:05:20 <TrueBrain> yeah .. he should just read the issue tracker :)
21:06:05 <Eddi|zuHause> i haven't really followed it
21:06:17 <TrueBrain> not sure what to do with it exactly .. shutting down finger is easiest
21:06:30 <TrueBrain> there is no real way of informing people
21:06:41 <peter1138> Hmm, when resolving conflicts, is there a way to show "ours" and "theirs", rather than a confusing diff?
21:06:53 <TrueBrain> many GUIs do that peter1138 :)
21:06:54 <Eddi|zuHause> TrueBrain: RSS feed! :p
21:07:21 <TrueBrain> well, it is a bit annoying .. I can update finger, kinda, but even people that use it will try to use the wrong URL to fetch the binaries
21:07:58 <TrueBrain> meh; still not sure what to do with it
21:08:20 <peter1138> Ok, well this isn't intuitive :D
21:09:29 <LordAro> peter1138: vimdiff is great
21:09:54 <peter1138> which is LOCAL, which is BASE and which is REMOTE?
21:09:55 <LordAro> the colour scheme i use for vim normally means most of the screen is bright pink, including some of the text colour
21:10:12 <peter1138> And the bottom window? o_O
21:10:14 <LordAro> the bottom is the merged version
21:10:27 <peter1138> which is LOCAL, which is BASE and which is REMOTE?
21:10:43 <LordAro> one is working, one is left, one is right
21:10:49 <LordAro> i ususally look at their contents to work out which
21:11:09 <LordAro> s/left/from/ s/right/to/
21:11:21 <TrueBrain> Eddi|zuHause: left a new comment, possibly it helps :)
21:11:28 <TrueBrain> Eddi|zuHause: tnx for the poke btw :)
21:11:47 <TrueBrain> right ... what to fix this weekend ... hmm ... we should have a poll about what I should do next, I guess :D
21:11:47 <peter1138> LordAro, and... what do I have to do?
21:12:03 <peter1138> It seems I can change all 4 windows
21:12:33 <LordAro> like i said (implied) i don't properly understand it :p
21:12:48 <LordAro> you definitely want the end result in the bottom window though
21:13:18 <peter1138> "the bottom buffer contains the file you can actually edit"
21:13:44 <Eddi|zuHause> TrueBrain: the listing.txt file, how future proof is that? new entries are added at the bottom, so you have to download the whole file, and how much will this grow over time?
21:14:18 <Eddi|zuHause> TrueBrain: i'm assuming here people who used finger before are only interested in the newest entry, not the whole history
21:14:33 *** Gustavo6046 has joined #openttd
21:27:58 <peter1138> I need to rework this :/
21:29:00 <Eddi|zuHause> <peter1138> which is LOCAL, which is BASE and which is REMOTE? <-- i never worked this out
21:29:28 <peter1138> I was going to tell you, but I've forgotten now :/
21:29:29 <glx> I'm used to <<<< ==== >>>>> marks
21:29:45 <peter1138> glx, sometimes that doesn't give you enough context.
21:36:41 <glx> I already have winmerge, so using it seems to be a good idea
21:40:28 <glx> but I should update it first, my installed version is quite old and doesn't have 3-way comparison :)
21:41:29 <glx> oh nice my version is from 2009 :)
21:41:48 <Eddi|zuHause> that was basically yesterday, right?
21:42:07 <Eddi|zuHause> i've no clue what happened between 2009 and 2019
21:42:17 <andythenorth> did I mention how good it is that ffwd is fast?
21:44:07 <peter1138> andythenorth, was it not fast?
21:44:19 <andythenorth> it was very not fast
21:44:24 <andythenorth> now it very is fast
21:44:47 <andythenorth> one game year is about 12 seconds
21:44:52 <andythenorth> if I close all vehicle windows
21:44:55 <andythenorth> and have no AIs running
21:44:59 <andythenorth> and turn off full animation
21:45:05 <andythenorth> and go to the corner of the map
21:46:14 <peter1138> That seems excessively fast.
21:46:32 <LordAro> that is suspiciously fast
21:46:37 <peter1138> Should we do The Sims style FFWD? :p
21:46:59 <peter1138> LordAro, I think he's enabled RTX ON.
21:48:06 <andythenorth> if I put full animation on, it slows, the palette animation is a real CPU suck
21:48:36 <andythenorth> drops to about 60s for a game year
21:48:57 <andythenorth> if I put the viewport on a busy part of the map it tanks a lot more
21:49:06 <andythenorth> can't figure out if that's towns, or animated industries causing that
21:49:44 <nielsm> doing palette animation with gpu shaders could be a massive win, I suspect
21:50:04 * LordAro looks at michi_cc's opengl branch
21:50:16 <andythenorth> it used to be fast, a long time ago
21:50:18 <nielsm> turning it back into the hardware table lookup it used to be in 8bpp display modes
21:50:20 <andythenorth> then something changed
21:50:33 <peter1138> Yes, operating systems stopped support 8bpp stuff.
21:51:46 <LordAro> nice, mine's about 13s
21:52:27 <LordAro> oh, that's with full animation on as well
21:52:49 <Eddi|zuHause> try the null driver? :p
21:53:12 <LordAro> turning animation off is much faster
21:54:31 <peter1138> Did somebody improve things somewhere? ;)
21:54:54 <peter1138> Or even... break it?
21:55:34 <Eddi|zuHause> dunno, with fullscreen i get maybe 1s per day, with a really small window i get about 2s per month
21:56:15 <andythenorth> if this is 'broken', I'll take it
21:56:32 <andythenorth> typically the viewport is over populated parts of the map, which are much much slower
21:57:23 <glx> pff I hate microsoft compatibility telemetry, it always starts when I don't want, and it makes the CPU fan spin
21:58:14 <LordAro> ok, 1440p maximised window, fully zoomed out 256x256 map (can see the whole thing), full animation turned off - 2.7s/year
21:58:24 <Eddi|zuHause> sounds like something to be disabled
21:58:50 <LordAro> (Windows 10, compiled with MinGW, i5 6600k)
22:00:05 <Eddi|zuHause> LordAro: how is your screen 100x faster than mine?
22:00:30 <DorpsGek> Samu: Samu was last seen in #openttd 1 hour, 41 minutes, and 31 seconds ago: <Samu> english!!
22:00:50 <andythenorth> Eddi|zuHause: what CPU?
22:01:16 <LordAro> intel's single core speed is usually pretty special
22:01:47 <peter1138> This will be my window tick refactoring stuff, yes?
22:02:01 <Eddi|zuHause> andythenorth: AMD Phenom(tm) II X6 1055T
22:02:16 <andythenorth> wonder if it's an architecture thing
22:03:17 <LordAro> mm, Amd do suffer a bit with single threaded performance
22:03:20 <Eddi|zuHause> well, it's a few years old by now...
22:03:38 <Eddi|zuHause> i was considering getting a Ryzen for over a year now...
22:03:44 * LordAro tries setting -march=skylake, just for funsies
22:05:11 <TrueBrain> Eddi|zuHause: yeah, I noticed that too; mostly that I linked listing.txt instead of latest.txt; that is the most useful I am sure :D
22:05:18 <TrueBrain> and not a bad idea, to flip the order in listing.txt
22:05:26 <TrueBrain> possibly limit it to 90 or something too
22:05:43 <TrueBrain> planetmaker: lemme know if you need more help :)
22:07:05 <planetmaker> I tried the first version and yesterdays version as listed in listing.txt. No particular reason for any of those
22:07:45 <peter1138> Hmm, I wondered if it was only updating viewports every 30ms too, but it goes super smooth on FFWD still, so dunno.
22:07:50 *** Thedarkb1-T60 has joined #openttd
22:07:51 <planetmaker> latest.txt is excellent. For the server :)
22:08:40 <planetmaker> I guess I now have all the info to update the server scripts
22:10:21 <LordAro> "-Ofast -march=skylake" results in 2.4s/year
22:10:30 <LordAro> probably not worth the bother
22:10:42 <peter1138> Ah, the reason it is so fast now is that in FFWD it actually doesn't update the screen faster than 1000fps.
22:11:02 <peter1138> So the gameloop is still running without updating the screen.
22:11:25 <andythenorth> can we make nmlc go this fast too? :P
22:11:26 <peter1138> window.cpp:3096: if (delta_ms == 0) return;
22:11:47 <peter1138> So on an empty map...
22:14:12 <peter1138> I guess the next trick would be to update windows while it's idle
22:14:23 <peter1138> Then you get supersmooth scrolling outside of FFWD.
22:15:25 <peter1138> I think it's a one-liner.
22:15:38 <LordAro> but means a core is maxed out constantly?
22:17:08 <peter1138> I mean no, it's not a one-liner cos it didn't work.
22:17:14 <nielsm> more important imo to update the gui when the simulation is running slow :(
22:17:30 <peter1138> nielsm, that's not possible.
22:17:31 <nielsm> at the very least allow mouse movement
22:18:11 <peter1138> Better to work on hardware mouse cursor.
22:18:56 <nielsm> peter1138, I wonder, what if you really did put simulation on a separate thread, and synchronized with gui on every DoCommand?
22:19:19 <nielsm> as well as when a tick was simulated allow the gui to update world viewports
22:19:36 <nielsm> (it'd be a full year project probably)
22:20:34 <peter1138> You don't need to synchronize the GUI on every DoCommand.
22:20:46 <peter1138> You need to synchronize it with... game state.
22:20:56 <nielsm> yeah got it the wrong way around
22:23:04 <peter1138> I'm seeing simulation rate in the 5000s
22:23:22 <peter1138> Ah, it's dropping as more AIs start up.
22:24:05 <peter1138> So when idling, there's a Sleep(1)
22:24:12 <peter1138> When in FFWD, there's no sleep.
22:24:40 <peter1138> So it's expected to go as fast as possible. Just now that's really fast because it really doesn't update anything on the screen unless 1 ms has passed.
22:25:02 <glx> so it signals video driver thread mor often
22:25:03 <peter1138> Well, that's not quite right.
22:25:27 <peter1138> I dunno how it works, I just made it happen :p
22:26:30 <peter1138> If you are in some feature branch that later got merged into master, then technically master would contain that commit.
22:26:36 <peter1138> But it wouldn't be master.
22:26:59 <peter1138> So I reckon it'd also be wrong info.
22:27:26 <peter1138> That's not going to happen with the main repo, but it's possible for a local merge to happen. Small chance :p
22:27:33 <nielsm> as that PR stands now, the branch name is never included in the network or gamelog revision string, unless the build is marked as Release
22:27:50 <peter1138> What makes a Release build again? I dunno
22:27:53 <nielsm> so what the branch name is does not actually matter
22:28:07 <peter1138> I think that's correct.
22:28:08 <nielsm> I think someone changed a bit in rev.cpp
22:28:29 <peter1138> I was going back on the thought that it might be nice to know what version is needed from the server list.
22:28:36 <peter1138> But it's still wrong, so it doesn't matter.
22:29:17 <peter1138> This is just how git works compared to svn.
22:29:40 <TrueBrain> nielsm: do I get it right, that nightlies now will show as a githash in the server listing?
22:30:03 <TrueBrain> that is what we expect/want too?
22:30:06 <peter1138> Any non-release build.
22:30:20 <peter1138> How does some self-build a release build to be compatibler?
22:30:21 <TrueBrain> (as again, it will show up in the server listing :)
22:30:25 <nielsm> TrueBrain yeah that's the problem
22:30:31 <Samu> _settings_client.gui.start_as_spectator ///< activate a spectator slot in single player and start every game mode as a spectator
22:30:34 <nielsm> there's two opposite requirements
22:30:40 <peter1138> TrueBrain, with git branches it's not possible to get the branch name unless you are at HEAD.
22:30:45 <Samu> what shall be the name of the setting?
22:30:55 <nielsm> one is making sure clients identify accurately to servers, the other is users being able to recognize which client version they need from the server listing
22:30:58 <TrueBrain> nielsm: I am just asking :) I dont mind as much the answer; more that you realise it is also user facing :)
22:31:14 <peter1138> (Unless you use git reset --hard to get to the correct revision, but that's ugly)
22:31:26 <TrueBrain> peter1138: what nielsm says
22:31:35 <glx> not possible to have a special packet for the server name ?
22:31:43 <nielsm> my best suggestion for usability would be keeping a lookup table on the web server browser that translates revision strings to human readable
22:31:48 <TrueBrain> nielsm: I guess it is a matter of what we currently prefer to happen
22:32:03 <glx> yes I know it's UDP and not "fiable"
22:32:04 <TrueBrain> nielsm: it is not only on the web; also ingame etc
22:32:05 <peter1138> TrueBrain, if i "git checkout $lastnightlyshahash" and build that, the branch name is not master.
22:32:33 <TrueBrain> nielsm: so I guess the choice is: either show the client what he can expect, or do the right thing on network validation level
22:32:52 <Samu> start_as_spectator? spectator? spectator_mode? some other more fitting name?
22:32:58 <TrueBrain> like I mentioned a few days ago; I guess the UDP protocol needs a bit of love in general
22:33:03 <TrueBrain> as these should be 2 fields or something
22:33:04 <nielsm> unless we introduce a new packet in the protocol for additional server info
22:33:22 <nielsm> should look at what JGR does for "unlimited" newgrfs on network games
22:33:24 <peter1138> TrueBrain, yes, 2 fields was what I was thinking.
22:33:27 <TrueBrain> we can of course make it two steps
22:33:32 <peter1138> One is just the sha hash
22:33:37 <peter1138> The other a readable name.
22:33:51 <TrueBrain> for example, keep the human readable now, work towards changing the protocol (and MSU), and fix it properly later
22:34:25 <glx> indeed first packet with the basic required data, like version check, then another with user friendly info
22:34:39 <peter1138> how much bits of sha hash do you really need to be unique?
22:34:54 <nielsm> 40 bits is generally enough
22:34:56 <TrueBrain> nielsm: for example, take the first 24 chars from the branch, and the other from the hash
22:35:13 <TrueBrain> a solution "somewhere in the middle"
22:35:23 <TrueBrain> (far from perfect, but .. meh)
22:35:26 <peter1138> If you set the network revision string to "g012346789-20190201-master"
22:35:34 <peter1138> Then you could make the compatibility check stop at the first -
22:35:39 <nielsm> 'git log' uses 7 hex digits for shortrevs for me atm
22:35:45 <nielsm> so presumably that's enough to be unique
22:35:52 <TrueBrain> nielsm: in latest git, this '7' is dynamic; as a FYI
22:35:59 <TrueBrain> it can change to 8 if there is a conflict
22:36:14 <peter1138> In theory the g0123456789 is then "unique" enough
22:36:28 <peter1138> And you still get usable info, at least from the official nightlies
22:37:01 <peter1138> Or am I talking to myself? :D
22:37:06 <nielsm> I had a previous version of that patch where I took the full revision string (date-branch-rev) and overwrote the last 10 bytes of it with a fresh rev prefix, if the rev part was truncated
22:37:30 <nielsm> so it'd truncate branch name but still include enough git hash to find the exact revision
22:37:57 <TrueBrain> another approach is to do a bit more work: the MSU could use a rewrite (it is now written in C++ .. it is not nice). I can help with that. We can bump the UDP protocol version, drop 1 or 2 NewGRFs (for now), and add a full field to the protocol
22:38:09 <TrueBrain> takes a bit more effort, but might be a more proper fix
22:38:12 <peter1138> I'd say doing a compare of just a part of the revision string is a good compromise for now.
22:38:53 <LordAro> TrueBrain: post 1.9, perhaps?
22:39:01 <LordAro> it's about time there was a beta :)
22:39:07 <peter1138> So "g012345679" would match "20190201-master-g0123456789"
22:39:15 <peter1138> Erm, no it wouldn't
22:39:18 <peter1138> So "g0123456789" would match "20190201-master-g0123456789"
22:39:21 <TrueBrain> LordAro: if you help, we can try to release a beta this weekend
22:39:33 <peter1138> ^ nielsm doable? already done?
22:39:38 <LordAro> i can probably do some things
22:39:40 <nielsm> bool IsNetworkCompatibleVersion(const char *other)
22:39:45 <nielsm> is a function that exists and is used
22:39:48 <nielsm> can make it do whatever
22:40:21 <peter1138> I think it'd be useful for people using prebuilt binaries to know that they are on LordArosPatchPack or whatever...
22:40:24 <planetmaker> <nielsm> should look at what JGR does for "unlimited" newgrfs on network games <-- nothing. He advertizes it as SP-feature only
22:40:28 <nielsm> right now it's a strict strncmp check
22:40:45 <peter1138> Wasn't it cirdan who did the unlimited newgrfs?
22:40:58 <peter1138> nielsm, just compare the shahash (and modified) part?
22:41:17 <TrueBrain> nielsm: if you like, you can locally run a MSU and see what shows up to clients btw
22:41:18 <nielsm> "Up to 256 NewGRFs in multiplayer (added in v0.25.0)" <-- copied from JGRpp feature list
22:41:55 <glx> why so many newgrfs in a single game ?
22:42:08 <nielsm> yeah sounds like a bad idea imo but eh
22:42:31 <Samu> i'm ruining existant comments
22:42:38 <glx> well with ECS you can eat a lot of newgrf slots
22:42:59 <LordAro> left a game running, after 700 years i'm losing 13 billion a year on loan interest ^^
22:43:50 <LordAro> currently at -£4 trillion
22:44:12 <TrueBrain> LordAro: what would help me most, if we branch 1.9 and tag the beta, with all the stuff that is needed for that
22:44:18 <TrueBrain> someone needs to figur eout how we want to do that in git
22:44:27 <andythenorth> you need all those newgrfs for separators
22:44:31 <LordAro> TrueBrain: betas aren't usually branched
22:44:33 <andythenorth> in the newgrf menu
22:44:40 <Samu> /* When replaying the client ID is not a valid client; there* are actually no clients at all. However, the company has to* be created, otherwise we cannot rerun the game properly.
22:44:47 <Samu> someone explain me what is this?
22:44:51 <TrueBrain> really? Owh :D Is that what we still want?
22:44:58 <TrueBrain> either way, is 'master' prepared to be beta1?
22:45:30 <glx> debug desync stuff I think Samu
22:46:05 <TrueBrain> frosch123: any insights? :)
22:46:05 <nielsm> peter1138, TrueBrain, re-add the network revision string mangling so branch name is included, but truncated git hash is re-inserted too?
22:46:20 <TrueBrain> nielsm: sounds like a good compromise
22:46:32 <peter1138> nielsm, as long you can get enough in. You made the revision string longer as well, right?
22:46:44 <peter1138> TrueBrain, there's some nice PRs we should get in first, I reckon.
22:46:57 <nielsm> yes I increased it from 14 to 32 characters (15 to 33 with nul included)
22:47:03 <TrueBrain> peter1138: won't there always be PRs like that? :D
22:47:33 <nielsm> go over open PR's and add those wanted features/fixes to the 1.9 milestone?
22:47:37 <peter1138> Oh, hmm, depends on the branch/not-branch thing.
22:47:41 <TrueBrain> sounds like a good idea nielsm!
22:47:44 <TrueBrain> also for issues, I guess
22:47:53 <peter1138> I'm checking out the overwrite patch
22:48:02 <TrueBrain> I am used to branching on beta, so master can continue doing its thing
22:48:07 <TrueBrain> but .. no clue what we want for OpenTTD
22:48:20 <frosch123> TrueBrain: what's the question? "beta" is our definition for tagged nightly from master. if we branch, we call it rc
22:48:39 <TrueBrain> is master prepared to be called beta1?
22:49:10 <glx> nielsm: and you can save a byte if you mix g, m and u
22:49:30 <TrueBrain> LordAro: okay, this means I can rephrase it: I have everything ready to make a release based on master. So if that is what is needed, I can release a beta1 at any moment, as far as I am aware
22:49:31 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN approved pull request #7156: Add: Warn before overwriting an existing save file https://git.io/fhSTy
22:49:39 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7156: Add: Warn before overwriting an existing save file https://git.io/fhSJr
22:49:45 <TrueBrain> so tell me when you want it, and I can most likely serve it :)
22:50:17 <frosch123> a beta would still be a tag
22:50:26 <frosch123> so there is no difference for the farm, is there?
22:50:30 <TrueBrain> mostly for findversion.sh I guess :D
22:50:45 <TrueBrain> the main difference is the amount of targets, and where it publishes the files
22:50:46 <frosch123> so we should do a beta just to test that :p
22:50:57 <LordAro> changelog & readme & friends should be updated, ofc
22:50:58 <peter1138> You can test findversion.sh with a local tag, right?
22:51:01 <glx> beta is just a special nightly
22:51:06 <peter1138> Or did you mean test the CF :D
22:51:26 <peter1138> LordAro, oh. Yes, documentation.
22:51:36 <TrueBrain> I like the idea of putting all issues/PRs in the 1.9 milestone we want
22:51:41 <peter1138> Did the 2018->2019 copyright update get done?
22:51:55 <TrueBrain> if we all agree, we can look into a beta1, to test-run the system, so to say
22:52:32 <TrueBrain> in all cases, please dont tag before poking me; I want to try to autobuild on tag :D
22:52:44 <TrueBrain> that would be ideal, for me .. just when ever a tag is pushed, build and publish a release
22:53:01 <peter1138> Is it acceptable to update all the langs at once for 2018-2019 or will eints fuck me over again?
22:53:11 <glx> and I think there's no need for a feature freeze for beta, only with RC and stable
22:53:20 <frosch123> peter1138: eints takes the newest available translation
22:53:37 <LordAro> my money wrapped around
22:53:47 <glx> frosch123: unless newest is empty ;)
22:53:49 <TrueBrain> glx: a feature freeze might be wise, but 'feature' freeze. Still means you can accept PRs etc :) Just nothing BIG of FEATURE like :)
22:54:11 <peter1138> Basically just NRT.
22:54:15 <LordAro> and only resized the finance window when it became positive
22:54:41 <TrueBrain> not NRT, not the other one .. TBTR :P
22:54:47 <TrueBrain> anyway, that would be my suggestion here :)
22:55:49 <glx> noticed some incorrect stuff, but it's too huge to be easily reviewable
22:56:13 <frosch123> glx: does it do any refactoring, or does it just add stuff?
22:56:15 <LordAro> i guess it's an overflowsafeint, rather than an underflowsafeint
22:57:01 <glx> and changes autoreplace GUI I think
22:57:06 <TrueBrain> but yeah, we should try to push for a 1.9 soon-ish .. we are already behind schedule I guess :D
22:57:26 <peter1138> LordAro, you left it running "that long" to overflow :)
22:57:39 <glx> only 2 months left for the stable release ;)
22:57:54 <LordAro> peter1138: year 3500 or so
22:59:00 <TrueBrain> but I am going to leave it to you guys to tell me when you want the first beta
22:59:20 <TrueBrain> I tested most things; just a real run is always .. well .. things tend to break the first time :D
22:59:39 <LordAro> definitely aim for this weekend, i'd say
23:02:42 <TrueBrain> I am guessing things like debian files need a bump or something too
23:02:56 <TrueBrain> or are they prepared for 1.9.0-beta1?
23:03:00 <LordAro> all the source files as well?
23:03:24 <peter1138> There is no date int the source files.
23:03:29 <planetmaker> nah, they don't have dates
23:03:29 *** Gustavo6046 has joined #openttd
23:03:40 <peter1138> Do we still need $Id$? :p
23:03:48 <peter1138> They did in the SVN days, it was placed there by SVN though.
23:04:17 <LordAro> it only did things for SVN, anyway
23:05:11 <Samu> github has a way to get openttd by svn
23:05:14 <glx> no there's an svn wrapper around git
23:05:41 <glx> and we removed all references to svn in our scripts
23:05:50 <planetmaker> 20190201-maste vs. 20190201--g5a5861f2
23:06:15 <peter1138> planetmaker, yes, this is what we were discussing about 30 minutes ago.
23:09:25 <peter1138> so "g" means normal, "m" is ... modified? What's "u"?
23:10:07 <peter1138> No, there must be git info.
23:10:11 <peter1138> Otherwise there'd be no hash.
23:10:25 <nielsm> determineversion.vbs sadly does not ever write 0 for the modified flag, so you can only get "unknown" and "modified" when using that...
23:10:49 <glx> hmm what happens with network_revision[NETWORK_REVISION_LENGTH - 1] = '\0'; if _openttd_revision was shorter ?
23:11:16 <nielsm> good question, it probably writes somewhere it should not!
23:11:53 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhDyC
23:14:41 <glx> and if the branch name is very very long all the branch will be replaced I guess, as it will find the '-' between date and branch
23:15:18 <nielsm> it searches for the - in the original string to find the offset
23:15:21 <LordAro> some of samu's branches, for instance :p
23:15:35 <nielsm> so it shouldn't overwrite the beginning or another word in the branch name
23:15:42 <peter1138> LordAro, one of mine ;)
23:15:42 <glx> oh right, wrong reading from me :)
23:16:20 <Samu> maybe tag it work in progress so it's not closed
23:17:02 <Samu> need yet to fix comments, the worst part
23:17:14 <Samu> all comments are assuming single player has no spectator
23:19:07 <peter1138> Hmm #7151 didn't trigger CI.
23:19:33 <TrueBrain> you now have the power to fix that :D
23:20:34 <peter1138> Can you tell me how? I don't know it would show up.
23:20:38 <TrueBrain> what would the server listing show nielsm?
23:21:02 <TrueBrain> refs/pull/<id>/head
23:21:05 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7150: Change: Make ships stop in locks to move up/down instead of following the slope. https://git.io/fhSku
23:21:18 <peter1138> TrueBrain, ah ok :-)
23:21:28 <nielsm> 20190201-fix-network-m5f30a8d976
23:21:40 <nielsm> is the value GetNetworkRevisionString returns
23:21:47 <TrueBrain> screenshot! :P (should show in LAN games too, right?)
23:21:52 <peter1138> Ah, because it's longer too, nice.
23:21:56 <glx> hehe was about to suggest strecat, but I remembered the "string too long" message :)
23:22:18 <peter1138> Manual build for me.
23:22:36 <TrueBrain> peter1138: gratz :D
23:22:46 <peter1138> nielsm, push, approve, commit.
23:23:35 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7121: Fix #7021: Better revision strings for network and gamelog https://git.io/fh6im
23:23:37 <peter1138> Oh, kinda confusing.
23:23:43 <nielsm> actually that's 10 digits of the hash
23:23:47 <peter1138> m5f30a8d976 in the network reviison
23:23:56 <peter1138> but g5f30a8d9M in the game revision
23:23:59 <nielsm> should maybe shorten to 8 digits?
23:24:07 <peter1138> I think those two should also match.
23:24:14 <peter1138> Or rather, display the same info.
23:24:36 <peter1138> 10 would be better than 8.
23:25:03 <peter1138> So, m5f30a8d976 in both?
23:25:43 <nielsm> that's a change to findrevision.sh and determineversion.vbs
23:27:11 <peter1138> g5f30a8d976M would be a minor change, I guess. But you lose another character.
23:27:30 <nielsm> yeah I'd rather not spend more bytes on that :)
23:27:41 <glx> hmm no return in ExtractNetworkRevisionHash ?
23:27:55 <glx> should check the PR maybe
23:28:40 <nielsm> yes I fixed that when compile failed ;)
23:30:29 <peter1138> Do we have any devs still running OS X? :p
23:30:42 <peter1138> andythenorth, test 7109 :p
23:32:05 <andythenorth> I'll have to go find a mouse too eh
23:32:35 <peter1138> I dunno, isn't it a touchpad thing?
23:32:45 <andythenorth> nah, it changes mouse behaviour too
23:32:46 <Samu> crap, cannot switch to spectator when all 15 companies exist
23:32:48 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog https://git.io/fhSkM
23:32:51 <andythenorth> that's one reason I didn't test yet
23:33:08 <andythenorth> have to go find a mouse in a cupboard
23:33:14 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7121: Fix #7021: Better revision strings for network and gamelog https://git.io/fhSkD
23:33:22 <peter1138> andythenorth, have you been Enterprising again? In your spare time?
23:36:18 <nielsm> determineversion.vbs and findversion.sh are not very much in sync, actually
23:36:34 <TrueBrain> the naming alone :P
23:36:46 <nielsm> determineversion.vbs will not include branch name if it's "master", findversion.sh will always include branch name
23:36:55 <TrueBrain> oops, that is my mistake
23:37:03 <TrueBrain> explains the error planetmaker just mentioned
23:37:08 <TrueBrain> findversion.sh is correct
23:37:14 <TrueBrain> I removed the 'master' thing recently
23:37:24 <TrueBrain> it should always include the branch name, even for master
23:37:29 <TrueBrain> would you mind fixing that? :D
23:38:16 <LordAro> andythenorth: #7109 :p
23:38:43 <andythenorth> mouse isn't here :P
23:39:22 <andythenorth> PR changes two things at once, I can test one of them :P
23:39:34 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhSkH
23:40:33 <nielsm> 20190201-fix-networkrevision-ma4cf8593c9 20190201 2 a4cf8593c9c710f7a33f9c7367656277db317a3e
23:41:10 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhSk7
23:42:56 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhSkd
23:44:24 <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #7158: Add: Client setting gui.start_spectator https://git.io/fhSk4
23:44:55 <andythenorth> so much running costs hacks
23:47:10 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhDIU
23:47:10 <glx> so nice a force push while I was reviewing
23:47:34 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7121: Fix #7021: Better revision strings for network and gamelog https://git.io/fh6im
23:48:02 <peter1138> Hmm, I should've used "extend" for the industry one for consistency, oh well.
23:48:29 <nielsm> hm maybe ought to have changed the commit message for the version scripts one
23:48:33 <nielsm> since it does more now
23:49:17 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhSkj
23:51:09 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhSIf
23:51:19 <peter1138> Whew, that was close, I nearly drank the sediment in my beer.
23:53:36 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhSIJ
23:54:00 <TrueBrain> tnx for fixing my mistake nielsm :)
23:56:15 <DorpsGek_II> [OpenTTD/OpenTTD] J0anJosep commented on pull request #7148: Switch saveload versions from literal numbers to enum values. https://git.io/fhSIU
continue to next day ⏵