--- Log opened Fri Aug 19 00:00:00 2016 --- Day changed Fri Aug 19 2016 20160819 00:00:00< vultraz> in the toggle_panel 20160819 00:00:08< vultraz> inside the listbox 20160819 00:00:15< celmin> So if that's left out, nothing happens? 20160819 00:00:20< vultraz> i assume so 20160819 00:00:28< celmin> Okay, then, leave it out and bind your custom callback in instead. 20160819 00:00:43< vultraz> but that'd be inconsistent with other dialogs 20160819 00:00:46< celmin> What? 20160819 00:00:49< celmin> How so? 20160819 00:01:00< vultraz> double clicking a list is used everywhere 20160819 00:01:04< celmin> The custom callback does the same thing, except that it shows the difficulty dialog first. 20160819 00:01:11< vultraz> there IS set_callback_mouse_left_double_click 20160819 00:01:17< vultraz> but I don't know if that 20160819 00:01:20< celmin> I should say "would do" since it's not written yet. 20160819 00:01:28< vultraz> 's per-panel 20160819 00:01:36< celmin> It takes a twidget, right? 20160819 00:01:37< vultraz> meaning I'd have to bind that to every single damn listbox entry :| 20160819 00:01:40< celmin> Yes. 20160819 00:01:43< celmin> Of course. 20160819 00:01:53< vultraz> every time the listbox is changed :| 20160819 00:01:56< vultraz> even when filtering :| 20160819 00:02:07< vultraz> (though I could change filtering to use set_row_shown) 20160819 00:02:13< vultraz> (like it should_ 20160819 00:02:15< vultraz> ) 20160819 00:02:17< celmin> Doesn't the add item method in listbox return the added widget? 20160819 00:02:29< vultraz> what? 20160819 00:02:29< celmin> If that's the case, all you have to do is bind the callback at that point. 20160819 00:02:46< celmin> ttree_view_node::add_child returns the new ttree_view_node. 20160819 00:02:57< vultraz> tlistbox::add_row returns void 20160819 00:03:08< celmin> But it could easily be changed to return a grid, right? 20160819 00:03:12< vultraz> I could return the grid 20160819 00:03:14< vultraz> yes 20160819 00:03:25< vultraz> it fact, it'd be useful in some cases 20160819 00:03:40< celmin> I think this came up awhile ago when we were discussing things. 20160819 00:03:51< vultraz> right now, if you want to access the just-added row grid, one needs to do this 20160819 00:03:56< vultraz> list.add_row(data) 20160819 00:04:09< vultraz> tgrid& grid = list.get_row_grid(list.get_item_count - 1); 20160819 00:04:23< vultraz> would be nice to do tgrid& grid = list.add_row(data); 20160819 00:04:24< celmin> Yeah, that's silly. Just have add_row return the grid in the first place. 20160819 00:04:50< celmin> I guess it's a grid, not a toggle panel, so you might want to find_widget it to actually get the toggle panel. 20160819 00:04:57< vultraz> yes.. 20160819 00:05:05< vultraz> but that's simple enough.. 20160819 00:05:07< celmin> Yeah. 20160819 00:05:25< vultraz> slightly tangential question.. 20160819 00:06:12< vultraz> if you have two vecs of pointers to the same objects, is there any simpler way to compare them than looping over one and saying if(vec1[i] != vec2[i])? 20160819 00:06:34< vultraz> (related to getting a vector of bools for get_row_shown) 20160819 00:06:53< vultraz> (since the create_engine keeps a list of filtered and unfiltered games) 20160819 00:07:17< celmin> Well, you could do if(vec1 != vec2) probably. 20160819 00:07:48< celmin> Which would do roughly the same thing internally. 20160819 00:08:27< celmin> And probably short-circuit by comparing their sizes first. 20160819 00:08:34< celmin> ~-probably 20160819 00:08:37< celmin> ^` 20160819 00:08:38< celmin> ... 20160819 00:08:42< celmin> ^-probably 20160819 00:09:05< celmin> All the normal comparison operators work on vectors, actually. 20160819 00:09:44< vultraz> was thinking of doing something like... std::vector states; for(int i = 0; i < vec_unfiltered.size(); i++) { stats.push_back(vec_filtered[i] == vec_unfiltered[i]); } 20160819 00:10:26< celmin> Oh, I think std::transform has a binary predicate version... 20160819 00:10:48< vultraz> it'd be nice if there was something simpler 20160819 00:12:03< celmin> Maybe transform(vec1.begin(), vec2.end(), vec2.begin(), back_inserter(states), equal()) 20160819 00:12:10< celmin> Assuming they're vectors of configs, I dunno/ 20160819 00:12:21< celmin> Also need std:: in front of everything, of course. 20160819 00:12:39< celmin> Anyway, disappearing for a bit now. 20160819 00:12:46< vultraz> pointers 20160819 00:12:49< vultraz> not configs 20160819 00:12:52< vultraz> or config pointers 20160819 00:13:00< celmin> Then equal() 20160819 00:13:18< vultraz> they're vectors of std::shared_ptr 20160819 00:18:58-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 250 seconds] 20160819 00:25:25-!- gfgtdf [~chatzilla@x4e3690f8.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 48.0/20160726073904]] 20160819 00:28:27 * vultraz pokes irker 20160819 00:28:52< vultraz> dammit, irker, where is my commit! 20160819 00:40:12-!- travis-ci [~travis-ci@ec2-54-166-29-54.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 00:40:13< travis-ci> wesnoth/wesnoth#10445 (master - 5bac12a : Charles Dang): The build has errored. 20160819 00:40:13< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153435981 20160819 00:40:13-!- travis-ci [~travis-ci@ec2-54-166-29-54.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 00:53:06-!- Appleman1234 [~Appleman1@KD036012021122.au-net.ne.jp] has joined #wesnoth-dev 20160819 01:00:40-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160819 01:05:19-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 252 seconds] 20160819 01:08:58< celmin> Then, equal>? 20160819 01:11:34< vultraz> I see 20160819 01:12:59 * wedge009 imagines irker responding with a torrent of delayed commit messages like when someone pushes a big branch 20160819 01:20:40< celmin> BTW vultraz, when you change a function with a doc comment, you should also update the comment. 20160819 01:20:59< vultraz> I see 20160819 01:21:12< vultraz> agh, dammit 20160819 01:21:38< vultraz> I cannot bind the same type of function to connect_signal_mouse_left_click as ttoggle_panel::set_callback_mouse_left_double_click 20160819 01:21:47 * vultraz curses gui2 and it's stupid event handler types 20160819 01:21:57< celmin> Probably can. 20160819 01:22:57< vultraz> C:\Users\Charles\Documents\wesnoth-git\src\gui\dialogs\multiplayer\mp_create_game.cpp|130|error: invalid initialization of reference of type 'const tsignal_function& {aka const std::function&}' from expression of type 'std::function'| 20160819 01:23:06< vultraz> tsignal_function is evil :| 20160819 01:23:54< vultraz> anyway, set_callback_mouse_double_click requires a std::function 20160819 01:23:58< vultraz> so, what do I do here 20160819 01:24:00< vultraz> :| 20160819 01:24:15< celmin> Easy. Bind it. 20160819 01:24:25< vultraz> ? 20160819 01:24:41< celmin> The signatures are compatible. 20160819 01:24:59< vultraz> er, wait 20160819 01:25:05< vultraz> twindow also a twidget, right..? 20160819 01:25:16< celmin> Yes, and also a tdispatcher 20160819 01:25:28< vultraz> ok, so maybe I don't need to do void dialog_exit_hook(twidget&, twindow& window); 20160819 01:25:36< vultraz> I could just do twidget& window 20160819 01:25:42< vultraz> or maybe twindow& window, even? 20160819 01:25:49< vultraz> which is valid 20160819 01:26:57< vultraz> looks like I can just do twindow& window :D 20160819 01:32:10< vultraz> I wonder if I should make a before_exit hook in twindow... 20160819 01:34:28< irker257> wesnoth: Charles Dang wesnoth:master 90c3c05af4cd / / (6 files in 3 dirs): MP Create: improved handling of campaign difficulty selection https://github.com/wesnoth/wesnoth/commit/90c3c05af4cdfe28373219884241ee6340f6b9eb 20160819 01:34:35< vultraz> that was a lot simpler than I expected 20160819 01:34:38< vultraz> ty, celmin 20160819 01:44:13< vultraz> celmin: earlier, did you mean std::equal or std::is_same? 20160819 01:44:20< celmin> equal 20160819 01:44:31< celmin> equal is a functor, while is_same is a type trait 20160819 01:44:42< celmin> So, is_same compares types, not values. 20160819 01:44:52< vultraz> ah 20160819 01:46:25< vultraz> ok, I have this http://pastebin.com/NdjN6xTC 20160819 01:48:38< vultraz> but it keeps saying 'no matching function call for equal()'. I assume I need to put something in equal, but I'm confused as to what :/ 20160819 01:48:39< celmin> What's the return type of get_levels_by_type 20160819 01:49:51< vultraz> std::vector> 20160819 01:50:13< celmin> No &? 20160819 01:50:54< vultraz> no, no references 20160819 01:51:15< celmin> Then that code will probably crash from invalid pointers. 20160819 01:51:36< celmin> Put the level lists in a const& temporary. 20160819 01:51:58< celmin> Otherwise they'll be destroyed before the transform executes 20160819 01:53:54< vultraz> as so? http://pastebin.com/iNdbzZXq 20160819 01:54:54< celmin> First two iterators need to be beginning and end of one container. Third iterator is the beginning of the other. 20160819 01:54:54-!- travis-ci [~travis-ci@ec2-174-129-73-19.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 01:54:55< travis-ci> wesnoth/wesnoth#10446 (master - 90c3c05 : Charles Dang): The build failed. 20160819 01:54:55< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153446670 20160819 01:54:55-!- travis-ci [~travis-ci@ec2-174-129-73-19.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 01:55:06< celmin> And, hmm... 20160819 01:55:21< celmin> I just realized a potential problem. I think this assumes they are the same length. 20160819 01:55:34< vultraz> they are not 20160819 01:55:38< celmin> Exactly 20160819 01:55:55< celmin> I took your request at face value without really checking if it was the right choice... 20160819 01:56:14< vultraz> is my loop idea better? :P 20160819 01:56:31< celmin> I think your loop idea had the same problem? Unless I misunderstood it. 20160819 01:56:49< vultraz> eh, true... 20160819 01:56:58< vultraz> so, what is the best solution here 20160819 01:57:03< celmin> What you want is set_difference, I think... 20160819 01:57:12< celmin> Which requires the vectors to be sorted... 20160819 01:57:39< celmin> Or set_intersection 20160819 01:57:55< celmin> Except not quite that either... 20160819 01:58:49< vultraz> a loop with std::find? 20160819 01:59:09< vultraz> loop over vector 1, push back whether it's in vector 2? 20160819 01:59:26< celmin> Hmm... 20160819 02:03:32< celmin> The logic there is correct, but... 20160819 02:03:51< celmin> Are the lists sorted? 20160819 02:04:28< vultraz> I have no idea 20160819 02:05:06< celmin> I would expect them to be, and if they are, it'd be more efficient to use std::binary_search over std::find. 20160819 02:05:22< celmin> And even if they aren't, it might be more efficient to sort them first and do the same. 20160819 02:05:57< celmin> std::find is O(n) worst case, std::binary_search is O(log n). 20160819 02:07:18< celmin> Or if the create_engine doesn't already return a sorted list, it could be changed to do so. 20160819 02:09:49< vultraz> binary_search doesn't work right 20160819 02:09:51< vultraz> find is 20160819 02:10:03< vultraz> (this code is working) 20160819 02:10:05< vultraz> std::vector filtered; 20160819 02:10:07< vultraz> for(unsigned int i = 0; i < levels_unfiltered.size(); i++) { 20160819 02:10:08< vultraz> filtered.push_back(std::find(levels_filtered.begin(), levels_filtered.end(), levels_unfiltered[i]) != levels_filtered.end()); 20160819 02:10:10< vultraz> } 20160819 02:10:38< celmin> If it doesn't work right it's because they're not sorted. 20160819 02:10:45< celmin> Binary search only works if they're already sorted. 20160819 02:10:48< vultraz> I see 20160819 02:10:56< celmin> I think that loop is roughly O(n^2) 20160819 02:11:31< celmin> You can also get binary search by putting the filtered levels in a set instead of a vector. 20160819 02:11:43< vultraz> the whole filtered thing is rather inefficient 20160819 02:12:15< vultraz> first, this happens 20160819 02:12:16< vultraz> https://github.com/wesnoth/wesnoth/blob/master/src/game_initialization/create_engine.cpp#L1145 20160819 02:12:38< vultraz> then, when you get unfiltered 20160819 02:12:40< vultraz> https://github.com/wesnoth/wesnoth/blob/master/src/game_initialization/create_engine.cpp#L1205 20160819 02:12:46< vultraz> and filtered 20160819 02:12:47< vultraz> https://github.com/wesnoth/wesnoth/blob/master/src/game_initialization/create_engine.cpp#L1245 20160819 02:12:51< vultraz> very inefficient, I think 20160819 02:13:22< celmin> Why doesn't it just return scenarios_ directly? 20160819 02:13:26< celmin> And etc 20160819 02:13:47< celmin> I guess "and etc" is redundant 20160819 02:13:55< vultraz> I don't know 20160819 02:14:10< celmin> Pretty sure that would give exactly the same result. 20160819 02:14:14< celmin> Though, it depends on the type. 20160819 02:14:21< celmin> What's the type of scenarios_ and co? 20160819 02:14:40< celmin> Oh I see. 20160819 02:14:48< celmin> It's a list of indices. 20160819 02:14:52< vultraz> https://github.com/wesnoth/wesnoth/blob/master/src/game_initialization/create_engine.hpp#L196 20160819 02:15:19< vultraz> so, these functions return a vector of level_ptr 20160819 02:15:30< vultraz> while scenarios_, etc, are vectors of scenario_ptr, etc 20160819 02:15:37< celmin> You sure? 20160819 02:15:48< vultraz> yes, look 20160819 02:16:12< vultraz> however, class scenario inherits from class level... 20160819 02:16:18< vultraz> and other classes do inherit from class scenario 20160819 02:16:30< celmin> Oh, I was thinking of scenarios_filtered_, sorry. 20160819 02:16:34< vultraz> can we... dynamic cast? 20160819 02:16:36< celmin> That's the list of indices. 20160819 02:16:40< celmin> Why dynamic cast? 20160819 02:17:03< celmin> Dynamic cast is usually used to convert a base class to a subclass, and only if there are virtual methods involved, I think. 20160819 02:17:46< celmin> So apply_level_filters() builds a list of the indices of matching levels. 20160819 02:17:53< celmin> Well, multiple lists. 20160819 02:18:09< vultraz> so if you have class a and class b : public b, vector, can one do a vec func() { return b };? 20160819 02:18:31< vultraz> er, return the vector of b 20160819 02:18:31< celmin> Sorry, I didn't quite get what you mean there. 20160819 02:18:43< celmin> Containers are not polymorphic. 20160819 02:18:52< celmin> It wouldn't be right for them to be. 20160819 02:19:18< celmin> If A is a base class of B, then you can't convert between vector and vector. 20160819 02:19:28< vultraz> if you have a vector of pointers to class b, and class b inherits from class b, can you return that vector in a function with a return type of a vector of class a? 20160819 02:19:28< celmin> Or between vector and vector either probably. 20160819 02:19:42< celmin> No. 20160819 02:19:53< vultraz> ok 20160819 02:20:05< celmin> If you have a vector of B and need a vector of A, you're totally out of luck. 20160819 02:20:27< celmin> If you have a vector of B or B* and need a vector of A*, then you can construct a new vector, but direct conversion is not possible. 20160819 02:20:41< vultraz> I guess that's why it doesn't return the vectors directly 20160819 02:20:48< vultraz> anyway 20160819 02:20:50< celmin> (Of course, anywhere I say X* shared_ptr ^shared_ptr 20160819 02:21:01< vultraz> this method of game filtering seems faster than reconstructing the list 20160819 02:21:15< celmin> Here's an idea. 20160819 02:21:16< vultraz> plus, it avoids glitches with the sliders that result from that 20160819 02:21:30< celmin> Add a method to create_engine that returns scenarios_filtered_ etc. 20160819 02:21:46< celmin> Then you can easily convert that to the needed vector 20160819 02:22:03< vultraz> eh? 20160819 02:22:23< celmin> for(size_t i : scenarios_filtered_) vec_bool[i] = true; 20160819 02:22:30< celmin> Or whatever 20160819 02:22:47< vultraz> that... doesn't work 20160819 02:22:52< celmin> Why not? 20160819 02:23:04< vultraz> because then how will the listbox know what rows to show or not? 20160819 02:23:09< celmin> That's exactly it. 20160819 02:23:34< vultraz> say you have 10 rows, and want to display 1,3, and 5. you can't have a vector of true, true, true, you need a vector of true, false, true, false, true, etc 20160819 02:23:36< celmin> Assuming the rows that exist in the listbox exactly correspond to the elements of scenarios_, the list scenarios_filtered_ contains the indices of those rows that should be visible. 20160819 02:24:02< celmin> Yeah, what I described doesn't make a vector of true, true, true in that case. 20160819 02:24:17< celmin> You do need to vec_bool.resize(total_existing_scenarios) first. 20160819 02:24:18< vultraz> but that would mean I need a vector pre-filled with false values 20160819 02:24:30< celmin> That's easy, because false is what you get when default-constructing a bool. 20160819 02:24:37< vultraz> ah 20160819 02:24:39< celmin> So using resize() will fill it with false. 20160819 02:24:43< celmin> Or you can do it on construction. 20160819 02:24:47< vultraz> can I set it to an initial size? 20160819 02:24:51< celmin> Something like vector blah(size) 20160819 02:24:57< vultraz> I see 20160819 02:25:12< celmin> If you wanted it to start all true you could do vector blah(size, true), but obviously that's not the case here. 20160819 02:25:29< celmin> BTW, vector is a dynamic bitset. 20160819 02:25:53< celmin> It's not really a true vector. 20160819 02:26:59< vultraz> eh? 20160819 02:27:10< celmin> vector is a bitset, not a real container. 20160819 02:27:20< celmin> Not really important for the most part, I guess, 20160819 02:27:31< vultraz> I see 20160819 02:27:47< vultraz> (btw, does a switch statement that returns need a break; call? 20160819 02:27:50< celmin> It means some things that work on other vectors won't work with vector though. 20160819 02:27:53< celmin> No. 20160819 02:28:03< celmin> Unless of course the return isn't the only possible path. 20160819 02:28:40< celmin> A switch is sorta a glorified goto. It checks the value, jumps to the appropriate case label, and continues execution from there. 20160819 02:28:51< celmin> (Or the default label.) 20160819 02:30:26< vultraz> this method you suggest should be more efficient, i think 20160819 02:30:56< vultraz> since it doesn't construct the temp vectors.. 20160819 02:30:59< vultraz> or have to search both 20160819 02:31:16< celmin> Just need a new method in create_engine that returns the intermediate data it was already storing. 20160819 02:31:30< celmin> (Or even one that constructs the vector if you want.) 20160819 02:32:52< vultraz> is this the correct way to say 'return default empty vector'? 20160819 02:32:54< vultraz> return std::vector(); 20160819 02:33:25< celmin> Yes, 20160819 02:37:57< irker257> wesnoth: Charles Dang wesnoth:master 6b3f9d8cbde6 / src/ (3 files in 2 dirs): MP Create: much more efficient method of game filtering https://github.com/wesnoth/wesnoth/commit/6b3f9d8cbde60038c88ef8a9e85fea755ea0baac 20160819 02:37:59< vultraz> celmin: ^ 20160819 02:38:30< celmin> Well, you misspelled indices... 20160819 02:39:03< celmin> That aside, looks good. 20160819 02:39:43< vultraz> sdjkfhuilhfui 20160819 02:39:53< celmin> ??? 20160819 02:40:13 * vultraz corrects 20160819 02:41:17< irker257> wesnoth: Charles Dang wesnoth:master 88726caebc82 / src/game_initialization/ (create_engine.cpp create_engine.hpp): Fixup typo from 6b3f9d8cbde6 https://github.com/wesnoth/wesnoth/commit/88726caebc82b44fcf79f7e2244abca6c6d09263 20160819 02:44:00< vultraz> hmmm 20160819 02:44:05< vultraz> seems to be a small bug here 20160819 02:44:14< vultraz> details of filtered games can display incorrectly 20160819 02:44:20< celmin> ? 20160819 02:44:28< celmin> In the lobby? 20160819 02:44:33< vultraz> create 20160819 02:45:00< vultraz> can you confirm? 20160819 02:46:00< vultraz> go to create, type one letter in the filter box, confirm the selected game's details appear, then do another..it should go back to aethermaw 20160819 02:46:55< vultraz> hmmm 20160819 02:47:35< vultraz> maybe because reset_level_filters is never called? 20160819 02:48:13< vultraz> I think I have an idea 20160819 02:49:51< vultraz> the num players filter should always be applied 20160819 02:49:57< vultraz> meaning it needs an 'any' setting 20160819 02:50:14< vultraz> ahh 20160819 02:50:22< vultraz> in gui1, 1 was considered 'any' 20160819 02:57:35< vultraz> agh, dammit :| 20160819 02:57:45< vultraz> how do I do this 20160819 02:59:03-!- travis-ci [~travis-ci@ec2-54-166-29-54.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 02:59:04< travis-ci> wesnoth/wesnoth#10447 (master - 6b3f9d8 : Charles Dang): The build is still failing. 20160819 02:59:04< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153453640 20160819 02:59:04-!- travis-ci [~travis-ci@ec2-54-166-29-54.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 03:00:24< vultraz> gahh 20160819 03:00:30< vultraz> for some reason 20160819 03:00:37< vultraz> when filtered, i cannot get the details of ANY selection... 20160819 03:00:41< vultraz> the hell is going on ehre 20160819 03:03:34< vultraz> hmmm 20160819 03:03:35< vultraz> I wonder.. 20160819 03:04:36< vultraz> ok, what does.... set_current_level do 20160819 03:04:38< vultraz> current_level_index_ = scenarios_filtered_.at(index); 20160819 03:04:40< vultraz> gmmmmmm 20160819 03:05:05< vultraz> we know the _filtered vectors are indices.. 20160819 03:05:14< vultraz> so, let's see 20160819 03:05:19< vultraz> if the list is filtered 20160819 03:05:27< vultraz> we get the index using get_selected_row 20160819 03:05:33< vultraz> say, you have 3 games shown 20160819 03:05:38< vultraz> you'll get 1 20160819 03:06:08< vultraz> then you'll set current_level_index_ to ... scenarios_filtered_[1] :| 20160819 03:06:11< vultraz> (or maybe it's 0) 20160819 03:06:24< vultraz> but wait.. 20160819 03:06:27< vultraz> it's always filtered... 20160819 03:06:41< vultraz> so the sizes should always match...? 20160819 03:06:50< vultraz> celmin: thoughts, here? 20160819 03:07:19< celmin> I don't understand the issue. 20160819 03:07:30< celmin> Try to explain it clearly? 20160819 03:08:43< vultraz> for some reason, the right game details aren't showing when you filter 20160819 03:08:50< vultraz> could you confirm? 20160819 03:08:56< celmin> Not right now. 20160819 03:12:32-!- travis-ci [~travis-ci@ec2-174-129-73-19.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 03:12:33< travis-ci> wesnoth/wesnoth#10448 (master - 88726ca : Charles Dang): The build is still failing. 20160819 03:12:33< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153453973 20160819 03:12:33-!- travis-ci [~travis-ci@ec2-174-129-73-19.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 03:15:35-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Quit: wedge009] 20160819 03:15:54-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160819 03:16:53< vultraz> hmmmmmmmmmmmm 20160819 03:19:20< vultraz> ahhh 20160819 03:19:30< vultraz> I see the problem 20160819 03:20:19< vultraz> celmin: get_selected_row() doesn't consider whether a row is visible or not 20160819 03:20:36< vultraz> it's an absolute index 20160819 03:21:15< vultraz> the create engine assumes a relative index based on filter criteria 20160819 03:24:53< vultraz> so I need a way to convert the absolute index to a relative one 20160819 03:26:55< celmin> Sounds doable 20160819 03:28:43< vultraz> I could add a flag to get_selected_item to respect the visibility 20160819 03:29:04< vultraz> celmin: any other method occur to you? 20160819 03:29:32< celmin> Kinda 20160819 03:29:53< vultraz> do tell 20160819 03:32:17< vultraz> (also, is it valid to use a ternary condition in an if statement? such as: if((*items_[i]).selected && respect_visibility ? (*items_[i]).shown : true) ) 20160819 03:33:03< celmin> Valid sure, but whyyy? 20160819 03:33:25< vultraz> why whyyy? 20160819 03:34:36< celmin> Okay so where was I. 20160819 03:34:59< celmin> get_selected_row() doesn't consider visibility. That's probably fine. 20160819 03:35:09< celmin> create_engine expects a filtered-relative index. 20160819 03:35:15< celmin> So to convert, uhh... 20160819 03:35:32< celmin> Maybe std::find on the index list? 20160819 03:35:54< celmin> And then subtract begin() to get the index from the iterator. 20160819 03:35:54< vultraz> uh...? 20160819 03:36:08< celmin> You don't understand what I mean? 20160819 03:36:10< vultraz> I see 20160819 03:36:17< celmin> The index list refers to the get_indices thing. 20160819 03:36:33< vultraz> er.. now you lost me 20160819 03:36:39< celmin> Blagh. 20160819 03:36:47< vultraz> look for the absolute index in the relative index vector? 20160819 03:36:57< celmin> Yes, that. 20160819 03:37:28< celmin> std::find gives you an iterator, and since it's random access, you can then subtract begin() to get the relative index. 20160819 03:37:50< vultraz> wait, begin of what? 20160819 03:37:59< vultraz> the relative index vector? 20160819 03:38:16< celmin> The same begin passed to find. 20160819 03:44:26< celmin> As for ternary in if, why would you do that? 20160819 03:45:02< vultraz> to avoid another if block 20160819 03:45:04< vultraz> anyway 20160819 03:45:05< vultraz> your method works 20160819 03:45:15< celmin> I think the example you posted would work using || instead of the ternary, but not quite sure. 20160819 03:58:39< celmin> Wait, no... 20160819 03:59:02< celmin> With &&? 20160819 03:59:17-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has joined #wesnoth-dev 20160819 03:59:49< celmin> Actually, not sure which of && and ?: gets higher precedence... 20160819 04:00:35< tad_> && 20160819 04:01:06< celmin> So if I'm not mistaken, your "a && b ? c : true" is equivalent to "a && b && c". 20160819 04:01:15< tad_> But I **always** use parens because it's so darned confusing, especially with ?: 20160819 04:01:27< celmin> Yeah, I generally use parentheses when mixing those three. 20160819 04:01:38< tad_> "if a && c then c else true" 20160819 04:02:39< celmin> No wait, it wouldn't be equivalent... 20160819 04:02:50< Aginor> ? has lower presendence than your other boolean operators 20160819 04:03:00< tad_> And not exactly the same because c does not need to be boolean in the ?: form .. it will be promoted after, instead of during in the && .. && 20160819 04:03:07< celmin> "a && b && c" would be more like "a && b ? c : false" 20160819 04:03:33< Aginor> http://en.cppreference.com/w/c/language/operator_precedence 20160819 04:03:41< celmin> I have that page open right now, actually. :) 20160819 04:03:41< Aginor> c, c++, java 20160819 04:03:42< tad_> a && b && c --> if aa then else if bb then else if cc then 20160819 04:03:52< celmin> Anyway, vultraz, I think that example of a ternary inside an if is a bad idea. 20160819 04:04:11-!- JyrkiVesterinen [~JyrkiVest@87-100-209-14.bb.dnainternet.fi] has joined #wesnoth-dev 20160819 04:05:04< celmin> So anyway tad_, what's up? Usually when you join there's a specific reason, right? 20160819 04:05:09< tad_> Ternaries are usually a bad idea. They can be REAL handy, but are confusing. 20160819 04:05:10< irker257> wesnoth: Charles Dang wesnoth:master 157a579014e0 / src/gui/dialogs/multiplayer/ (mp_create_game.cpp mp_create_game.hpp): MP Create: fixed an issue where the correct game wouldn't appear when filtering https://github.com/wesnoth/wesnoth/commit/157a579014e0941e8fbddf873365364caa76c963 20160819 04:05:16< vultraz> celmin: ^ 20160819 04:05:47< tad_> Looking for Zookeeper. I have a WIP on TSG and wanted opinion/feedback on some requests as I continue with the bandit side of things. 20160819 04:05:54< celmin> Ah. 20160819 04:06:06< celmin> Seems he's not around though. 20160819 04:06:26< tad_> Yep. 20160819 04:06:44< celmin> BTW vultraz, not really a big deal, but usually when working with indices they should be size_t. 20160819 04:07:21< tad_> gack. no, I'll remain silent on that. 20160819 04:07:24< celmin> The existing code probably doesn't respect that much though... 20160819 04:08:00< celmin> And int does work perfectly fine except in extreme cases that'll basically never happen. 20160819 04:08:25< tad_> size_t has bit my @$$ so many times .. 20160819 04:08:34< celmin> How so? 20160819 04:09:04< celmin> Admittedly, I've had some problems with it too, but that was in a codebase that tended to use -1 as a magic value... 20160819 04:09:20< tad_> It's only meaningful when speaking of memory allocations. I've been on embedded systems where size_t was 8 bits and indexed were 16. 20160819 04:15:14< Aginor> we should always respect the signedness of our iterators 20160819 04:15:37< Aginor> if our length functions returns size_t, that's what we should use 20160819 04:15:46< celmin> Yeah. 20160819 04:15:49< Aginor> if it returns and int16_t, that's what we should use. 20160819 04:15:55< tad_> size_t is a C-ism we're 'blessed' with simply because K&R wrote C so they could write Unix and they needed something for memory allocations in Unix. 20160819 04:15:56< celmin> That's more important than always using size_t. 20160819 04:16:06< Aginor> so always use the correct type. 20160819 04:16:41< tad_> Personal opinion: grep for size_t and if it's not related to malloc (or ilk) it's a code smell. 20160819 04:16:55< celmin> It rarely is though. 20160819 04:17:10< celmin> Also, size_t is in the C++ standard too. 20160819 04:17:27< tad_> That's because the entire C standard is in C++ 20160819 04:17:38< celmin> My impression was that it wasn't part of that. 20160819 04:17:51< celmin> Even if it is though, it's used throughout the C++ standard library. 20160819 04:18:11< tad_> Which, if you read the source, smells greatly. 20160819 04:18:19< celmin> So in respecting iterator signedness as Aginor said, you could end up using it a lot for loops over standard containers. 20160819 04:18:39< Aginor> celmin: not just signedness actually, but size too 20160819 04:18:52< celmin> Yeah. 20160819 04:18:59< Aginor> which basically turns into respecting the type that's used for indexing/sizing containers/arrays/lists 20160819 04:21:22 * Aginor has strong views on the subject 20160819 04:22:23< tad_> So do I. So did a lot of us when the first C++ standard was being worked on. But you can't win 'em all. 20160819 04:23:53< tad_> As I recall it came down to doing it now, and ignoring lazy programmers, or doing it in a couple years with a lot more argument. 20160819 04:24:45< Aginor> tad_: so a list iterator should always use a signed type instead? 20160819 04:25:44< tad_> I like signed and I like iterators which do something sane when passed funky values. 20160819 04:26:08-!- travis-ci [~travis-ci@ec2-174-129-131-190.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 04:26:09< travis-ci> wesnoth/wesnoth#10449 (master - 157a579 : Charles Dang): The build is still failing. 20160819 04:26:09< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153462218 20160819 04:26:09-!- travis-ci [~travis-ci@ec2-174-129-131-190.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 04:26:13< Aginor> but how do they know that your signed value is signed when they expect unsigned? 20160819 04:26:18< tad_> There is no reason an iterator cannot go from -1 to -n .. it's up to the designer of the class being iterated over. 20160819 04:28:13< tad_> The C-ism is that the class being iterated is an array. Doesn't need to be. 20160819 04:28:43< Aginor> I fully agree 20160819 04:29:15< Aginor> the point I was trying to bring across is that user of the API should respect the types supplied by the interface 20160819 04:29:17< tad_> So give me an enum (Red, Green, Blue, ...) and let me iterate using that as an index .. 20160819 04:29:50< tad_> 'tis best to observe the false assumptions of the designer. then, when it fails, you can boot it upstream. 20160819 04:34:30< tad_> As to the question of signed vs unsigned .. I've found that few class designers (including the standard libraries) worry about edge conditions. Things tend to fail long before you get to the signed/unsigned rollover point, so it's REAL hard to test them. 20160819 04:37:13< tad_> I do remember doing some testing in C and when I got up there it didn't just fail, it caused a kernel panic. Hard to test at all when that happens. 20160819 04:39:22< celmin> I seem to recall that signed rollover is implementation-defined behaviour. 20160819 04:39:44-!- Appleman1234 [~Appleman1@KD036012021122.au-net.ne.jp] has quit [Ping timeout: 260 seconds] 20160819 04:39:46-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160819 04:41:56< JyrkiVesterinen> It's worse. Signed rollover is undefined behavior. 20160819 04:41:56< tad_> Yep. 20160819 04:41:56< celmin> That is indeed worse. 20160819 04:42:22< tad_> Yes. Indexing and pointer math is only defined for the range [0..n]. If *p --> v[0] then *(p-1) is implementation defined behavior, iirc. 20160819 04:44:24-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 260 seconds] 20160819 04:51:50-!- Kwandulin [~Miranda@p200300760F35BF024C478C790C2034A6.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160819 04:52:19-!- JyrkiVesterinen [~JyrkiVest@87-100-209-14.bb.dnainternet.fi] has quit [Quit: .] 20160819 05:01:21< tad_> OK .. I have a really minor bug for y'all .. I was just re-starting a play-test run-through and started by deleting all saved games. Accidentially pressed Load instead of Cancel when there were no more to delete and got 'the file is corrupt' when a more approriate error would be the 'no file to load' you'd get if you canceled then pressed Load again. Happy, Tad came in and has an error for y'all? 20160819 05:02:05< celmin> Or disable the Load button if the list is empty... 20160819 05:02:14< celmin> …GUI2 does support disabling, right? 20160819 05:02:27< tad_> Oh but that would be making the UX too easy! 20160819 05:02:45< vultraz> yes, it support disabling :P 20160819 05:03:03< vultraz> I shall deal with this 20160819 05:03:54< tad_> Sometime. How many people lean on Delete like that? 20160819 05:04:25< tad_> While you're there, though, I do wish the Del key was a shortcut for the Delete button ... 20160819 05:06:46< tad_> Ah, checked the log. It was trying to open the last-deleted file .. and tried *.gz *.gz.gz (?!?) and *.gz.bz (!?!?!) before it gave up. 20160819 05:06:53< irker257> wesnoth: Charles Dang wesnoth:master 20e33d5c5865 / src/gui/dialogs/game_load.cpp: Game Load: close dialog if you delete all savefiles https://github.com/wesnoth/wesnoth/commit/20e33d5c58651635da71386c519a391ee00f5c9a 20160819 05:06:55< vultraz> tad_: ^ 20160819 05:07:07 * tad_ chuckles. 20160819 05:07:13< tad_> Thanks. 20160819 05:09:47< celmin> What happens when you go to open it and there were none to begin with? 20160819 05:09:59< vultraz> it doesn't show 20160819 05:10:00< tad_> "No files to load" message popup. 20160819 05:10:03< celmin> Ah, okay. 20160819 05:10:04< vultraz> yeah 20160819 05:10:41< celmin> Could also make Delete and Backspace hit the delete button. 20160819 05:11:11 * tad_ is key-centric. I'm all for not having to find the mouse if I don't have to ... 20160819 05:11:59< vultraz> I don't know what the delete hotkey is 20160819 05:13:08< celmin> Delete hotkey? 20160819 05:13:13< celmin> Does it need to be a hotkey? 20160819 05:13:24< tad_> Oh .. question on the ~RC(>1) errors .. were those supposed to be fully fixed? I get one every now and then and can't get it to repeat when I see it. 20160819 05:13:43< vultraz> tad_: I thought i fixed it :| 20160819 05:14:00< vultraz> but actually I did notice them once or twice myself.. 20160819 05:14:29< tad_> I wish I could get a repeatable failure. But even when I remember EXACTLY what I did since program start to the error, it won't re-appear. 20160819 05:15:01< celmin> What's wrong with ~RC(>1)? 20160819 05:15:12< vultraz> tad_: try clicking on a savegame with no leader image 20160819 05:15:17< vultraz> celmin: and yes it needs a hotkey 20160819 05:16:01< vultraz> register_hotkey takes a hotkey::HOTKEY_COMMAND 20160819 05:17:02< vultraz> I could make a version that takes SDLkey, I suppose 20160819 05:17:56< vultraz> SDLK_DELETE 20160819 05:17:58< vultraz> hmm 20160819 05:18:59< tad_> The other spurious message I can't reproduce on-demand is from SDL about unknown keystorke. But that message says it's an upstream problem, so it probably is. 20160819 05:19:14< celmin> Don't just do something like that out of the blue. 20160819 05:19:28< vultraz> what? 20160819 05:19:42< celmin> Introducing a hard-coded version of register_hotkey. 20160819 05:19:59< vultraz> why not? 20160819 05:20:01< tad_> gui/dialogs/multiplayer/mp_create_game.cpp:130:70: error: invalid use of non-static member function ‘void gui2::tmp_create_game::dialog_exit_hook(gui2::twindow&)’ std::bind(tmp_create_game::dialog_exit_hook, this, std::ref(window))); 20160819 05:20:07< vultraz> I'm not going to work on it now, but still 20160819 05:20:09< celmin> Mind you, I can't imagine why anyone would want to rebind that particular hotkey... 20160819 05:20:39< vultraz> oh 20160819 05:20:43< vultraz> I didn't bind by reference 20160819 05:20:52< vultraz> should I be binding by reference? 20160819 05:20:56< vultraz> (always?) 20160819 05:20:59< celmin> Binding what? 20160819 05:20:59< tad_> I don't see a need to allow users to rebind EVERY key. Delete means "Delete" and why would one ever want to change it so "Insert" means "Delete"? 20160819 05:21:07< celmin> Yeah. 20160819 05:21:15< vultraz> std::bind(tmp_create_game::dialog_exit_hook, this, std::ref(window))); 20160819 05:21:27< vultraz> I assume the function should be bound by reference? 20160819 05:21:28< celmin> As for why not, I'm just asking you to properly consider whether it's really needed before doing it. 20160819 05:21:40< celmin> You don't need std::ref around the function, if that's what you're asking. 20160819 05:21:45< vultraz> no... 20160819 05:21:50< celmin> You need & in front of it though. 20160819 05:21:52< vultraz> &tmp_create::dialog_exit_hook 20160819 05:21:55< vultraz> yes 20160819 05:21:59< vultraz> I forgot this time 20160819 05:21:59< celmin> That's not "binding by reference". 20160819 05:22:06< vultraz> I see 20160819 05:22:07< celmin> This is not a lambda closure. 20160819 05:22:07< vultraz> then what is it? 20160819 05:22:14< celmin> It's taking the address, sort of. 20160819 05:22:40< celmin> Function types implicitly convert to their address, but member function types for some reason don't. 20160819 05:22:50< vultraz> but why does it error for him and not for me 20160819 05:23:00< tad_> Because they may be inlined and not have an address 20160819 05:23:05< celmin> Dunno. Different compiler, different version, etc. 20160819 05:23:10< celmin> tad_: No, that's not why. 20160819 05:23:24< irker257> wesnoth: Charles Dang wesnoth:master 0289944299f0 / src/gui/dialogs/multiplayer/mp_create_game.cpp: Small fixup https://github.com/wesnoth/wesnoth/commit/0289944299f03e98ce92c7a7ea147c7b15829438 20160819 05:23:35< celmin> That would apply to any functions, but by taking the address anywhere you force a non-inline version to exit 20160819 05:24:11< vultraz> tad_: ^ 20160819 05:24:40< tad_> OK. Compiled that file cleanly ... 20160819 05:25:11< celmin> I guess you're not getting the "not enough braces" error either, then. 20160819 05:25:20< celmin> Because I'm pretty sure that's in the same file. 20160819 05:26:19< tad_> I'm using: gcc version 6.1.1 20160802 (GCC) 20160819 05:26:38< vultraz> what? 20160819 05:26:40< tad_> And make was happy after than last commit. Still running but past the error 20160819 05:27:14< tad_> And it's done. Don't see any errors about braces. 20160819 05:27:26-!- hay207 [~hay207@41.34.3.180] has joined #wesnoth-dev 20160819 05:27:33-!- travis-ci [~travis-ci@ec2-174-129-131-190.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 05:27:34< travis-ci> wesnoth/wesnoth#10450 (master - 20e33d5 : Charles Dang): The build is still failing. 20160819 05:27:34< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153468720 20160819 05:27:34-!- travis-ci [~travis-ci@ec2-174-129-131-190.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 05:28:52-!- hay207__ [~hay207@41.34.13.213] has quit [Ping timeout: 240 seconds] 20160819 05:32:58< vultraz> huh.. 20160819 05:33:00< vultraz> weird... 20160819 05:33:22< vultraz> start wesnoth without debug and the listbox WILL get smaller when selecting a new category... 20160819 05:33:27< vultraz> with debug mode and it won't :| 20160819 05:33:29< vultraz> the hell? 20160819 05:33:31< celmin> Weird. 20160819 05:33:48< celmin> Grep game_config::debug in src/gui? 20160819 05:34:18< vultraz> it's all in dialogs :/ 20160819 05:34:46< vultraz> only thing in mp_create is whether to add the SP campaign categoey 20160819 05:35:27< celmin> So if you temporarily comment that out or something, does it work in debug mode? 20160819 05:37:57< vultraz> ..yes 20160819 05:38:06< vultraz> maybe it's the Wesnoth Benchmark stuff that shows up...? 20160819 05:38:13 * vultraz has no idea 20160819 05:38:30< celmin> I'd been wondering what that is for awhile now. 20160819 05:39:28< vultraz> nothing important, really 20160819 05:42:38< vultraz> yeah, if those aren't present it also doesn't work :| 20160819 05:42:44< vultraz> in debug 20160819 05:42:58< vultraz> so it's something about the widget size..? 20160819 05:43:00< vultraz> :| 20160819 05:43:59< vultraz> I don't understand what's going on here 20160819 05:45:10< vultraz> it doesn't even happen every time... 20160819 05:45:33< vultraz> ie 20160819 05:45:39< vultraz> select Random Scenarios, size doesn't change 20160819 05:45:44< vultraz> select Campaigns, size doesn't change 20160819 05:45:49< vultraz> select Random Scenarios again, DOES change 20160819 05:45:51< vultraz> whaaa?/ 20160819 05:47:17< tad_> Try campaigns then scenarios without the first scenario? 20160819 05:49:21< vultraz> ... even weirder, the scrollbar doesn't function properly??/ 20160819 05:49:22< celmin> So in the inspector window, array variables are grouped together, right? 20160819 05:49:33< vultraz> what the *hell* 20160819 05:49:52< celmin> Hmm, there's actually no way to iterate through a config in that order... 20160819 05:49:56< vultraz> everything works *perfectly* in debug mods.. 20160819 05:50:03< celmin> Even though that's the way it's actually stored internally... 20160819 05:50:20< vultraz> absolutely perfectly :| 20160819 05:50:26< vultraz> but without the longer names, it does not 20160819 05:51:08< vultraz> someone explain this sorcery 20160819 05:54:53< vultraz> HHHHHHHHHHHHHHHMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 20160819 05:54:58< vultraz> I think I have an idea 20160819 05:55:06< vultraz> if the list is initially smaller... 20160819 05:55:13< vultraz> the widget has a larger initial width 20160819 05:55:25< vultraz> that initial width is used as the maximum width 20160819 05:55:29< vultraz> somehow, that's causing problems 20160819 05:55:58< vultraz> what I need is to be able to manually specify max_width 20160819 05:56:59< vultraz> should probably make this something in twidget... 20160819 05:57:48< vultraz> hmmm 20160819 05:57:52< vultraz> twidget has set_size.. 20160819 06:00:19< celmin> Sometimes you ramble just as much as I do, huh. 20160819 06:03:59< vultraz> ofc that doesn't work 20160819 06:05:13< vultraz> let's test my theory with a hardcoded number 20160819 06:06:22< vultraz> doesn't work :| 20160819 06:06:36< vultraz> let's see what happens without the line i added earlier in non-debug mode 20160819 06:07:17< vultraz> it IMMEDIATELY resizes the listbox when i select random maps 20160819 06:07:21< vultraz> ok, so that helps.. 20160819 06:07:38< vultraz> ok weirdly, even then the scrollbar is fucked up 20160819 06:10:32< vultraz> ill have to talk to gfgtdf later 20160819 06:10:34< vultraz> this makes 0 sense 20160819 06:11:25< vultraz> not to mention the label never grows, despite there being space for it... it uses a scrollbar instead 20160819 06:12:05< vultraz> interesting.. 20160819 06:12:18< vultraz> listbox only shrinks if you go to Campaigns.. 20160819 06:12:23< vultraz> and then Random Maps.. 20160819 06:13:01< tad_> At first bluch, sounds like an uninitialized variable 20160819 06:13:59< vultraz> hmm 20160819 06:14:12< vultraz> ok, selecting SP Campaigns (I enabled them) causes the list to grow 20160819 06:14:14< vultraz> obviously 20160819 06:14:18< vultraz> but then the label has problem.. 20160819 06:14:57< vultraz> but selecting sp campaigns then random maps does NOT cause random to shrink.. 20160819 06:15:09< vultraz> ok, so this is rather specialized..... 20160819 06:17:45-!- travis-ci [~travis-ci@ec2-174-129-73-19.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 06:17:46< travis-ci> wesnoth/wesnoth#10451 (master - 0289944 : Charles Dang): The build has errored. 20160819 06:17:46< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153470371 20160819 06:17:46-!- travis-ci [~travis-ci@ec2-174-129-73-19.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 06:18:58< vultraz> i shall speak to gfgtdf 20160819 06:28:18-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160819 06:32:46< vultraz> ok, I've fixed the broken scrollbars.. 20160819 06:33:03-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 276 seconds] 20160819 06:34:54< vultraz> or, well, at least for this case 20160819 06:35:33< irker257> wesnoth: Charles Dang wesnoth:master 8aa82bd4c3f9 / data/gui/window/mp_create_game.cfg: MP Create: allow description area to grow to fill available height https://github.com/wesnoth/wesnoth/commit/8aa82bd4c3f93810e64a26f57e3793fd60f18bf4 20160819 06:45:31< irker257> wesnoth: Charles Dang wesnoth:master 369cabc9ae43 / data/gui/widget/ (4 files): Use standard label definitions for scroll labels https://github.com/wesnoth/wesnoth/commit/369cabc9ae4396f4bbf1d5e79efda55cdf19fd88 20160819 07:14:46-!- Sapient [~yourstrul@180.190.93.6] has joined #wesnoth-dev 20160819 07:14:46-!- Sapient [~yourstrul@180.190.93.6] has quit [Changing host] 20160819 07:14:46-!- Sapient [~yourstrul@wesnoth/developer/Sapient] has joined #wesnoth-dev 20160819 07:18:23-!- Necrosporus [~Necrospor@unaffiliated/necrosporus] has joined #wesnoth-dev 20160819 07:19:18< celmin> Wait, what's this linked group thing about? 20160819 07:20:19< vultraz> what? 20160819 07:20:38< celmin> I have here a label with linked_group=name 20160819 07:20:40< celmin> What does that mean 20160819 07:21:28< vultraz> what are you looking at? 20160819 07:21:35< vultraz> the inspector? 20160819 07:21:38< celmin> Yes 20160819 07:21:55< vultraz> linked_group is used to keep widget size consistent 20160819 07:21:58< vultraz> that's the id 20160819 07:22:11< vultraz> look for [linked_group] tags 20160819 07:22:22< vultraz> they have fixed_width/height keys 20160819 07:22:29< celmin> Ugh what 20160819 07:22:46< vultraz> any widget in a linked_group share widths/heights 20160819 07:22:49< celmin> Is this relevant for both listboxes and treeviews? 20160819 07:22:58< vultraz> it's for any widget 20160819 07:23:08< vultraz> but it's mostly used for labels and images and such 20160819 07:23:37< celmin> Hmm… I'll comment it out for now. 20160819 07:23:49< vultraz> might not be necessary 20160819 07:23:59< vultraz> that is, you might not need it 20160819 07:24:01< vultraz> but I dunno 20160819 07:25:18< celmin> uses_markup is valid in the WML right 20160819 07:26:55< vultraz> actually no 20160819 07:27:06< celmin> What, why not. 20160819 07:27:26< vultraz> dunno 20160819 07:27:35< celmin> Ugh, okay. 20160819 07:27:39< vultraz> i was trying to add it, but it was slightly more complicated than I thought 20160819 07:27:49< vultraz> it's valid from the c++ 'wml', though :) 20160819 07:29:16-!- Kwandulin [~Miranda@p200300760F35BF024C478C790C2034A6.dip0.t-ipconnect.de] has quit [Ping timeout: 250 seconds] 20160819 07:29:29-!- travis-ci [~travis-ci@ec2-174-129-131-190.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 07:29:30< travis-ci> wesnoth/wesnoth#10452 (master - 8aa82bd : Charles Dang): The build has errored. 20160819 07:29:30< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153479513 20160819 07:29:30-!- travis-ci [~travis-ci@ec2-174-129-131-190.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 07:29:32-!- Kwandulin [~Miranda@p200300760F35BFE1C1D966FFC0DAC2A5.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160819 07:29:54< celmin> I need to set it to "true" instead of true I guess. 20160819 07:30:01< vultraz> yes 20160819 07:33:48-!- Sapient [~yourstrul@wesnoth/developer/Sapient] has quit [Quit: Have fun, cya!] 20160819 07:42:00< celmin> I'm going to make the assumption that unit IDs are unique. 20160819 07:42:22< fabi_> hmmm 20160819 07:42:34< fabi_> Are they? 20160819 07:42:47-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160819 07:42:53< celmin> Well, they're supposed to be. 20160819 07:43:08< celmin> Unless someone were to deliberately set the same ID on two different units... 20160819 07:43:39< celmin> I suppose I could use std::advance instead... 20160819 07:43:59< tad_> That travis build error keeps reminding me of a recent article I saw on reddit where the analyized 2 million builds. 20160819 07:44:30< celmin> Actually, I'm not sure if there even is an easy "get unit by ID" function, so that might be better. 20160819 07:47:04< tad_> Assuming unit IDs are unique is 'safe enough'. It's not universally true but when it's not the WML author should be taking steps to ensure it's not a problem. 20160819 07:47:12-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 240 seconds] 20160819 07:49:23-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has joined #wesnoth-dev 20160819 07:49:43< tad_> What would help on the WML side is when we clone a unit for a special purpose, we could ask for a new, unique unit ID for it during the [store_unit] which cloned the unit. 20160819 07:51:01< celmin> Yeah, I decided not to assume it because it was actually simpler. 20160819 07:51:22< celmin> If I'm looking up a unit by its ID, I need to iterate through all units until I find a match. 20160819 07:51:39< celmin> If on the other hand I'm fetching by "index", I just need to advance the iterator. 20160819 07:52:13< celmin> I don't need to worry about units appearing while the inspector is open, unless someone opens the Lua console, and that case is easily dealt with. 20160819 07:52:23< tad_> When I cloned a unit in HttT (use_advisor PR) I tested like mad to be sure the duplicated ID would not cause issues, and made darned sure I killed the clone when it had done its job. 20160819 07:54:41-!- boucman_work [~boucman@229.29.205.77.rev.sfr.net] has joined #wesnoth-dev 20160819 07:55:23< tad_> And when I was testing the choose_level logic I'm using I learned real quick to be sure to kill units with assigned IDs before [unit] .. things get 'funky' when you have two Simyr running around on the map. 20160819 07:55:45-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20160819 07:56:09< tad_> Ah .. zookeeper .. who I've been hoping to see. 20160819 07:58:10< vultraz> he always comes in around this time 20160819 07:58:14< vultraz> fyi 20160819 07:58:47< tad_> I noted that from reading the logs. It's just that it's 3AM here and if the wife wakes I gotta run. 20160819 07:59:18< vultraz> ah 20160819 08:00:29< vultraz> CDT? 20160819 08:00:30< zookeeper> < tad_> What would help on the WML side is when we clone a unit for a special purpose, we could ask for a new, unique unit ID for it during the [store_unit] which cloned the unit. 20160819 08:00:33< zookeeper> i believe all that you really need to do in that case is {CLEAR_VARIABLE stored_unit.id} before unstoring. 20160819 08:00:43< zookeeper> not sure though because i've never done that 20160819 08:01:36< tad_> I will test that and update the PR if it works. I'd feel better without a duplicated ID even if it's just on the map for one [message] before I kill it. 20160819 08:04:14< tad_> zookeeper: I have a branch on my personal fork. It's a WIP and not ready for a PR (unless that's what you want). It has changes to TSG S09a which I think will address the issues you wanted me to look at. If you want to review them before I get too far away from them. 20160819 08:04:49< zookeeper> sure, i can have a look 20160819 08:05:57< tad_> Actually, it has all the changes for the elven side, and I'll be working on the bandit side over the next couple days. But I appreciate feedback on what I've done. 20160819 08:06:24< tad_> I've been playtesting it and like it, but I may be too close to it to see if I've gone overboard :P 20160819 08:08:59< tad_> Well, as expected, the wife woke. Gotta run. 20160819 08:09:00< zookeeper> well, let's see it 20160819 08:09:04< zookeeper> oh, okay 20160819 08:09:18< tad_> At TSG-elven is the branch name. Do you need a link? 20160819 08:09:31< zookeeper> nah 20160819 08:09:58< tad_> OK. Leave comments or we can talk tomorrow. 20160819 08:10:05 * tad_ waves 20160819 08:10:09-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has quit [Quit: Page closed] 20160819 08:16:00-!- travis-ci [~travis-ci@ec2-174-129-73-19.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 08:16:01< travis-ci> wesnoth/wesnoth#10453 (master - 369cabc : Charles Dang): The build has errored. 20160819 08:16:01< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153480903 20160819 08:16:01-!- travis-ci [~travis-ci@ec2-174-129-73-19.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 08:23:08-!- horrowind [~Icedove@2a02:810a:83c0:404:21b:fcff:fee3:c3ff] has joined #wesnoth-dev 20160819 08:24:00< celmin> Hmm. 20160819 08:24:33< celmin> The unit list overview under specific teams sort of duplicates the info in the global unit list, except that you only get the summary for each unit and can't view the full info. 20160819 08:31:52< celmin> Finally finished the draft. 20160819 08:32:01< celmin> That is to say, I can build and see if it works. 20160819 08:34:16-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has quit [Quit: ChipmunkV] 20160819 08:35:04-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20160819 08:42:51-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has joined #wesnoth-dev 20160819 08:49:46-!- Kwandulin [~Miranda@p200300760F35BFE1C1D966FFC0DAC2A5.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160819 08:57:56-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160819 08:58:15-!- celticminstrel is now known as celmin|Zzzzzz 20160819 09:02:18-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 250 seconds] 20160819 09:22:04-!- Kwandulin [~Miranda@p200300760F35BFE1C814E2876DC36467.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160819 09:25:24-!- matthiaskrgr [matthiaskr@gateway/shell/panicbnc/x-oxhzceyibbolglta] has quit [Ping timeout: 276 seconds] 20160819 09:29:11-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has joined #wesnoth-dev 20160819 09:45:48-!- irker257 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160819 09:46:24-!- matthiaskrgr [matthiaskr@gateway/shell/panicbnc/x-knahqdawhokfqlbl] has joined #wesnoth-dev 20160819 09:46:48-!- matthiaskrgr is now known as Guest61233 20160819 09:50:30-!- Guest61233 [matthiaskr@gateway/shell/panicbnc/x-knahqdawhokfqlbl] has quit [Changing host] 20160819 09:50:30-!- Guest61233 [matthiaskr@unaffiliated/matthiaskrgr] has joined #wesnoth-dev 20160819 09:50:30-!- Guest61233 [matthiaskr@unaffiliated/matthiaskrgr] has quit [Changing host] 20160819 09:50:30-!- Guest61233 [matthiaskr@gateway/shell/panicbnc/x-knahqdawhokfqlbl] has joined #wesnoth-dev 20160819 09:52:05-!- Guest61233 is now known as matthiaskrgr_ 20160819 09:57:58-!- celmin [~celticmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The minstrel departs, to spread the music to the masses!] 20160819 10:34:47-!- irker569 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160819 10:34:47< irker569> wesnoth: Charles Dang wesnoth:master da561512a451 / / (3 files in 2 dirs): MP Create: implemented most remaining functionality https://github.com/wesnoth/wesnoth/commit/da561512a451301761064376b0acc9496b634526 20160819 10:41:23-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160819 10:45:40-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 258 seconds] 20160819 11:08:28-!- matthiaskrgr_ is now known as matthiaskrgr 20160819 11:16:52< fabi_> vultraz: around? 20160819 11:28:40-!- travis-ci [~travis-ci@ec2-54-166-29-54.compute-1.amazonaws.com] has joined #wesnoth-dev 20160819 11:28:41< travis-ci> wesnoth/wesnoth#10454 (master - da56151 : Charles Dang): The build has errored. 20160819 11:28:42< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/153522268 20160819 11:28:42-!- travis-ci [~travis-ci@ec2-54-166-29-54.compute-1.amazonaws.com] has left #wesnoth-dev [] 20160819 11:42:24< zookeeper> gfgtdf, so, in 1.12 if you have a last breath event which declares defeat, the following die event won't trigger. in 1.13.5, it does. this is probably due to the [endlevel]-related changes, but i don't really recall the specifics of what all changed and why. 20160819 11:43:30< zookeeper> case in point: https://forums.wesnoth.org/viewtopic.php?p=600781#p600781 (the remark at the bottom) 20160819 11:43:38< JyrkiVesterinen> It may be this commit: https://github.com/wesnoth/wesnoth/commit/9336b767646eb08243d88672787d12709ec29014 20160819 11:45:04-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160819 11:45:11< zookeeper> maybe. the bug won't trigger if the debug kill command is used to kill haldric. 20160819 11:46:11< zookeeper> but that commit was post-1.13.5, no? 20160819 11:47:46< JyrkiVesterinen> Indeed, it was after 1.13.5 was tagged. 20160819 11:51:10< zookeeper> in any case, it's entirely possible it's due to an intentional change of some kind, but if it is then it might need rethinking because there's bound to be lots of cases like the aforementioned 20160819 11:51:19< zookeeper> (and they're not easily findable) 20160819 11:51:38< zookeeper> so hopefully it's just due to a unintended bug that's easy to fix :J 20160819 12:01:58< vultraz> fabi_: yes? 20160819 12:10:21< fabi_> vultraz: I like to talk about [command] once more. 20160819 12:10:26< vultraz> ...yes? 20160819 12:10:38< fabi_> Iirc we agreed to change every command to "do" 20160819 12:10:44< fabi_> Right? 20160819 12:10:46< vultraz> ...what? 20160819 12:10:48< vultraz> we did? 20160819 12:10:48< fabi_> no 20160819 12:10:50< fabi_> ? 20160819 12:11:05< vultraz> I believe you mentioned it, but I don't think we ever agreed to it 20160819 12:11:30< fabi_> Iirc you and celmin|Zzzzzz both liked the proposal. 20160819 12:12:36< vultraz> it feels rather pointless 20160819 12:16:19-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160819 12:17:56< zookeeper> whatever that's about, yes, just renaming tags like that is pointless. 20160819 12:19:17< zookeeper> or, on second thought, let's call it actively harmful instead. 20160819 12:19:41< fabi_> nonsense 20160819 12:20:46-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 250 seconds] 20160819 12:27:41-!- Kwandulin [~Miranda@p200300760F35BFE1C814E2876DC36467.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160819 12:29:07< zookeeper> well, you're free to repeat whatever rationale you have for it 20160819 12:51:24-!- celmin [~celticmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20160819 12:58:38< celmin> What's that about a hard-coded list in the WML file? 20160819 13:01:30-!- celmin|Zzzzzz is now known as celticminstrel 20160819 13:04:02< vultraz> celmin: the random faction matchups options are in wml, not added dynamically in the c++ 20160819 13:04:38< celmin> …what? 20160819 13:04:50< celmin> I'm confused, isn't that better? 20160819 13:05:00< vultraz> perhaps 20160819 13:06:12< vultraz> anyway, i'm working on load game functionality right now 20160819 13:06:27< vultraz> I've decided to add a separate category that lists saved games 20160819 13:07:03< celmin> Eh, I see. 20160819 13:07:24< vultraz> you object? 20160819 13:07:29< celmin> Not sure. 20160819 13:07:34< celmin> Have you moved the filter box yet? 20160819 13:07:50< vultraz> what? 20160819 13:07:52< vultraz> no :| 20160819 13:07:59< vultraz> what's wrong with where it is 20160819 13:08:04< celmin> It's really bizarre for the filter box to not be lined up with the list that it's filtering. 20160819 13:08:29< vultraz> it's consistent with the gui1 placing 20160819 13:08:38< celmin> Still bizarre. 20160819 13:08:42< vultraz> plus, I dunno of it's worth taking up space on top of the list.. 20160819 13:08:45< celmin> No need to keep it consistent like that. 20160819 13:08:51< vultraz> I can consider changing it 20160819 13:08:56< celmin> Bottom would be fine too. 20160819 13:08:56< vultraz> after I deal with this 20160819 13:09:06< vultraz> I need to interface saved games into the create_engine 20160819 13:10:28< vultraz> it's proving slightly difficult 20160819 13:12:40< vultraz> mostly because I'm unsure what it needs.. 20160819 13:13:51< vultraz> i guess I need the minimap image 20160819 13:13:53< vultraz> and ... 20160819 13:14:14< vultraz> do save game keep metadata like descriptions...? 20160819 13:15:24< vultraz> yes 20160819 13:15:29< vultraz> in [snapshot]... 20160819 13:15:30-!- Kwandulin [~Miranda@p200300760F35BFE125DFD69504FA6848.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160819 13:15:50< celmin> [snapshot] is like a scenario, I think? 20160819 13:16:16< celmin> All the WFL views of sides are annoyingly 0-indexed... 20160819 13:16:18< vultraz> seems so 20160819 13:17:26< vultraz> ok, so savegame::save_info::summary() returns that config, it seems.. 20160819 13:18:28< vultraz> this is one thing I dislike about programming.. not being able to logically see how it all fits together >_> 20160819 13:18:46< vultraz> ok, let's see... 20160819 13:18:47< celmin> I want to break the WFL view of sides, but that's obviously a bad idea... 20160819 13:18:51< vultraz> rubber duck 20160819 13:18:56< celmin> Even if FormulaAI isn't used much... 20160819 13:19:10< vultraz> if I want to use the create_engine, i should keep a list of saved_games 20160819 13:19:26< vultraz> so I can use ng::level::TYPE::SAVED_GAME 20160819 13:20:39-!- Necrosporus_ [~Necrospor@unaffiliated/necrosporus] has joined #wesnoth-dev 20160819 13:20:45< vultraz> the create_engine uses subclasses for each game type 20160819 13:21:35< celmin> Anyway, I'm replacing 219 instances of teams()[] with get_team(). 20160819 13:21:42-!- Necrosporus_ [~Necrospor@unaffiliated/necrosporus] has quit [Client Quit] 20160819 13:21:46< vultraz> I see 20160819 13:21:54< vultraz> OK 20160819 13:21:57< vultraz> I think... 20160819 13:22:50< vultraz> ok uh... 20160819 13:23:23< vultraz> ok, set_data.. 20160819 13:23:25< vultraz> alright 20160819 13:23:26< vultraz> I think 20160819 13:23:28< vultraz> ugh 20160819 13:23:56< vultraz> celmin: does it matter if two classes have the same name if they're in different namespaces? 20160819 13:24:03-!- Necrosporus [~Necrospor@unaffiliated/necrosporus] has quit [Ping timeout: 240 seconds] 20160819 13:24:06< vultraz> (thought it might cause confusion later...) 20160819 13:24:26< celmin> It already causes some confusion with all the different "manager" classes. 20160819 13:24:37< celmin> But no, it doesn't really matter that much, I guess. 20160819 13:31:29-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has quit [Quit: .] 20160819 13:32:45-!- Kwandulin [~Miranda@p200300760F35BFE125DFD69504FA6848.dip0.t-ipconnect.de] has quit [Ping timeout: 258 seconds] 20160819 13:33:37-!- Kwandulin [~Miranda@p200300760F35BFE125DFD69504FA6848.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160819 13:34:06< vultraz> I still don't know how to get the OTHER data 20160819 13:34:49-!- irker569 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20160819 13:35:06< vultraz> summary is.. return save_index_manager.get(name()); 20160819 13:35:23 * vultraz mutters darkly at whoever engineered so many levels of disambiguation 20160819 13:38:15< celmin> …disambiguation? 20160819 13:38:41< vultraz> layers upon layers upon layers 20160819 13:38:58< celmin> Are you sure disambiguation is what you mean> 20160819 13:39:22 * vultraz mutters darkly at self 20160819 13:39:34< vultraz> this is why you don't program past midnight >_> 20160819 13:40:08< vultraz> misdirection 20160819 13:40:46-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20160819 14:16:21< vultraz> ok, I'll figure out the rest of the data later 20160819 14:26:21< vultraz> (why is there an empty destructor here) 20160819 14:26:54< vultraz> (all the classes in this file seem to have empty destructors...) 20160819 14:29:27< vultraz> celmin: is there any reason to keep empty destructors around? 20160819 14:29:33< celmin> Sometimes. 20160819 14:29:41< celmin> If it's virtual. 20160819 14:29:59< celmin> When you have a class with virtual methods, you need a destructor even if it doesn't do anything. 20160819 14:30:18< celmin> I don't recall the reasoning though. 20160819 14:30:38< celmin> (A virtual destructor, to be specific.) 20160819 14:32:21< celmin> Ugh, tgame_stats takes a 0-index team, why... 20160819 14:32:42< celmin> ^indexed 20160819 14:37:32 * celmin is skipping the (game_)display cases. 20160819 14:37:43< celmin> And the game stats sorting keys. 20160819 14:37:59< vultraz> why? 20160819 14:41:23< celmin> Because it's confusing and convoluted and most stuff in those files is fundamentally 0-indexed anyway. 20160819 14:41:41< celmin> There is a rather baffling comment on line 53 of whiteboard/mapbuilder.cpp. 20160819 14:42:20< celmin> It appears to imply that the try-catch block would catch exceptions thrown by the destruction of the unit movement resetters, but that's not true. 20160819 14:43:25< celmin> Admittedly, it's impossible for the unit movement resetter to throw an exception on destruction, but still... 20160819 14:50:47< nore> I've found a freeze involving units with a lot of hitpoints 20160819 14:51:47< nore> A unit with 1000000 hitpoints attacking one with 100 is noticeable 20160819 14:52:38< nore> If it attacks a unit with 1000 hitpoints, it is enough to make wesnoth eat almost all the computer's RAM 20160819 14:53:05< nore> Wesnoth froze completely and had to be killed 20160819 14:53:20< nore> This happens with both 1.12 and 1.13 20160819 14:53:34< celmin> I feel like I heard somewhere that this was the reason for introducing that Monte Carlo thing. 20160819 14:53:42< celmin> Is it master or 1.13.5? 20160819 14:54:17< nore> master from a week ago or so 20160819 14:54:35< nore> Post-1.13.5 anyway 20160819 15:15:47-!- wedge010 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has joined #wesnoth-dev 20160819 15:18:56-!- boucman_work [~boucman@229.29.205.77.rev.sfr.net] has quit [Remote host closed the connection] 20160819 15:19:44-!- wedge009 [~Thunderbi@60-241-236-92.static.tpgi.com.au] has quit [Ping timeout: 250 seconds] 20160819 15:19:45-!- wedge010 is now known as wedge009 20160819 15:23:01< vultraz> celmin: does one have to call the constructor of a parent class in the constructor of a derived one? 20160819 15:23:36-!- Kwandulin [~Miranda@p200300760F35BFE125DFD69504FA6848.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160819 15:23:45< celmin> It's done automatically. 20160819 15:23:57< celmin> If you need to pass arguments, put the call at the top of the initializer list. 20160819 15:38:55-!- fabi__ [~fabi@176.4.53.65] has joined #wesnoth-dev 20160819 15:39:03-!- fabi_ [~fabi@176.4.53.205] has quit [Read error: Connection reset by peer] 20160819 15:42:11-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has quit [Ping timeout: 244 seconds] 20160819 15:47:50-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160819 15:53:50-!- Kwandulin [~Miranda@p200300760F35BFE1CD66216B579EEFC4.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160819 15:55:03-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20160819 15:57:55-!- DeFender1031 [~DeFender1@46-116-114-128.bb.netvision.net.il] has quit [Quit: I'm not back now.] 20160819 16:01:58-!- hk238 [~kvirc@t224.ip7.netikka.fi] has joined #wesnoth-dev 20160819 16:09:42-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160819 16:09:50-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20160819 16:12:26-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20160819 16:13:30-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has joined #wesnoth-dev 20160819 16:17:27-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has quit [Disconnected by services] 20160819 16:17:51-!- Ravana__ [~Ravana@72-21-46-176.dyn.estpak.ee] has joined #wesnoth-dev 20160819 16:18:01-!- Ravana__ is now known as Ravana_ 20160819 16:18:03-!- Ravana_ [~Ravana@72-21-46-176.dyn.estpak.ee] has quit [Changing host] 20160819 16:18:03-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has joined #wesnoth-dev 20160819 16:27:04< celmin> The warnings about comparing numbers of different signs are so annoying... 20160819 16:33:58-!- Kwandulin [~Miranda@p200300760F35BFE1CD66216B579EEFC4.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160819 16:55:34-!- Greg-Boggs [~greg_bogg@2601:1c2:901:e170:c0a7:2c36:4a91:ee73] has joined #wesnoth-dev 20160819 16:56:39-!- Greg-Boggs [~greg_bogg@2601:1c2:901:e170:c0a7:2c36:4a91:ee73] has quit [Remote host closed the connection] 20160819 16:56:54-!- Greg-Boggs [~greg_bogg@2601:1c2:901:e170:c0a7:2c36:4a91:ee73] has joined #wesnoth-dev 20160819 16:59:47-!- Greg-Boggs [~greg_bogg@2601:1c2:901:e170:c0a7:2c36:4a91:ee73] has quit [Remote host closed the connection] 20160819 17:14:37-!- hk238 [~kvirc@t224.ip7.netikka.fi] has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria] 20160819 17:19:10-!- hk238 [~kvirc@t224.ip7.netikka.fi] has joined #wesnoth-dev 20160819 17:23:10-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20160819 17:39:51-!- JyrkiVesterinen [~JyrkiVest@78-27-109-198.bb.dnainternet.fi] has joined #wesnoth-dev 20160819 17:49:16-!- Kwandulin [~Miranda@p200300760F35BFE1D519B1A8FFF2EDAE.dip0.t-ipconnect.de] has joined #wesnoth-dev 20160819 17:51:15-!- hk238 [~kvirc@t224.ip7.netikka.fi] has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria] 20160819 17:57:02< JyrkiVesterinen> nore: I implemented the Monte Carlo simulation mode for attack prediction. 20160819 17:57:27< JyrkiVesterinen> Damage calculation should be nearly instant even when a 1M HP unit attacks a 100 HP unit. 20160819 17:58:28< JyrkiVesterinen> For 1M-HP-vs-1K-HP, the damage complexity calculation is dangerously close to overflowing a 32-bit unsigned integer. The game might pick the traditional damage calculation mode by accident. 20160819 17:59:16< JyrkiVesterinen> https://github.com/wesnoth/wesnoth/blob/master/src/attack_prediction.cpp#L1569-L1587 20160819 17:59:52< JyrkiVesterinen> (We're talking about insanely complex fight when the *number to approximate fight compexity* is about to overflow...) 20160819 18:01:03< JyrkiVesterinen> Monte Carlo mode doesn't try to save memory. It's not a surprise that battles with hitpoints this high would eat memory like crazy. 20160819 18:02:32< JyrkiVesterinen> Even without slow, 1M-vs-1K would require 4 GB of memory for the result matrix. 20160819 18:02:45< JyrkiVesterinen> If both combatants have slow, 16 GB. 20160819 18:02:51< zookeeper> of course it'd be nice if the game would just skip the whole thing gracefully in extreme cases like that 20160819 18:04:26< JyrkiVesterinen> It would be possible to implement a new data structure to save memory in situations like this. MC simulation only needs to save the cases which actually occurred, not all the possibilities. 20160819 18:04:46< zookeeper> it's a lot more reasonable for things to not work right when extreme values are used than it is for the game to hog all available memory and crash 20160819 18:05:20< JyrkiVesterinen> I wonder if there is a reasonable use case for battles like this. 20160819 18:05:38< JyrkiVesterinen> It would still be possible for MC damage prediction to support battles like that. 20160819 18:05:51< JyrkiVesterinen> The only question is whether it's worth the effort. 20160819 18:07:47< zookeeper> could the code just detect when ridiculousness would ensue, and simply perform the calculations with values divided by 100 or something (and then multiply by 100 before displaying the results)? 20160819 18:07:59 * zookeeper shrugs 20160819 18:08:24< JyrkiVesterinen> I think it would be more interesting for me to implement the sparse matrix instead. :) 20160819 18:10:16< zookeeper> well, i have a hard time seeing one million hitpoints as reasonable 20160819 18:10:47< nore> well, I hit this problem while playing Legend of the Invincibles (so enemy had 1K HP units), with debug mode setting my units to 1M HP to make them unkillable 20160819 18:11:07< zookeeper> it's harder to say where the threshold for what's reasonable is exactly 20160819 18:11:13< zookeeper> 1K is certainly reasonable 20160819 18:11:26< nore> I wouldn't expect the game to figure out the damage calculation in such cases, but not crashing would be nice :) 20160819 18:11:45< nore> about storing the result matrix: we don't need that, do we? 20160819 18:12:22< nore> I mean, the only thing that needs to be stored is the final probabilities given the unit's starting hitpoints 20160819 18:12:46< nore> so that would only be the number of max. hitpoints both units have, not their product 20160819 18:12:50< loonycyborg> I kinda dislike tacky solutions in games like setting hp to million to simulate invincibility :P 20160819 18:13:10< loonycyborg> afaik there are other ways in wesnoth 20160819 18:13:50< JyrkiVesterinen> The game used a 2D array for existing battle prediction code. I simply used the same matrix implementation for MC mode, too. It's good to use existing code instead of always reinventing the wheel. 20160819 18:14:29< JyrkiVesterinen> And as I said, it would be possible to use a more efficient data structure for extreme battles. 20160819 18:14:34< loonycyborg> oh nwm 20160819 18:14:40< loonycyborg> it's only debug mode :P 20160819 18:14:58< JyrkiVesterinen> But I think I won't bother. Indeed, setting HP to a million is a bad way to simulate invincibility. 20160819 18:14:58-!- Kwandulin [~Miranda@p200300760F35BFE1D519B1A8FFF2EDAE.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20160819 18:15:18< nore> of course, it's only debug mode :) 20160819 18:15:42< zookeeper> i don't really understand why the number of hitpoints would matter in the first place? i mean it makes sense that if there's berserk and drain and whatnot involved then the number of possible outcomes might explode, but isn't it silly if a perfectly normal non-lethal combat calculation becomes a problem if the combatants' hitpoints get multiplied 1000x? 20160819 18:16:43< JyrkiVesterinen> zookeeper: It happens because a 2D array is used to store the probabilities of each outcome (probability calculation mode) or the number of times each outcome happens (Monte Carlo mode). 20160819 18:17:25< nore> well, I think it could even be more efficient to recognize when a combat will be non-letal and to use more efficient algorithms then 20160819 18:17:36< JyrkiVesterinen> https://github.com/wesnoth/wesnoth/blob/master/src/attack_prediction.cpp#L423-L430 20160819 18:17:44< zookeeper> JyrkiVesterinen, but so what, if the number of outcomes remains low? 20160819 18:17:52< nore> but anyway, as I said, it's only debug mode, so it does not matter a lot 20160819 18:18:32-!- fabi__ [~fabi@176.4.53.65] has quit [Quit: Konversation terminated!] 20160819 18:18:38-!- fabi__ [~fabi@176.4.53.65] has joined #wesnoth-dev 20160819 18:19:10< JyrkiVesterinen> Well, the probability matrix doesn't even know which outcomes are possible ahead of time. It allocates an array row/column for every possibility "combatant HP between zero and maximum". 20160819 18:20:16< JyrkiVesterinen> 1M HP vs 1 HP results in 2 000 002 slots (1 000 001 * 2). 20160819 18:21:04< celmin> I understand that setting HP to 1M to simulate invicibility isn't a good method, but is there any other easy method for debug mode? 20160819 18:21:07< zookeeper> right... 20160819 18:21:34< zookeeper> JyrkiVesterinen, well that does sound kind of dumb, does it not? :P 20160819 18:21:49< celmin> Yeah, kinda. 20160819 18:21:50< JyrkiVesterinen> For extreme cases like that, a 2D array is a wrong data structure to begin with. A map would be more efficient. 20160819 18:22:01< celmin> Maybe a sparse matrix is a good idea even for normal cases? 20160819 18:22:05< zookeeper> of course that's not to say a not-dumb way wouldn't be a lot harder 20160819 18:22:27< celmin> A sparse matrix shouldn't be all that much harder, really. 20160819 18:23:05< celmin> Slightly different syntax, of course. 20160819 18:23:20< celmin> (Since the obvious way of implementing a sparse array is to use a map.) 20160819 18:30:16-!- fabi__ [~fabi@176.4.53.65] has quit [Ping timeout: 258 seconds] 20160819 18:33:24-!- fabi__ [~fabi@176.4.53.65] has joined #wesnoth-dev 20160819 18:41:41-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20160819 19:00:51< celmin> unit::side_ is the 1-indexed side, right? 20160819 19:12:18-!- Shiki [~Shiki@141.39.226.227] has joined #wesnoth-dev 20160819 19:12:54-!- prkc [~prkc@179.43.155.226] has quit [Ping timeout: 276 seconds] 20160819 19:26:52-!- prkc [~prkc@gateway/vpn/privateinternetaccess/prkc] has joined #wesnoth-dev 20160819 20:00:06-!- vultraz [~chatzilla@124.109.10.167] has quit [Ping timeout: 250 seconds] 20160819 20:03:24-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20160819 20:23:03-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20160819 20:23:09-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20160819 20:36:21-!- JyrkiVesterinen [~JyrkiVest@78-27-109-198.bb.dnainternet.fi] has quit [Quit: Going to bed] 20160819 20:38:10-!- Shiki [~Shiki@141.39.226.227] has quit [Remote host closed the connection] 20160819 20:51:52-!- horrowind [~Icedove@2a02:810a:83c0:404:21b:fcff:fee3:c3ff] has quit [Quit: horrowind] 20160819 21:03:23-!- mjs-de [~mjs-de@x4e318ae9.dyn.telefonica.de] has joined #wesnoth-dev 20160819 21:08:13-!- tad_ [add94167@gateway/web/freenode/ip.173.217.65.103] has joined #wesnoth-dev 20160819 21:08:34-!- Shiki [~Shiki@141.39.226.227] has joined #wesnoth-dev 20160819 21:08:52< tad_> Question for Celtic Minstrel, if you're around. 20160819 21:09:07< celmin> Hi 20160819 21:09:58< celmin> What's up? 20160819 21:10:00< tad_> So I hit another place where subsuming a side is buggy. And I was wondering: is there some way to do the start-of-turn heal, cure, restore movement, etc., from Lua or WML? 20160819 21:10:33< celmin> Hmm. If there's a way, it's probably something in the [do_command] tag, but... 20160819 21:10:48< celmin> To my knowledge, it doesn't have anything like that... 20160819 21:11:09< tad_> I wrote notes on the idea ... https://github.com/GregoryLundberg/wesnoth/commit/df090a23427d967abb63422d30ea369d67d1882c 20160819 21:12:17< tad_> I know it's going to be a real problem when I get to Delfador's Memoirs. 20160819 21:12:55< celmin> What's with the turn "subsume"? 20160819 21:13:36< celmin> I guess mergine one side into another... 20160819 21:13:57< celmin> So really, the problem would occur when side 2 is merged into side 1 (for example), but not if it were instead merged into side 3...? 20160819 21:14:02< tad_> The entire side=2 joins forces with side=1 (us) if you want them to, mid-turn during a movement and [message] with options, in this case. 20160819 21:14:44< tad_> Yes, if the NEW side # is < it's a problem. If it's > no problem at all. 20160819 21:15:45< tad_> In most cases, we are side 1 and they're joining us, so it's usually a problem. Dunno about MP, but probably the < or > makes a difference there. 20160819 21:18:31-!- Appleman1234 [~Appleman1@KD036012021122.au-net.ne.jp] has joined #wesnoth-dev 20160819 21:20:24< tad_> Anyway, I asked because if the Lua has access to the needed functions or data, I can write it. But I'm not up to finding and providing what's needed for the C++ side. 20160819 21:20:40< tad_> It's low-priority, but something to consider. 20160819 21:20:50-!- prkc [~prkc@gateway/vpn/privateinternetaccess/prkc] has quit [Ping timeout: 250 seconds] 20160819 21:23:02-!- Greg-Boggs [~greg_bogg@2601:1c2:901:e170:c0a7:2c36:4a91:ee73] has joined #wesnoth-dev 20160819 21:23:02< celmin> I'll keep it in mind. 20160819 21:23:30< zookeeper> tad_, there's no single function to perform all the beginning-of-turn stuff 20160819 21:24:06< celmin> Of course, you can simulate it by doing all the same actions manually, but... 20160819 21:24:44< tad_> Yeah, but then it's possible to miss things. 20160819 21:25:02< celmin> Right, and it's not very future-proof. 20160819 21:25:10< zookeeper> the way you're now doing it is perfectly fine 20160819 21:25:20< zookeeper> and more or less the exact right way you're supposed to do it, i'd think 20160819 21:25:50< tad_> For DM, half the times this is an issue, it's fixable with [heal_unit] .. but if you tarry too long, you'll find poisoned and dying Mages and Loyalists ... 20160819 21:26:06< celmin> What exactly are you doing right now? 20160819 21:26:18< celmin> (Does heal_unit not handle poison?) 20160819 21:26:26< tad_> I'm setting movement to max_moves and ignoring HP and poison and such 20160819 21:27:07< zookeeper> i don't see what the problem with healing is supposed to be 20160819 21:27:45< zookeeper> the units switch sides in the middle of a turn. they shouldn't get any healing at that point. 20160819 21:27:48< tad_> It does. But I'm not sure it's appropriate for mid-turn changes. Works great for scenario-to-scenario issues we see in a couple places in D The healing occurs on 'side 2 turn start' not 'turn start' so if side 2 is joining side 3, it's healed. But if side 3 is joining side 2, it's not. 20160819 21:29:33< zookeeper> right 20160819 21:30:06< zookeeper> ok, so they can miss one healing cycle because of it. however, it seems like it'd be pretty weird and confusing if they were healed when they switch sides. 20160819 21:30:13< tad_> So, side 2 has a unit standing next to a healer. Should have gotten +8HP but didn't .. and won't for another turn. 20160819 21:30:32< zookeeper> penalty for being a bandit 20160819 21:30:34< zookeeper> :p 20160819 21:30:40 * tad_ chuckle. 20160819 21:31:18< tad_> If, all sides were healed and had movement reset, etc., before side 1 starts movement phase, then it's not an issue, ever. 20160819 21:32:39< tad_> When I'm playing I really notice I can't move the new units. But I only notice the missed healing if I look. 20160819 21:32:59< celmin> But healing on turn start instead of side turn start is a drastically different mechanic. 20160819 21:33:05< zookeeper> i mean yeah now that you point it out it is a technically a legit issue... but you might be the first to ever notice 20160819 21:33:19 * tad_ shrugs 20160819 21:33:32< celmin> Resetting movement on turn start though might be a good idea. 20160819 21:33:42< celmin> Or even on turn end? 20160819 21:33:44< tad_> "Gee, that unit has only 1 HP. I sure wish I could move it out of harm's way ..." 20160819 21:33:46< celmin> Side turn end, I mean. 20160819 21:34:15< celmin> Once the side's turn has ended, its movement doesn't matter for any engine purposes, right? 20160819 21:34:35< tad_> Well, like you said .. might be a drastic change. That's why I wondered about doing an action tag for it. 20160819 21:34:52< tad_> Who knows what UMC might depend upon? 20160819 21:35:07< celmin> Hm? 20160819 21:35:16< celmin> I said healing on turn start drastically changes the mechanics. 20160819 21:35:27< celmin> And would likely upset the game balance and everything. 20160819 21:35:36-!- prkc [~prkc@192.40.89.72] has joined #wesnoth-dev 20160819 21:35:41< tad_> Right. 20160819 21:35:45< tad_> I can see that. 20160819 21:35:48< celmin> Pretty sure that doesn't apply to resetting movement though. 20160819 21:36:37< tad_> Movement is easy to handle, as I have done. It's just wishing the other missed parts could be handled. 20160819 21:36:40< celmin> I guess it's possible that some UMC depends on movement not being reset, but… it's not like it's reasonable to assume that units of already-moved sides have 0 move points, since units that weren't moved at all might still have some. 20160819 21:37:02< zookeeper> if you really really wanted to, the "best" way to solve the HP issue could be to silently heal (if they're in village, etc) the units when they switch sides but not confuse the player with the healing animations etc. 20160819 21:37:33< tad_> Yes, no animations would be nice. 20160819 21:38:07-!- mjs-de [~mjs-de@x4e318ae9.dyn.telefonica.de] has quit [Remote host closed the connection] 20160819 21:39:11< celmin> I personally wouldn't mind having the animations, but I sorta see your point... 20160819 21:39:36< tad_> Which comes back to doing an action tag and letting the content designer choose. 20160819 21:42:19< zookeeper> village healing is easy to simulate, rest healing depends on whether the resting attribute is in the correct state 20160819 21:43:05< tad_> And there's context-healing for shaman, white mage; and regeneration; and ??? 20160819 21:43:59< celmin> It's super-complicated. 20160819 21:44:01< zookeeper> the outlaws wouldn't have been healed by healers if they didn't switch sides 20160819 21:44:08< celmin> I wonder if terrain filters have keys for testing terrain attribtues. 20160819 21:44:10-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20160819 21:44:11< celmin> ^attributes 20160819 21:44:17< zookeeper> so i don't think they'd need to get healer healing 20160819 21:44:23< celmin> Like "select only healing terrain" or "select terrain that gives upkeep". 20160819 21:44:30< tad_> That's in this case. In DM we have both vilalges and white mages 20160819 21:45:00-!- Appleman1234 [~Appleman1@KD036012021122.au-net.ne.jp] has quit [Ping timeout: 276 seconds] 20160819 21:45:18< tad_> The only thing I know for sure is, somehow, the engine figures it all out 20160819 21:45:45< zookeeper> my impression is that this is an interesting argument and that we might want to actually give silent healing to units when switching sides in this manner, but it's also a complicated issue and thus best reserved for later 20160819 21:46:03< tad_> Yep. Best for later. 20160819 21:47:32< tad_> We're talking about what it means for healing, but there is also poison (HP loss), slowed and who know what else. 20160819 21:49:32< tad_> The big issue is movement and that's fixable, now. And it makes it easy to find places to look if it's fixed .. grep on max_moves and you're going to find the candidates. 20160819 21:50:05< celmin> Object expiration. 20160819 21:50:17< celmin> I think that can happen at turn refresh. 20160819 21:51:28< tad_> There is so much to it. Object expiration is where I'd say UMC will have the most dependency on 'how it is now'. 20160819 21:52:38< zookeeper> ok so "HttT General Improvements" is the one that should go in next? 20160819 21:53:04< tad_> Yes. Once that's in all the remaining ones become 1-commit-wonders 20160819 21:56:01< tad_> I think of "general improvements" more as suggestions .. it should all be pick-and-choose and no-harm-no-foul if you don't want some or any. 20160819 21:56:05< zookeeper> tad_, the first hex doesn't seem to match his actual position: https://github.com/wesnoth/wesnoth/pull/730/commits/7c5db6cbd03ad18548d89c8596d9b9080dab595b#diff-df48d835dd449340a60041f0c5752b66R483 20160819 21:56:32< zookeeper> (also dunno why you kill and re-create him, could just use [move_unit] and [modify_unit], but it doesn't matter) 20160819 21:56:46< fabi__> tad_: Are you overhauling every mainline campaign? 20160819 21:57:44< celmin> Overhauling is a bit strong, I think? 20160819 21:57:56< celmin> He's doing mainly bugfixes and resolving TODOs. 20160819 21:58:04< tad_> But, yes, my goal is to ultimately take a look at every one. 20160819 21:58:14< fabi__> nice 20160819 21:59:25< celmin> Out of curiosity, does that include the tutorial? 20160819 22:00:19< tad_> I've not looked at it, but it probably should. 20160819 22:01:39< tad_> I started this because I had an idea for a UMC. Went looking for background info. Hit bugs. And saw the forum post about polishing for Steam and decided why not? Worse case? Zookeeper tells me to shut up and go away and I go back to doing that UMC ida. 20160819 22:03:23< celmin> Heh... 20160819 22:04:35< fabi__> tad_: zookeeper claims to polish the tutorial since ages. Just ignore him if you feel like taking care about it. 20160819 22:06:00< tad_> Well, I'm trying to help and also not step on toes. Some people have over a decade on this project and I've been here only a couple months and am learning more all the time. 20160819 22:07:17< fabi__> tad_: I have thought about a mechanism to verify the correctness of scenarios by the usage of unit test scenarios which inherit from the to be tested one. 20160819 22:08:04< celmin> Other people have done work on it too. 20160819 22:13:24< zookeeper> tad_, https://github.com/wesnoth/wesnoth/pull/730/commits/93c2d7047ae3177f58ece7e196165d1fc619ae2e <- that's probably a string that should go in core/macros/objective-utils.cfg 20160819 22:13:51< zookeeper> since presumably it should become a standardized note 20160819 22:14:15< tad_> OK. I'll pull it an make a subject-PR specifically for it. 20160819 22:14:39< zookeeper> or can be done afterwards 20160819 22:17:48< zookeeper> fog on northern winter seems kind of random. was it just for added ambiance because snowfall? 20160819 22:19:03< tad_> I liked it. That's all. Made it a bit more of a challenge not seeing here all the enemy units were. Like I said, pick-and-choose 20160819 22:20:02< zookeeper> https://github.com/wesnoth/wesnoth/pull/730/commits/26fcc4a5b662728839afb4ee77cf181e54b40b47#diff-fff1763915bff0e8a787ee380a91a9d8R156 <- "place" typo. although i'm not sure why the original "you" form needed to be changed anyway. 20160819 22:21:17< tad_> Just personal preference. I don't like my games talking to me, I'd rather they talk about the characters. I'm a god-like observer, no Li'sar, or Konrad ... 20160819 22:21:30< celmin> What's wrong with female_message there BTW? 20160819 22:21:44< zookeeper> (also not that you ever _should_ give the sword to a paladin, but it isn't entirely useless on them; you'll mostly be fighting humans and orcs and they have 20% arcane resistance, no fire resistance... 20160819 22:22:28< celmin> You could use speaker=unit but also image=wesnoth-icon.png. 20160819 22:22:39< celmin> I don't remember if there was an option to not highlight the speaker. 20160819 22:22:59< zookeeper> yeah you could do that. highlighting the speaker in that case wouldn't even be a problem. 20160819 22:27:01< tad_> place vs places 20160819 22:27:13-!- Greg-Boggs [~greg_bogg@2601:1c2:901:e170:c0a7:2c36:4a91:ee73] has quit [] 20160819 22:27:59< tad_> Not sure where you're talking about? The [message] blocks fortalking the sword and armor? 20160819 22:28:46< zookeeper> yes 20160819 22:29:03< celmin> Yeah, where you have an if on the gender. 20160819 22:30:06< tad_> Oh. narrator/icon vs narrator/profile-image? 20160819 22:30:27< tad_> I really wanted to use the [message] gender attributes, but no workie here 20160819 22:31:34< tad_> So speaker=unit, image=icon and yeah it should work but you'll see Li'sar asking, not the narrator. I could try to override that with caption 20160819 22:31:55-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20160819 22:32:03< celmin> Right, I forgot about caption, but still I would expect it to work... 20160819 22:32:18< celmin> An empty caption key should suppress the default. 20160819 22:32:38< zookeeper> yeah 20160819 22:32:41< celmin> ie, if you put caption="" or even just 'caption=' 20160819 22:33:21< zookeeper> tad_, i've always considered northern winter to be a bit of a breather scenario so i'd actually prefer it without fog. in its place it wouldn't hurt to pan the view to actually show the orcs when delfador mentions them, though. 20160819 22:34:03< tad_> I'd not considered that and it's easy enough to test (sword and armor subject) 20160819 22:34:16< tad_> No problem, I'll delete the commit for fog. 20160819 22:35:10< tad_> Probably want the 'breather' more if you have to contend with more snow on Dwarven Doors 20160819 22:36:27-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Remote host closed the connection] 20160819 22:36:46< tad_> Personally, I consider it transitional and it won't hurt the campaign at all if northern winter were removed. It's really not important to the story-line. Not suggesting removal, just observing my impression 20160819 22:40:44-!- Appleman1234 [~Appleman1@KD036012024020.au-net.ne.jp] has joined #wesnoth-dev 20160819 22:41:05< zookeeper> sure, it doesn't really have any particular story purpose 20160819 22:41:14< zookeeper> (except maybe convey some passage of time) 20160819 22:42:56< tad_> Yes, it does get you from fall with winter hard approaching, at the ford, to spring on the way, at the doors. 20160819 22:45:57-!- Greg-Boggs [~greg_bogg@2601:1c2:901:e170:44b9:a76c:708a:bb84] has joined #wesnoth-dev 20160819 22:46:52< tad_> What I liked most about northern winter was the humans griping about the cold. 20160819 22:50:24-!- Greg-Boggs [~greg_bogg@2601:1c2:901:e170:44b9:a76c:708a:bb84] has quit [Ping timeout: 250 seconds] 20160819 22:50:44< zookeeper> what i like most about it is getting to level up some units in relative peace on a nice spacious map without anyone breathing down your neck. it's like a little winter vacation. 20160819 22:51:28< tad_> I do see what you mean. I usually pull out the L1s for it and try to get at least 2 L2s out of them 20160819 22:56:16< tad_> I have a special affinity for humans griping about the cold. I'm in Louisiana, temps have been running around 100F, and I'm wearing a hoodie because the wife sets the A/C to 70F 20160819 22:58:30 * zookeeper dislikes smoke 20160819 22:58:34< zookeeper> oops, wrong game 20160819 22:58:37 * zookeeper dislikes cold 20160819 22:59:26< zookeeper> i also dislike heat and my comfortable temperature range tends to be a bit narrow 20160819 23:09:56< celmin> The only way to modify a unit's ability at the moment is through store/unstore, right? 20160819 23:10:25< zookeeper> unless you remove the old and add a new via [object], then... sure, i guess 20160819 23:11:02< celmin> Pretty sure the Lua API doesn't grant access to abiity details. 20160819 23:11:50< tad_> it'd be a table-walk if it did 20160819 23:12:55< celmin> A what? 20160819 23:13:22< tad_> A table and the lua would have to walk it to find what you need. 20160819 23:13:38< celmin> I think the only way in Lua is, again, store/unstore. 20160819 23:14:19< zookeeper> tad_, btw i went through the TB fixes PR and left only one comment about a dubious change. otherwise it looks good. 20160819 23:14:37 * tad_ is looking 20160819 23:15:28< zookeeper> i find https://github.com/wesnoth/wesnoth/pull/700/commits/cad74aca84a693623405ce84aa4fb4db96b40c07 a rather funny case of idiot-proofing, but that's not a bad thing. it _could_ happen :p 20160819 23:16:27< tad_> OK, I'll pull that AToTB change. 20160819 23:16:29< zookeeper> could have a contest where whoever manages to trigger the attack event on a lich, wins 20160819 23:18:57< zookeeper> i wonder how feasible that could be 20160819 23:18:58< tad_> I've been thinking I've done so much 'these types and all advancements' that it might be nice to have it generated on the fly. 20160819 23:19:30< zookeeper> i guess you'd need to feed the kills to the enemy leader instead of an adept, because a non-intelligent adept would already require 6 kills to level 20160819 23:20:09< celmin> tad_: In where? Filters? Recall? 20160819 23:20:32< zookeeper> ok wait what am i talking about? the filter's in a [not], duh. 20160819 23:20:59< tad_> roles, filters, anywhere type= appears. 20160819 23:21:09< celmin> Hmm... 20160819 23:21:29< zookeeper> actually, lich shouldn't be part of that filter... :> 20160819 23:21:34< tad_> The issue is sometimes I want 'em sorted one way (for role type) and sometimes another. 20160819 23:22:20< celmin> I'm trying to remember if WFL has access to the list of unit types outside the AI context… probably not... 20160819 23:23:09< tad_> I added lich to the list because it's an advancement. Unless I crossed wires walking the chain by hand. 20160819 23:23:27< celmin> Speaking of that issue, you might also want "all of unit tree A, all of unit tree B, etc" in some cases and "all level 1s from needed trees, all level 2s from needed trees, etc" in others? 20160819 23:23:52< celmin> This seems like quite a nontrivial task, huh... 20160819 23:24:02< tad_> And I might want 'all elves then all humans then ...' 20160819 23:24:13< tad_> so I wish and drop it. too hard 20160819 23:24:23< celmin> I think it could be done in WFL though, provided a way to access the data exists. 20160819 23:24:32< celmin> (Such a way does not exist currently in $() context though.) 20160819 23:24:48< celmin> (Also, that'd yield a bracketed list, which could be a small problem...) 20160819 23:25:00< celmin> (And with quoted values...) 20160819 23:25:16< celmin> (Oh, wait, you could probably get past that with some WFL too though...) 20160819 23:25:36< celmin> Hmm... 20160819 23:25:44< tad_> And then how to add custom sort criteria .. and it starts to look like a C++ mess. S 20160819 23:25:53< tad_> So I drop the idea but keep wishing 20160819 23:26:02< celmin> Well, I was thinking of: 20160819 23:26:04< zookeeper> tad_, point is that a lich has skeleton resistances, so it is one of those "nigh-immune to our weapons" enemies 20160819 23:26:20< celmin> a) Something like a "unit_tree()" WFL function that walks the tree and returns a list of type IDs. 20160819 23:26:40< zookeeper> tad_, but really no one's ever going to see a lich in that scenario :p 20160819 23:26:41< celmin> b) Use WFL higher-order functions to organize the output. 20160819 23:26:52< tad_> Ah. Didn't check details. Assumed it if was an advancement it was not wanted. Generally that's true. Here, though .. hmmm 20160819 23:28:14< tad_> Oh, I agree, if your weapon does not good against a lich in S01 then you're best off kissing your ass good-bye because you don't have a chance. 20160819 23:28:43< celmin> Maybe I should add a game_config() function to WFL. Built-in functions are global across all formulas, so it's an easier to make something accessible everywhere. 20160819 23:28:47< celmin> ^easier way 20160819 23:28:53< tad_> I didn't consider if it was REASONABLE that a dark adept might advance to a lich in an L1 scene, just that it could happen at all. 20160819 23:29:36< zookeeper> tad_, and arguably if you manage to feed 30 units to an enemy to see a lich, and then manage to kill it, you should not be told "That was not so hard!" :] 20160819 23:29:54< celmin> Actually, other than in [role], I don't think the order of types makes any difference? 20160819 23:30:07< tad_> The issue arose because of the bats, which DO appear, easily. 20160819 23:30:25< tad_> @celmin, correct as far as I knwo 20160819 23:31:40< celmin> vultraz: What is "reservior"? 20160819 23:31:45< celmin> (In MP Create) 20160819 23:31:55< zookeeper> tad_, so whenever you do what you do with that filter thing, i can merge it 20160819 23:33:54< tad_> AToTB? I need to pull the fake sighted logic. And I'll pull lich from the filter list. Are there other issues? 20160819 23:34:28< zookeeper> not that i saw 20160819 23:35:09< tad_> OK. I'll get on it now, then. 20160819 23:36:53< celmin> I have 19 branchs on my local repo… 20160819 23:36:56< celmin> ^branches 20160819 23:37:07< celmin> I should clean up some of the old ones... 20160819 23:37:16< celmin> Also need to update spirit_po... 20160819 23:37:34< celmin> Not sure why I still have an ai branch. 20160819 23:42:21< tad_> OK, zookeeper, deleted the fake sighted commit, removed lich from the [not] list, rebased to master and think it's ready. 20160819 23:43:52< zookeeper> ok, pressing the green button... 20160819 23:44:04 * tad_ covers his eyes ... 20160819 23:44:20 * zookeeper ducks for cover 20160819 23:44:23< celmin> Ah, blargh on the timing. Oh well, I can easily rebase, 20160819 23:44:25-!- irker885 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20160819 23:44:25< irker885> wesnoth: Gregory A Lundberg wesnoth:master 8199098d74bb / data/campaigns/Two_Brothers/scenarios/ (02_The_Chase.cfg 03_Guarded_Castle.cfg): AToTB Remove variable artifacts https://github.com/wesnoth/wesnoth/commit/8199098d74bb1589ee4b898062e6bed68716d043 20160819 23:44:25< irker885> wesnoth: Gregory A Lundberg wesnoth:master 21320f7c1cd2 / data/campaigns/Two_Brothers/scenarios/ (4 files): AToTB Standardize on EASY https://github.com/wesnoth/wesnoth/commit/21320f7c1cd27bc0895bbc6f32ac7f36db5c7ce7 20160819 23:44:25< irker885> wesnoth: Gregory A Lundberg wesnoth:master 955b8477d2d5 / data/campaigns/Two_Brothers/ (5 files in 2 dirs): AToTB Standardize Arvith's last breath https://github.com/wesnoth/wesnoth/commit/955b8477d2d554c6b06a701d54cb5c2016d5fde3 20160819 23:44:26< irker885> wesnoth: Gregory A Lundberg wesnoth:master f351f3570366 / data/campaigns/Two_Brothers/ (3 files in 2 dirs): AToTB Standardize Baran https://github.com/wesnoth/wesnoth/commit/f351f35703669e919f9f37b20e855015926b529c 20160819 23:44:27< irker885> wesnoth: Gregory A Lundberg wesnoth:master b9a18aee48a4 / data/campaigns/Two_Brothers/ (3 files in 2 dirs): AToTB Standardize Baran's last breath https://github.com/wesnoth/wesnoth/commit/b9a18aee48a4fdeb575e4de8547268688c59c9f8 20160819 23:44:29< irker885> wesnoth: Gregory A Lundberg wesnoth:master 423f082ebcc6 / data/campaigns/Two_Brothers/scenarios/01_Rooting_Out_a_Mage.cfg: AToTB S01 Fix bug: Missing advancements https://github.com/wesnoth/wesnoth/commit/423f082ebcc696130fdb1602fc85b048ab99a0d2 20160819 23:44:31< irker885> wesnoth: Gregory A Lundberg wesnoth:master 27bda635e75a / data/campaigns/Two_Brothers/scenarios/01_Rooting_Out_a_Mage.cfg: AToTB S01 Fix bug: No unit for role https://github.com/wesnoth/wesnoth/commit/27bda635e75a10f2fc521a9605026e7e1b61a5f6 20160819 23:44:33< irker885> wesnoth: Gregory A Lundberg wesnoth:master fbedc205b0ac / data/campaigns/Two_Brothers/ (scenarios/01_Rooting_Out_a_Mage.cfg utils/characters.cfg): AToTB S01 Fix bug: Mercenary may be dead https://github.com/wesnoth/wesnoth/commit/fbedc205b0ac7316f27845198fb866e7e7cfd56d 20160819 23:44:33< celmin> At least this one won't conflict, unlike all vultraz's work. 20160819 23:44:35< irker885> wesnoth: Gregory A Lundberg wesnoth:master 7a3d2e37f707 / data/campaigns/Two_Brothers/scenarios/02_The_Chase.cfg: AToTB S02 Fix bug: Inconsitent objectives https://github.com/wesnoth/wesnoth/commit/7a3d2e37f7075c5beb2496a7946ad7220b22123c 20160819 23:44:37< irker885> wesnoth: Gregory A Lundberg wesnoth:master 33c2e1037bad / data/campaigns/Two_Brothers/scenarios/02_The_Chase.cfg: AToTB S02 Fix bug: Speaker may be dead https://github.com/wesnoth/wesnoth/commit/33c2e1037bad31a91ab12009ff2deb5ee39c6715 20160819 23:44:39< irker885> wesnoth: Gregory A Lundberg wesnoth:master 75986550adeb / data/campaigns/Two_Brothers/scenarios/02_The_Chase.cfg: AToTB S02 Fix bug: Missing units https://github.com/wesnoth/wesnoth/commit/75986550adeb0be71ccf8972207977575239813b 20160819 23:44:41< irker885> wesnoth: Gregory A Lundberg wesnoth:master 6c33ecbd9415 / data/campaigns/Two_Brothers/scenarios/03_Guarded_Castle.cfg: AToTB S03 Fix bug: Delay guards https://github.com/wesnoth/wesnoth/commit/6c33ecbd9415c5149d5ec2a0793503c928700f9e 20160819 23:44:43< irker885> wesnoth: Gregory A Lundberg wesnoth:master a82e55660787 / data/campaigns/Two_Brothers/scenarios/03_Guarded_Castle.cfg: AToTB S03 Fix bug: Capture villages https://github.com/wesnoth/wesnoth/commit/a82e55660787aafedeec2384294d0c1a7347d292 20160819 23:44:45< irker885> wesnoth: Gregory A Lundberg wesnoth:master 77e714e4edef / data/campaigns/Two_Brothers/scenarios/03_Guarded_Castle.cfg: AToTB S03 Fix bug: Rotharik may be dead https://github.com/wesnoth/wesnoth/commit/77e714e4edefa670c2755b6c2b9e879090275e80 20160819 23:44:47< irker885> wesnoth: Gregory A Lundberg wesnoth:master d45f17425954 / data/campaigns/Two_Brothers/scenarios/03_Guarded_Castle.cfg: AToTB S03 Fix bug: Inconsistent objectives https://github.com/wesnoth/wesnoth/commit/d45f17425954eb0c9aa8ec0ddf7296e4069ab869 20160819 23:44:49< irker885> wesnoth: Gregory A Lundberg wesnoth:master 80afcee8db97 / data/campaigns/Two_Brothers/scenarios/02_The_Chase.cfg: AToTB S02 Capture new villages https://github.com/wesnoth/wesnoth/commit/80afcee8db9758b9e84fa2ad41be1e8820e0d5e4 20160819 23:44:51< irker885> wesnoth: Gregory A Lundberg wesnoth:master bb21a7ae2ba9 / data/campaigns/Two_Brothers/scenarios/02_The_Chase.cfg: AToTB S02 Wait to kill Brena https://github.com/wesnoth/wesnoth/commit/bb21a7ae2ba9a714d2b52f5c03e1ea2d0ae99071 20160819 23:44:53< irker885> wesnoth: Gregory A Lundberg wesnoth:master 5a9a394d9570 / data/campaigns/Two_Brothers/scenarios/02_The_Chase.cfg: AToTB S02 Agressive kidnappers https://github.com/wesnoth/wesnoth/commit/5a9a394d9570bf9a8397f80197651c2fc44f2707 20160819 23:44:53< celmin> Oh, I thought it was going to be HTTT, but it was TB instead. 20160819 23:44:55< irker885> wesnoth: Gregory A Lundberg wesnoth:master 9696307a09e3 / data/campaigns/Two_Brothers/scenarios/03_Guarded_Castle.cfg: AToTB S03 Improve shroud https://github.com/wesnoth/wesnoth/commit/9696307a09e32b167f983657083831acb0d1bc6b 20160819 23:44:57< irker885> wesnoth: Gregory A Lundberg wesnoth:master 8b984cfa6bcd / data/campaigns/Two_Brothers/scenarios/03_Guarded_Castle.cfg: AToTB S03 Logical guards https://github.com/wesnoth/wesnoth/commit/8b984cfa6bcd7b4a965c936ead948a52d9165504 20160819 23:44:59< irker885> wesnoth: Gregory A Lundberg wesnoth:master 8fc3e3100f47 / data/campaigns/Two_Brothers/ (4 files in 2 dirs): AToTB Get choose_level working https://github.com/wesnoth/wesnoth/commit/8fc3e3100f47c0bb0d6fb4f751242979f090985f 20160819 23:45:01< irker885> wesnoth: Lari Nieminen wesnoth:master 4dbf5b026341 / data/campaigns/Two_Brothers/ (5 files in 2 dirs): Merge pull request #700 from GregoryLundberg/GL_AToTB_final https://github.com/wesnoth/wesnoth/commit/4dbf5b026341bb7b74fa6dd8eafde6f3d2952aee 20160819 23:47:16< tad_> And .. POOF! .. another branch gone from my repo. I need to get crackin' ... 20160819 23:49:06< celmin> Apparently "boost_trimming" is not fully merged… what was the command to compare it to master... 20160819 23:49:08-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has quit [Quit: ChipmunkV] 20160819 23:49:18< celmin> I can never remember whether to use two dots or three. 20160819 23:50:41< tad_> You talking about a range of commit ids in git command-line? Two. 20160819 23:51:05< celmin> I'm talking about wanting to see any changes that are in the branch but not in master. 20160819 23:51:16< celmin> I'm not sure if that's equivalent to what you just said. 20160819 23:51:17< tad_> google is your friend 20160819 23:51:38< vultraz> celmin: see tooltip 20160819 23:51:53< celmin> Gah, I already forgot the question. 20160819 23:52:04< celmin> Um, what? 20160819 23:52:22< celmin> I guess I need to search the config file then... 20160819 23:52:28< vultraz> [10:31:39] celmin vultraz: What is "reservior"? 20160819 23:52:29< vultraz> [10:31:43] celmin (In MP Create) 20160819 23:53:23< celmin> …what the heck is that? 20160819 23:53:43< vultraz> ? 20160819 23:53:58 * tad_ is afk 20160819 23:54:02< celmin> Where the heck did this word come from? 20160819 23:54:07< celmin> I don't get it. 20160819 23:54:12< vultraz> word? 20160819 23:54:13< celmin> It just seems to be a made-up word? 20160819 23:54:16< celmin> "reservior" 20160819 23:54:28< vultraz> I see 20160819 23:54:39< celmin> What does it mean? 20160819 23:54:52< celmin> I understand the tooltip, but I want to know about the word... 20160819 23:55:03< vultraz> I must have made a typo with "reservoir" 20160819 23:55:16< celmin> But... 20160819 23:55:34< shadowm> Butts. 20160819 23:55:37< celmin> I wouldn't associate "reservoir" with something like that either... 20160819 23:55:52< celmin> Hi shadowm, what's up. 20160819 23:55:56< vultraz> it's a bad choice, I agree 20160819 23:57:16< celmin> vultraz: What's with those four commented lines in dropdown_list? 20160819 23:57:26< vultraz> oh yeah 20160819 23:57:30< vultraz> old method of setting the list 20160819 23:57:35< vultraz> i should remove them 20160819 23:57:45< celmin> I'll do it since I'm touching the file anyway. --- Log closed Sat Aug 20 00:00:32 2016