IRC logs for #openttd on OFTC at 2016-05-14
            
00:01:25 *** Samu_ has joined #openttd
00:01:29 <Samu_> lag
00:02:07 <Eddi|zuHause> you have an odd number of lines for an even number of directions
00:02:27 *** Samu has quit IRC
00:02:48 <Eddi|zuHause> also, you're not load balancing properly
00:08:07 <Ethereal_Whisper> Yeah, it's convoluted and dumb
00:08:10 <Ethereal_Whisper> I'm trying to fix it
00:09:13 <Ethereal_Whisper> Organic networks ftw
00:09:15 <Ethereal_Whisper> >.>
00:11:34 *** Wormnest has quit IRC
00:14:20 <Ethereal_Whisper> http://i.imgur.com/sqgOzsZ.png that's properly load balanced right?
00:15:03 <Eddi|zuHause> there's not a lot of load to balance
00:15:20 <Ethereal_Whisper> Not yet, I just started a new game and want to build things properly
00:22:26 *** supermop has quit IRC
00:23:55 *** frosch123 has quit IRC
00:33:59 *** Samu has joined #openttd
00:34:19 <Samu> hey
00:34:50 <Samu> http://imgur.com/a/Z5quz - _settings.newgame doesn't match _settings.game
00:35:19 <Samu> now I'm confused :(
00:36:07 <Samu> _settings.game has config_list == { size = 0 }
00:36:19 <Samu> it should be <NULL>
00:36:51 <Samu> there's something I don't quite understand
00:36:59 *** Wormnest has joined #openttd
00:37:10 <Samu> _settings.newgame is the one that should be wrong
00:37:27 <Samu> I don't get it
00:38:06 *** Samu_ has quit IRC
00:38:48 <Samu> is the main menu a loaded savegame?
00:39:14 *** Wormnest has quit IRC
00:46:53 *** aard has quit IRC
00:50:24 *** Matombo has quit IRC
00:52:19 <Ethereal_Whisper> There, I made my network a circle lol
00:52:44 *** ektor has quit IRC
00:58:18 <Samu> _settings_game is indeed the culprit
00:58:36 <Samu> oops _settings.game
00:59:51 <Samu> while in main menu, it retrieves information from _settings.newgame - and information stored here is correct
01:00:48 <Samu> starting a new game, the information that is stored correctly in _settings.newgame is not passed correctly to _settings.game
01:01:41 <Samu> but something is wrong on my analysis, there's something amiss yet
01:04:08 *** sla_ro|master has quit IRC
01:07:53 <Samu> please explain me what happens in the main menu
01:08:10 <Samu> is it a loaded save?
01:08:53 <Samu> if it is, that save is storing wrong information in _settings.game that is then passed through to a new game when it starts
01:09:20 *** Gja has quit IRC
01:11:24 *** FLHerne_ has quit IRC
01:11:58 *** FLHerne_ has joined #openttd
01:13:03 *** smoke_fumus has quit IRC
01:20:16 *** Defaultti has quit IRC
01:26:01 *** Defaultti has joined #openttd
01:41:34 <Samu> yes, i finally nailed it
01:44:59 <Samu> void MakeNewgameSettingsLive()
01:45:06 <Samu> this function is ruining it
01:45:36 <Samu> openttd.cpp, line 368 more especifically
01:53:07 *** Biolunar has joined #openttd
01:53:55 <Samu> there's 3 script types?
01:54:35 <Samu> ai_config.cpp, game_config.cpp, script_config.cpp
01:55:15 <Samu> when it is generating the settings for the AIs, it is using script_config.cpp instead of ai_config.cpp
01:55:25 <Samu> how do I correct this?
02:00:42 *** Supercheese has quit IRC
02:12:37 *** HerzogDeXtEr has quit IRC
02:18:14 *** Snail has joined #openttd
02:18:49 *** Compu has joined #openttd
02:25:16 *** Biolunar has quit IRC
02:53:19 *** Supercheese has joined #openttd
03:00:45 <Wolf01> 'night
03:00:49 *** Wolf01 has quit IRC
03:04:11 *** Quatroking has quit IRC
03:05:17 *** FLHerne_ has quit IRC
03:12:31 *** Samu has quit IRC
03:31:03 *** shirish has quit IRC
03:32:21 *** shirish has joined #openttd
04:33:37 *** glx has quit IRC
05:10:53 *** minisylf has joined #openttd
05:12:43 *** Sylf has quit IRC
05:25:12 *** shirish has quit IRC
05:32:44 *** shirish has joined #openttd
05:44:58 *** shirish has quit IRC
05:45:21 *** shirish has joined #openttd
06:06:05 *** Snail has quit IRC
06:06:42 *** shirish_ has joined #openttd
06:14:13 *** shirish has quit IRC
06:31:21 *** rahtgaz has joined #openttd
07:30:25 *** shirish_ has quit IRC
07:35:21 *** Arveen has joined #openttd
07:40:33 *** sla_ro|master has joined #openttd
08:16:39 *** andythenorth has joined #openttd
08:20:43 <andythenorth> o/
08:46:51 *** sla_ro|master has quit IRC
08:49:29 *** sla_ro|master has joined #openttd
08:52:52 *** sla_ro|master has quit IRC
09:04:20 <Ethereal_Whisper> http://i.imgur.com/WKUbtSD.png TRAINS
09:05:11 <Ethereal_Whisper> As convoluted as those lines appear, that yard's pretty low-capacity
09:17:51 *** Alberth has joined #openttd
09:17:51 *** ChanServ sets mode: +o Alberth
09:18:00 <Alberth> moin
09:26:44 <andythenorth> lo
09:33:32 <andythenorth> Alberth: I assume (from all the town growth scripts) that GS can track cargo deliveries to town?
09:34:25 * andythenorth should just look in docs eh? But I have a BB idea
09:36:15 <Alberth> it can
09:36:29 * andythenorth would like a little more diversity in BB goals
09:36:33 <andythenorth> wondering about these:
09:36:46 <andythenorth> - deliver all of n town cargos in quantity x
09:36:54 <andythenorth> - pickup x from town
09:37:00 <andythenorth> - pickup x from industry
09:37:06 <Alberth> https://nogo.openttd.org/api/trunk/classGSCargoMonitor.html#fd23dc4fd1e2eda15086124a9e4c6184
09:37:08 <andythenorth> not sure about pickup goals, might be weird
09:37:37 <Alberth> https://nogo.openttd.org/api/trunk/classGSCargoMonitor.html#4975cfe4b596ef1add86ddb49a532b6e pickup also exists
09:37:48 <andythenorth> yeah SV has pickup goals :)
09:38:21 <andythenorth> hmm, how about mail service? o_O “Deliver x bags of mail per year, anywhere on the map”
09:39:55 <Alberth> BB is partly constructed to have pickup goals, but for some reason they didn't come out as useful to support
09:40:09 <Alberth> I think the answer was in the distance calculation
09:40:47 <andythenorth> something weird about them anyway, can’t explain what
09:41:10 <andythenorth> they’re a bit purposeless, somehow ‘transport to’ seems more justified than ‘transport away from’
09:41:18 <Alberth> ie it makes sure you cannot get away building a 3 tile connection by finding the minimal distance you have to connect
09:41:59 <Alberth> probably that's it, indeed. You'd need to do the entire computation again, but in the other viewpoint
09:42:37 <Alberth> and in the end you'd reach the same conclusion, mostly
09:42:51 <Alberth> if not completely
09:43:46 <Alberth> hmm, probably not completely, you can construct a counter example
09:45:33 <Alberth> how is x bags of mail / year better than x bags of mail in 1 year?
09:46:12 <Alberth> or 4x bags in 4 year?
09:46:42 <Alberth> sustaining a flow is quite trivial, unless you introduce disruptions in the game
09:47:19 <andythenorth> dunno :)
09:47:40 * andythenorth must take kids to football, but will think about it
09:47:42 *** andythenorth has quit IRC
09:48:11 <Alberth> he, come back, I was typing a long and complicated sentence :p
09:49:14 <Ethereal_Whisper> My network is efficient as all hell but not that profitable :(
09:51:55 *** Hiddenfunstuff has joined #openttd
09:55:18 *** Matombo has joined #openttd
10:15:20 <Alberth> source and destinations not far enough away from each other?
10:19:27 *** Supercheese has quit IRC
10:49:00 <TrueBrain> going to reboot the webservices of openttd.org .. hopefully giving a new toy in the process :D
10:50:34 <TrueBrain> I always forget how fast nginx is ... :D
10:59:47 <TrueBrain> ieuw, we now support HTTP/2 .. what is this :P
11:00:16 <Rubidium> half the internet experience of HTTP/1?
11:00:19 *** Matombo has quit IRC
11:01:07 <Ethereal_Whisper> RIP train 119
11:01:26 <TrueBrain> Rubidium: yes :D
11:03:00 <TrueBrain> we will see tomorrow how much of the interwebz use HTTP/2 :P
11:04:36 *** Wormnest has joined #openttd
11:16:16 *** andythenorth has joined #openttd
11:26:01 *** Compu has quit IRC
11:29:32 *** Quatroking has joined #openttd
11:37:52 *** Wolf01 has joined #openttd
11:38:24 <Wolf01> o/
11:44:47 *** Progman has joined #openttd
11:48:30 <Alberth> hi hi
11:58:15 *** DorpsGek has joined #openttd
11:58:15 *** ChanServ sets mode: +o DorpsGek
12:04:36 *** smoke_fumus has joined #openttd
12:26:22 * andythenorth draws hogs
12:32:01 *** frosch123 has joined #openttd
12:34:32 <andythenorth> quak
12:36:19 <frosch123> hoi
12:36:46 <andythenorth> also horses
12:53:51 *** Compu has joined #openttd
13:00:29 *** HerzogDeXtEr has joined #openttd
13:03:15 <Alberth> hola
13:07:47 *** Compu has quit IRC
13:11:09 *** Compu has joined #openttd
13:27:54 <argoneus> good morning train friends
13:30:55 *** andythenorth has left #openttd
13:39:17 *** rahtgaz has quit IRC
13:57:21 *** Samu has joined #openttd
13:58:34 <Samu> hi´
14:06:18 *** sim-al2 has quit IRC
14:13:23 *** tokai|noir has joined #openttd
14:13:23 *** ChanServ sets mode: +v tokai|noir
14:20:06 *** tokai has quit IRC
14:36:03 *** Progman_ has joined #openttd
14:38:52 *** Progman has quit IRC
14:39:04 *** Progman_ is now known as Progman
14:46:42 <Samu> "restart" versus "newgame"
14:49:55 <Samu> when I restart a game, the AI configs won't be the same that were used to start the abandoning game, but those that I have last set
14:49:59 <Samu> is that intended?
14:55:01 <Alberth> what game are you playing with "restart"
14:56:12 <Alberth> ie, I don't know of such a button
15:09:27 <Samu> console command "restart"
15:10:44 <Samu> the abandoned game was set up to start AdmiralAI
15:11:07 <Samu> then before typing restart in the console, I change AdmiralAI to AroAI
15:11:23 <Samu> if i restart now, it will have AroAI in the config
15:12:50 <Alberth> ah, ok
15:13:04 <Alberth> don't know what it intends to do, I never used it
15:15:13 *** sim-al2 has joined #openttd
15:20:38 <Samu> "newgame" is like going back to main menu and starting a new game, but without actually going to main menu, right?
15:21:30 <Samu> hmm i guess not exactly
15:26:30 *** aard has joined #openttd
15:26:40 <Alberth> source code knows :)
15:27:01 <Alberth> I always use the gui buttons
15:46:19 *** Progman has quit IRC
16:17:02 *** ConductCat has quit IRC
16:19:26 *** Arveen has quit IRC
16:43:07 *** Tirili has joined #openttd
16:49:10 *** ConductorCat has joined #openttd
16:50:57 *** ConductCat has joined #openttd
16:53:36 <Samu> problem originates here, line 368 of openttd.cpp https://git.openttd.org/?p=trunk.git;a=blob;f=src/openttd.cpp;h=c149ebbd4d430150cb82dbd20a4938bb3212b040;hb=HEAD#l368
16:54:05 <Samu> when i start a new game
16:54:33 <Samu> that line creates wrong values for the config list
16:54:42 <Samu> http://imgur.com/a/Z5quz
16:55:42 <Samu> it creates a config_list with { size = 0 } for AIs, but instead it should create a NULL
16:55:50 <Samu> how do I fix this
16:56:24 <Samu> for the random ai, specifically
16:57:59 *** ConductorCat has quit IRC
17:06:56 *** minisylf is now known as Sylf
17:12:10 <Samu> AIConfig(const AIConfig *config) : ScriptConfig(config) {}
17:12:14 <Samu> what does this do?
17:12:33 <Alberth> You're looking at a value rather than a pointer to a value, is my guess
17:13:21 <Alberth> looks like a normal constructor
17:16:54 <Samu> it's here https://git.openttd.org/?p=trunk.git;a=blob;f=src/ai/ai_config.hpp;h=b02935902c060d104f315a28ea7a2da933cc5e3b;hb=HEAD#l29
17:17:38 <Samu> after this, the config is constructed with the wrong defaults
17:17:52 <Samu> for random ai, that is
17:20:31 <Samu> openttd.cpp line 368 does new AIConfig(_settings_newgame.ai_config[c]);
17:20:57 <Samu> it brings it to ai_config.hpp line 29
17:21:42 <Samu> then from here it goes to script_config.cpp line 36
17:21:51 <Samu> ops, line 46
17:22:38 <Samu> runs some code, then at line 57, script_config.cpp this->AddRandomDeviation();
17:23:08 <Samu> jumps to line 132, script_config.cpp
17:23:54 <Samu> line 134, script_config.cpp, for (ScriptConfigItemList::const_iterator it = this->GetConfigList()->begin(); it != this->GetConfigList()->end(); it++) {
17:24:10 <Samu> GetConfigList() - this is where it finds the NULL
17:24:48 <Samu> config_list is currently at this stage
17:25:00 <Samu> is curently NULL*
17:25:51 <Samu> jumps up to line 77 where it does a this->PushExtraConfigList();
17:26:46 <Samu> now it's at line 197 of script_config.hpp
17:26:53 <Samu> virtual void PushExtraConfigList() {};
17:27:04 <Samu> and here's the problem
17:27:20 <Samu> it creates an empty list
17:27:53 <Samu> its not adding the start_date :/
17:29:03 <Samu> NULL becomes { size = 0 }, start_date is ignored
17:30:42 <Samu> random ais, even though without any configurable parameters, should have added start_date config line when it's executing the PushExtraConfigList()
18:01:32 <Alberth> or not encounter NULL, isn't it?
18:03:21 <Samu> if i understood these steps
18:03:52 <Samu> it encounters NULL
18:03:58 <Samu> NULL = true
18:04:09 <Samu> so it starts a list
18:04:16 <Samu> list is initially size = 0
18:04:27 <Samu> then PushExtraConfigList immediately after
18:04:46 <Samu> however, this extraconfiglist doesn't have the start_date in there
18:04:56 <Samu> it remains size = 0
18:05:02 <Samu> :(
18:11:54 <Samu> i see that when I load a savegame, the size is NULL, and then it does the same steps PushExtraConfigList, but this one does have the start_date config
18:12:26 <Samu> from NULL, to size = 0, then to size = 1 with the start_date appended to it
18:13:58 <Samu> there are several PushExtraConfigList functions :o
18:14:14 <Alberth> yes, but if it wouldn't encounter NULL, would it work then?
18:15:54 <Samu> if it encounters size = 0, it won't run the PushExtraConfigList afterwards
18:16:17 <Samu> confused with your question
18:18:36 <Samu> the ai_gui.cpp has a GetConfigList at line 52
18:19:01 <Samu> newgame has set a size = 0
18:19:36 <Samu> when ai_gui gets the list, it won't run the PushExtraConfigList, because config_list is not equal to NULL anymore, but equal to size = 0
18:20:28 <Samu> it's a random ai without start_date in the list of parameters which shoudln't happen
18:20:37 <Samu> all ais always have start_date
18:20:42 <Samu> including random ai
18:27:26 <Samu> it only happens on new games
18:27:54 <Samu> doesn't happen on loaded saves, if the main menu is a loaded save that would explain why it isn't bugged in main menu
18:33:13 <Alberth> quite rare problem thus
18:33:24 *** HerzogDeXtEr1 has joined #openttd
18:38:34 *** HerzogDeXtEr has quit IRC
18:46:32 <Samu> i must follow the load save code
18:47:05 <Samu> there's something escaping on my analysis
18:48:03 <Samu> afterload or whatever is also dealing with this size = 0, but then reverts it to NULL at some point
18:48:13 <Samu> where?
18:55:06 *** Gja has joined #openttd
19:00:36 *** glx has joined #openttd
19:00:36 *** ChanServ sets mode: +v glx
19:07:03 *** aard has quit IRC
19:14:49 <Samu> hmm i have a feeling afterload doesn't even set anything
19:15:05 <Samu> i see NULL everywhere
19:15:28 <Samu> or I don't know what I'm supposed to be searcing
19:20:48 <Alberth> afterload just updates savegames to a new version
19:21:29 *** roidal has joined #openttd
19:38:40 <Samu> DoLoad doesn't even use MakeNewgameSettingsLive() function
19:38:54 <Samu> this is the function that breaks stuff
19:39:17 <Samu> but there's so many things happening in a Load
19:40:34 <Samu> wait, it does, my bad, let me check
19:44:45 <glx> not using newgame settings on load makes sense ;)
19:45:08 <Samu> it does
19:45:19 <Samu> it is using that function
19:45:52 <Samu> InitializeGame
19:45:55 <Samu> bla bla if (reset_settings) MakeNewgameSettingsLive();
19:46:17 <Samu> DoLoad runs the InitializeGame, which runs MakenewgameSettingsLive
19:48:23 *** Arveen has joined #openttd
19:49:15 <Samu> InitializeGame(256, 256, true, true);
19:49:28 <Samu> DoLoad is saying true to reset_settings
19:52:21 <Samu> MakenewgameSettingsLive turns config_list from NULL to size = 0.
19:52:35 *** sla_ro|master has joined #openttd
19:53:02 <Samu> between this and me accessing the ai_gui, size = 0 goes back to NULL, i have to find where does this happen exactly
20:44:50 *** Tirili has quit IRC
20:52:39 *** MonkeyDrone has joined #openttd
21:24:27 *** supermop has joined #openttd
21:37:15 *** Snail has joined #openttd
21:54:16 *** Supercheese has joined #openttd
22:02:57 *** svkampen has joined #openttd
22:09:38 *** FLHerne has joined #openttd
22:13:52 *** frosch123 has quit IRC
22:19:33 *** Alberth has left #openttd
22:31:25 *** svkampen has quit IRC
22:51:26 *** Snail has quit IRC
22:53:49 *** Matombo has joined #openttd
23:00:15 *** Matombo has quit IRC
23:03:47 <Samu> I got something!
23:03:57 <Samu> ai_sl.cpp
23:05:01 <Samu> line 61
23:05:08 <Samu> Load_AIPL() - free all current data
23:05:23 <Samu> there goes the size = 0, returns to NULL
23:12:14 <Samu> two wrongs make a right
23:12:16 <Samu> lel
23:13:30 <Samu> MakeNewgameSettingsLive() makes config_list wrongly
23:14:31 <Samu> Load_AIPL() cleans the config_list again back to NULL
23:14:42 <Samu> and doesn't restore its values
23:15:29 <Samu> funny that the end resut is the intended behaviour, it brings it back to NULL which will append start_date posteriorly when querying the config_list
23:19:34 <Samu> until then, the config list is NULL, which isn't exactly correct either, it's merelly being fixed on-the-fly
23:27:25 *** Compu has quit IRC
23:28:10 *** roidal has quit IRC
23:29:10 <Samu> aha!!! if (this->config_list != NULL) delete this->config_list;
23:29:58 <Samu> config_list == { size = 0 } - becomes NULL here, finally NAILED IT!
23:31:20 <Samu> this->config_list = (info == NULL)
23:36:37 *** Tirili has joined #openttd
23:39:12 *** Compu has joined #openttd
23:54:14 *** Tirili has quit IRC
23:57:34 <Samu> alright, now I got a clearer idea where the fix has to be done