Config
Log for #openttd on 18th April 2016:
Times are UTC Toggle Colours
00:00:01  *** FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has quit [Quit: There's a real world out here!]
00:09:45  <Samu> https://onedrive.live.com/redir?resid=23B29F3DE45F6F1F!1273&authkey=!ALxYnF4ONWf8Qvg&ithint=file%2cxlsx
00:09:56  <Samu> excel online
00:09:58  <Samu> much better
00:16:01  <Samu> bah, its bugged
00:27:30  <Samu> https://onedrive.live.com/redir?resid=23B29F3DE45F6F1F!1275&authkey=!AES3XpDoVoXDIRE&ithint=file%2cxlsx
00:27:34  <Samu> there, fixed
00:27:45  <Samu> cyas, good night
00:27:47  *** Samu [~oftc-webi@po-217-129-255-23.netvisao.pt] has quit [Quit: Page closed]
00:29:41  *** ABCRic [~ABCRic@95.85.3.239] has joined #openttd
00:35:49  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
00:40:34  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
00:57:19  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
01:00:54  *** Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Remote host closed the connection]
01:05:37  *** JezK [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has joined #openttd
01:07:39  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
01:08:56  *** Cybertinus [~Cybertinu@cybertinus.customer.cloud.nl] has quit [Ping timeout: 480 seconds]
01:15:44  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
01:20:39  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
01:26:17  *** liq3 [liq3@CPE-120-147-195-191.gdiv2.lon.bigpond.net.au] has joined #openttd
01:27:39  *** liq3 [liq3@CPE-120-147-195-191.gdiv2.lon.bigpond.net.au] has quit []
01:28:45  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
01:37:26  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
01:45:29  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
01:49:30  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
02:31:10  *** DDR [~David@S0106602ad0773a2e.vc.shawcable.net] has quit [Remote host closed the connection]
03:03:34  *** supermop [~supermop@pool-100-37-203-161.nycmny.fios.verizon.net] has quit [Ping timeout: 480 seconds]
04:04:10  *** Xal [~xal@S0106f0f2490b0073.vw.shawcable.net] has joined #openttd
04:05:02  *** Snail [~jacopocol@cpe-98-14-130-227.nyc.res.rr.com] has quit [Quit: Snail]
04:08:06  *** Clockworker__ is now known as BiG_CW_MF
04:10:54  *** JezK [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has quit [Ping timeout: 480 seconds]
04:16:09  *** sim-al2 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has quit [Ping timeout: 480 seconds]
04:20:31  *** JezK [~jez@2407:7800:400:107f:829c:d11d:8d1:6d2e] has joined #openttd
04:35:07  *** glx [~glx@000128ec.user.oftc.net] has quit [Quit: Bye]
04:51:39  *** JezK [~jez@2407:7800:400:107f:829c:d11d:8d1:6d2e] has quit [Ping timeout: 480 seconds]
05:01:20  *** JezK [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has joined #openttd
05:01:50  *** Clockworker_ [Clockworke@177.2.175.68] has joined #openttd
05:01:50  *** BiG_CW_MF [Clockworke@177.2.175.68] has quit [Read error: Connection reset by peer]
05:33:10  *** sla_ro|master [slamaster@89.136.141.100] has joined #openttd
05:49:40  *** Xal [~xal@S0106f0f2490b0073.vw.shawcable.net] has quit [Quit: bye]
05:56:29  *** GriffinOneTwo_ [~oftc-webi@adsl-68-123-206-120.dsl.irvnca.pacbell.net] has joined #openttd
05:57:17  <GriffinOneTwo_> so, I haven't done anything with Open TTD in many months, if not years, I ran across some neat photos of some passenger Terminus station in France somewhere, created an tt-forums account, created a off topic post (I thought I read the posting rules {I just reread, I don't see what I did wrong}), and got promptly banned?   Does that happen much, or is it likely I really screwed up?
06:14:03  *** GriffinOneTwo_ [~oftc-webi@adsl-68-123-206-120.dsl.irvnca.pacbell.net] has quit [Quit: Page closed]
06:24:45  <V453000> LOL
06:57:13  *** Ketsuban [~ketsuban@2a02:c7d:a34a:9000:4596:f7df:be02:f7ad] has joined #openttd
07:03:25  *** JezK [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has quit [Quit: :q!]
08:09:50  *** sla_ro|master [slamaster@89.136.141.100] has quit []
09:10:46  *** Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
09:11:01  <Wolf01> o/
09:18:41  *** Samu [~oftc-webi@po-217-129-255-23.netvisao.pt] has joined #openttd
09:19:04  <Samu> oh god, how dumb excel online is at calculating values on a table
09:19:26  <Samu> it is always automating stuff and ruining the calculations
09:47:20  <Samu> what is the average upload speed of openttd servers?
09:56:05  <Samu> okay, the idea I have about encoding vs uploading is to make openttd automate the choice of an encoding preset if you give ottd the upload rate of your internet connection, but this alone isn't enough. It also needs to know the capabilities of your cpu.
09:57:51  <Samu> goal would be to start encoding at the optimal preset to send that file to a client, but in this case it assumes the client download speed matches the upload speed of the server
09:58:40  <Wolf01> iiwdnti?
09:59:21  <Samu> uh?
09:59:45  <Wolf01> figure it
10:02:07  <Samu> the greatest unknown variable here is knowing the capabilities of your cpu
10:04:05  * Wolf01 reboots
10:04:07  *** Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
10:04:50  *** Quatroking [~Quatrokin@ip226-139-211-87.adsl2.static.versatel.nl] has joined #openttd
10:11:17  <Samu> i'll give an example, sort this by upload rate: https://onedrive.live.com/redir?resid=23B29F3DE45F6F1F!1271&authkey=!AAIUn3D6oXYFDM4&ithint=file%2cxlsx
10:12:12  <Samu> supposing you have a FX-8150, the calculated encoding speed for each presets are calculated on that sheet
10:12:38  <Samu> converting it to upload rates, you get an average speed of that encoder
10:13:12  <Samu> for my case, my internet connection has an upload rate of 3000 kbps
10:13:32  <Samu> I want then to exclude all the encoders which are slower than 3000
10:14:02  <Samu> they are the lzma presets from 5 to 9, these are excluded
10:14:39  <Samu> the best choice so far is then zlib preset 9 with 3591 kbps
10:15:22  <Samu> but now, i have to pay attention the resulting compressed size, and i start selecting those which result in fast encoding speeds from 3000 upwards
10:15:41  <Samu> have openttd find the smallest compressed size
10:16:09  <Samu> and i will end up with lzma preset 3
10:16:27  <Samu> this would be the choice
10:16:58  <Samu> given fx-8150 and an upload of 3000 kbps, tell openttd to encode with lzma preset 3 to send the file to a client joining the sever
10:19:04  *** Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
10:38:40  <Samu> is it a bad idea?
10:39:28  <Wolf01> yes
10:39:33  <Samu> :(
10:39:50  <Wolf01> what you are trying to do depends on too many variables
10:42:08  <Wolf01> or better, if you will update the sheet and ottd functions from now to eternity, it might be an idea
10:45:38  <Wolf01> also, what happens if I tell ottd I have 20M connection and I'm downloading stuff all the day? what happens if I use ottd from a thumb drive in more computers with really different specs?
10:49:29  *** Hiddenfunstuff [~Geth@y32.ip1.anvianet.fi] has joined #openttd
10:52:15  <Samu> i see :(
10:53:35  <Samu> biggest variable however, as I see it, is the cpu
10:55:07  <Samu> the internet upload rate would be a value you'd have to setup on a server config
10:55:48  <Samu> the value is used to exclude slower presets
10:55:58  <Samu> but i see what u mean with downloading all day
10:59:58  <Wolf01> you could implement a way to do some checks every time the game is started, but we already have the grf check which takes a lot of time, don't expect me to wait for connection check and hardware check too
11:14:31  *** TheMask96 [martijn@envy.vhost.ne2000.nl] has quit [Ping timeout: 480 seconds]
11:14:42  <Samu> the checking doesn't have to be on launching openttd
11:14:56  <Samu> but perhaps before server creation
11:15:03  <Samu> or on server creation
11:19:03  *** TheMask96 [martijn@pride.vhost.ne2000.nl] has joined #openttd
11:21:22  <Samu> hmm, maybe even during the duration of a server
11:22:49  <Samu> log the encoding time data each time a client joins
11:24:24  <Samu> then make use of that data to estimate capabilities of the cpu? hmm
11:24:31  <Samu> yeah... difficult
11:26:08  <Samu> actually, autosaves could serve this purpose
11:28:29  <Samu> use a different preset everytime an autosave is starting, log the time it took to compress for each preset
11:29:04  <Samu> ~but i see, this is not easy
11:29:12  <Samu> sometimes servers dont' have autosaves enabled
11:29:47  <Samu> ok, i give up
11:36:48  <Wolf01> why the single player game shouldn't benefit from the savegame compression too?
11:55:20  <Wolf01> V453000, does the steam version of factorio has drm?
12:03:10  <Wolf01> I mean, does it requires steam to be running to launch it? Because this is a shared pc and there is a lot of trouble with steam accounts, so I might download the installer from the site instead
12:07:20  *** joepie91 [~sven@2001:980:a4ca:1:7a2b:cbff:fee1:2550] has joined #openttd
12:09:50  <joepie91> quick note for any OpenTTD devs lingering around; reading the content server client code atm, and one of the comments appears to be inaccurate... in network_content.cpp, in ClientNetworkContentSocketHandler::RequestContentList(uint count, const ContentID *content_ids), it claims that it will add a byte for the content type and then a uint16 for the count of IDs in the packet, but as far as I can tell there's only the count uint16, and
12:09:52  <joepie91> nothing relating to content type is being added
12:10:26  <joepie91> r27546 it seems
12:12:26  <Samu> Wolf01: hmm, what speed  is expected for single player savegames?
12:12:33  <Samu> the fastest possible?
12:12:39  <Samu> that would be lzo
12:17:08  <Samu> or zlib 2 if lzo is not to be used
12:17:26  <Samu> lzo is having some issues :(
12:22:40  *** DDR [~David@S0106602ad0773a2e.vc.shawcable.net] has joined #openttd
12:29:01  <joepie91> hm.
12:29:40  <joepie91> who do I talk to about things in the code that *look* like bugs but may or may not be?
12:30:38  <Wolf01> just write here and wait for an answer
12:31:47  <joepie91> right. so right now I'm looking at ClientNetworkContentSocketHandler::RequestContentList(ContentVector *cv, bool send_md5sum)
12:31:54  *** Supercheese [~Superchee@cpe-76-178-136-186.natnow.res.rr.com] has quit [Read error: Connection reset by peer]
12:32:20  <joepie91> it asserts the length of the list of content vectors by reserving 20 bytes for each and checking if the size checks out
12:32:32  *** Supercheese [~Superchee@cpe-76-178-136-186.natnow.res.rr.com] has joined #openttd
12:32:38  <joepie91> comment says sizeof(uint32) + sizeof(md5sum (byte[16]))
12:32:48  <joepie91> however, that's not what it writes for each item
12:33:12  <joepie91> instead, it writes uint8 (content type), uint32 (item ID), optionally byte[16] (md5sum)
12:33:29  <joepie91> so it looks to me like that assertion is off by one byte per item
12:33:44  <joepie91> mind, I'm not a C++ developer, so I may be missing something
12:33:46  <joepie91> :P
12:34:53  <joepie91> this is still in network_content.cpp btw
12:35:38  *** Snail [~jacopocol@cpe-98-14-130-227.nyc.res.rr.com] has joined #openttd
12:36:39  <joepie91> from the looks of it, it ignores the uint8 in both md5sum and no-md5sum cases
12:58:54  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
13:02:11  *** Snail [~jacopocol@cpe-98-14-130-227.nyc.res.rr.com] has quit [Quit: Snail]
13:02:42  <V453000> Wolf01: the zip is probably a better option for you but I believe it should be drm free
13:06:47  *** luaduck [~luaduck@cream.duck.me.uk] has joined #openttd
13:07:10  <Wolf01> just finished to download it, it requires steam, so I think I'll do with the installer
13:11:17  <Wolf01> my best friend died this morning, I'm hoping they accept the RMA for its internal organs, but I'll have to stay at least 3 weeks without it :(
13:13:10  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
13:22:28  *** supermop [~supermop@static-71-249-209-97.nycmny.east.verizon.net] has joined #openttd
13:26:20  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
13:27:29  <supermop> yo
13:27:46  <Wolf01> o/
13:29:26  <supermop> hows it going 5 or 6 hours in the future?
13:30:13  <Wolf01> bad :(
13:33:22  <Wolf01> I have to rely on my old best friend now for some time, but the place is a bit uncomfortable, cold, dusty (more than my room) and I don't even have room to stretch my legs
13:35:21  <Wolf01> also the keyboard is weird and the mouse must be shaken a bit to awake it
13:38:34  <supermop> bluetooth?
13:39:02  <V453000> WIRE MASTER RACE
13:39:02  <Alkel_U3> I know that feeling. 2 years ago my laptop fried, shifting me back from an i7 with 8 GB RAM to an olden AMD with 2 GB. It was then I realized what frustration is.
13:43:34  <Wolf01> keyboard is weird <- not an error, it is weird
13:43:53  <Wolf01> it is one of the trust gaming series
13:45:03  <Wolf01> the backlight doesn't work anymore (after just a year), the keys are small and of shitty plastic
13:47:33  <supermop> 3d print some metal ones?
13:48:45  <Wolf01> nah, I would like to use my logitech one, but I don't want to share it with others :P
13:49:47  <Wolf01> man, the installation of visual studio takes ages
13:50:18  <Wolf01> I bet I'll get a fully automated industry on factorio before it will finish
13:52:45  <Wolf01> oh finally switching to electric power :D
13:53:17  <Wolf01> 35 minutes, I could do better next time
14:02:04  <Wolf01> lol the display: "power off in 5 minutes to save energy, press a button to avoid power off"... guess what button I pressed?
14:05:25  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
14:08:50  <blathijs> 9
14:08:53  <blathijs> w00ps
14:13:32  <Samu> visual studio express is warning me the trial expires in 9 days :(
14:13:42  <Samu> i thought this was free forever
14:13:45  <Samu> wth
14:14:33  *** Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
14:14:36  *** mode/#openttd [+o Alberth] by ChanServ
14:14:44  <Alberth> moin
14:15:17  *** sim-al2 [~sim-al2@dns25-173.cbu.edu] has joined #openttd
14:16:22  <blathijs> Samu: Perhaps you have full features now and some of them will be disabled? (Just guessing)
14:18:30  <Samu> Sign in to unlock the product
14:18:35  <Samu> sign in to what?
14:19:05  <Samu> they want my email!
14:20:29  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
14:20:48  <Samu> by the look of it, I need a microsoft account to keep using visual studio 2015 express for desktop
14:20:56  <Samu> meh, ok
14:23:33  <Samu> success! this product is licensed to "myemail@here.com"
14:54:32  *** sla_ro|master [slamaster@89.136.141.100] has joined #openttd
15:02:52  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
15:08:17  *** JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has joined #openttd
15:11:29  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
15:35:04  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
15:39:01  <Wolf01> ok, compiled successfully
15:39:07  <Wolf01> now... emulators :|
15:41:49  <Wolf01> running factorio again
15:42:14  <Alberth> building an emulator in factorio? :)
15:45:31  *** TheMask96 [martijn@pride.vhost.ne2000.nl] has quit [Ping timeout: 480 seconds]
15:47:19  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
15:50:55  *** TheMask96 [martijn@envy.vhost.ne2000.nl] has joined #openttd
15:54:20  *** sim-al2 [~sim-al2@dns25-173.cbu.edu] has quit [Ping timeout: 480 seconds]
15:59:21  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
16:00:18  <Samu> i'd like to know all the different ways openttd creates a savegame
16:00:46  <Samu> savegame on crash, autosave, manual save, this kind of stuff
16:04:27  <Samu> i have many ideas flowing in my head
16:05:26  <Samu> i see code for a save on exit, I didn't know of this
16:08:30  <Samu> fastforwarding games could benefit from very fast encoding autosaves
16:10:19  <Samu> some kind of bool table system in a function that detects how the savegame is being requested and return the better encoder for that request
16:12:08  <Samu> network games would have autosavesand manual saves set to use the fastest possible encoder
16:12:33  <Samu> network games would have sending map to client would have another kind of encoder
16:12:39  <Samu> erm repetition
16:18:02  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
16:28:10  *** Arveen [~Arveen@ip-95-223-75-47.hsi16.unitymediagroup.de] has joined #openttd
16:34:23  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
16:39:34  <Samu> ewww... there's a lot of ways, i see
16:42:34  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
16:46:20  <Wolf01> finally downloaded the virtual machines but mmmh, no hardware virtualization, I guess I should peek in the bios
16:46:23  <Wolf01> bye
16:46:26  *** Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
16:47:41  <Samu> what is this code about... desync savegames?
16:48:00  <Samu> it is creating savegames for desyncs?
16:48:09  <Samu> how does that work?
16:48:36  <Taede> saves a game every frame (or something) which can then be replayed
16:48:42  <Taede> to establish what is the cause of a desync
16:50:36  *** HerzogDeXtEr [~farci@i59F6CBCC.versanet.de] has joined #openttd
16:51:26  *** frosch123 [~frosch@00013ce7.user.oftc.net] has joined #openttd
16:57:42  <Samu> that would be extremely slow :(
16:58:05  <Samu> every frame? can't even see that happening
17:02:50  *** glx [~glx@000128ec.user.oftc.net] has joined #openttd
17:02:53  *** mode/#openttd [+v glx] by ChanServ
17:03:29  *** smoke_fumus [~smoke_fum@188.35.176.90] has joined #openttd
17:04:33  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
17:05:40  *** sim-al2 [~sim-al2@dns25-173.cbu.edu] has joined #openttd
17:13:20  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit [Ping timeout: 480 seconds]
17:19:27  *** Progman [~progman@p57A18692.dip0.t-ipconnect.de] has joined #openttd
17:31:24  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
17:42:45  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has quit []
17:43:37  *** JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has quit [Quit: JacobD88]
17:44:12  *** Cybertinus [~Cybertinu@cybertinus.customer.cloud.nl] has joined #openttd
17:52:56  *** gelignite [~gelignite@x4db58389.dyn.telefonica.de] has joined #openttd
17:55:00  *** tycoondemon [~ashnohoe@D97B8CD4.cm-3-4c.dynamic.ziggo.nl] has joined #openttd
18:15:48  *** Wolf01 [~Wolf01@host249-115-dynamic.116-80-r.retail.telecomitalia.it] has joined #openttd
18:15:50  *** Wolf01 [~Wolf01@host249-115-dynamic.116-80-r.retail.telecomitalia.it] has quit [Killed (NickServ (Too many failed password attempts.))]
18:16:02  *** Wolf01 [~Wolf01@host249-115-dynamic.116-80-r.retail.telecomitalia.it] has joined #openttd
18:16:04  *** Wolf01 [~Wolf01@host249-115-dynamic.116-80-r.retail.telecomitalia.it] has quit [Killed (NickServ (Too many failed password attempts.))]
18:22:04  <Samu> who's a code expert
18:22:19  *** Wolf01 [~Wolf01@0001288e.user.oftc.net] has joined #openttd
18:22:32  <Wolf01> o/
18:23:23  <Samu> ok
18:24:05  <Samu> how do I make this code smarter, without magic numbering stuff https://paste.openttdcoop.org/pjpvwmhiu
18:24:42  <Samu> sgf_id especially
18:26:31  <Alberth> you ever considered reading a book about c++ ?
18:26:54  <Samu> yes but gave up
18:27:20  <Alberth> so now we must do your coding?
18:27:24  <Wolf01> Declare the numbers as constant and give them a meaningful name
18:29:26  <Samu> but I don't have to, they are already in a table, if only i knew how to get them directly from the table into the &_saveload_formats[x]
18:30:45  <Wolf01> :|
18:30:59  <Samu> that x is a number from 0 to 3
18:31:11  <Samu> 0 is lzo, 1 is none, 2 is zlib, 3 is lzma
18:31:41  <Alberth> so 2 is a meaningful name eh?
18:32:32  <Wolf01> The table is made by you or it's already in the code somewhere?
18:32:39  <Samu> it's already in the code
18:32:47  <Samu> not made by me
18:33:09  <Alberth> "lastof()" doesn't look like you wrte it  :)
18:33:26  <Alberth> *wrote
18:33:36  <Samu> lastof just picks lzma for default
18:33:48  <Samu> uses lzma for every savegame
18:38:00  <Wolf01> And what if one of the first methods isn't available? The numbers are always the same?
18:38:01  <Alberth> actually, it does a bit more; if I add a better compression method at the end, it will pick that one, ie not lzma always, but the last one
18:38:32  <Alberth> good point Wolf01
18:39:30  <Samu> it's like a table inside a table
18:39:39  <Samu> lzma has its parameters
18:39:48  <Samu> independent than the others
18:41:36  <Samu> this is the table https://git.openttd.org/?p=trunk.git;a=blob;f=src/saveload/saveload.cpp;h=b1a21844f355fc18dfb1b80f7b01e8df33a2b202;hb=HEAD#l2345
18:42:57  <Samu> line 2385 has that part i'm editing const SaveLoadFormat *def = lastof(_saveload_formats);
18:43:32  <Wolf01> The problem is that one of the methods isn't available your code won't work, or you have to define the default one
18:44:20  <Alberth> eg what if lzma is not availalble?
18:44:52  <Samu> it borks !
18:45:05  <Wolf01> or even zlib
18:45:32  <Samu> it has to have one at least
18:45:49  <Samu> lastof must be in there I see
18:45:52  <Wolf01> yes but if I have just one, what are 2 and 3?
18:46:07  <Wolf01> lastof() works
18:46:25  <Wolf01> but how do you chose a different method in this case?
18:47:24  <Samu> so, my code must be written after that line, not before
18:47:59  <Wolf01> I mean, you want to compress with zlib, but I only have lzmaÚ
18:51:41  <Samu> if no zlib, resort to using default
18:51:56  <Samu> if no lzma or zlib or anything, resort to using default
18:52:18  <Wolf01> assuming the compression none doesn't change and it's always 2, I think you could do "int sgf_id = lastof(_saveload_formats)"
18:52:49  <Samu> none is 1
18:52:57  <Samu> it starts counting from 0
18:53:10  <Wolf01> ok, I misread it
18:53:41  <Wolf01> then how do you get the default?
18:54:02  <Samu> i think the question is, how do I change the default
18:54:04  *** Myhorta [~Myhorta@00018fad.user.oftc.net] has joined #openttd
18:54:21  <Samu> ok let me try something
18:54:23  <Samu> brb
18:54:27  <Wolf01> you are already changing the default
18:55:37  <Wolf01> but to *what* is unknown
18:59:43  <Samu> iterate over all available formats and look for zlib? something like that? and if it exists, switch default to that, but i can't seem to write this, it errors
19:00:28  <Samu> gonna try writing stuff brb
19:03:12  <Samu> * @param s Name of the savegame format. If NULL it picks the first available one
19:08:12  <Samu> hmm i think i understand
19:08:55  <Samu> if (_network_server && _sl.autosaveinprogress) *s = OTTZ;
19:09:15  <Samu> gonna try this one step at a time
19:11:54  <Samu> if (_network_server && _sl.autosaveinprogress) *s = 'OTTZ';
19:17:21  <Wolf01> yes a string would do it
19:17:29  <Wolf01> learn the basics please
19:17:35  <Samu> if (_network_server && _sl.autosaveinprogress) *s = TO_BE32X('OTTZ');
19:19:43  <Samu> :( basics
19:20:12  *** Progman_ [~progman@p57A18CFA.dip0.t-ipconnect.de] has joined #openttd
19:25:18  *** Progman [~progman@p57A18692.dip0.t-ipconnect.de] has quit [Ping timeout: 480 seconds]
19:25:30  *** Progman_ is now known as Progman
19:34:37  *** FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has joined #openttd
19:50:37  <Samu> i broke visual studio
19:50:52  <Samu> it's always telling me format O is not available, reverting to lzma
19:51:03  <Samu> i already reverted all changes, what's wrong
19:56:00  *** Arveen [~Arveen@ip-95-223-75-47.hsi16.unitymediagroup.de] has quit [Quit: Nettalk6 - www.ntalk.de]
19:56:10  <Samu> i'm terrible at this :(
20:00:51  <Samu> i broke this
20:00:55  <Samu> rip
20:02:05  *** Myhorta[1] [~Myhorta@25.103.114.89.rev.vodafone.pt] has joined #openttd
20:03:06  *** Hiddenfunstuff [~Geth@y32.ip1.anvianet.fi] has quit [Quit:  HydraIRC -> http://www.hydrairc.com <- Now with extra fish!]
20:07:06  *** Myhorta [~Myhorta@00018fad.user.oftc.net] has quit [Ping timeout: 480 seconds]
20:12:44  *** DDR [~David@S0106602ad0773a2e.vc.shawcable.net] has quit [Ping timeout: 480 seconds]
20:15:28  *** sla_ro|master [slamaster@89.136.141.100] has quit []
20:20:39  *** sim-al2 [~sim-al2@dns25-173.cbu.edu] has quit [Ping timeout: 480 seconds]
20:25:23  <Samu> what is wrong damn it :)(
20:25:35  <Samu> what is a configuration file?
20:25:48  *** Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
20:26:45  <Samu> the real 1.6.0 is now crashing too... why's that?
20:27:03  <Samu> ah... configuration file, they mean openttd.cfg
20:31:20  <Samu> savegame_format = O
20:31:46  <Samu> so this simple O in openttd.cfg was making me lose my mind
20:32:07  <Samu> problem solved
20:32:10  <Samu> lol
20:37:30  *** FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has quit [Quit: There's a real world out here!]
20:37:40  *** FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has joined #openttd
20:38:47  *** FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has quit [Read error: Connection reset by peer]
20:39:10  *** FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has joined #openttd
20:47:30  *** FLHerne_ [~flh@dsl-217-155-24-22.zen.co.uk] has joined #openttd
20:47:30  *** FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has quit [Read error: Connection reset by peer]
20:48:25  *** FLHerne_ [~flh@dsl-217-155-24-22.zen.co.uk] has quit []
20:48:39  *** FLHerne_ [~flh@dsl-217-155-24-22.zen.co.uk] has joined #openttd
20:54:57  *** FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has joined #openttd
20:55:10  *** FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has quit []
20:55:51  *** FLHerne_ [~flh@dsl-217-155-24-22.zen.co.uk] has quit [Read error: No route to host]
21:02:42  *** Supercheese is now known as Guest904
21:02:49  *** Supercheese [~Superchee@50-37-118-138.mscw.id.frontiernet.net] has joined #openttd
21:15:52  *** Wormnest [~Wormnest@s5596abd2.adsl.online.nl] has joined #openttd
21:25:58  *** Goddesen [~quassel@51.174.164.106] has quit [Quit: No Ping reply in 180 seconds.]
21:34:04  *** Goddesen [~quassel@51.174.164.106] has joined #openttd
21:39:44  *** Progman [~progman@p57A18CFA.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
21:40:51  *** frosch123 [~frosch@00013ce7.user.oftc.net] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
21:40:58  <Samu> i had no idea savegame format could be configured in openttd.cfg :(
21:41:10  <Samu> this voids almost 100% of my ideas
21:41:12  <Samu> lol
21:42:10  <Samu> i'm always learning something new about openttd
21:46:41  <Samu> omg.... https://wiki.openttd.org/Savegame_format
21:46:45  <Samu> I am so sad now :8
21:51:38  *** sim-al2 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has joined #openttd
21:53:45  *** supermop [~supermop@static-71-249-209-97.nycmny.east.verizon.net] has quit [Remote host closed the connection]
21:56:54  <Samu> well this means you actually support lzo
21:56:59  <Samu> officially
22:08:14  *** gelignite [~gelignite@x4db58389.dyn.telefonica.de] has quit [Quit: http://bit.ly/1kso8Ta]
22:09:34  *** Goddesen [~quassel@51.174.164.106] has quit [Quit: No Ping reply in 180 seconds.]
22:15:44  *** Goddesen [~quassel@51.174.164.106] has joined #openttd
22:15:46  *** Wormnest [~Wormnest@s5596abd2.adsl.online.nl] has quit [Quit: Leaving]
22:17:04  <Wolf01> 'night
22:17:09  *** Wolf01 [~Wolf01@0001288e.user.oftc.net] has left #openttd []
22:30:17  *** JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has joined #openttd
22:36:55  <Samu> can I ask for a favour? are you able to join this server? https://www.openttd.org/en/server/98619
22:37:06  <Samu> openttd 1.6.0
22:37:34  <Samu> i've set lzo in openttd.cfg, just wondering if you get an error about loading savegame
22:46:59  *** JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has quit [Quit: JacobD88]
23:18:34  *** tokai [~tokai@00012860.user.oftc.net] has joined #openttd
23:18:37  *** mode/#openttd [+v tokai] by ChanServ
23:21:42  *** Supercheese [~Superchee@50-37-118-138.mscw.id.frontiernet.net] has quit [Quit: Valete omnes]
23:25:25  *** tokai|noir [~tokai@00012860.user.oftc.net] has quit [Ping timeout: 480 seconds]
23:28:02  *** JezK [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has joined #openttd
23:57:15  *** LadyHawk- [~LadyHawk@5751e87a.skybroadband.com] has joined #openttd

Powered by YARRSTE version: svn-trunk