--- Log opened Wed Mar 16 00:00:26 2016 20160316 00:00:27< fabi> ? 20160316 00:00:39< fabi> Do you have any examples for that claim? 20160316 00:01:00< celticminstrel> I seem to recall you talking at length about replacing WML with something else. 20160316 00:01:07< fabi> yes 20160316 00:01:11< fabi> I am doing that right now 20160316 00:01:29< fabi> I have made a lot of great progress. 20160316 00:01:51< celticminstrel> Well, uh. Good luck, I guess? 20160316 00:02:08< fabi> Thank you very much :-) 20160316 00:02:08< celticminstrel> I don't see any point in doing it, but if you have fun with it, I guess that's a good thing. 20160316 00:02:44< celticminstrel> I do recall thinking your replacement didn't really have any advantages, but I don't remember any details. 20160316 00:03:03-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160316 00:03:07< celticminstrel> Maybe I was thinking something slightly different from what I just said I recalled thinking. 20160316 00:03:14 * celticminstrel shrug. 20160316 00:04:42-!- iceiceice [~chris@wesnoth/developer/iceiceice] has joined #wesnoth-dev 20160316 00:05:03< shadowm> iceiceice: Was it you who explained to me the theory behind tlua_jailbreak_exception or whatever before? 20160316 00:05:16< iceiceice> not sure 20160316 00:05:22< iceiceice> i mean i assume mordante explained it to you before that 20160316 00:05:37< shadowm> Probably not. 20160316 00:06:13< iceiceice> so, 20160316 00:06:17< iceiceice> the basic issue here is, 20160316 00:06:23< iceiceice> it is not safe to throw exceptions through lua 20160316 00:06:31< iceiceice> even if lua is "compiled as c++" 20160316 00:06:41< iceiceice> because, 20160316 00:06:45< iceiceice> lua is an ANSI C library 20160316 00:07:09< iceiceice> in C++, strong exception safety means, roll back semantics in the face of an exception being thrown 20160316 00:07:22< iceiceice> so like, if you have some crappy object whose copy constructor can throw, 20160316 00:07:31< iceiceice> and you try to add it to a std::vector, 20160316 00:07:36< iceiceice> and it triggers a vector reallocation, 20160316 00:07:46< iceiceice> and moves all of its objects, and then an exception is thrown, 20160316 00:07:50< iceiceice> it won't end up in a wierd state 20160316 00:08:02< iceiceice> it will have rollback semantics, as if the push_back operation never happened 20160316 00:08:13< iceiceice> making exception safe containers is fairly tricky 20160316 00:08:19< iceiceice> and it is entirely impossible in ANSI C 20160316 00:08:25< iceiceice> if you do not have destructors, 20160316 00:08:29< iceiceice> and you do not have try catch 20160316 00:08:35< iceiceice> you cannot make an exception safe container 20160316 00:08:48< iceiceice> so in general, when you throw an exception through lua, 20160316 00:08:49< celticminstrel> Lua does use try/catch when compiled as C++, though. 20160316 00:09:01< iceiceice> not for *your* exceptions thoguh 20160316 00:09:11< iceiceice> only for its internal exceptions, that it uses instead of setjmp longjmp 20160316 00:09:16< celticminstrel> I thought it had a catch(...) clause. 20160316 00:09:34< iceiceice> look its pretty well documented what is supported 20160316 00:09:37< celticminstrel> Yeah, it does. 20160316 00:09:44< iceiceice> its not meant to catch your exceptions 20160316 00:09:54< celticminstrel> I'm not saying you're wrong, only that I still don't quite understand the situation here. 20160316 00:09:54< iceiceice> the devs of lua are pretty clear about this on their mailing list 20160316 00:09:55< iceiceice> ok 20160316 00:10:16< iceiceice> when lua is using exceptions for lua_errors, 20160316 00:10:22< iceiceice> you should think of that as kind of a hack 20160316 00:10:30< celticminstrel> It's quite clear that it does catch your exceptions, at least. Whether it does the sensible thing at that time, I don't know. 20160316 00:10:53< iceiceice> i think what the results of that are, 20160316 00:11:02< iceiceice> lua internals are in an indeterminate / possibly invalid state 20160316 00:11:21< iceiceice> for instance, lua has a feature called "coroutines" 20160316 00:11:27< iceiceice> which wesnoth makes limited use of 20160316 00:11:33< iceiceice> when it calls a C fnuction pointer, 20160316 00:11:36< iceiceice> it has to increment a counter 20160316 00:11:38< iceiceice> to keep track of that 20160316 00:11:43-!- louis94 [~~louis94@91.178.242.179] has quit [Ping timeout: 244 seconds] 20160316 00:11:52-!- louis94 [~~louis94@91.178.242.1] has joined #wesnoth-dev 20160316 00:11:53< iceiceice> because you cannot yield across a C-call boundary or you get undefined behavior 20160316 00:12:01< iceiceice> if your C funciton pointer throws instead of returning normally, 20160316 00:12:05< iceiceice> i would assume that counter gets fucked up 20160316 00:12:18< iceiceice> and that there is no concievable way that lua could keep track of this and recover 20160316 00:12:27< iceiceice> among many other thing slike that likely go wrong 20160316 00:12:37< iceiceice> so, 20160316 00:12:53< iceiceice> on the one hand, you aren't supposed to throw exceptions through lua 20160316 00:12:59< iceiceice> on the other hand, 20160316 00:13:05< iceiceice> wesnoth throws exceptions all the time 20160316 00:13:14< iceiceice> like, every time you click the end turn button 20160316 00:13:35< shadowm> Suppose I am writing a new C++ application that embeds Lua. The recommendation is to just not make it possible for Lua code to throw exceptions? 20160316 00:13:35< iceiceice> and its generally fairly confusing to figure out exactly what functions do and dont throw in the play_contorller 20160316 00:13:57< iceiceice> shadowm, my recommendation is, just ban C++ exceptions from your code base 20160316 00:14:01< iceiceice> and compile with -fno-exceptions 20160316 00:14:15< iceiceice> esp. if you plan to use like, multiple independent lua states 20160316 00:14:36< iceiceice> you can compile with -DBOOST_NO_EXCEPTIONS 20160316 00:14:47< iceiceice> and most of the libraries you will use are c libraries anyways 20160316 00:15:00< shadowm> Hmph. 20160316 00:15:23< iceiceice> if you only make limited use of C++ exceptions then maybe its ok 20160316 00:15:40< iceiceice> its up to you 20160316 00:15:42< iceiceice> i guess one thing i also do is, 20160316 00:15:47< shadowm> I mean, it's not like I _need_ C++ exceptions or anything but... 20160316 00:15:48< iceiceice> any function that i push to lua gets declared "noexcept" 20160316 00:15:49< celticminstrel> I'm currently looking at ldo.c and trying to decipher it. >_> 20160316 00:15:50< fabi> The thing is: you should encapsulate the lua host from the rest. 20160316 00:15:53-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 00:15:59< iceiceice> so that if an exception does propagate to lua 20160316 00:16:03< iceiceice> you get an immediate terminate 20160316 00:16:08< iceiceice> rather than some indeterminate state 20160316 00:16:19< iceiceice> anyways the idea in wesnoth was 20160316 00:16:25< iceiceice> somehow we need to get the exceptoins around lua 20160316 00:16:31< iceiceice> so what is done is 20160316 00:16:37< iceiceice> there is an exception type, lua jailbreak exception 20160316 00:16:45< iceiceice> in wesnoth any functiont hat gets push to lua 20160316 00:16:53< iceiceice> has a special catch block for "lua jailbreak exception" aronud it 20160316 00:17:03< iceiceice> and the jailbreak exception gets caught, and stored in a global variable 20160316 00:17:14< iceiceice> then a "lua error" is signaled instead 20160316 00:17:26< iceiceice> at the calling end, 20160316 00:17:29< iceiceice> anything that pcalls lua 20160316 00:17:34< iceiceice> is supposed to check the global variable 20160316 00:17:36< iceiceice> and if there is an exception 20160316 00:17:39< iceiceice> it rethrows it 20160316 00:17:45< shadowm> Ohhh. 20160316 00:17:48< celticminstrel> This is what luaW_pcall does. 20160316 00:17:54< iceiceice> the issue with this is 20160316 00:17:57< iceiceice> you don't know if it will really work 20160316 00:18:05< iceiceice> for instance if your lua code uses "pcall" 20160316 00:18:10< iceiceice> it may catch the lua erorr in transit 20160316 00:18:15< iceiceice> not realizing htat it's really a C++ exception 20160316 00:18:36< iceiceice> actually for that reason it might be a good idea to just remove the built-in pcall function from wesnoth's lua contexts 20160316 00:18:54< iceiceice> depending how paranoid you are about this sttuff 20160316 00:19:01< iceiceice> another bad thing that can happen is, 20160316 00:19:11< iceiceice> what if the error handling function in lua, calls some C++ code 20160316 00:19:29< iceiceice> and that C++ code does something perhaps triggering what originally triggered the exception to thorw a second exception 20160316 00:19:35< iceiceice> or a completely different exception 20160316 00:19:46< iceiceice> then you have a hot mess on your hands 20160316 00:19:53< celticminstrel> Sounds pretty confusing. 20160316 00:20:13< iceiceice> the jailbreak exceptio nthing is a hack 20160316 00:21:04< iceiceice> basically lua does not mix well with an exception-happy coding style 20160316 00:21:31< fabi> But you can have an application that encapsulates lua. 20160316 00:21:46< fabi> And use exceptions outside at will. 20160316 00:22:11< fabi> Compiling the whole application without exceptions is not needed. 20160316 00:22:19< iceiceice> the thing is that 20160316 00:22:25< iceiceice> lua is unusual among C libraries in that 20160316 00:22:27< celticminstrel> fabi: What iceiceice said about pushing only noexcept functions to Lua would do that, I think. 20160316 00:22:30< iceiceice> you are supposed to push Your functions to it 20160316 00:22:41< iceiceice> it's pretty common that you e.g. ask opengl for its function pointers 20160316 00:22:49< iceiceice> most C libraries do not ask you for your funciton pointers though 20160316 00:23:09< iceiceice> the thing is that if your function pointers throw exceptions, then that is "not nice" to lua 20160316 00:23:10< fabi> celticminstrel: it is also about calling lua from c++ 20160316 00:23:24< iceiceice> and it may be hard to cleanly separate your app into exception and exception fre 20160316 00:23:25< fabi> celticminstrel: You need to make both sides safe. 20160316 00:24:22< iceiceice> imo exception free code is nicer anyways 20160316 00:24:26< iceiceice> it tends to be a lot easier to reason about 20160316 00:24:50< iceiceice> and it runs alot faster in emscripten 20160316 00:24:55< shadowm> Wasn't it you who was arguing in favor of throwing exceptions in our Boost.Filesystem wrappers? :p 20160316 00:25:12< iceiceice> don't remember 20160316 00:25:13< iceiceice> maybe years ago 20160316 00:25:37< shadowm> I distinctly remember someone telling me "shadowm we should be throwing exceptions here" and I was like "but I like checking bools everywhere". 20160316 00:26:05< shadowm> And we didn't really have many people involved at the time who would care about that particular API. 20160316 00:26:20< iceiceice> was this 1.12 era? 20160316 00:26:30< iceiceice> or like earlier? 20160316 00:26:32< shadowm> Yes (BFS was introduced in 1.11.19). 20160316 00:26:48< iceiceice> well i dont know who else it could have been but i dont remember this :p 20160316 00:27:03< iceiceice> i think mostly i tried to eliminate exceptions 20160316 00:27:07< fabi> I like exceptions. 20160316 00:27:11< shadowm> Anyway, thanks for the technical explanation, that's a lot of stuff to think about. :\ 20160316 00:27:17< iceiceice> yup np 20160316 00:27:25< fabi> Sad to see the nice little fellows go away... 20160316 00:27:29< shadowm> I'm not really a fan of exceptions either to be honest. 20160316 00:28:13< shadowm> But I'm not sure if I can attribute that to anything but laziness and lack of thorough documentation reading skills. 20160316 00:28:57< iceiceice> i mean, i dont think they are a bad language feature 20160316 00:29:13< fabi> Exceptions are a nice concept. But they are not good implemented in c++ 20160316 00:29:17< iceiceice> i think if you are working on a program meant to run in low memory environments, and recover from out-of-memory errors, 20160316 00:29:21< iceiceice> they are almost invaluable 20160316 00:29:24< fabi> s/good/well 20160316 00:29:52< iceiceice> but i really dont agree with the people who say like "exceptions are THE way to signal errors in C++" 20160316 00:30:11< iceiceice> things like boost::lexical_cast, where it throws an exception to signal a parser error... 20160316 00:30:14< iceiceice> idk i think thats a bad idea 20160316 00:30:27< iceiceice> you should throw an exception only when something bad enough has happened to warrant terminating the program 20160316 00:30:32< iceiceice> because that may be exactly what happens 20160316 00:30:41< iceiceice> imo 20160316 00:31:04-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160316 00:32:20< fabi> iceiceice: Do you recommend that for all languages or just c++? 20160316 00:32:35< iceiceice> just c++ 20160316 00:32:41< fabi> okay 20160316 00:37:45< shadowm> Oh man I found the relevant emails. I regret doing this. 20160316 00:38:19< gfgtdf> shadowm: what are you doing ? 20160316 00:38:47< shadowm> Learning about the pitfalls of Wesnoth's embedded Lua implementation. 20160316 00:39:11< gfgtdf> shadowm: to do the lua update ? 20160316 00:39:26< shadowm> Uh, no, that's not my responsibility I'm afraid. 20160316 00:40:16< gfgtdf> shadowm: why are you investigatign the lua internqals then ? 20160316 00:40:47< shadowm> Because there's a chance I might be potentially considering embedding Lua in my own application. 20160316 00:41:31< gfgtdf> shadowm: note that our lua implementation also depends on boost :) 20160316 00:41:42< celticminstrel> How so? 20160316 00:41:55< gfgtdf> celticminstrel: https://github.com/wesnoth/wesnoth/blob/master/src/lua/lmathlib.cpp#L271 20160316 00:42:33< celticminstrel> So basically just for pi? 20160316 00:42:42< shadowm> That 1) is obviously not upstream code; 2) IIRC the chance didn't have a solid reason to be? 20160316 00:42:45< shadowm> *change 20160316 00:43:15< shadowm> It's commit f5e673e6443220c57e40cea31d430870b4f73925. 20160316 00:43:40< shadowm> I rather doubt the author was looking after functionality changes, so it doesn't really count. 20160316 00:46:19-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20160316 00:48:37< shadowm> s/looking// 20160316 00:56:03< shadowm> vultraz: Okay, so I remember I postulated that the tooltips might need shadows to stand out better? 20160316 00:56:27< shadowm> Please explain why you decided to remove shadows from window frames in response to that. 20160316 00:56:53< shadowm> *dialog frames 20160316 00:58:32< shadowm> Oh um. 20160316 00:58:44< shadowm> Castles are missing floor graphics now. 20160316 00:59:28< shadowm> vultraz: I was also speculating that the black boxes on the theme UI could do without their borders, not without themselves entirely. 20160316 01:01:24< shadowm> zookeeper: Would you perchance know something about this? https://dl.dropboxusercontent.com/u/21371130/Screenshots/75568.png 20160316 01:04:24-!- atarocch [~atarocch@31.159.29.255] has joined #wesnoth-dev 20160316 01:09:01-!- atarocch [~atarocch@31.159.29.255] has quit [Ping timeout: 244 seconds] 20160316 01:40:42< iceiceice> shadowm, i guess an alternative is, 20160316 01:40:54< iceiceice> you could try to reimplement lua from the ground up in C++ 20160316 01:41:00< iceiceice> so that it is exception-safe 20160316 01:41:01< iceiceice> :p 20160316 01:41:06< celticminstrel> Pffft. 20160316 01:41:13< iceiceice> there are probably some programmers out there whow ould think that is awesome and use it 20160316 01:41:20< iceiceice> you could reuse all their unit tests 20160316 01:41:24< celticminstrel> <-- 20160316 01:41:34< iceiceice> :) 20160316 01:42:49-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160316 01:47:09-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 260 seconds] 20160316 01:47:09-!- wedge010 is now known as wedge009 20160316 01:48:09-!- louis94 [~~louis94@91.178.242.1] has quit [Quit: Konversation terminated!] 20160316 01:53:11-!- ancestral [~ancestral@75-168-168-95.mpls.qwest.net] has joined #wesnoth-dev 20160316 01:53:33-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160316 01:58:11-!- irker474 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160316 02:09:41-!- gfgtdf_ [~chatzilla@f054158242.adsl.alicedsl.de] has joined #wesnoth-dev 20160316 02:11:52-!- gfgtdf [~chatzilla@f054170174.adsl.alicedsl.de] has quit [Ping timeout: 260 seconds] 20160316 02:12:06-!- gfgtdf_ is now known as gfgtdf 20160316 02:17:44-!- ancestral_ [~ancestral@75-168-168-95.mpls.qwest.net] has joined #wesnoth-dev 20160316 02:17:54-!- ancestral [~ancestral@75-168-168-95.mpls.qwest.net] has quit [Read error: Connection reset by peer] 20160316 02:17:54-!- ancestral_ is now known as ancestral 20160316 02:24:12< celticminstrel> So gfgtdf, about PR628, do you think it's alright to merge once the Travis tests pass? 20160316 02:26:03-!- iceiceice [~chris@wesnoth/developer/iceiceice] has quit [Quit: Leaving] 20160316 02:31:57-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20160316 02:43:09-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 02:43:38< gfgtdf> celticminstrel: well i'm stil not happy about the x =x , y = y changew in that commit. I perosnally think that 1) swicthing to x=x y=y will break every addom or mainline content so this is not realyl an option 20160316 02:44:04< gfgtdf> and i also think taht "I personally prefer" is not enogh reason do d o so 20160316 02:44:35< gfgtdf> i personally like the {x, y} form more but this is mostlikeley just becasue i got used to that 20160316 02:45:00< gfgtdf> and sureley the one who implemented those api in teh first place also prefered the {x, y} ofrm 20160316 02:46:43< gfgtdf> the {x,y, x=x, y=y} aswell as the userdata look to me liek they'll mkae the code even more complicated, becasue whenever you have a userdata you usually have too look up which things they do support while with simple tables you usually know very well what you'll get 20160316 02:47:07< gfgtdf> qabout implenting operators such subtraction for locations 20160316 02:47:08< celticminstrel> The third option was regular table with a metatble. 20160316 02:47:13-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 240 seconds] 20160316 02:47:13< celticminstrel> ^metatable 20160316 02:48:36< celticminstrel> {x,y,x=x,y=y} doesn't make the code (on the Lua side at least) more complicated; it just means they can address it either with .x .y or with [1] [2] 20160316 02:48:42< gfgtdf> i actually think that impleneting operator - is a nontrivial task, specialyl when you have locations a,b,c,d such that a-c = b-d and you implement it simply by somponentsize subtraction then the relative direction from a to b migth be different than the relative direction form c to d 20160316 02:48:48< celticminstrel> But it does mess up ilua's printing of it. 20160316 02:49:11< gfgtdf> i also think that think might be teh reason why the c++ map_location class has no such operator 20160316 02:49:48< celticminstrel> Well, it doesn't have to be as an operator, I guess, but there's a way to calculate the distance between two locations. 20160316 02:51:35< gfgtdf> celticminstrel: well yes but some codes will use .x .y and some will use [1] [2]. And i think this is sureley a regression over all codes using [1] [2]. for example it migth then happen that some code expect a {x, y} form and oters in the {x=x, y=y} form and you'd have too lookup every code for which form they expect 20160316 02:52:39< gfgtdf> celticminstrel: (this was mainly about custom lua implemented function, not c++ functions) 20160316 02:52:53< celticminstrel> Yeah, I get the idea. 20160316 02:55:21< celticminstrel> For the time being I can change pushlocation to only push {x,y} and/or revert some of the uses of pushlocation in return values. 20160316 02:57:09< celticminstrel> Oh right, the former does mean breaking some AI routines that returned locations, though. 20160316 02:57:55< gfgtdf> celticminstrel: hmm yes but those ai function are neigher used in mainline nor docuemted well on the wiki 20160316 02:58:23< celticminstrel> That was mainly just the get_dst_src stuff, I thought. 20160316 02:58:27< gfgtdf> celticminstrel: afaik the wiky says something like "Use lua debugging tools to find out what these function to or which datastructore tehy return" 20160316 02:58:30< celticminstrel> There's also eg get_targets 20160316 02:58:42< gfgtdf> do* 20160316 02:59:25< celticminstrel> mattsc: Do you know how commonly ai.get_targets() is used? 20160316 02:59:38< celticminstrel> And get_avoid() 20160316 03:00:03< celticminstrel> And get_attacks() 20160316 03:00:23< gfgtdf> celticminstrel: those functiosn are effected ? 20160316 03:00:27< celticminstrel> I think that's probably all of the ones that use locations... 20160316 03:00:44< celticminstrel> gfgtdf: Since I replaced the AI code's push_map_location with luaW_pushlocation, they are affected. 20160316 03:01:44< celticminstrel> I think there might be one more. 20160316 03:02:04< celticminstrel> Not sure where "push_movements" is used. 20160316 03:02:48< gfgtdf> celticminstrel: hmm github search shows no macthes for "get_targets". "get_attacks" is used but it refers to the lua defeined fronctions in ai_helper.lua 20160316 03:03:25< celticminstrel> One problem with locations is that some Wesnoth API functions do the equivalent of "return x,y" rather than "return {x,y}". 20160316 03:03:29< celticminstrel> This includes u.loc. 20160316 03:03:52< gfgtdf> celticminstrel: "get_avoid" is used ut its return value is immidiateley passed to location_set so this case woudlnt be a problem 20160316 03:04:19< celticminstrel> Right. So not really important for mainline, specifically. 20160316 03:05:36< gfgtdf> celticminstrel: afaik "loc" isnt docuemnted in te wiki, and i dobt anyone woudl use teh undocuemted "loc" instead of just "x" and "y" 20160316 03:05:59< celticminstrel> Ah, okay, so I can change that to return {x,y} without worrying about it, if that's the case. 20160316 03:06:12< celticminstrel> (Though I'd need to verify it's not used in mainline.) 20160316 03:07:44< celticminstrel> So if I changed pushlocation to not add string x and y keys, would you then be okay with merging the PR? 20160316 03:08:32< celticminstrel> Or should I also revert the return value changes for pathfinding functions? (String keys for the extra information in their location tables.) 20160316 03:11:35< celticminstrel> The other case of "return x,y" was get_mouseover_tile or whatever, I think. 20160316 03:12:49< gfgtdf> celticminstrel: hmm well not sure about changes for pathfinding functions, but if you change they you must make sure to check all mainline lua codes that use that function 20160316 03:13:42< celticminstrel> There should probably be WML unit tests for that, actually... 20160316 03:15:01< gfgtdf> celticminstrel: i actualyl think that find_reach is mostly used by a ai so mattsc migth have on opinion on this 20160316 03:15:40< celticminstrel> I did @highlight him on the PR, but I think he didn't notice. 20160316 03:17:40< gfgtdf> celticminstrel: hmm about "luaW_tolocation accepts units": i'm not sure whether tihs might be a little confusion. Specially since for example "wesnoth.match_unit" can now take a location or a unit as thirs parameter and they men completeley different things 20160316 03:18:01-!- ancestral [~ancestral@75-168-168-95.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160316 03:18:27< celticminstrel> Oh, good point... 20160316 03:19:57< celticminstrel> I need to make sure that I check if it's a unit before checking if it's a location. 20160316 03:20:05< mattsc> celticminstrel: I am not aware of any instance of ai_get_targets() being used 20160316 03:21:07< mattsc> By contrast, I do use find_reach() a lot 20160316 03:21:52< gfgtdf> celticminstrel: y i know, at least in wesnoth.match_unit it does check for units first. But my point is that afer this change people might asume that tehy can just pass a unit whnever a location is wanted, which is not the case for those function. 20160316 03:22:12< gfgtdf> mattsc: y but teh question was whether you use teh third paameter retuned for each location 20160316 03:22:36< celticminstrel> gfgtdf: No, I didn't change that. 20160316 03:22:43< celticminstrel> I just duplicated it under a string key. 20160316 03:22:53< mattsc> gfgtdf: Oh, I see (I haven’t had time to read up on everything yet, bit rushed for time) 20160316 03:23:05< mattsc> for find_reach: yes, I do 20160316 03:23:32< celticminstrel> mattsc: What about ai.get_attacks(), ai.get_avoid(), wesnoth.find_path(), wesnoth.find_cost_map()? 20160316 03:23:45< celticminstrel> Or wesnoth.find_vacant_tile() 20160316 03:23:51< gfgtdf> celticminstrel: find_path is a rather useful function tha i also use in my addons 20160316 03:23:57< mattsc> no, no, yes, yes 20160316 03:24:11< mattsc> what’s the third parameter of find_vacant_tile? 20160316 03:24:11< gfgtdf> wesnoth.find_vacant_tile is also coonly used whenever placing unit for example 20160316 03:24:29< celticminstrel> mattsc: It doesn't have one, just returns x,y as two separate values. 20160316 03:24:47< celticminstrel> mattsc: ie, it returns a single location, not a list of locations with extra data. 20160316 03:24:48< mattsc> celticminstrel: well, I defintiely use that function 20160316 03:25:01< mattsc> if that was the question 20160316 03:25:25< mattsc> celticminstrel: actually, the MAIs do use get_avoid() 20160316 03:25:46< celticminstrel> The changes I made to the three pathfinding functions were backwards-compatible, at least theoretically, but I was kind of hoping I could change wesnoth.find_vacant_tile() to return the location as a table instead of two separate values. I guess that won't work. 20160316 03:25:57< mattsc> Hmm, and get_attacks is also being used. 20160316 03:26:25< mattsc> Well, it will work, it just requires some changes in Lua code to be made also. 20160316 03:26:30< mattsc> That’s fine by me. 20160316 03:26:33< gfgtdf> celticminstrel: hmm i think we shouldn'T change those functions that returns 2 integers, x,y= func() is rather common and if you want a table you can still use loc = {func()} 20160316 03:26:57< celticminstrel> mattsc: Regarding get_avoid and get_attacks, as long as they're passed straight to a location_set, the change I'm proposing won't break anything. 20160316 03:26:57< mattsc> Either way is fine by me, I mean. 20160316 03:27:13< celticminstrel> Not sure if that applies to get_targets, possibly not. 20160316 03:27:31< mattsc> they are not always (passed directly to an LS) 20160316 03:28:30< celticminstrel> gfgtdf: Oh huh, I didn't know that was possible. I thought you had to use something like table.pack or something. 20160316 03:29:30< celticminstrel> mattsc: If they're only used it mainline I can easily update those uses of it; I'm more worried about if this change might break something in UMC or something. 20160316 03:29:41< celticminstrel> ^in mainline 20160316 03:32:51< mattsc> celticminstrel: yes, agreed, but I cannot really tell you that. 20160316 03:33:11< mattsc> I know that I have written little AI snippets for people for the campaigns here or there over the years. 20160316 03:33:36< mattsc> I also know that some people have taken MAIs and adapted them for UMC 20160316 03:34:10< mattsc> I don’t think that there’s a lot of that out there, but I assume the amount’s not zero either 20160316 03:34:18-!- gfgtdf [~chatzilla@f054158242.adsl.alicedsl.de] has quit [Ping timeout: 276 seconds] 20160316 03:34:35< celticminstrel> Mainly I'm worried about the aspect/goal functions now. 20160316 03:34:56< celticminstrel> I've concluded that the functions returning two integers cannot be easily changed. 20160316 03:35:13< mattsc> The only places where I am using those is in a couple MAIs, which query some standard aspects so that those are also taken into account. 20160316 03:35:17< celticminstrel> And I'm going to (at least for now) revert the pathfinding function changes, though they're supposed to be backwards compatible. 20160316 03:35:54< celticminstrel> (That is, the changes to their return values. I also changed their parameters a little, adding an alternate format.) 20160316 03:36:20< mattsc> See, for example: https://wiki.wesnoth.org/Micro_AIs#Fast_Micro_AI_.28ai_type.3Dfast_ai.29 20160316 03:36:46< mattsc> The section titled “Standard RCA AI aspects respected by this Micro AI” 20160316 03:37:42< mattsc> There are a small number of instances like that. And I know that that AI has been adapted to at least one UMC campaign. 20160316 03:38:06< mattsc> But beside that, 20160316 03:38:14< mattsc> I’d really be guessing too 20160316 03:41:54< celticminstrel> So it uses both get_avoid() and get_attacks(). 20160316 03:51:58< mattsc> Yes, apparently. I’d forgotten that ... 20160316 04:04:51-!- minzbonbon [~min@meta23.net] has quit [Ping timeout: 276 seconds] 20160316 04:09:03-!- minzbonbon [~min@meta23.net] has joined #wesnoth-dev 20160316 04:23:01-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: So long and thanks for all the fish.] 20160316 04:30:49< celticminstrel> ...wait, why does luaW_tovconfig return true if it finds nil or nothing? 20160316 04:34:33-!- aeth [~Michael@wesnoth/umc-dev/developer/aethaeryn] has quit [Ping timeout: 240 seconds] 20160316 04:53:50-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20160316 04:54:20-!- aeth [~Michael@wesnoth/umc-dev/developer/aethaeryn] has joined #wesnoth-dev 20160316 04:59:25-!- ancestral [~ancestral@75-168-168-95.mpls.qwest.net] has joined #wesnoth-dev 20160316 05:06:16-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 250 seconds] 20160316 05:14:53< celticminstrel> Apparently, changing that breaks the vconfig ipairs iterator. Fun! 20160316 05:27:10-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20160316 05:33:36< zookeeper> shadowm, uh, i ought to know. let's see... 20160316 05:34:54< celticminstrel> 8 of 10 tests passed. Only two left to fix. I guess I won't get it pushed tonight. 20160316 05:35:05-!- celticminstrel is now known as celmin|sleep 20160316 05:36:04< celmin|sleep> I suppose I should also run it over all tests too, to make sure fixing one didn't break another. 20160316 05:38:10< celmin|sleep> Huh? Why is a WML unit test using select_hex? 20160316 05:39:39< zookeeper> shadowm, what the actual f... 20160316 05:39:52< zookeeper> my changes can't do that, they've touched images only 20160316 05:41:17< celmin|sleep> ...where the heck is the "feeding" test scenario defined... 20160316 05:42:36< zookeeper> shadowm, except that they do O.o 20160316 05:42:50< celmin|sleep> ...oh wait. 20160316 05:43:03< zookeeper> namely, the removal of one stray pixel from the keep cobbles tile breaks surrounding bases 20160316 05:43:19< celmin|sleep> I mistakenly assumed all the filenames would start with test_ >_> 20160316 05:43:23-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 05:45:43-!- Kwandulin [~Miranda@p200300760F7D73B1FC27FC3BC833422F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160316 05:48:25-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 268 seconds] 20160316 05:50:42< zookeeper> shadowm, i'd like to say that it's unsurprising that switching from TERRAIN_BASE to NEW:BASE for the affected castles/keeps fixes the issue. but, i'll try to understand what's actually happening, first... 20160316 05:53:48< zookeeper> this is very curious 20160316 05:56:20< celmin|sleep> Curiouser and curiouser! :P 20160316 05:59:26< zookeeper> like, pure black magic mystery 20160316 06:05:29< zookeeper> hrhm. 20160316 06:05:46< zookeeper> #1 theory: pnggauntlet crapped some of the files 20160316 06:05:52< celmin|sleep> Not unlike my missing TC then. 20160316 06:13:51< zookeeper> yesss, that seems to be it. it had switched alpha to some paletted thing, which apparently the game can't handle. and then... i suppose the silly multihex rule TERRAIN_BASE uses _somehow_ causes the builder to crap out on some of the surrounding hexes as well (what, why? how? no idea) 20160316 06:14:45< zookeeper> this is worrying because i've been running pnggauntlet with the same settings for a long time without any problems 20160316 06:16:59< zookeeper> and by paletted thing i don't mean what you think. the file still shows up at 32bit. 20160316 06:18:08< zookeeper> although i probably read the help page wrong so it's maybe got nothing to do with palettes after all 20160316 06:32:22< zookeeper> right, yes, tweakpng tells me that it has replaced the alpha channel with a tRNS chunk indicating a transparent color 20160316 06:32:25< zookeeper> or something like that 20160316 06:44:17-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160316 06:59:51< zookeeper> what the hell -.- when when i specifically tell it to use rgb+alpha, it still turns one image into paletted format 20160316 07:03:04< zookeeper> i don't like that i can't trust my favorite compressor anymore 20160316 07:06:01-!- ancestral [~ancestral@75-168-168-95.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20160316 07:07:28-!- irker917 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160316 07:07:28< irker917> wesnoth: ln-zookeeper wesnoth:master 1e271987616f / data/core/images/terrain/ (10 files in 5 dirs): Fixed compression-induced brokenness https://github.com/wesnoth/wesnoth/commit/1e271987616fdb3d0da7b7fab997ec95c18f495e 20160316 07:07:29< zookeeper> i think i caught all of them 20160316 07:26:02< irker917> wesnoth: ln-zookeeper wesnoth:master 9cc1188ce733 / data/core/images/terrain/ (5 files in 3 dirs): Fixed a few more cases of Fixed compression-induced brokenness https://github.com/wesnoth/wesnoth/commit/9cc1188ce7333915091e08d62a04887347cdd052 20160316 07:27:06 * zookeeper facepalms at commit message fail 20160316 07:27:38< zookeeper> not a good morning 20160316 07:35:07< vultraz> shadowm: I'm working on something to replace the window shadows, just wait a few days 20160316 07:37:36< shadowm> Then what did you want me for? 20160316 07:38:42< vultraz> to get your opinion on the new borders themselves 20160316 07:38:54< vultraz> they're fully procedural now, and also at least 50% thinner 20160316 07:39:01< vultraz> do you think too thin? 20160316 07:39:37< vultraz> as for the theme boxes, I'm not sure it would look good with just a black background 20160316 07:39:38< shadowm> Like, we've been over this already. I think you can obtain more constructive feedback from anyone else. 20160316 07:39:51< vultraz> and I did remove the menu button images 20160316 07:40:17< Aginor> do we have a designer we can get feedback from? 20160316 07:40:17< shadowm> Well, you have my opinion on the matter already, it doesn't look good at all without the black regions. 20160316 07:40:24< vultraz> yes, well, you happen to be only one of two people (other is celmin|sleep) who cares about the UI design 20160316 07:40:41< vultraz> for the rest of us, I could commit ponies of unicorns and you'd all be like 'meh' :P 20160316 07:40:43< shadowm> Aginor: Not quite, but LordBob (a portrait artist) has served double duty as our UI designer. 20160316 07:40:57< shadowm> s/a portrait artist/THE portrait director/ 20160316 07:41:21 * Aginor nods 20160316 07:41:23< shadowm> Only since 1.9.x, mind you. 20160316 07:43:03< vultraz> so right now I'm serving as the de facto UI improvements guy 20160316 07:43:16< vultraz> who goes to LB asking for more images :P 20160316 07:44:54< shadowm> vultraz: Well, work on stimulating their brain cells in charge of apathy inhibition then, because I'm no longer active, remember? I made you CM and you wanted to become RM for a reason after all. 20160316 07:45:17< vultraz> alright 20160316 07:45:23< shadowm> I'd rather not even look at the title screen unless I absolutely have to. 20160316 07:45:25< vultraz> from now on I'll only speak to celmin|sleep about the UI 20160316 07:46:07< zookeeper> shadowm, would you agree that some kind of online tool for grepping the add-on server(s) contents (not publicly available, of course) would be a good thing to have? it would make it easier to determine the impact of compatibility-breaking changes, and if one is feeling nice it'd allow one to drop a note to relevant authors. 20160316 07:46:07< zookeeper> i'm mainly thinking in case we get some more of those people who aren't comfortable with engine development but can do python or whatever and have experience with web-related stuff. 20160316 07:46:13< shadowm> And be careful with overdoing it too, otherwise you get people getting crazy ideas about replacing Wesnoth's input scheme with some other game's and things like that. 20160316 07:47:10< Aginor> zookeeper: my immediate thoughts for that idea are "security hole" and "shell injection" 20160316 07:47:38< shadowm> Aginor: How would it be a security hole? It'd only have read-only access to the add-on files. 20160316 07:47:59< Aginor> shadowm: if we actually run grep? 20160316 07:48:03< shadowm> IMO it wouldn't be any more of a security hole than phpBB or MediaWiki already are. ¬_¬ 20160316 07:48:37< Aginor> unless we go and write our own web-grep-implementation that we have complete control over 20160316 07:48:42< shadowm> Obviously it wouldn't "run grep" with an arbitrary command line. I think everyone knows that system() is evil and every library/programming language developer who implements it should be shot in the head. 20160316 07:49:08< shadowm> s/knows/agrees/ 20160316 07:49:30< Aginor> I think there's a vast majority of people who disagree 20160316 07:49:37< Aginor> I'm not one of them 20160316 07:50:25< shadowm> I'm willing to make an exception for the people who designed and ratified POSIX because they honestly didn't know better back then. 20160316 07:51:53< shadowm> So yes, the immediate danger is that this gets approved and deployed by someone who doesn't care/know their network security hazards. 20160316 07:53:57 * Aginor shrugs 20160316 07:54:04< vultraz> Aginor: do you have a few minutes to help me with something? 20160316 07:54:18< Aginor> vultraz: I'm about to make an international phonecall 20160316 07:54:24< vultraz> ah, ok 20160316 07:54:32< Aginor> vultraz: once I'm done I'd be happy to be of assistance 20160316 07:54:46< zookeeper> ...so, in other words, it's an ok idea to suggest to such a person, as long as potential security considerations are stressed enough? 20160316 07:55:12< Aginor> zookeeper: yes. someone who's heard of OWASP is a good start ;) 20160316 07:55:49< shadowm> zookeeper: All that said, if you are comfortable with the command line, I'm willing to give you the required access for grepping stuff. 20160316 07:56:04< shadowm> *and SSH 20160316 07:57:17< zookeeper> well, sure, it's been a long time since i've last done that but i'm sure i'd manage 20160316 07:57:39< shadowm> Start by sending me a forum PM with your public key. 20160316 07:59:50< zookeeper> sure, but that'll have to wait for later since i want to know that i know what i'm doing, first 20160316 08:03:21< Aginor> vultraz: ok 20160316 08:03:26< Aginor> vultraz: now I have time 20160316 08:05:25< vultraz> Aginor: ok. taking inspiration from dota 2, I wanted to make each gui2 dialog tint the screen behind it a bit in order to keep focus on that specific window. (dota 2 also blurs the background but I don't think we have the ability to do that yet) 20160316 08:05:38< shadowm> (Of course it had to be Dota 2.) 20160316 08:05:44< vultraz> I was able to accomplish that in a basic manner by adding a call to draw_solid_tinted_rectangle in tdialog;:show 20160316 08:06:01< vultraz> however, two problems 20160316 08:06:33< vultraz> 1. ever successive dialog simply adds more tint to the background (might be fixed with a flag) 20160316 08:06:54< vultraz> 2. sub-dialogs don't draw the tint on top of dialogs underneath 20160316 08:07:24< vultraz> that might be because I'm drawing on the framebuffer instead of the window surface.. 20160316 08:08:41< Aginor> vultraz: your problem is related to what I was talking about the other day, dialogs don't know properly about each other. 20160316 08:08:47< vultraz> so, my question is this: how do I make sure it always add the tint to the entire area not covered by the currently active window, barring any area not already tinted 20160316 08:08:55< vultraz> adds* 20160316 08:09:21< Aginor> do I understand correctly? You don't want a tinted-area double-tinted? 20160316 08:10:02< Aginor> vultraz: make a new class that keeps tracks of your windows, and is responsible of their decoration 20160316 08:10:11< Aginor> let's call it "window-manager" or something similar 20160316 08:10:28-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 08:10:31< Aginor> the window manager is responsible for drawing borders, and tinting, etc 20160316 08:11:04< Aginor> it can also solve the problem of finding overlapping windows and making sure they're redrawn in the right order 20160316 08:11:41< Aginor> then avoiding double-tinting becomes the problem of ensuring that two tint-rectangles don't overlap 20160316 08:12:21< Aginor> for inspiration see https://en.wikipedia.org/wiki/X_window_manager 20160316 08:12:32< Aginor> (it'd be quite a bit of work) 20160316 08:13:33< vultraz> damn. I was hoping it would be a simple solution 20160316 08:13:51< Aginor> there might be hacky ways 20160316 08:14:05< Aginor> but that'd be the Correct (TM) way to solve the problem 20160316 08:14:18< Aginor> and we'll have to go down that path eventually to some extent anyway 20160316 08:14:57-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 246 seconds] 20160316 08:15:14< vultraz> I'm not sure what you mean by "drawing borders" 20160316 08:15:35< vultraz> borders are window decoration defined in a window's defintion 20160316 08:15:36< Aginor> vultraz: isn't that what you want the tinted borders from? 20160316 08:16:02< Aginor> hmm 20160316 08:16:04< Aginor> I misread 20160316 08:16:46< vultraz> Aginor: this is the effect I want https://www.dropbox.com/s/its1vfnoylegmsc/tintedgui2background.PNG?dl=0 20160316 08:16:47< Aginor> easier solution, have your window manager draw a tint before your modal dialog. 20160316 08:17:07< vultraz> it works for one dialog, and disappears when you close that dialog. it's multiple dialogs that are the problem 20160316 08:17:16< Aginor> when dialog is closed, redraw, draw new tint, draw previous top-dialog 20160316 08:18:04< Aginor> vultraz: you need to keep track of windows and be able to re-draw the entire screne when a window closes to do it properly 20160316 08:18:20< vultraz> ahh 20160316 08:18:36< vultraz> I'm thinking, maybe keep a vector of window dimensions, or something 20160316 08:18:41< Aginor> have your window-manager class keep a stack of windows 20160316 08:18:55< Aginor> and possibly their types 20160316 08:18:58< vultraz> then when one is closed, take the last entry, delete it, and redraw the last rectangle 20160316 08:19:01< vultraz> something like that... 20160316 08:19:07< Aginor> yes 20160316 08:19:22< Aginor> video2::draw_layering's equivalent in GUI2 land 20160316 08:19:22< vultraz> then again, any window position change or resize basically invalidates the stack 20160316 08:19:23< irker917> wesnoth: ln-zookeeper wesnoth:master bc6effd0dec4 / data/core/terrain-graphics.cfg: Fixed a small glitch between flat shore and sand shore https://github.com/wesnoth/wesnoth/commit/bc6effd0dec4865b5c2dd17616b21400c26f1c6d 20160316 08:19:33< Aginor> nope 20160316 08:19:56< Aginor> well, yes if you only track the position 20160316 08:20:02< Aginor> track references to the windows instead 20160316 08:20:05< vultraz> even better to keep track of the windows themselves 20160316 08:20:07< vultraz> yeah 20160316 08:20:12< vultraz> then use their dimensions 20160316 08:20:19< Aginor> possibly windows with metadata 20160316 08:20:26< Aginor> where the metadata can be references 20160316 08:20:37< Aginor> that way you can also tell the windows to draw themselves 20160316 08:20:57< Aginor> and in what order 20160316 08:21:01< Aginor> and mark them as dirty 20160316 08:21:43< Aginor> closing a non-tinted dialog should cause (naivly) the bottom of the stack to the top to redraw themselves 20160316 08:21:52< Aginor> each being marked as dirty 20160316 08:21:56< Aginor> before the draw 20160316 08:22:10< Aginor> to optimise performance, have them redraw only the affected area 20160316 08:22:35< Aginor> a tinted dialog is in effect a window covering the entire screen, thus needing to invalidate all underlying components 20160316 08:22:53< vultraz> this is all very complicated 20160316 08:23:03< Aginor> this is the kind of discussion where I'd usually be drawing on a whiteboard 20160316 08:24:01< Aginor> https://awwapp.com/b/uyutdn3dw/ 20160316 08:24:09< Aginor> for all virtual whiteboard needs 20160316 08:24:13< Aginor> no idea how good that app is 20160316 08:37:34-!- boucman_work [~boucman@193.84.89.18] has joined #wesnoth-dev 20160316 08:38:45-!- Kwandulin [~Miranda@p200300760F7D73B1FC27FC3BC833422F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160316 08:50:03< vultraz> well, I actually don't have much more time to talk 20160316 08:50:12< vultraz> it's almost 8 and I need to get dinner 20160316 08:50:15< Aginor> vultraz: for all your fading-in/out/to-the-side things, yuo want a lerp function 20160316 08:50:27< vultraz> a what now? 20160316 08:50:29< Aginor> and deal with it time-based instead of anything else 20160316 08:50:34< Aginor> https://en.wikipedia.org/wiki/Linear_interpolation 20160316 08:51:53< Aginor> vultraz: do you agree that we should introduce a window-manager class? 20160316 08:52:16< Aginor> that can be leveraged to deal with your tinting, and even for fading 20160316 08:52:31< Aginor> also, note that all modern UI's have moved away from fading 20160316 08:54:12< vultraz> dota 2 does some nice effects with its windows that I really like (thought i has far fewer windows than we) 20160316 08:54:21< vultraz> but whatever we choose, our UI does need some effects 20160316 08:54:28< vultraz> it's very static right now 20160316 08:54:51< Aginor> I'd argue that we don't need effect as much as to clean it up 20160316 08:54:56< Aginor> it's busy and cluttered 20160316 08:55:10< vultraz> that is true too 20160316 08:55:14< Aginor> our theming is not helping with that 20160316 08:55:32< vultraz> god, gui1 and the theme system needs to burrrnnn 20160316 08:55:59< Aginor> simplifying the cluttering of the UI would contribute more to a nicer experience than sprinkles 20160316 08:56:02< vultraz> but that, and effects, and whatever, are all part of the same goal 20160316 08:56:12< vultraz> making the UI feel smoother and more intuitive 20160316 08:56:36< Aginor> sprinkles are good once you are in a position to add topping, but if you're still trying to sort out the rest then it's just a distraction 20160316 08:56:47< vultraz> right 20160316 08:56:48< Aginor> vultraz: not just smoother, but less cluttered 20160316 08:57:08< Aginor> but we should also focus on the right things at the time 20160316 08:57:11< vultraz> so whatever you think is the best base to start sorting things out, I'm on board with 20160316 08:57:30< Aginor> let's stay focused on completing the GUI2 transition since that's the path we're going down 20160316 08:57:44< Aginor> then we can worry about sprinkles 20160316 08:57:44< vultraz> I can do that 20160316 08:58:04< Aginor> how about getting the non-finished network screens done? 20160316 08:58:14< vultraz> the what? 20160316 08:58:25< Aginor> join game or whatever it is 20160316 08:58:31< Aginor> the experimental screen 20160316 08:58:32< vultraz> oh, yeah 20160316 08:58:39< Aginor> get that sorted 20160316 08:58:44< vultraz> that's a huge cluster$&()*@ 20160316 08:58:46< Aginor> get the others sorted 20160316 08:58:55< Aginor> then do the main game screen last 20160316 08:59:13< Aginor> well, that and editor at the same time I guess 20160316 08:59:18< vultraz> right now I'm doing all the smaller in-game dialogs 20160316 08:59:23< vultraz> I just did Recruit 20160316 08:59:26< vultraz> next will be Recall 20160316 08:59:30< vultraz> then Advance 20160316 08:59:47 * Aginor nods 20160316 09:00:04< Aginor> I think it might be useful to get some of the big ones out of the way too though 20160316 09:00:12< vultraz> now that I've made the unit preview pane widget, it will got lot faster 20160316 09:00:18< Aginor> that way we'll know if there's any more pitfalls 20160316 09:00:22< vultraz> yeah 20160316 09:00:26< vultraz> I'm also working on the addons manager 20160316 09:00:31< Aginor> cool 20160316 09:00:34< vultraz> but shadowm told me to not touch the networking side of things, so 20160316 09:00:35< Aginor> how's that getting on? 20160316 09:00:48< vultraz> the interface is 90% done 20160316 09:01:03< vultraz> just need to add more filtering functionality 20160316 09:01:26< Aginor> sweet 20160316 09:01:26< vultraz> then I need someone who knows our networking code to hook it into the new dialog 20160316 09:01:53< vultraz> Aginor: this is about what it looks like now https://www.dropbox.com/s/sjj78qioc5pqp81/GUI2%20addons%20list%20FULL%20WINDOW%20staging%207.PNG?dl=0 20160316 09:02:23< vultraz> anyway 20160316 09:02:25< vultraz> I do have to go 20160316 09:02:36< Aginor> enjoy dinner 20160316 09:02:40< vultraz> thanks 20160316 09:03:26< shadowm> vultraz: loonycyborg wrote the network transfer dialog and the Boost.Asio glue it uses. 20160316 09:03:35< shadowm> *the GUI2 network transfer dialog 20160316 09:04:14< shadowm> The really, really bad news is that the MP client does _not_ use Boost.Asio, it uses SDL_net. 20160316 09:05:00< shadowm> But if you want to tackle the campaignd client, you will probably get more than enough help from him. 20160316 09:05:06< shadowm> *tackle the campaignd client first 20160316 09:05:57< shadowm> Otherwise, there isn't a SDL_net GUI2 network transfer dialog in existence yet, so you'll need to get veeery creative OR get loonycyborg to actually finish work on the Boost.Asio wesnothd client/server branch. 20160316 09:06:56< shadowm> I'd greatly prefer if he finished work on that branch instead because honestly SDL_net needs to die. 20160316 09:07:24< shadowm> (I'll spare you a repeat of the same old rant.) 20160316 09:14:58< vultraz> alright, I'll speak to him 20160316 09:31:29< zookeeper> err. i was getting a solid >20fps in the editor with my heavy water test map using a build which was probably a few days old, but after i built this morning, it's dropped to 9. 20160316 09:33:27< zookeeper> i hope that's just me, somehow 20160316 09:34:56< zookeeper> looks like it's just in the editor 20160316 09:35:24-!- Nobun [~nobun@host62-49-dynamic.12-79-r.retail.telecomitalia.it] has joined #wesnoth-dev 20160316 09:40:05-!- Elvish_Hunter [~elvish_hu@wesnoth/developer/elvish-hunter] has joined #wesnoth-dev 20160316 09:40:14< Elvish_Hunter> Hi :) 20160316 09:41:21< Elvish_Hunter> 20160315 13:11:40 * zookeeper wonders if someone else could run data/tools/hexometer 20160316 09:42:26< Elvish_Hunter> Well, given that it's a Bash script, I suppose that Windows users can't run it... 20160316 09:43:11< Elvish_Hunter> Except if they install Cygwin. 20160316 09:43:31< Elvish_Hunter> For this reason, is anyone interested in a Python port of this tool? 20160316 09:49:31-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160316 09:52:14< zookeeper> i wouldn't mind, except if by python you mean python with random dependencies that i wouldn't have 20160316 09:53:16< Elvish_Hunter> No. Just Python and the Pillow library. 20160316 09:54:56< zookeeper> the what 20160316 09:55:57< Elvish_Hunter> https://python-pillow.org/ 20160316 09:56:14< Elvish_Hunter> It's the successor of the PIL library. 20160316 09:56:34< Elvish_Hunter> It's required for pretty much every image handling in Python. 20160316 10:08:27< zookeeper> vultraz, "As for the fullscreen issue, I really can't say what the cause is." <- how about "not being able to select resolution in fullscreen"? :p 20160316 10:09:01< zookeeper> (i don't recall if that discussion here was before or after the release, but hopefully by now you're convinced that it was a bad idea) 20160316 10:20:20-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160316 10:25:11-!- mjs-de [~mjs-de@x4db59a36.dyn.telefonica.de] has joined #wesnoth-dev 20160316 10:33:54-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160316 10:37:31-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 10:42:02-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 244 seconds] 20160316 11:04:13-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160316 11:16:28-!- VultCave [~chatzilla@124.109.10.167] has joined #wesnoth-dev 20160316 11:17:54-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Read error: Connection reset by peer] 20160316 11:17:55-!- VultCave is now known as vultraz 20160316 11:18:45-!- louis94 [~~louis94@91.178.242.1] has joined #wesnoth-dev 20160316 11:19:36-!- irker917 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160316 11:23:57-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160316 11:25:52-!- Elvish_Hunter [~elvish_hu@wesnoth/developer/elvish-hunter] has left #wesnoth-dev ["Ciao!"] 20160316 11:32:14-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth-dev 20160316 11:33:14-!- boucman_work [~boucman@193.84.89.18] has quit [Ping timeout: 250 seconds] 20160316 11:59:48-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160316 12:00:06-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 250 seconds] 20160316 12:00:09-!- ancestral [~ancestral@75-168-27-21.mpls.qwest.net] has joined #wesnoth-dev 20160316 12:04:39-!- ancestral [~ancestral@75-168-27-21.mpls.qwest.net] has quit [Ping timeout: 264 seconds] 20160316 12:14:32< vultraz> slight problem :| 20160316 12:14:57< vultraz> I can't do anything to the experiential mp lobby since there are no games in it to test the interface :| 20160316 12:16:34< vultraz> t'is annoying 20160316 12:19:37< zookeeper> ...create a game? 20160316 12:19:45< zookeeper> or two, or three? 20160316 12:20:31< vultraz> but I have to be in the games :/ 20160316 12:20:57< vultraz> and I can't run two clients because two clients can't join with the same username 20160316 12:21:14< zookeeper> and you... have to join with the same username? 20160316 12:21:28< vultraz> i have no other one 20160316 12:22:18 * zookeeper stares 20160316 12:22:26< zookeeper> what's the catch here 20160316 12:22:31-!- gfgtdf [~chatzilla@f054158242.adsl.alicedsl.de] has joined #wesnoth-dev 20160316 12:23:15< vultraz> I need to be able to connect to a server with running games 20160316 12:23:33< vultraz> or somehow create autonomous game instances that will continue to run 20160316 12:24:16< zookeeper> so connect to a server as vultrazfoo and create a game, then connect to the server as vultraz and test whatever you wanted to test..? 20160316 12:27:34< Nobun> vultraz: if you need I cann connect in the game server together with you 20160316 12:27:51< Nobun> if this can help you somehow 20160316 12:29:28< vultraz> oh, wait, the names don't have to be registered 20160316 12:29:40-!- gfgtdf [~chatzilla@f054158242.adsl.alicedsl.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 44.0.2/20160210153822]] 20160316 12:29:50< vultraz> right 20160316 12:29:52< vultraz> i forgot that 20160316 12:30:04< vultraz> ty ty 20160316 12:30:11< vultraz> Nobun: i'm good, thanks 20160316 12:36:25< Nobun> you're wellcome... I am not able to do many things to contribute, but if I can do something, I will happy to do it :) 20160316 12:43:15-!- boucman_work [~boucman@193.84.89.18] has joined #wesnoth-dev 20160316 12:50:23-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160316 13:02:21< celmin|sleep> Silly vultraz is silly. 20160316 13:05:59-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20160316 13:07:17-!- ancestral [~ancestral@75-168-27-21.mpls.qwest.net] has joined #wesnoth-dev 20160316 13:12:57-!- celmin|sleep is now known as celticminstrel 20160316 13:13:44-!- ancestral [~ancestral@75-168-27-21.mpls.qwest.net] has quit [Ping timeout: 260 seconds] 20160316 13:25:43-!- atarocch [~atarocch@109.119.13.0] has joined #wesnoth-dev 20160316 13:32:16< Nobun> wow... I fixed the bug I found in a very unsuspected way... now I'm testing if it works while changing screen resolution 20160316 13:32:45 * celticminstrel thinks you meant "unexpected". 20160316 13:33:13< Nobun> lol... perhaps 20160316 13:33:40< Nobun> however as I feard, that fix work weird if I try to resize windows... now I will try alternate 2 20160316 13:36:21< mattsc> celticminstrel: what’s the reason that you made it possible to change the [default] facet of aspects? 20160316 13:37:02< Nobun> celticminstrel: may I ask you a suggestion? I'd like to slow-down the speed of loading cache at startup (before the main menu) 20160316 13:37:14< mattsc> I always that it was the point that they are immutable. 20160316 13:37:16< Nobun> in order to test properly if the fix work or not 20160316 13:37:51< Nobun> mattsc: if I remember well you are the one who builds the mac version, right? 20160316 13:38:03< celticminstrel> No, that's ancestral. 20160316 13:38:20< celticminstrel> mattsc: Was that the point? 20160316 13:38:26< mattsc> Nobun: as celticminstrel says; I used to, but haven’t in a long time 20160316 13:39:03< mattsc> celticminstrel: that was my interpretation at least; so there’s the default, and every change on top of that is an extra facet 20160316 13:39:24< mattsc> If nothing else, I always found it very convenient to check for changed aspects that way. 20160316 13:39:34< celticminstrel> Hmm. 20160316 13:39:37< mattsc> All you had to do is look at the AI component structure to see if something worked. 20160316 13:39:46< Nobun> I don't have mac, but I had a little suggestion for the mac packager (in short... trying to static build to see if the static build is supported by all MAC OSes instead of the current problem on supporting different MAC OS releases) 20160316 13:39:55< mattsc> something = a change to an aspect 20160316 13:40:11< celticminstrel> That's still true, right? 20160316 13:40:37< mattsc> If you change the default, you can see that in the component structure? 20160316 13:40:43< celticminstrel> Yeah. 20160316 13:40:49< celticminstrel> I think. 20160316 13:40:53< mattsc> let me check 20160316 13:41:01< celticminstrel> You can certainly see it in the list of aspects in the inspector. 20160316 13:41:08< mattsc> Nobun: you should talk to ancestral about that. 20160316 13:41:30< celticminstrel> I didn't have a really strong reason for changing that though, so I could probably be convinced to revert it. 20160316 13:41:40< mattsc> celticminstrel: what I mean is, if you changed an aspect before, you only needed to see if there were extra (indented) lines in the component structure. You did not actually have to read anything. 20160316 13:41:53< celticminstrel> Ah. 20160316 13:42:00< mattsc> Anyways, but that’s just convenient. 20160316 13:42:21< mattsc> The underlying point is: if you change the default, it’s not the default any more. Somehow that seems contradictory to me. 20160316 13:42:36< celticminstrel> I think that if we want the default to be immutable, then perhaps it should be removed from the config. 20160316 13:42:46< celticminstrel> And instead hardcoded somewhere in the C++ code. 20160316 13:42:49-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160316 13:43:20< mattsc> Not necessarily (IMO). 20160316 13:43:41< mattsc> But seriously, what does “default” mean if it’s not the actual the default? 20160316 13:43:48< mattsc> I mean that as a question, not an argument. 20160316 13:44:17< celticminstrel> It's still "a" default - it's the last value the game will fall back to if no other facets are active. 20160316 13:44:29< celticminstrel> It's just not necessarily the engine default. 20160316 13:45:07-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 248 seconds] 20160316 13:45:08-!- wedge010 is now known as wedge009 20160316 13:45:25< mattsc> Well, I wouldn’t call that the default. 20160316 13:45:39< mattsc> But in any case, I don’t really care, I just wanted to hear your thoughts on this. 20160316 13:48:37< celticminstrel> It seems like you have a point, and certainly anything that can be done by changing the default can also be done by just adding another always-active facet, but I guess I felt that if the config structure made something look possible than it should be possible, or something? Like, [default] is basically just a [facet] without the turns and time_of_day keys. 20160316 13:48:50< celticminstrel> ^then 20160316 13:51:34< mattsc> celticminstrel: As I said, I don’t really have a strong feeling about it one way or another. I guess I just got used to it being one way, that doesn’t mean it has to remain this way. 20160316 13:51:54< mattsc> So, the changes you made to the ExpAI engine definition is what’s needed for all AIs that define and engine? 20160316 13:52:26< celticminstrel> mattsc: Most should just need that first line with the local being assigned from ... 20160316 13:53:11< celticminstrel> The ExpAI needed a bit more because it seemed to be using the persistent data somehow. 20160316 13:53:37< mattsc> celticminstrel: so that’s going to ripple through a lot of UMC. With the external CAs being a relatively recent thing, I bet there are way more custom AIs with an engine definition than with external CAs out there. 20160316 13:53:56< mattsc> What’s the best way of handling that? 20160316 13:54:03< mattsc> Making people aware of that? 20160316 13:54:23< mattsc> It needs an obvious message, rather than just a silent failure. 20160316 13:54:39< celticminstrel> ...I think it was removing a line assigning to ... wasn't it. 20160316 13:54:41< celticminstrel> ^from 20160316 13:54:47< celticminstrel> Hmm. 20160316 13:55:39< mattsc> Oh, it just looks like an addition for the ExpAI because it uses ‘data’. Hmm. 20160316 13:56:00< mattsc> I did get an error message when I did a quick test of the MAIs, but I don’t remember why. 20160316 13:56:04< celticminstrel> I think the key point is that the "ai" table used to be passed as an argument. 20160316 13:56:16< mattsc> Let me get back to you on this after I’ve done some testing ... 20160316 13:56:19< celticminstrel> So, many engine definitions start with something like "local ai = ..." 20160316 13:56:42< celticminstrel> However, the "ai" table is no longer passed as an argument, so by doing that, they lock themselves out of accessing the "ai" table. 20160316 13:56:56< celticminstrel> Thus, any attempt to access "ai" table methods would result in an error. 20160316 13:57:02< mattsc> your code for the ExpAI still passes that argument though. 20160316 13:57:12< mattsc> Umm, what? 20160316 13:57:33< celticminstrel> ...let me code find the commit so that I'm not talking from memory. 20160316 13:57:37< celticminstrel> ^go 20160316 13:57:38< mattsc> I must be misunderstanding something. How do you get access to the ai table then? 20160316 13:57:50< mattsc> https://github.com/wesnoth/wesnoth/pull/615/commits/10e7f689cc35a88dd956 20160316 13:57:56< celticminstrel> It's temporarily injected into global scope for the duration of the action. 20160316 13:58:15< celticminstrel> Oh, thanks. 20160316 13:59:51< celticminstrel> Yeah, line 551 is the main point - in most engine definitions I think that removing that line would make them work. 20160316 14:00:12< mattsc> most, but not all, right? 20160316 14:00:25< celticminstrel> Well, the ExpAI is proof of that, yes. 20160316 14:02:00< celticminstrel> I suppose this would also break anything that actually used a global "ai" variable for, well, anything (not just AI). 20160316 14:02:19-!- ancestral [~ancestral@45.sub-70-197-228.myvzw.com] has joined #wesnoth-dev 20160316 14:03:20< mattsc> Right; I wouldn’t worry about the latter. (I think some of my test code actually does that, but I can change that easily) 20160316 14:03:39< mattsc> I have no idea how many UMC AIs may be out there that use the data variable. 20160316 14:03:53< celticminstrel> I could easily change it so that non-AI code using a global "ai" variable is not broken. 20160316 14:04:11< celticminstrel> Though I doubt there's much code doing such a thing. 20160316 14:04:14< mattsc> I don’t think that necessary. 20160316 14:04:17< mattsc> exactly 20160316 14:04:18< celticminstrel> Yeah. 20160316 14:04:31< celticminstrel> I won't bother then. 20160316 14:04:57< mattsc> So as I said, I think we should make it obvious what’s happening for AIs that use ‘data’, rather than it just throwing an obscure generic “variable is nil” or something error. 20160316 14:05:25< celticminstrel> I'm trying to think if there's a way to actually do this though. 20160316 14:05:40< mattsc> Most people who use custom AIs don’t actually understand them very well. They just copied them from somewhere and at best modified the Lua code itself a little, but not the setup. 20160316 14:06:22< mattsc> Could you insert a ‘if not data then wesnoth.message() end’ or something? 20160316 14:06:43< celticminstrel> Like, prepend that to the code of all engine definitions? 20160316 14:07:18< mattsc> Something like that. I haven’t thought it through. 20160316 14:07:24< celticminstrel> Hmm. 20160316 14:07:38< celticminstrel> Will that work... 20160316 14:08:19< celticminstrel> I feel like it probably won't... 20160316 14:09:41< mattsc> possibly 20160316 14:09:41< celticminstrel> Maybe scanning the code for the string "ai ="... 20160316 14:10:06< mattsc> Btw, if you do this: ‘./Wesnoth -d -t protect_unit’ it shows you what kind of error you get at the moment 20160316 14:10:27< celticminstrel> I'm in the middle of a rebase right now so I can't try it. 20160316 14:10:41< mattsc> There’s also an error about unknown type of goal, but I haven’t looked into where that’s coming from yet. 20160316 14:10:45< mattsc> okay, no worries. 20160316 14:10:52< mattsc> I’ll have to stop this shortly anyway. 20160316 14:11:19< celticminstrel> Unknown goal type might be related to Lua goals. 20160316 14:11:40< celticminstrel> Or it might be related to protect_my_unit which I removed. 20160316 14:12:20< mattsc> I’m pretty sure I am not using either in that AI 20160316 14:12:27< mattsc> but again, I might not remember correctly 20160316 14:15:04< mattsc> celticminstrel: next question :) 20160316 14:15:28< mattsc> the read_only attribute to the ai table being true in evaluation functions … 20160316 14:15:44-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 250 seconds] 20160316 14:15:46< mattsc> that only affects the ai table functions themselves, right? 20160316 14:16:00< mattsc> I can still use things like wesnoth.put_unit() etc. there? 20160316 14:16:06< celticminstrel> Yeah. 20160316 14:16:18< mattsc> okay, that’s good then 20160316 14:16:18< celticminstrel> It just means that move(), recruit(), and a couple others are unavailable. 20160316 14:16:23< mattsc> ok 20160316 14:16:38< celticminstrel> And you can actually get around that if you really want by using "ai.move = ai.move" in an engine definition, I think (didn't test it). 20160316 14:16:59< mattsc> you _really_ shouldn’t do that though … 20160316 14:17:08< celticminstrel> Right, I added that for a reason. 20160316 14:17:16< mattsc> the ai.check_*() functions are still available though? 20160316 14:17:20< celticminstrel> Yes. 20160316 14:17:23< mattsc> ok 20160316 14:18:10< mattsc> “Every Lua AI component now supports a [params] subtag.” That’s great! 20160316 14:18:45-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160316 14:18:57< celticminstrel> This is immutable data, mind you, like exec/eval_parms. 20160316 14:19:13< mattsc> I saw that. That’s fine. 20160316 14:19:41< celticminstrel> People needing mutable data can of course access the engine's [data] tag. 20160316 14:20:05-!- ancestral [~ancestral@45.sub-70-197-228.myvzw.com] has quit [Quit: i go nstuf kthxbai] 20160316 14:20:19< mattsc> right 20160316 14:20:30< mattsc> and that’s still accessible through self.data, right? 20160316 14:20:38< mattsc> As in, the syntax did not change? 20160316 14:20:58< celticminstrel> It's accessible through self.data only in external CAs that use exec/eval_parms, as I recall. 20160316 14:21:02-!- gfgtdf [~chatzilla@f054158242.adsl.alicedsl.de] has joined #wesnoth-dev 20160316 14:21:12< gfgtdf> celticminstrel: what does [params] do ? 20160316 14:21:16< celticminstrel> "local _,_,data = ..." is the normal way to get at it. 20160316 14:22:06< mattsc> but if you then add that back to the engine, as you did for the ExpAI, the syntax is the same again? 20160316 14:22:07< celticminstrel> gfgtdf: Passes arbitrary input data to the AI code; means you can use the same code with different parameters to get different (though presumably similar) results. 20160316 14:22:16< gfgtdf> celticminstrel: so its the same as [args] in [lua] ? 20160316 14:22:24< celticminstrel> gfgtdf: Exactly that. 20160316 14:22:44< gfgtdf> celticminstrel: hmm i wodner whether we shoudl all is [args] there too then 20160316 14:22:45< celticminstrel> mattsc: Sorry, what? 20160316 14:23:09< celticminstrel> gfgtdf: I could change it to [args]. I can't remember why I chose [params]. 20160316 14:23:20< mattsc> celticminstrel: if I need to change every occurence of self.data in all AI code, that’s … a lot of work and compatibility breaking 20160316 14:24:07< celticminstrel> Let me check the commits again, perhaps self.data will still work in all CAs (but only in CAs). 20160316 14:24:08< mattsc> celticminstrel: CL invocations of the AI has a —parms parameter, without the ‘a’ :P 20160316 14:24:27< mattsc> well, if you go back to the commit I linked to up there ... 20160316 14:24:33< celticminstrel> mattsc: What does that do? Do I need to edit that? 20160316 14:24:48< mattsc> No, don’t please. 20160316 14:25:05< celticminstrel> Oh wow, github now has prev/next buttons. 20160316 14:25:16< celticminstrel> Ah, maybe because it's a PR... 20160316 14:25:17< mattsc> It let’s you set up some basic values like ‘gold’ etc. for MP games 20160316 14:25:32< celticminstrel> Ah, okay. 20160316 14:26:05< mattsc> back to the setence I started: 20160316 14:26:22< gfgtdf> mattsc: the ai code can change teh gold amount in mp games ? 20160316 14:26:27< mattsc> … you will see that you add data to the engine return value there 20160316 14:26:46< mattsc> gfgtdf: no, it’s for CL setup of MP games 20160316 14:27:03< gfgtdf> ok 20160316 14:27:18< mattsc> It’s not really related, I just threw in a distracting comment. :) 20160316 14:27:49< celticminstrel> Ah! 20160316 14:27:59< mattsc> gfgtdf: you can change the gold from the AI though, if you really want to. 20160316 14:28:11< mattsc> But even I am not in favor of that level of cheating. 20160316 14:28:28< celticminstrel> Then yes, external CAs can still access self.data. All you need to do is delete the explicit "self" argument from their definition. 20160316 14:28:43< mattsc> but you do need to do that? 20160316 14:29:01< mattsc> So, every MAI needs to be changed, and a lot of other AI code also. 20160316 14:29:18< celticminstrel> Yes, however any that use exec/eval_parms have a backwards compatibility case which makes them work without deleting that explicit "self" argument. 20160316 14:29:42< mattsc> And I assume if you use [params] instead of eval/exec_params, the same is true? 20160316 14:30:05< celticminstrel> No, the compatibility case is triggered by the presence of either eval_parms or exec_parms. 20160316 14:30:10-!- louis94 [~~louis94@91.178.242.1] has quit [Ping timeout: 252 seconds] 20160316 14:30:13< mattsc> I see. 20160316 14:30:30< celticminstrel> My thought was that if you're changing to use [params] you can delete that "self" at the same time. 20160316 14:30:41< mattsc> right 20160316 14:30:45< celticminstrel> Actually, I guess it's not quite just deleting "self". 20160316 14:30:58< celticminstrel> But it's still just changing two lines in the external CA. 20160316 14:31:12< mattsc> celticminstrel: Looks like we need to make sure people are very aware of this change in the next release. And that you give a good reason why this compatibility breaking was necessary. 20160316 14:31:48< mattsc> Also, we probably shouldn’t do this more than once. So if you have other things like this on the horizon, it would be good to put them all into the same release. 20160316 14:32:25< mattsc> celticminstrel: anyways, I am done with my “theoretical review” of your changes now. Next, I want to do some actual testing. 20160316 14:33:03< celticminstrel> I don't think I have any compatibility breaking AI changes in mind that haven't already been put in that PR. 20160316 14:33:30< mattsc> Okay; no upcoming deprecations or removals? 20160316 14:34:20< mattsc> In any case, I’m off for a bit now. Will be back online soon, but likely afk most of the time. 20160316 14:34:23< celticminstrel> For the reason, the general goal of these changes was to make the handling of AI component code more or less the same for all components. 20160316 14:34:37< celticminstrel> No upcoming deprecations or removals that I can think of that have not already been done. 20160316 14:34:50< celticminstrel> I will definitely explain what has happened in RELEASE_NOTES or something. 20160316 14:35:07< mattsc> Right; I understand that. But we need to make it clear to UMC authors that there’s actually a good reason to do so. 20160316 14:35:33< mattsc> I think we can also offer for us (you and me) to fix their AI setup if they can’t or don’t want to do so themselves. 20160316 14:35:46< celticminstrel> I'm okay with that offer. 20160316 14:35:59< mattsc> there isn’t that much custom AI code out there, and most of it are just copies of each other 20160316 14:36:06< mattsc> okay, I’m off; thansk and TTYL. 20160316 14:36:39-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: mattsc] 20160316 14:44:00< fabi> When I change the max_experience of a unit during a game that runs with xp_modifier != 100%, what happens? 20160316 14:44:14< celticminstrel> No idea. 20160316 14:44:18< celticminstrel> Try it. 20160316 14:44:54< fabi> Well, I am more interrested in the answer "What should happen.", not how the engine does. 20160316 14:45:11< celticminstrel> Hmm. 20160316 14:45:53< celticminstrel> Well, I suppose if you change it with an [effect], it should be adjusted according to the xp_modifier. 20160316 14:46:26< fabi> But if you adjust it by lua the magic is not done? 20160316 14:46:58< fabi> or with [modify_unit] 20160316 14:47:01< celticminstrel> Well, that depends. 20160316 14:47:24< celticminstrel> When xp_modifier is set, do you want "u.max_experience" to return the unmodified value or the modified value? 20160316 14:47:52< fabi> good question 20160316 14:48:26< fabi> It seems this is not quite specified in the API documentation yet. 20160316 14:48:28< celticminstrel> If it returns the modified value, then you really shouldn't be applying magic when it's set. 20160316 14:48:41< celticminstrel> If it returns the unmodified value, then you probably should be. 20160316 14:49:04< celticminstrel> I would assume it returns the modified value. That's also what I would expect, personally. 20160316 14:49:16< fabi> I agree. 20160316 14:49:27< fabi> Okay. This is good enough for me. Thank you very much. 20160316 14:49:40< celticminstrel> Presumably there is (or should be) a way to access the xp_modifier so that you can manually apply it when doing stuff through Lua or [modify_unit]. 20160316 14:51:14< gfgtdf> celticminstrel: xp_modifier only hanes the map_experience in [unit_type] 20160316 14:51:17< gfgtdf> changes 20160316 14:51:33< gfgtdf> celticminstrel: iirc 20160316 14:51:53< celticminstrel> fabi: ^ 20160316 14:51:56< zookeeper> yeah, i don't think any automatic scaling should be applied to the value if modified during the scenario. 20160316 14:52:15< celticminstrel> Even when using [effect] to change it? 20160316 14:52:38< celticminstrel> Maybe that [effect] could take an extra key specifying whether to honour it... 20160316 14:52:43< zookeeper> ehh... maybe. 20160316 14:52:54< gfgtdf> celticminstrel: well effect usually plies it as precentage anyway 20160316 14:53:00< gfgtdf> celticminstrel: so its doesnt realy matter there 20160316 14:53:09< celticminstrel> True, if it's applied as a percentage, then it doesn't matter. 20160316 14:53:18< zookeeper> both methods are recipes for disaster :p 20160316 14:53:56< zookeeper> so i'd lean towards having the engine take its hands off it whenever possible 20160316 14:54:14< gfgtdf> celticminstrel: well i dint we should keep the current way do do it mut baybe add a way to query the expereince modifer if there isnt alredy one so that authors can apply it if they want 20160316 14:54:27< gfgtdf> think* 20160316 14:54:28< celticminstrel> I forgot the option of percentage changes was there, so with that I think that [effect] should probably ignore it. 20160316 14:54:29< celticminstrel> fabi: ^ 20160316 14:55:01< fabi> I am confused now :-) 20160316 14:55:05< celticminstrel> gfgtdf: Yeah, there should definitely be a way to query the current xp_modifier. Is there not one already? 20160316 14:55:22< gfgtdf> fabi: why do you want to know that? 20160316 14:56:06< fabi> Let's say I have a unit with the intelligent trait. And then I play with 80% xp_modifier. 20160316 14:56:13< gfgtdf> celticminstrel: well wesnoth.game_config mostlikeley has a field for that 20160316 14:56:44< celticminstrel> I seem to recall that xp_modifier can be set in the config somewhere. 20160316 14:56:50< fabi> Maybe the xp modifier depends on the difficult level. 20160316 14:57:03< celticminstrel> Not sure if it was in [campaign] or [scenario] or [side] or what. 20160316 14:57:07< fabi> Then the unit meets the wise sage in the scenario. 20160316 14:57:26< fabi> Who grants him more knowledge in form of reduced max_xp. 20160316 14:58:32-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20160316 14:58:36< fabi> hmmm 20160316 14:58:36< Ravana_> there is wesnoth.game_config.mp_settings.experience_modifier 20160316 14:59:42< celticminstrel> Can't you set xp_modifier per-scenario or something? 20160316 14:59:52< fabi> sure 20160316 15:00:09< celticminstrel> If that's the case, is wesnoth.game_config.mp_settings.experience_modifier set to that value? 20160316 15:00:25< celticminstrel> What if it's a campaign, not MP? 20160316 15:00:25< gfgtdf> celticminstrel: nomostlikely not 20160316 15:00:50-!- Nobun [~nobun@host62-49-dynamic.12-79-r.retail.telecomitalia.it] has quit [Quit: Salve a tutti] 20160316 15:00:52< gfgtdf> celticminstrel: xp_modifer was designed for mp games 20160316 15:01:05< celticminstrel> But it's not limited to them. 20160316 15:02:11< gfgtdf> celticminstrel: in any case, you can not change mp_settings.experience_modifier using lua 20160316 15:03:00< celticminstrel> Changing the XP modifier mid-scenario would be kind of silly anyway. 20160316 15:03:05< Ravana_> though why not? 20160316 15:03:13< celticminstrel> Why not allow it, you mean? 20160316 15:03:18< Ravana_> with the new unit create event you can globally apply the change anyways 20160316 15:03:30< celticminstrel> There isn't really any reason to not allow it. 20160316 15:03:37-!- atarocch [~atarocch@109.119.13.0] has quit [Ping timeout: 260 seconds] 20160316 15:03:42< celticminstrel> Wait, is it not already applied on unit create, then? 20160316 15:04:09< fabi> Well, it would be fine if the behaviour is somewhere specified. 20160316 15:04:11< celticminstrel> gfgtdf said it's applied to the unit_type, but is it done at init time, or when a unit is created? 20160316 15:04:19< fabi> Best at both places. 20160316 15:04:25< fabi> WML and Lua api 20160316 15:04:37< gfgtdf> celticminstrel: well imuie sure changing xp_moder during a game will do more harm then good 20160316 15:05:29< fabi> celticminstrel: Should a change to xp_modifier only apply to new created units? 20160316 15:05:45< fabi> What about recalled units? 20160316 15:06:22< celticminstrel> To apply it to existing units you'd need to advance them. I believe recalled units are rebuilt when you recall them, so those would get the change if it's applied at unit create time. 20160316 15:06:31< celticminstrel> s/advance/rebuild/ 20160316 15:08:10< fabi> Okay, so xp_modifier is a thing that sets the max_experience of a unit at creation time. 20160316 15:08:26< gfgtdf> celticminstrel: i'v played umc campaigns where the different scenarios had different xp_modifers and usually this lead to eigher bug or unexpected behviour. 20160316 15:08:30< celticminstrel> I'm not sure. It might instead modify the unit_type at init time. 20160316 15:08:38< fabi> so being more a unit_type modifier than an actual unit modifier, like zookeeper said 20160316 15:09:01< celticminstrel> Or are you saying you actually investigated how it works, fabi? 20160316 15:09:15< fabi> except when it comes to recalling, there we rewrite the max_xp of an already created unit. 20160316 15:11:04< gfgtdf> hmm github doesnt suppo reaching in code anymore? this seems liek a hue regression 20160316 15:11:09< fabi> celticminstrel: My engine runs a ported version of the unit test scenarios iceiceice created for wesnoth. I assume those end all with success? 20160316 15:11:17-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160316 15:11:20< celticminstrel> gfgtdf: Doesn't support what? 20160316 15:11:33< gfgtdf> search 20160316 15:11:56< celticminstrel> fabi: Are you asking if they all pass right now, or if they're all expected to end in victory? 20160316 15:12:26< fabi> celticminstrel: I know that there is a handful of tests that are supposed to fail to check if the unit test framework itself is sound. 20160316 15:12:44< gfgtdf> celticminstrel: when i got to "https://github.com/wesnoth/wesnoth" there used to be a 'search in resposity' textfied which cannot find anymore 20160316 15:12:48< fabi> I have never run that test in Wesnoth myself. 20160316 15:12:58< fabi> I hope they are still used and work. 20160316 15:13:23< celticminstrel> They are run by Travis every time someone pushes to master. 20160316 15:13:34< celticminstrel> Or makes a pull request. 20160316 15:14:29< fabi> cool. I usually get the idea of how the engine should work from those tests. 20160316 15:18:23-!- atarocch [~atarocch@109.119.13.0] has joined #wesnoth-dev 20160316 15:18:44-!- gfgtdf [~chatzilla@f054158242.adsl.alicedsl.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 44.0.2/20160210153822]] 20160316 15:20:04< fabi> Well, the xp related ones are not very sophisticated. 20160316 15:24:47-!- louis94 [~~louis94@91.178.242.1] has joined #wesnoth-dev 20160316 15:27:37< celticminstrel> https://github.com/wesnoth/wesnoth/pull/628 20160316 15:27:41< celticminstrel> gfgtdf: ^ 20160316 15:38:26< celticminstrel> Hmm. gfgtdf does not like the addition of .x and .y keys in luaW_pushlocation, but it's clear that without that I can't avoid breaking compatibility for anyone that uses ai.get_avoid(), ai.get_attacks(), ai.get_targets(). 20160316 15:38:41< celticminstrel> The ExpAI uses ai.get_attacks(), and would be broken by the change. 20160316 15:38:58< celticminstrel> (That it would be easily fixed is beside the point.) 20160316 15:41:51< celticminstrel> Mainline code also uses ai.get_avoid() in several cases, but those wouldn't be broken because the return value is passed immediately to location_set.of_pairs(). 20160316 15:43:12-!- irker230 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160316 15:43:12< irker230> wesnoth: ln-zookeeper wesnoth:master 3133ba325f9e / data/core/images/terrain/ (43 files in 4 dirs): Cleaned up off-hex stray pixels https://github.com/wesnoth/wesnoth/commit/3133ba325f9ef2f45c42031ce2c2e892780ce4ae 20160316 15:44:31< celticminstrel> Huh. It looks like the MicroAIs that claim to support [avoid] actually don't do so properly. 20160316 15:45:01< celticminstrel> I should fix that on the AI branch. 20160316 15:45:30< celticminstrel> "Note that ai.get_avoid() cannot be used as it always returns an array, even when the aspect is not set, and an empty array could also mean that no hexes match the filter" 20160316 15:45:53-!- atarocch [~atarocch@109.119.13.0] has quit [Remote host closed the connection] 20160316 15:45:54< celticminstrel> mattsc: ^ Why is that an issue when [micro_ai][avoid] takes priority over the aspect and not the other way around? 20160316 15:47:53< celticminstrel> Anyway, changing get_avoid() and get_targets() would break nothing in mainline, but changing get_attacks() would. 20160316 15:48:05< celticminstrel> Should I worry about non-mainline content here? 20160316 15:48:17< mattsc> celticminstrel: IIRC, you want the code block taking avoid into account to be skipped if neither the default nor the MAI [avoid] tag is present. 20160316 15:48:47< celticminstrel> mattsc: Can't you do that with something like ls:empty()? 20160316 15:48:56< celticminstrel> If not, that should be added to location_set. 20160316 15:48:59-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 15:49:31< mattsc> There’s a different between the location set being empty because no [avoid] tag is present or because it does not match any locations. 20160316 15:49:55< celticminstrel> There is? 20160316 15:50:08< mattsc> I don’t remember if it’s a difference in practice, but my recollection is that I had a reason for assuming so. 20160316 15:50:40< mattsc> Is this in the Fast MAI? 20160316 15:51:05< celticminstrel> It's in ca_fast_attack_utils.lua, so probably. 20160316 15:51:29< celticminstrel> Several uses of ai.get_attacks() pass an additional parameter that appear to contain options, but the C++ code doesn't seem to use it for anything. 20160316 15:51:45< celticminstrel> Although, there seems to be something... 20160316 15:52:29< celticminstrel> Ah, wait, no, it's not even acknowledged by the code. 20160316 15:52:56< celticminstrel> (I'm not on the AI branch right now, either.) 20160316 15:53:45< celticminstrel> Examples: data/ai/micro_ais/cas/ca_fast_combat.lua:83: local attacks = AH.get_attacks({ unit }, { include_occupied = cfg.include_occupied_attack_hexes }) 20160316 15:53:54< celticminstrel> Oh, wait. 20160316 15:53:59< celticminstrel> That's ai_helper.get_attacks(). 20160316 15:54:17< mattsc> celticminstrel: oh, I remember ... 20160316 15:55:14< mattsc> celticminstrel: let’s assumethe default [avoid] tag is set. How does the code know whether the MAI tag is set or just returns no locations? 20160316 15:55:36< mattsc> In one case it overrides the default tag, in the other case it should not. 20160316 15:56:06< celticminstrel> Sounds easy to me. If it's set, then it's not nil. 20160316 15:56:13< celticminstrel> Regardless of whether it matches any locations. 20160316 15:56:39< mattsc> celticminstrel: my point is that you cannot use ai.get_avoid() to distinguish between the two cases. 20160316 15:57:13< mattsc> which was your original question, wasn’t it? 20160316 15:57:27< celticminstrel> It was, but it still doesn't make sense. 20160316 15:57:37-!- Nobun [~nobun@host62-49-dynamic.12-79-r.retail.telecomitalia.it] has joined #wesnoth-dev 20160316 15:57:38< mattsc> hmm ... 20160316 15:57:54< celticminstrel> Isn't that only an issue if you want the aspect to take priority over the MicroAI's parameter? When you get the MicroAI's local avoid tag, it'll always be a filter, not a list of locations. 20160316 15:58:07< celticminstrel> So as long as the local tag is set, you can just use that and ignore the aspect. 20160316 15:58:56< mattsc> Yeah, I think you’re right. 20160316 15:59:08< mattsc> Maybe I had it the other way around first, and then changed my mind. 20160316 16:00:08< mattsc> And if the local one is not set, you can use whatever get_avoid() returns, whether that’s due to it not being there or not matching anything does not matter. 20160316 16:00:22< celticminstrel> Okay, so get_attacks is only used directly by the ExpAI. 20160316 16:00:22< mattsc> So while what’s there is not a problem, it’s unnecessary. 20160316 16:00:42< celticminstrel> What's there does not honour the aspect properly. 20160316 16:00:52< mattsc> celticminstrel: on your question whether you should worry about UMC, that depends on what you mean by that. 20160316 16:01:03< mattsc> Should you worry that it is used in UMC somewhere: yes 20160316 16:01:13< mattsc> Should you worry whether that is a problem: that depends 20160316 16:01:49< mattsc> “What's there does not honour the aspect properly.” what? 20160316 16:03:36< celticminstrel> It takes the first facet regardless of turns= or time_of_day= and does not work if the aspect is not composite (eg, if it's a Lua aspect). 20160316 16:04:07< celticminstrel> And my AI branch adds at least one more case where it would fail. (At least, I think that's new in the AI branch. Not 100% sure.) 20160316 16:04:10-!- boucman_work [~boucman@193.84.89.18] has quit [Remote host closed the connection] 20160316 16:05:03< celticminstrel> (Oh right, I did add Lua facets, so it would fail there.) 20160316 16:06:44< celticminstrel> mattsc: I mean, should I worry whether changing locations in the return value of ai.get_attacks() to have [1] and [2] instead of .x and .y would break any UMC? Should I hope that all UMC using ai.get_avoid() passes it to location_set, and that no-one uses ai.get_targets()? 20160316 16:06:49< mattsc> You cannot blame it for something that did not exist yet at the time it was written. 20160316 16:06:57< celticminstrel> I'm not. 20160316 16:07:07< celticminstrel> It won't work in cases that did already exist at the time. 20160316 16:07:19< celticminstrel> It won't work correctly if there is a turns= or time_of_day= key. 20160316 16:07:22< Nobun> a little question: did the if(ev.type == SDL_VIDEORESIZE || ev.type == SDL_VIDEOEXPOSE) and the other similar line (for the #else case preprocessor) should run on resizing windows? 20160316 16:07:37< Nobun> if so it seems they didn't act as expected 20160316 16:07:37< celticminstrel> It won't work if the aspect is a standard aspect (which is an extremely unlikely case, but not impossible). 20160316 16:07:53< celticminstrel> (That means that the [aspect] tag directly contains a [value] tag.) 20160316 16:07:59< celticminstrel> And it won't work if the aspect is a Lua aspect. 20160316 16:08:19< celticminstrel> Those are all cases where it would fail without considering anything new in my AI branch. 20160316 16:08:27< celticminstrel> But my AI branch adds additional cases where it would fail. 20160316 16:08:41< mattsc> right 20160316 16:09:11< mattsc> As for your question, you can hope, but I’d say there’s a non-negligible chance that that will not be true. 20160316 16:10:15< celticminstrel> Hmm. 20160316 16:10:47< Nobun> hmm thank, mattsc 20160316 16:10:59< celticminstrel> Nobun: I think that was at my question. 20160316 16:11:14< Nobun> ah ok, sorry xD 20160316 16:11:18< mattsc> Nobun: yes, that was meant for celticminstrel :) 20160316 16:11:34< celticminstrel> If it breaks for 1.13.5 but is then fixed for 1.13.6, is that acceptable? Because, if I do decide to make this change, I have another change in mind that would unbreak it. 20160316 16:11:47< celticminstrel> (That could easily happen before 1.13.5, but I don't know for sure if it would.) 20160316 16:11:51< mattsc> celticminstrel: I mean, how is any of us supposed to know what the collective UMC authors have come up with. 20160316 16:11:58< celticminstrel> Right. 20160316 16:12:04< mattsc> My experience is: if it can be done, it has been done by someone. 20160316 16:12:28< celticminstrel> So, again - is "broken temporarily" acceptable? 20160316 16:12:47< mattsc> If there’s a good reason to do so, sure. 20160316 16:13:03< celticminstrel> 'kay 20160316 16:14:06< mattsc> Personally, I think the AI code is such a mess, that an overall restructuring has been needed for a long time. 20160316 16:14:57< mattsc> But as I said before, I think it would make sense to keep it to as few compatibility breaking releases as possible. 20160316 16:15:15< celticminstrel> I'll try to make sure I unbreak it before 1.13.5 then. 20160316 16:16:21< mattsc> I didn’t mean as few changes as possible, but to bundle as many of them as possible into the same release 20160316 16:16:51< mattsc> As we’ve discussed before, if I were doing it, I would make even more dramatic changes. 20160316 16:17:06< celticminstrel> I would like to remove the ai::interface class at some point. 20160316 16:17:09< mattsc> Do a clean break, so to speak. 20160316 16:17:20< celticminstrel> This was the old way to create custom C++ APIs, before the composite AI became a thing. 20160316 16:17:30< mattsc> Will that break any old code? 20160316 16:17:39< celticminstrel> It won't break anything not written in C++. 20160316 16:17:47< celticminstrel> Nowadays, someone wanting to do that kind of thing should really be inheriting from stage instead. 20160316 16:17:49< mattsc> Probably not a problem then. 20160316 16:17:53< celticminstrel> Yeah. 20160316 16:18:18< celticminstrel> The ai_algorithm key used to be used to select a registered subclass of interface. 20160316 16:18:28< celticminstrel> That has not been the case for I have no idea how long. 20160316 16:18:38< mattsc> But anything like getting rid of stages or engines or … that you might still be planning to do; I’d put all of this into the same release that this PR goes into. 20160316 16:18:39< celticminstrel> The fallback stage is the last remaining thing that actually uses it. 20160316 16:19:02< celticminstrel> So, at present, an old AI written in that way could probably be patched in by using the fallback stage. 20160316 16:20:19< celticminstrel> I wasn't planning to get rid of any other stages, except maybe fallback, but I thought that should happen at the same time as removing ai::interface. 20160316 16:20:22< mattsc> This also means that, IMO, the clean-up of the data/ai directory that we want to do should also go into the same release as this PR. 20160316 16:20:52< celticminstrel> I know there was talk of removing FormulaAI, but I thought that was a more long-term idea. 20160316 16:21:13< celticminstrel> (Also, I like the way the unit_formulas stage works and kind of wish I could do the same with Lua.) 20160316 16:21:59< celticminstrel> (I think Lua BCAs are a little similar, but they're also approached differently.) 20160316 16:22:10< mattsc> Well, you know my take on this. But there’s no point in going over it again. 20160316 16:22:29< celticminstrel> What kind of cleanup of data/ai were we talking about? 20160316 16:22:31< mattsc> You’re the one actually making the changes, so I’ll leave those things to you. 20160316 16:22:33< celticminstrel> Removing akihara? 20160316 16:22:47< mattsc> and strong AI and all the broken crap, yes 20160316 16:23:06< celticminstrel> Wait, strong AI is broken? I thought it was just default with a few adjusted aspects. 20160316 16:23:26< mattsc> no, I formulated that very carefully so that that’s not what I was saying ;) 20160316 16:23:37< celticminstrel> Oh, true. 20160316 16:23:49< mattsc> I want to get rid of the strong AI (well, move it to a debug AI only, I think) 20160316 16:23:52< celticminstrel> I don't really mind removing strong AI. 20160316 16:23:55< celticminstrel> Or that. 20160316 16:23:57< mattsc> and I also want to get rid of the broken crap 20160316 16:24:24< celticminstrel> Does that include ai_sf_with_rca? 20160316 16:24:41< mattsc> probably; I really haven’t looked into it yet 20160316 16:25:06< mattsc> so far, I’ve mostly been playing catch up with you; you’re way too productive for the amount of time I have ;) 20160316 16:26:27< mattsc> I don’t think ai_sf_with_rca is broken per se, but it performs worse than the default AI; I don’t really see a reason to keep it in that case 20160316 16:26:51< mattsc> It will remain in the repository history, after all, so it is available if anybody ever wants to pick it up again. 20160316 16:27:39< celticminstrel> I can encapsulate its removal in a single commit so that bringing it back, if desired, can be done by simply reverting that commit. 20160316 16:27:55< celticminstrel> I think the removal would be just deleting some files and one line of registry.cpp. 20160316 16:28:19< celticminstrel> So barring project files there shouldn't even be any reason for conflict if it's reverted. 20160316 16:28:35< mattsc> right; that’s a good idea, I think; but let’s finish your PR first, and then check out what we want to remove or change 20160316 16:28:39< celticminstrel> Okay, PR628 passed tests, so I'm going to merge it. 20160316 16:29:11< celticminstrel> BTW, did you have an opinion on https://github.com/wesnoth/wesnoth/pull/628/commits/198ff47da76b3cfc496c28576545f48c6f195fc2 ? 20160316 16:31:24< celticminstrel> mattsc: ^ 20160316 16:32:19< celticminstrel> It means you can do wesnoth.match_unit(u, {x,y}) to see if it would match if it were on that location, or something like that. 20160316 16:33:11< celticminstrel> Works on recall list units, too. 20160316 16:37:35< celticminstrel> I just realized it doesn't quite work as written, though. 20160316 16:39:53< mattsc> Does it still take a filter as a third argument? 20160316 16:40:05< celticminstrel> That's the second argument. 20160316 16:40:06< mattsc> If not, I don’t understand what this would do. 20160316 16:40:41< celticminstrel> It's sort of like moving the unit to that location, testing if it matches, then moving it back. I'm not quite sure if it's 100% equivalent to that though. 20160316 16:41:23< mattsc> testing if it matches what? The example you gave above has only 2 args. 20160316 16:41:30< celticminstrel> Oh. 20160316 16:41:39< celticminstrel> wesnoth.match_unit(u, filter, {x,y}) 20160316 16:41:43< celticminstrel> My example was wrong. 20160316 16:41:48< mattsc> Ah, okay. 20160316 16:42:02< mattsc> In fact, yes, that would potentially be extremely helpful for some things. 20160316 16:43:22< mattsc> I don’t have an immediate usecase that you couldn’t also do easily otherwise, but I am sure somebody will come up with something. 20160316 16:43:48< celticminstrel> Note that wesnoth.match_unit(u, filter, u2) already has a different meaning, so you can't pass a unit as a location here. 20160316 16:44:46-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20160316 16:44:53< mattsc> Yeah, I saw that. 20160316 16:46:56< mattsc> celticminstrel: what I’d really like to have is a “virtual map”, one that is a copy of the original map, but where I can move units around at will, without having to worry about overwriting existing units and restoring the original state at the end of the evaluation. :D 20160316 16:47:23< celticminstrel> That sounds suspiciously like the whiteboard. 20160316 16:47:24< mattsc> For AI move evaluation purposes, I mean. 20160316 16:47:33< celticminstrel> Yeah, I understand what you mean. 20160316 16:47:50< mattsc> I don’t know anything about how the whiteboard works. 20160316 16:48:15< mattsc> Internally, I mean. I (kind of) know how you can use it in game. 20160316 16:48:22< celticminstrel> Well, you can't actually use the whiteboard to do what you want, it's just that its purpose is somewhat similar (only for players, not AI). 20160316 16:48:30< mattsc> okay 20160316 16:48:37< celticminstrel> Or at least, I don't think you can use it to do what you want. 20160316 16:48:45< mattsc> celticminstrel: I need to sign off in ~5min; anythign else we should discuss right now? 20160316 16:48:56< celticminstrel> Not that I can think of. 20160316 16:49:15< mattsc> Okay; always nice to have these dicsussion. 20160316 16:49:36< celticminstrel> I think adding some way to revert gamestate like you say could be done fairly easily right now, but that might be rather inefficient. 20160316 16:49:56 * celticminstrel basically means somehow hooking into the snapshot system used for saved games. 20160316 16:54:04< mattsc> celticminstrel: okay; it would make some things easier, although my current system already does so manually, so I don’t have an immediate need for it. 20160316 16:54:35< mattsc> As in, I always have do/undo pairs for any change I make for move evaluation. 20160316 16:55:36< mattsc> Note to self: change MAIs to using [params]. Can be done after PR 615 is merged though, no need to include it in the PR. 20160316 16:55:59< celticminstrel> 'kay 20160316 16:57:55< mattsc> since it has no effects that are visible to the user whatsoever 20160316 16:58:18< celticminstrel> Indeed. 20160316 16:58:35< mattsc> Bye for now. 20160316 16:58:41< celticminstrel> Bye. 20160316 16:58:46-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: So long and thanks for all the fish.] 20160316 17:01:21-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160316 17:04:36-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has joined #wesnoth-dev 20160316 17:10:18-!- Nobun [~nobun@host62-49-dynamic.12-79-r.retail.telecomitalia.it] has quit [Quit: Salve a tutti] 20160316 17:15:57-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 17:23:50-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-dev 20160316 17:24:57-!- Kwandulin [~Miranda@p200300760F7D736F60F6D00E37B7B3CB.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160316 17:29:26-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 250 seconds] 20160316 17:39:22-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20160316 17:39:22-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20160316 17:47:02< celticminstrel> So, my new [message] mega-formula has errors. Fun! 20160316 17:47:28< celticminstrel> Actually it's not technically an error in the formula, fortunately. 20160316 17:58:47< celticminstrel> It's not recognizing my function definitions. :| 20160316 18:12:53< celticminstrel> I think I get why. 20160316 18:21:09< celticminstrel> I wonder why there's a gamemap_x_offset but no gamemap_y_offset. 20160316 18:24:00-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20160316 18:37:07-!- louis94 [~~louis94@91.178.242.1] has quit [Ping timeout: 260 seconds] 20160316 18:42:06-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160316 18:43:10-!- irker230 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160316 18:52:47-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 18:56:45< celticminstrel> Ugh, the portrait is overlapping the text in [message]. I really hope that's related to the formula. 20160316 19:04:41< vultraz> likely 20160316 19:05:04-!- louis94 [~~louis94@91.178.242.1] has joined #wesnoth-dev 20160316 19:09:23< celticminstrel> Okay, good. (It is.) 20160316 19:12:44-!- Kwandulin [~Miranda@p200300760F7D736F60F6D00E37B7B3CB.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160316 19:24:25-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20160316 19:25:22-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20160316 19:27:54< celticminstrel> Well, I'm not sure what I did before, but I reverted and redid the formula thing and now it works. 20160316 19:31:17< vultraz> nice, nice 20160316 19:31:49< vultraz> I'm doing some tweaks to the gui2 MP lobby 20160316 19:32:08< vultraz> I plan to remove the Lobby list 20160316 19:32:32< celticminstrel> variant= is valid in an SUF, I guess, so I can't use that key in [message]... 20160316 19:34:00< celticminstrel> Why are the portraits so much smaller in 1.13? Is that just because the window is smaller? 20160316 19:35:14< vultraz> if you're testing this in a small-ass window, yes :P 20160316 19:35:27< celticminstrel> 1024x768 at the moment. 20160316 19:35:33< celticminstrel> So not that small really. 20160316 19:35:33< vultraz> it's a "kinda bug" where they're set to go smaller at that resolution 20160316 19:35:41< vultraz> I think 20160316 19:37:42< celticminstrel> I just realized that prior to this change it was calculating several values more than once within a given formula. 20160316 19:37:48< celticminstrel> Like the aspect ratio, for example. 20160316 19:38:47< vultraz> so this is an improvement? 20160316 19:38:56< celticminstrel> Minor, but I think so, yes. 20160316 19:39:09< celticminstrel> Slightly more efficient, and also more readable. 20160316 19:39:16-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160316 19:39:52< vultraz> so apparently vertical_scrollbar_mode = "auto" is broken 20160316 19:40:06< vultraz> it doesn't take the full height of the box into account 20160316 19:40:14< vultraz> and leaves a section at the bottom unused 20160316 19:41:22< celticminstrel> Fun. 20160316 19:42:11< vultraz> "always" works properly 20160316 19:42:22< vultraz> I think celticminstrel reported this 20160316 19:42:36< celticminstrel> I don't know, I might have. 20160316 19:43:47< vultraz> in regards to the gamestate inspector 20160316 19:44:20< celticminstrel> Yeah. 20160316 19:44:42< celticminstrel> The inspector is still broken, but since the AI branch touched it I want to merge that before investigating closer. 20160316 19:45:31< vultraz> please do 20160316 19:45:51< celticminstrel> I was thinking of changing it to a treeview instead of two listboxes though. 20160316 19:46:09< celticminstrel> Rather than trying to figure out why one of the listboxes sometimes fails to place. 20160316 19:49:19-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 19:50:07-!- irker102 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160316 19:50:07< irker102> wesnoth: Celtic Minstrel wesnoth:master 268620e2cac3 / data/gui/default/window/wml_message.cfg: GUI: Simplify WML message dialog formulas https://github.com/wesnoth/wesnoth/commit/268620e2cac3759bffe91e716baec5919685efb8 20160316 19:50:14< irker102> wesnoth: Celtic Minstrel wesnoth:master a84500fb8fa9 / src/ (5 files in 2 dirs): Add functions for transferring map locations to and from Lua stack https://github.com/wesnoth/wesnoth/commit/a84500fb8fa9a2baa4d44ed6402787d78e331474 20160316 19:50:16< irker102> wesnoth: Celtic Minstrel wesnoth:master 058ec266cf89 / src/scripting/game_lua_kernel.cpp: Re-enable/fix put_unit deprecation warning https://github.com/wesnoth/wesnoth/commit/058ec266cf896681540cc2c72766263efc1192fa 20160316 19:50:18< irker102> wesnoth: Celtic Minstrel wesnoth:master d250e0456633 / src/scripting/lua_common.cpp: Now luaW_tolocation accepts units and vconfigs https://github.com/wesnoth/wesnoth/commit/d250e04566331c6bb4d3369b41649b8eec224c88 20160316 19:50:20< irker102> wesnoth: Celtic Minstrel wesnoth:master 2e6ad2bee329 / / (3 files in 2 dirs): Add wesnoth.select_unit(), deprecate wesnoth.select_hex() https://github.com/wesnoth/wesnoth/commit/2e6ad2bee3290dea4028da250801248f75f8e44a 20160316 19:50:22< irker102> wesnoth: Celtic Minstrel wesnoth:master 46cee1df6817 / src/scripting/game_lua_kernel.cpp: Allow wesnoth.match_unit to take a location, for hypothetical matches https://github.com/wesnoth/wesnoth/commit/46cee1df681777c9af60bd29307425c23d134460 20160316 19:50:24< irker102> wesnoth: Celtic Minstrel wesnoth:master afcb382009a6 / src/scripting/lua_map_location_ops.cpp: Replace Lua map_location helpers with new luaW functions https://github.com/wesnoth/wesnoth/commit/afcb382009a69d4fc639086fe9e4f446c745f4b3 20160316 19:50:26< irker102> wesnoth: Celtic Minstrel wesnoth:master df7cdba42cc2 / / (8 files in 3 dirs): Merge pull request #628 from CelticMinstrel/lua_map_locations https://github.com/wesnoth/wesnoth/commit/df7cdba42cc2219fff1ce6519fcc398b16a8fada 20160316 19:53:12-!- louis94 [~~louis94@91.178.242.1] has quit [Ping timeout: 246 seconds] 20160316 19:55:03-!- gfgtdf [~chatzilla@f054158242.adsl.alicedsl.de] has joined #wesnoth-dev 20160316 19:55:23< vultraz> celticminstrel: do you think we still need a Send button for the chatbox 20160316 19:55:34< vultraz> i mean, what kind of UI has a dedicated Send button 20160316 19:56:18< celticminstrel> What are you talking about? 20160316 19:56:24< celticminstrel> I don't remember any send button. 20160316 19:57:34< vultraz> look in the gui2 lobby 20160316 19:58:28< celticminstrel> Does Wesnoth support non-PNG images? 20160316 19:58:51< celticminstrel> eg in UMC 20160316 19:59:31< vultraz> not that I know of 20160316 20:03:29< celticminstrel> Okay yeah, remove it. 20160316 20:03:45< celticminstrel> Old lobby doesn't have it. 20160316 20:03:53< celticminstrel> (That's why I connected twice, in case you wondered.) 20160316 20:04:55< celticminstrel> At least the treeview doesn't crash anymore, but I feel like there's still something wrong with it. I didn't see myself until you left, and I didn't see anything until I'd closed and reopened the node. 20160316 20:05:18< celticminstrel> Why does it say "lobby" under the filter checkboxes? 20160316 20:05:38< celticminstrel> Something is cut off at the top, probably "Game". 20160316 20:06:08< celticminstrel> It's also much uglier than the old lobby. 20160316 20:06:28< vultraz> celticminstrel: that's why I'm fixing things :P 20160316 20:06:39< celticminstrel> None of that nice gold boxing for example. 20160316 20:07:07< vultraz> screw the gold boxing :P 20160316 20:07:24< vultraz> did you know that background is a scaled png image 20160316 20:07:50< celticminstrel> The gold boxing looks much nicer than the current GUI2 lobby. 20160316 20:08:01< vultraz> as I said, I'm tweaking things 20160316 20:08:12< vultraz> give me some time 20160316 20:10:09< vultraz> celticminstrel: opinion: filter above chat or above game list 20160316 20:10:29< celticminstrel> I think above game list or below game list is good. 20160316 20:12:25< celticminstrel> The "glad" versions of HTTT portraits look very different. 20160316 20:12:40< celticminstrel> More for Lisar than Konrad. 20160316 20:13:53< celticminstrel> My idea would probably break things once someone gets the sceptre. :| 20160316 20:15:29-!- prkc [~prkc@108.61.123.79] has quit [Ping timeout: 260 seconds] 20160316 20:18:58< irker102> wesnoth: Charles Dang wesnoth:master 8c4dfc5d699d / data/gui/default/widget/scroll_label_description.cfg: Design tweaks to description scroll label https://github.com/wesnoth/wesnoth/commit/8c4dfc5d699d3cd4d501f6ed647acfaa740d077f 20160316 20:19:01< irker102> wesnoth: Charles Dang wesnoth:master 32c93789929e / data/gui/default/window/lobby_main.cfg src/gui/dialogs/lobby_main.cpp: tlobby_main: design improvements https://github.com/wesnoth/wesnoth/commit/32c93789929e79a19e23525cfc9cc7785185b07c 20160316 20:19:04< vultraz> celticminstrel: check it out 20160316 20:19:18< vultraz> not completely revamped, but I think it looks better 20160316 20:21:35< celticminstrel> Oh huh, mattsc wrote pathfinding code for locating the Sceptre of Fire. 20160316 20:22:02-!- travis-ci [~travis-ci@ec2-107-20-125-184.compute-1.amazonaws.com] has joined #wesnoth-dev 20160316 20:22:03< travis-ci> wesnoth/wesnoth#8900 (master - 268620e : Celtic Minstrel): The build has errored. 20160316 20:22:03< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/116469549 20160316 20:22:03-!- travis-ci [~travis-ci@ec2-107-20-125-184.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160316 20:22:07< celticminstrel> get_helper_index should probably be promoted to helper.lua. 20160316 20:22:16< celticminstrel> Uh, get_direction_index, sorry. 20160316 20:22:35< celticminstrel> Okay, so did my WML message tweak break something somewhere? 20160316 20:23:21< vultraz> probably a travis derp 20160316 20:23:26< celticminstrel> Hope so. 20160316 20:23:36< celticminstrel> There'll be another build from PR628. 20160316 20:23:45< vultraz> yeah, 1 build errored 20160316 20:23:54< celticminstrel> 'kay 20160316 20:24:08< celticminstrel> By errored do you mean a ! error rather than a X error? 20160316 20:24:12< vultraz> ! 20160316 20:24:19-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160316 20:24:44-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 20:25:22< vultraz> now, onwards! to the lobby! 20160316 20:26:33< celticminstrel> Looks a little better. Playerlist still not working properly. 20160316 20:26:38< vultraz> gfgtdf: do you know if you can fix the issue where listbox toggle panel rows can sometimes grow smaller than the listbox width when the window is invalidated? 20160316 20:27:04< vultraz> a "little" :| 20160316 20:27:46< celticminstrel> Ir doesn't work very nice with multiple rooms in my opinion. 20160316 20:27:53< celticminstrel> ^It 20160316 20:27:56< vultraz> explain 20160316 20:28:35< celticminstrel> It's probably not a big deal, but if you're in several rooms, you can only see the list of users for the tab that's currently active and for the main lobby. 20160316 20:28:48< celticminstrel> Also, you're not listed in the main lobby if you have a different room tab open. 20160316 20:29:16< celticminstrel> Can you add some sort of outline around the listboxes? 20160316 20:29:24< celticminstrel> Oh wait, that's a treeview, right. 20160316 20:29:44< celticminstrel> The sort buttons are too close together. 20160316 20:29:47-!- prkc [~prkc@192.40.89.19] has joined #wesnoth-dev 20160316 20:29:58< vultraz> who's Brackdon_Cawr 20160316 20:29:59< celticminstrel> And I think a bit more vertical space is also needed there. 20160316 20:30:02< celticminstrel> That's me. 20160316 20:30:12< celticminstrel> Who else would it be? 20160316 20:30:14< vultraz> oh 20160316 20:30:19< vultraz> I expected 'celticminstral' 20160316 20:30:23< vultraz> el 20160316 20:30:25< celticminstrel> Sorry to disappoint you. 20160316 20:30:46< vultraz> heh 20160316 20:31:14< celticminstrel> The "Quit" button is a bit misleading. 20160316 20:31:31< celticminstrel> Maybe change it to something like "Log Out"? 20160316 20:31:38< vultraz> probably 20160316 20:31:40< celticminstrel> Or "Disconnect"? 20160316 20:32:38< celticminstrel> ...why are PLACE_SCEPTRE and KONRAD|LISAR_GETS_SCEPTER macros in the utilities file? They're specific to that one scenario, aren't they? 20160316 20:33:03< vultraz> probably because no one optimized that 20160316 20:33:37< celticminstrel> ...what does same_location_as_previous= do in an event... 20160316 20:34:10< celticminstrel> Okay, so as I thought, my idea would break Lisar/Konrad mood portraits after they get the sceptre. 20160316 20:34:14< celticminstrel> Hmm... 20160316 20:34:16< vultraz> HM 20160316 20:34:22< vultraz> tooltips can draw outside a window 20160316 20:34:28< celticminstrel> What's wrong with that? 20160316 20:34:37< celticminstrel> Seems normal to me. 20160316 20:34:37< vultraz> celticminstrel: i mean the wesnoth window 20160316 20:34:47< vultraz> if it's near the edge of the window, it will be cut off 20160316 20:34:47< celticminstrel> Oh, 20160316 20:34:56< vultraz> perhaps you can look at the formulas and make sure that doesn't happen? 20160316 20:35:12< celticminstrel> If it's cut off, that's bad. (If you could actually make it go outside, that would be fine, but I guess that's not in SDL's scope or something.) 20160316 20:35:18< celticminstrel> Maybe. Which definition? 20160316 20:35:39< celticminstrel> And where did you observe this happening? 20160316 20:35:48< vultraz> gui/default/window/tooltip_large.cfg 20160316 20:35:58< vultraz> celticminstrel: mp lobby, player sort button 20160316 20:36:20< vultraz> those images under 'quick replay' 20160316 20:36:31< celticminstrel> I said which definition, not which file. 20160316 20:36:57< celticminstrel> id=tooltip? 20160316 20:37:00< vultraz> yes 20160316 20:37:03< vultraz> obviously :P 20160316 20:37:17< vultraz> that's the only one that could possibly go outside the window 20160316 20:37:27< celticminstrel> Really? 20160316 20:37:32< celticminstrel> That's not obvious to me. 20160316 20:37:41< vultraz> ah 20160316 20:37:48< vultraz> well, yes, tooltip then 20160316 20:38:47< celticminstrel> Sudden storm. O_O 20160316 20:39:52< vultraz> you angered the programming gods 20160316 20:40:58< vultraz> gfgtdf: small tree view bug: the unfold is initially in the wrong position if expanded isn't set 20160316 20:41:12< vultraz> (I think that last part is the cause, but not 100% sure) 20160316 20:41:16< vultraz> unfold arrow* 20160316 20:42:19< celticminstrel> Should we try actually starting a game in that lobby? 20160316 20:43:11< vultraz> can you join the lobby? 20160316 20:43:17< vultraz> I need to test the player info window 20160316 20:43:22< vultraz> and just idle there 20160316 20:43:23< celticminstrel> I'm there... 20160316 20:43:33< vultraz> ah, you are 20160316 20:43:49< celticminstrel> I can open a whisper session with myself. 20160316 20:43:57< celticminstrel> And closing it crashes. 20160316 20:45:08-!- travis-ci [~travis-ci@ec2-107-20-125-184.compute-1.amazonaws.com] has joined #wesnoth-dev 20160316 20:45:09< travis-ci> wesnoth/wesnoth#8901 (master - df7cdba : Celtic Minstrel): The build has errored. 20160316 20:45:09< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/116469585 20160316 20:45:09-!- travis-ci [~travis-ci@ec2-107-20-125-184.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160316 20:45:31< celticminstrel> scrollbar_container.cpp:703, if you want to investigate. 20160316 20:45:39< vultraz> oh god 20160316 20:45:46< vultraz> not the scrollbar container 20160316 20:46:57 * vultraz cries 20160316 20:47:17< vultraz> celticminstrel: try whispering me and then closing it 20160316 20:47:26< celticminstrel> Give me a minute or two to math this out first. 20160316 20:47:38< vultraz> maaattthhh 20160316 20:48:51< celticminstrel> Still crashes. :/ 20160316 20:48:54< vultraz> yup 20160316 20:48:56< vultraz> confirmed 20160316 20:49:07< celticminstrel> I have a thing to push now. 20160316 20:50:38< irker102> wesnoth: Celtic Minstrel wesnoth:master d94c73a972cd / data/gui/default/window/tooltip_large.cfg: GUI: Fix tooltips occasionally getting cut off on the right https://github.com/wesnoth/wesnoth/commit/d94c73a972cd650777fbd1a4dc6448630e438ccb 20160316 20:51:08< celticminstrel> An analogous change could be made to set_y, if we find it necessary. 20160316 20:51:21-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160316 20:52:14< vultraz> ty ty 20160316 20:54:17-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 20:55:58-!- ChipmunkV [~vova@d0017-2-88-172-31-68.fbx.proxad.net] has quit [Quit: ChipmunkV] 20160316 21:08:40< celticminstrel> Huh. It quit after some preprocessor errors... weird... 20160316 21:11:16-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160316 21:12:20-!- travis-ci [~travis-ci@ec2-54-167-168-104.compute-1.amazonaws.com] has joined #wesnoth-dev 20160316 21:12:21< travis-ci> wesnoth/wesnoth#8902 (master - 32c9378 : Charles Dang): The build was broken. 20160316 21:12:21< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/116476036 20160316 21:12:21-!- travis-ci [~travis-ci@ec2-54-167-168-104.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160316 21:12:52< celticminstrel> I just noticed that there's a difference in the report - "errored" vs "broken". 20160316 21:18:03-!- mjs-de [~mjs-de@x4db59a36.dyn.telefonica.de] has quit [Ping timeout: 244 seconds] 20160316 21:21:56-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 21:29:09-!- gfgtdf [~chatzilla@f054158242.adsl.alicedsl.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0/20160303134406]] 20160316 21:32:11< vultraz> of course it is.. 20160316 21:37:45-!- travis-ci [~travis-ci@ec2-107-20-125-184.compute-1.amazonaws.com] has joined #wesnoth-dev 20160316 21:37:46< travis-ci> wesnoth/wesnoth#8903 (master - d94c73a : Celtic Minstrel): The build failed. 20160316 21:37:46< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/116483658 20160316 21:37:46-!- travis-ci [~travis-ci@ec2-107-20-125-184.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160316 21:38:25< vultraz> I have a fix 20160316 21:39:19-!- Appleman1234 [~Appleman1@KD106161140181.au-net.ne.jp] has quit [Ping timeout: 268 seconds] 20160316 21:39:56< irker102> wesnoth: Charles Dang wesnoth:master 999acb187f6a / data/gui/default/window/lobby_main.cfg: tlobby_main: more design tweaks https://github.com/wesnoth/wesnoth/commit/999acb187f6ae6b61a0c5a4fb5326d36041976df 20160316 21:40:03< celticminstrel> zookeeper: Please tell me what you think of this: https://github.com/wesnoth/wesnoth/pull/629 20160316 21:41:17< vultraz> I like 20160316 21:42:21< zookeeper> well... i don't see how that's a very good use of your time 20160316 21:42:35< celticminstrel> It didn't take all that much time. 20160316 21:42:38< vultraz> but it's already done :P 20160316 21:42:42< celticminstrel> That too. 20160316 21:45:41< zookeeper> well it's a change which doesn't break anything but doesn't really do anything either. i mean, i guess it might in some specific situation be a mildly convenient feature. 20160316 21:45:50< zookeeper> that thing with the %'s is just madness though 20160316 21:46:05< vultraz> celticminstrel: what about 618? 20160316 21:46:10< celticminstrel> If you have a better idea, it's trivial to change. 20160316 21:46:14< celticminstrel> vultraz: What about it? 20160316 21:46:21< vultraz> are you going to merge it? 20160316 21:46:31< celticminstrel> Probably. 20160316 21:46:35< celticminstrel> That's the formulas, I think? 20160316 21:46:51< celticminstrel> Oh, it's not. 20160316 21:46:52< vultraz> no, the effects 20160316 21:46:54< celticminstrel> Ah, right. 20160316 21:47:02< vultraz> formulas is 624 20160316 21:47:07< celticminstrel> I was going to rebase it first and see if Travis will compiled. 20160316 21:47:15< vultraz> ok 20160316 21:47:21< celticminstrel> ^compile 20160316 21:47:30< zookeeper> i'd s/image_variant/mood though (or something similar), for shortness. 20160316 21:47:33< celticminstrel> Or at least, not do whatever it is that caused it to break before. 20160316 21:47:55< celticminstrel> zookeeper: I thought about that, but "mentoring" and "defeated" aren't quite moods. That said, it doesn't need to be super-accurate. 20160316 21:48:04< celticminstrel> So I could change the key. 20160316 21:48:05< zookeeper> that'd also be more future-proof in case we want to make a "mood" affect something other than portrait, or something 20160316 21:48:21< celticminstrel> Eh? 20160316 21:48:33-!- prkc [~prkc@192.40.89.19] has quit [Ping timeout: 244 seconds] 20160316 21:48:43< zookeeper> i cannot clarify because i have no ideas 20160316 21:49:06< celticminstrel> Fair enough, I guess. 20160316 21:49:34-!- mjs-de [~mjs-de@x4db59a36.dyn.telefonica.de] has joined #wesnoth-dev 20160316 21:50:53-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160316 21:52:53< zookeeper> so it adds the mood suffix right before the first instance of ".png" in the image path, right? 20160316 21:53:02< celticminstrel> Yes. 20160316 21:53:13< zookeeper> okay, that's the most reasonable behavior 20160316 21:53:15< celticminstrel> With a hyphen prefixed. 20160316 21:53:30< celticminstrel> (But not in the second case with % signs.) 20160316 21:53:43< irker102> wesnoth: Celtic Minstrel wesnoth:master 92ab82fc8ed6 / changelog: Update changelog https://github.com/wesnoth/wesnoth/commit/92ab82fc8ed6c1c43fd0720a8cf0844e28ffb5ee 20160316 21:54:44< zookeeper> so, like, what was the motivation for this in the first place? 20160316 21:54:52< zookeeper> who needed it for what? 20160316 21:55:42< celticminstrel> Somehow it came from the discussions with Defender. 20160316 22:00:02< zookeeper> from an API maintenance point of view, i'm sure you're not surprised that i'm rather sceptical of adding features just for the sake of adding features, if there's no known need for them 20160316 22:00:30< celticminstrel> I can understand that. 20160316 22:00:35-!- dzaazd [adf7cfdb@gateway/web/freenode/ip.173.247.207.219] has joined #wesnoth-dev 20160316 22:02:02< celticminstrel> Whether there's a need from it depends on how you define "need"; certainly, the functionality it provides is needed by HTTT at least, but at the same time, the functionality it provides was already possible in a different way, so from that you could argue it wasn't really needed. 20160316 22:03:15< zookeeper> if it's a trivial addition then great, but especially if you add some weird new %% semantics to facilitate a minor feature that's at best a minor convenience, it's a bit... backwards 20160316 22:03:25< celticminstrel> On the other hand, you could argue it's still needed because this provides a simpler way to do it. 20160316 22:03:44< celticminstrel> Yeah, I was a bit uncertain about the %%, which is why I didn't just push it directly to master without asking anyone first. 20160316 22:04:07-!- prkc [~prkc@108.61.123.66] has joined #wesnoth-dev 20160316 22:04:28< zookeeper> i don't mind the basic feature as such, since it can be handy when for example you change a unit's portrait between variations and still want the moods to work right 20160316 22:05:02< vultraz> celticminstrel: I think that should become available globally 20160316 22:05:06< vultraz> the %% thing, that is 20160316 22:05:08< vultraz> or similar 20160316 22:05:13< vultraz> like string.format() 20160316 22:05:16< celticminstrel> vultraz: And how am I supposed to do that. 20160316 22:05:31< vultraz> I'm not sure.. 20160316 22:05:38< vultraz> maybe using the formula engine 20160316 22:05:41< zookeeper> in HttT it's not needed because the variants change at fixed moments and the scenario structure is linear, but for example in a campaign where the changes can happen anywhere, working around that with conventional means would be annoying 20160316 22:06:06< vultraz> image = "(foo/bar&-neutral&.png)" 20160316 22:06:11< vultraz> er 20160316 22:06:13< vultraz> %% 20160316 22:06:13-!- ancestral [~ancestral@45.sub-70-197-228.myvzw.com] has joined #wesnoth-dev 20160316 22:06:22< celticminstrel> vultraz: No, my question was more along the lines of... how do you know what to substitute. 20160316 22:06:32< celticminstrel> And when to substitute it, 20160316 22:06:54< vultraz> ehh 20160316 22:07:15< vultraz> well I was thinking something along the lines of... 20160316 22:07:57< vultraz> having it in that format would call the formula engine with an optional given value when you access it 20160316 22:08:01< vultraz> but I dunno if that's possible 20160316 22:08:29< zookeeper> make the madness stop 20160316 22:08:39< celticminstrel> I don't know if it's possible either or where you'd use it or how you'd use it or what. 20160316 22:08:56< celticminstrel> I honestly don't know any logical way to generalize this thing to anything other than portraits. 20160316 22:09:03< vultraz> so, like, cfg.parse_formula("key", format(a, b, c)) 20160316 22:10:05< vultraz> or, wait, $() calls the formula engine, right 20160316 22:10:54< celticminstrel> Only in variable substitution contexts. 20160316 22:10:57< celticminstrel> But yes. 20160316 22:11:12< vultraz> image = $(foo/foo%-neutral&.png). cfg.parse_formula("image", image_variation") 20160316 22:11:20< vultraz> cfg.image_variation* 20160316 22:11:22< vultraz> or something 20160316 22:11:23< vultraz> idk 20160316 22:11:26< vultraz> you're the syntax guy 20160316 22:12:44< celticminstrel> Hmm, it could be possible to leverage the variable substitution syntax here after all... 20160316 22:13:28< celticminstrel> (By the way, what you wrote is "divide foo by foo, then divide by negative neutral and take the remainder, then syntax error" in WFL.) 20160316 22:15:19< celticminstrel> Thunder. Loud. O_O 20160316 22:16:13< vultraz> oops xD 20160316 22:17:02-!- heirecka [~heirecka@exherbo/developer/heirecka] has quit [Excess Flood] 20160316 22:18:48-!- heirecka [~heirecka@exherbo/developer/heirecka] has joined #wesnoth-dev 20160316 22:18:56-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 22:20:48< vultraz> ok, now to see what to do with the lobby list 20160316 22:21:22< vultraz> celticminstrel: I think there should only be a list of people in the selected game and a list of online friends 20160316 22:21:42< vultraz> what do you think 20160316 22:21:52< celticminstrel> vultraz: Huh? 20160316 22:21:57< vultraz> for the mp lobby 20160316 22:22:08< celticminstrel> How is it right now, then? 20160316 22:22:14-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20160316 22:22:24< vultraz> Selected Game 20160316 22:22:25< vultraz> Current Room 20160316 22:22:27< vultraz> Lobby 20160316 22:22:32< vultraz> Other Games 20160316 22:22:42-!- ancestral [~ancestral@45.sub-70-197-228.myvzw.com] has quit [Quit: i go nstuf kthxbai] 20160316 22:22:43< celticminstrel> Ah, so you're proposing removing Other Games. 20160316 22:22:59< celticminstrel> Does the list in the old lobby show people in a game? 20160316 22:23:14< vultraz> it shows people in the lobby, that's it 20160316 22:23:27< vultraz> and somehow sorts it, I think 20160316 22:23:31< vultraz> with friends first 20160316 22:23:44< celticminstrel> Then I guess Other Games isn't really necessary, but definitely add Friends if it's not already there. 20160316 22:23:51-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 264 seconds] 20160316 22:23:52< vultraz> what I'd like to do is make it only Friends and Selected Game 20160316 22:24:01< celticminstrel> That said, even though it's not really necessary, it might be useful. 20160316 22:24:22< celticminstrel> Also, don't remove Current Room. Probably not Lobby either, but Current Room is more important than Lobby probably. 20160316 22:24:42< vultraz> then add a list of people in the current room to the side of the chat area 20160316 22:24:47< vultraz> but not for lobby 20160316 22:24:57< vultraz> who the hell cares about the list of people in the lobby 20160316 22:25:02< celticminstrel> Someone might. 20160316 22:25:10-!- louis94 [~~louis94@91.178.242.1] has joined #wesnoth-dev 20160316 22:25:11< vultraz> plus, if we ever get a wider player base, that list will become huge :P 20160316 22:25:25< celticminstrel> And it is technically a room, I believe, so omitting it is probably more complicated than not. 20160316 22:26:16< celticminstrel> I thought it was usually huge on the 1.12 server already. 20160316 22:26:19< vultraz> not really 20160316 22:26:25< vultraz> hard, that is 20160316 22:27:15< vultraz> huge as in hundreds of people 20160316 22:27:19< vultraz> we have dozens right now 20160316 22:27:51< vultraz> see, in most games, there are individual lobbies 20160316 22:27:58< vultraz> here, we have one big-ass lobby 20160316 22:28:12< celticminstrel> Explain what you mean by "individual lobbies". 20160316 22:28:14< vultraz> in fact, our 'waiting for players' thing is in other games what is considered a lobby 20160316 22:28:18< celticminstrel> Because it doesn't make any sense to me. 20160316 22:29:42< vultraz> when you create a game and wait for players 20160316 22:29:45< vultraz> that's a lobby 20160316 22:29:52< vultraz> or at least, what;s usually considered al obby 20160316 22:29:54< vultraz> a lobby 20160316 22:30:14< celticminstrel> That sounds like a self-hosting design. 20160316 22:30:32< vultraz> ...exactly 20160316 22:30:36< celticminstrel> That's not quite the right way of saying it, but not a server-based design. 20160316 22:30:36< vultraz> that's what we do 20160316 22:30:42< vultraz> each player hosts his own game 20160316 22:30:45< vultraz> oh 20160316 22:31:03< celticminstrel> It's like selecting... I think the third option on the initial multiplayer menu. 20160316 22:31:12< celticminstrel> One person hosts the game, the others connect. 20160316 22:31:19< vultraz> yes 20160316 22:31:21< vultraz> basically 20160316 22:31:29< celticminstrel> And that's bad, because it means that at least one of them needs to set up port forwarding. 20160316 22:31:34< vultraz> but that's actually what we do when we create a game 20160316 22:31:38< vultraz> except the game is on the server 20160316 22:31:46< celticminstrel> I think it also probably means that observers can't join? Not entirely sure. 20160316 22:31:53< vultraz> but the point of all this is, most games don't have a central lobby 20160316 22:32:03< shadowm> 19:24:58 who the hell cares about the list of people in the lobby 20160316 22:32:04< celticminstrel> At the very least, it's a lot harder for observers to join. 20160316 22:32:12< shadowm> A lot of people, including MP moderators. 20160316 22:32:26< celticminstrel> So anyway vultraz, what's your point, really? 20160316 22:32:32< vultraz> [09:31:50] vultraz but the point of all this is, most games don't have a central lobby 20160316 22:32:38< vultraz> we do 20160316 22:32:39< celticminstrel> Because "most players don't have a central lobby" isn't really a point. 20160316 22:32:44< vultraz> and maintain a list of people in it 20160316 22:32:53< vultraz> which, in essence, is everyone on the server 20160316 22:33:24< vultraz> shadowm has a point, but I do wonder what sysmods do in games with millions of players 20160316 22:33:43< shadowm> Focus on what we have, not on what we _might_ have. 20160316 22:33:59< shadowm> Please. 20160316 22:34:26< celticminstrel> You say that "most games don't have a central lobby", but I actually find that kind of hard to believe. 20160316 22:34:54< vultraz> not one in the sense we do 20160316 22:34:56< celticminstrel> Unless they rely on some other service (such as Steam) for connecting users without requiring the set up port forwarding. 20160316 22:35:08< celticminstrel> ^requiring them to 20160316 22:35:36< vultraz> usually they have matchmaking 20160316 22:35:45-!- Appleman1234 [~Appleman1@KD106161151028.au-net.ne.jp] has joined #wesnoth-dev 20160316 22:35:58< vultraz> or in cases such as Terraria, port forwarding 20160316 22:36:08< vultraz> terraria's solution is quite inelegant, tbh 20160316 22:36:19< vultraz> you have to have the IP of any server you want to connect to 20160316 22:36:32< celticminstrel> Um, that's true no matter what the design. 20160316 22:36:51< celticminstrel> You can't connect anywhere on the Internet without an IP address. 20160316 22:37:11< vultraz> no, I mean you have to manually go find it and enter it 20160316 22:37:34< celticminstrel> So what you're really saying is that Terraria didn't bother to implement DNS lookups. 20160316 22:37:48< vultraz> I guess 20160316 22:37:52< shadowm> Also, if you are going to question/discuss our MP design, I strongly recommend you talk to Soliton. 20160316 22:37:57< vultraz> Most servers are hosted by individual players 20160316 22:37:58< celticminstrel> ie, you can't type in a domain name 20160316 22:38:09< vultraz> now, that's not what we do 20160316 22:38:48< vultraz> we have a central server 20160316 22:39:43< vultraz> so, in essence, we have a central lobby 20160316 22:40:08-!- ancestral [~ancestral@45.sub-70-197-228.myvzw.com] has joined #wesnoth-dev 20160316 22:40:11< vultraz> I have a feeling people were looking at IRC when they designed our MP protocols 20160316 22:40:42< vultraz> anyway, I'm concerned about two things: 20160316 22:41:16< vultraz> a. the list of people in the lobby b. the chat of the main lobby 20160316 22:41:44< vultraz> we're planning to go on steam soon, and I'm afraid the first will get too long and the second will become impossible to chat in 20160316 22:41:48< celticminstrel> [Mar 16@6:40:11pm] vultraz: I have a feeling people were looking at IRC when they designed our MP protocols 20160316 22:41:49< celticminstrel> Maybe the people who added the "rooms" system, but beyond that, I kind of doubt it. 20160316 22:42:58-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160316 22:43:21< zookeeper> i have no idea what the rooms system even is. i mean, i've heard of it, but off the top of my head i'd have no idea how to use it. 20160316 22:43:26< celticminstrel> [Mar 16@6:41:44pm] vultraz: we're planning to go on steam soon, and I'm afraid the first will get too long and the second will become impossible to chat in 20160316 22:43:27< celticminstrel> You might have a point with the first, but you might actually find that very few people chat in the open lobby. 20160316 22:43:38< celticminstrel> zookeeper: It's not even accessible in the regular lobby. 20160316 22:43:39< vultraz> celticminstrel: that is true 20160316 22:43:51< zookeeper> celticminstrel, oh. makes sense then. 20160316 22:44:03< vultraz> celticminstrel: huge rooms are usually dominated by spammers 20160316 22:44:17-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160316 22:44:21< celticminstrel> (At least, there's no interface for it. I'm not sure what happens if you type "/join someroom".) 20160316 22:47:08< zookeeper> vultraz, that input bug is hilarious though 20160316 22:47:18< vultraz> heh 20160316 22:47:50-!- Necrosporus [~Necrospor@unaffiliated/necrosporus] has joined #wesnoth-dev 20160316 22:48:01< vultraz> I need to make a gui2interface for the rest of MP Create 20160316 22:48:42< vultraz> then things will make more sense 20160316 22:49:12< zookeeper> it felt like it repeated keypresses way too fast when the key was held down, so even on normal fast key taps it still repeated a few times 20160316 22:57:42-!- dzaazd [adf7cfdb@gateway/web/freenode/ip.173.247.207.219] has quit [Ping timeout: 252 seconds] 20160316 23:05:09-!- travis-ci [~travis-ci@ec2-107-20-125-184.compute-1.amazonaws.com] has joined #wesnoth-dev 20160316 23:05:10< travis-ci> wesnoth/wesnoth#8906 (master - 92ab82f : Celtic Minstrel): The build was fixed. 20160316 23:05:10< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/116499538 20160316 23:05:10-!- travis-ci [~travis-ci@ec2-107-20-125-184.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160316 23:17:54< irker102> wesnoth: ln-zookeeper wesnoth:master 8c2fd342e485 / data/core/images/terrain/swamp/ (18 files): Cleaned up off-hex stray pixels https://github.com/wesnoth/wesnoth/commit/8c2fd342e485866d653fc4688d27e1336d9e67bb 20160316 23:23:15-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 248 seconds] 20160316 23:46:59-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20160316 23:47:05-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20160316 23:54:58-!- mjs-de [~mjs-de@x4db59a36.dyn.telefonica.de] has quit [Remote host closed the connection] --- Log closed Thu Mar 17 00:00:28 2016