Back to Home / #openttd / 2016 / 05 / Prev Day | Next Day
#openttd IRC Logs for 2016-05-14

---Logopened Sat May 14 00:00:13 2016
00:06-!-Snail [] has quit [Quit: Snail]
00:06-!-shirish_ [~quassel@] has joined #openttd
00:14-!-shirish [] has quit [Ping timeout: 480 seconds]
00:31-!-rahtgaz [] has joined #openttd
01:30-!-shirish_ [~quassel@] has quit [Read error: Connection reset by peer]
01:35-!-Arveen [] has joined #openttd
01:40-!-sla_ro|master [slamaster@] has joined #openttd
02:16-!-andythenorth [] has joined #openttd
02:46-!-sla_ro|master [slamaster@] has quit []
02:49-!-sla_ro|master [slamaster@] has joined #openttd
02:52-!-sla_ro|master [slamaster@] has quit []
03:04<Ethereal_Whisper> TRAINS
03:05<Ethereal_Whisper>As convoluted as those lines appear, that yard's pretty low-capacity
03:17-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
03:17-!-mode/#openttd [+o Alberth] by ChanServ
03:33<andythenorth>Alberth: I assume (from all the town growth scripts) that GS can track cargo deliveries to town?
03:34*andythenorth should just look in docs eh? But I have a BB idea
03:36<@Alberth>it can
03:36*andythenorth would like a little more diversity in BB goals
03:36<andythenorth>wondering about these:
03:36<andythenorth>- deliver all of n town cargos in quantity x
03:36<andythenorth>- pickup x from town
03:37<andythenorth>- pickup x from industry
03:37<andythenorth>not sure about pickup goals, might be weird
03:37<@Alberth> pickup also exists
03:37<andythenorth>yeah SV has pickup goals :)
03:38<andythenorth>hmm, how about mail service? o_O “Deliver x bags of mail per year, anywhere on the map”
03:39<@Alberth>BB is partly constructed to have pickup goals, but for some reason they didn't come out as useful to support
03:40<@Alberth>I think the answer was in the distance calculation
03:40<andythenorth>something weird about them anyway, can’t explain what
03:41<andythenorth>they’re a bit purposeless, somehow ‘transport to’ seems more justified than ‘transport away from’
03:41<@Alberth>ie it makes sure you cannot get away building a 3 tile connection by finding the minimal distance you have to connect
03:41<@Alberth>probably that's it, indeed. You'd need to do the entire computation again, but in the other viewpoint
03:42<@Alberth>and in the end you'd reach the same conclusion, mostly
03:42<@Alberth>if not completely
03:43<@Alberth>hmm, probably not completely, you can construct a counter example
03:45<@Alberth>how is x bags of mail / year better than x bags of mail in 1 year?
03:46<@Alberth>or 4x bags in 4 year?
03:46<@Alberth>sustaining a flow is quite trivial, unless you introduce disruptions in the game
03:47<andythenorth>dunno :)
03:47*andythenorth must take kids to football, but will think about it
03:47-!-andythenorth [] has quit [Quit: andythenorth]
03:48<@Alberth>he, come back, I was typing a long and complicated sentence :p
03:49<Ethereal_Whisper>My network is efficient as all hell but not that profitable :(
03:51-!-Hiddenfunstuff [] has joined #openttd
03:55-!-Matombo [] has joined #openttd
04:15<@Alberth>source and destinations not far enough away from each other?
04:19-!-Supercheese [] has quit [Quit: Valete omnes]
04:49<TrueBrain>going to reboot the webservices of .. hopefully giving a new toy in the process :D
04:50<TrueBrain>I always forget how fast nginx is ... :D
04:59<TrueBrain>ieuw, we now support HTTP/2 .. what is this :P
05:00<@Rubidium>half the internet experience of HTTP/1?
05:00-!-Matombo [] has quit [Remote host closed the connection]
05:01<Ethereal_Whisper>RIP train 119
05:01<TrueBrain>Rubidium: yes :D
05:03<TrueBrain>we will see tomorrow how much of the interwebz use HTTP/2 :P
05:04-!-Wormnest [] has joined #openttd
05:16-!-andythenorth [] has joined #openttd
05:26-!-Compu [] has quit [Ping timeout: 480 seconds]
05:29-!-Quatroking [] has joined #openttd
05:37-!-Wolf01 [] has joined #openttd
05:44-!-Progman [] has joined #openttd
05:48<@Alberth>hi hi
05:56-!-DorpsGek [] has quit [Remote host closed the connection]
05:58-!-DorpsGek [] has joined #openttd
05:58-!-mode/#openttd [+o DorpsGek] by ChanServ
06:04-!-smoke_fumus [~smoke_fum@] has joined #openttd
06:26*andythenorth draws hogs
06:32-!-frosch123 [] has joined #openttd
06:36<andythenorth>also horses
06:53-!-Compu [] has joined #openttd
07:00-!-HerzogDeXtEr [] has joined #openttd
07:07-!-Compu [] has quit [Read error: Connection reset by peer]
07:11-!-Compu [] has joined #openttd
07:27<argoneus>good morning train friends
07:30-!-andythenorth [] has left #openttd []
07:39-!-rahtgaz [] has quit [Read error: Connection reset by peer]
07:57-!-Samu [] has joined #openttd
08:06-!-sim-al2 [] has quit [Read error: Connection reset by peer]
08:13-!-tokai|noir [] has joined #openttd
08:13-!-mode/#openttd [+v tokai|noir] by ChanServ
08:20-!-tokai [] has quit [Ping timeout: 480 seconds]
08:36-!-Progman_ [] has joined #openttd
08:38-!-Progman [] has quit [Ping timeout: 480 seconds]
08:39-!-Progman_ is now known as Progman
08:46<Samu>"restart" versus "newgame"
08:49<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
08:49<Samu>is that intended?
08:55<@Alberth>what game are you playing with "restart"
08:56<@Alberth>ie, I don't know of such a button
09:09<Samu>console command "restart"
09:10<Samu>the abandoned game was set up to start AdmiralAI
09:11<Samu>then before typing restart in the console, I change AdmiralAI to AroAI
09:11<Samu>if i restart now, it will have AroAI in the config
09:12<@Alberth>ah, ok
09:13<@Alberth>don't know what it intends to do, I never used it
09:15-!-sim-al2 [] has joined #openttd
09:20<Samu>"newgame" is like going back to main menu and starting a new game, but without actually going to main menu, right?
09:21<Samu>hmm i guess not exactly
09:26-!-aard [] has joined #openttd
09:26<@Alberth>source code knows :)
09:27<@Alberth>I always use the gui buttons
09:46-!-Progman [] has quit [Remote host closed the connection]
10:17-!-ConductCat [] has quit [Read error: Connection reset by peer]
10:19-!-Arveen [] has quit [Quit: Nettalk6 -]
10:43-!-Tirili [] has joined #openttd
10:49-!-ConductorCat [] has joined #openttd
10:50-!-ConductCat [] has joined #openttd
10:53<Samu>problem originates here, line 368 of openttd.cpp;a=blob;f=src/openttd.cpp;h=c149ebbd4d430150cb82dbd20a4938bb3212b040;hb=HEAD#l368
10:54<Samu>when i start a new game
10:54<Samu>that line creates wrong values for the config list
10:55<Samu>it creates a config_list with { size = 0 } for AIs, but instead it should create a NULL
10:55<Samu>how do I fix this
10:56<Samu>for the random ai, specifically
10:57-!-ConductorCat [] has quit [Ping timeout: 480 seconds]
11:06-!-minisylf is now known as Sylf
11:12<Samu> AIConfig(const AIConfig *config) : ScriptConfig(config) {}
11:12<Samu>what does this do?
11:12<@Alberth>You're looking at a value rather than a pointer to a value, is my guess
11:13<@Alberth>looks like a normal constructor
11:16<Samu>it's here;a=blob;f=src/ai/ai_config.hpp;h=b02935902c060d104f315a28ea7a2da933cc5e3b;hb=HEAD#l29
11:17<Samu>after this, the config is constructed with the wrong defaults
11:17<Samu>for random ai, that is
11:20<Samu>openttd.cpp line 368 does new AIConfig(_settings_newgame.ai_config[c]);
11:20<Samu>it brings it to ai_config.hpp line 29
11:21<Samu>then from here it goes to script_config.cpp line 36
11:21<Samu>ops, line 46
11:22<Samu>runs some code, then at line 57, script_config.cpp this->AddRandomDeviation();
11:23<Samu>jumps to line 132, script_config.cpp
11:23<Samu>line 134, script_config.cpp, for (ScriptConfigItemList::const_iterator it = this->GetConfigList()->begin(); it != this->GetConfigList()->end(); it++) {
11:24<Samu>GetConfigList() - this is where it finds the NULL
11:24<Samu>config_list is currently at this stage
11:25<Samu>is curently NULL*
11:25<Samu>jumps up to line 77 where it does a this->PushExtraConfigList();
11:26<Samu>now it's at line 197 of script_config.hpp
11:26<Samu> virtual void PushExtraConfigList() {};
11:27<Samu>and here's the problem
11:27<Samu>it creates an empty list
11:27<Samu>its not adding the start_date :/
11:29<Samu>NULL becomes { size = 0 }, start_date is ignored
11:30<Samu>random ais, even though without any configurable parameters, should have added start_date config line when it's executing the PushExtraConfigList()
12:01<@Alberth>or not encounter NULL, isn't it?
12:03<Samu>if i understood these steps
12:03<Samu>it encounters NULL
12:03<Samu>NULL = true
12:04<Samu>so it starts a list
12:04<Samu>list is initially size = 0
12:04<Samu>then PushExtraConfigList immediately after
12:04<Samu>however, this extraconfiglist doesn't have the start_date in there
12:04<Samu>it remains size = 0
12:11<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
12:12<Samu>from NULL, to size = 0, then to size = 1 with the start_date appended to it
12:13<Samu>there are several PushExtraConfigList functions :o
12:14<@Alberth>yes, but if it wouldn't encounter NULL, would it work then?
12:15<Samu>if it encounters size = 0, it won't run the PushExtraConfigList afterwards
12:16<Samu>confused with your question
12:18<Samu>the ai_gui.cpp has a GetConfigList at line 52
12:19<Samu>newgame has set a size = 0
12:19<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
12:20<Samu>it's a random ai without start_date in the list of parameters which shoudln't happen
12:20<Samu>all ais always have start_date
12:20<Samu>including random ai
12:27<Samu>it only happens on new games
12:27<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
12:33<@Alberth>quite rare problem thus
12:33-!-HerzogDeXtEr1 [] has joined #openttd
12:38-!-HerzogDeXtEr [] has quit [Ping timeout: 480 seconds]
12:46<Samu>i must follow the load save code
12:47<Samu>there's something escaping on my analysis
12:48<Samu>afterload or whatever is also dealing with this size = 0, but then reverts it to NULL at some point
12:55-!-Gja [] has joined #openttd
13:00-!-glx [] has joined #openttd
13:00-!-mode/#openttd [+v glx] by ChanServ
13:07-!-aard [] has quit [Read error: Connection reset by peer]
13:14<Samu>hmm i have a feeling afterload doesn't even set anything
13:15<Samu>i see NULL everywhere
13:15<Samu>or I don't know what I'm supposed to be searcing
13:20<@Alberth>afterload just updates savegames to a new version
13:21-!-roidal [] has joined #openttd
13:38<Samu>DoLoad doesn't even use MakeNewgameSettingsLive() function
13:38<Samu>this is the function that breaks stuff
13:39<Samu>but there's so many things happening in a Load
13:40<Samu>wait, it does, my bad, let me check
13:44<+glx>not using newgame settings on load makes sense ;)
13:45<Samu>it does
13:45<Samu>it is using that function
13:45<Samu>bla bla if (reset_settings) MakeNewgameSettingsLive();
13:46<Samu>DoLoad runs the InitializeGame, which runs MakenewgameSettingsLive
13:48-!-Arveen [] has joined #openttd
13:49<Samu> InitializeGame(256, 256, true, true);
13:49<Samu>DoLoad is saying true to reset_settings
13:52<Samu>MakenewgameSettingsLive turns config_list from NULL to size = 0.
13:52-!-sla_ro|master [slamaster@] has joined #openttd
13:53<Samu>between this and me accessing the ai_gui, size = 0 goes back to NULL, i have to find where does this happen exactly
14:44-!-Tirili [] has quit [Remote host closed the connection]
14:52-!-MonkeyDrone [~MonkDAce@] has joined #openttd
15:24-!-supermop [] has joined #openttd
15:37-!-Snail [] has joined #openttd
15:54-!-Supercheese [] has joined #openttd
16:02-!-svkampen [] has joined #openttd
16:09-!-FLHerne [] has joined #openttd
16:13-!-frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
16:19-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
16:31-!-svkampen [] has quit [Quit: Page closed]
16:51-!-Snail [] has quit [Quit: Snail]
16:53-!-Matombo [] has joined #openttd
17:00-!-Matombo [] has quit [Remote host closed the connection]
17:03<Samu>I got something!
17:05<Samu>line 61
17:05<Samu>Load_AIPL() - free all current data
17:05<Samu>there goes the size = 0, returns to NULL
17:12<Samu>two wrongs make a right
17:13<Samu>MakeNewgameSettingsLive() makes config_list wrongly
17:14<Samu>Load_AIPL() cleans the config_list again back to NULL
17:14<Samu>and doesn't restore its values
17:15<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
17:19<Samu>until then, the config list is NULL, which isn't exactly correct either, it's merelly being fixed on-the-fly
17:27-!-Compu [] has quit [Ping timeout: 480 seconds]
17:28-!-roidal [] has quit [Quit: WeeChat 1.4]
17:29<Samu>aha!!! if (this->config_list != NULL) delete this->config_list;
17:29<Samu>config_list == { size = 0 } - becomes NULL here, finally NAILED IT!
17:31<Samu>this->config_list = (info == NULL)
17:36-!-Tirili [] has joined #openttd
17:39-!-Compu [] has joined #openttd
17:54-!-Tirili [] has quit [Quit: Leaving]
17:57<Samu>alright, now I got a clearer idea where the fix has to be done
18:00-!-Ethereal_Whisper [] has quit [Read error: Connection reset by peer]
18:07-!-Gja [] has quit [Quit: Going offline, see ya! (]
18:11-!-JGR [] has quit [Ping timeout: 480 seconds]
18:38-!-chomwitt [] has quit [Ping timeout: 480 seconds]
18:39-!-JGR [] has joined #openttd
18:42-!-Arveen [] has quit [Quit: Nettalk6 -]
18:45-!-tokai [] has joined #openttd
18:45-!-mode/#openttd [+v tokai] by ChanServ
18:47-!-chomwitt [] has joined #openttd
18:49-!-Matombo [] has joined #openttd
18:49-!-smoke_fumus [~smoke_fum@] has quit [Quit: KVIrc 4.2.0 Equilibrium]
18:52-!-tokai|noir [] has quit [Ping timeout: 480 seconds]
18:56-!-Matombo [] has quit [Remote host closed the connection]
19:03-!-Wormnest [] has quit [Quit: Leaving]
19:16-!-Snail [] has joined #openttd
19:21-!-FLHerne_ [] has joined #openttd
19:21-!-FLHerne [] has quit [Quit: There's a real world out here!]
19:25-!-Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
19:34-!-sla_ro|master [slamaster@] has quit []
19:50<Samu>think I fixed it
19:51<Samu>if (!AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->HasScript()) AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->Change(NULL, -1, false, true);
19:51<Samu>added this line to openttd.cpp, below line 368
19:53<Samu>if it doesn't find a script, treat that script as being random ai (instead of none), and add some NULL's, especially at config_list, which is what Change is doing
19:54<Samu>must test save game, and load game now, see if it didn't break anything
19:54<Samu>well, not now, don't have time
19:55<Samu>cyas goodnight
20:03-!-Samu [] has quit [Ping timeout: 480 seconds]
20:08-!-Hiddenfunstuff [] has quit [Quit: HydraIRC -> <- Po-ta-to, boil em, mash em, stick em in a stew.]
20:24-!-Snail [] has quit [Quit: Snail]
21:08-!-Cybertinus [] has quit [Ping timeout: 480 seconds]
21:17-!-Cybertinus [] has joined #openttd
21:32-!-tokai|noir [] has joined #openttd
21:32-!-mode/#openttd [+v tokai|noir] by ChanServ
21:37-!-Quatroking [] has quit [Read error: Connection reset by peer]
21:39-!-tokai [] has quit [Ping timeout: 480 seconds]
21:42-!-FLHerne_ [] has quit [Ping timeout: 480 seconds]
22:07-!-Snail [] has joined #openttd
22:10-!-Snail [] has quit []
22:49-!-glx [] has quit [Quit: Bye]
23:37-!-orudge` [] has quit [Remote host closed the connection]
---Logclosed Sun May 15 00:00:15 2016