--- Log opened Thu Oct 20 00:00:47 2016 20161020 00:12:28-!- tad_carlucci [~lundberg@173.217.65.103] has quit [Quit: Off to resolve a merge conflict between the wife and husband branches of my real life.] 20161020 00:25:05-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 260 seconds] 20161020 00:57:23< irker253> wesnoth: Chris Beck wesnoth:master e9d72ad7ed7d / src/scripting/ (lua_common.cpp lua_common.hpp lua_kernel_base.cpp): partially revert 797613f760d0c84afefa39b305bb512f4a574479 https://github.com/wesnoth/wesnoth/commit/e9d72ad7ed7d6897a3807b1293ff4c37c6c5b7d9 20161020 00:58:53-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has joined #wesnoth-dev 20161020 01:08:21-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 01:09:49-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20161020 01:11:56-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20161020 01:13:03-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 256 seconds] 20161020 01:30:31-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20161020 01:44:07< celticminstrel> iceiceice's commit doesn't fix the crash, BTW 20161020 01:45:50-!- gfgtdf_ [~chatzilla@x4e363b46.dyn.telefonica.de] has joined #wesnoth-dev 20161020 01:45:50-!- gfgtdf [~chatzilla@x4e36ac6b.dyn.telefonica.de] has quit [Read error: Connection reset by peer] 20161020 01:45:51-!- gfgtdf_ is now known as gfgtdf 20161020 01:56:34< vultraz> celticminstrel: why do you think i should use std::set? 20161020 01:57:19< celticminstrel> I'm not sure if it's a good idea, but... if you can't rely on the window currently closing being on the top of the stack, it seems like a set would make it easier to remove the open window. 20161020 02:00:24< vultraz> how so? 20161020 02:01:03< celticminstrel> ...because you'd just use erase(ptr)? 20161020 02:01:27< vultraz> oh 20161020 02:01:34< vultraz> that's how set works? 20161020 02:01:57< celticminstrel> Set and map both. 20161020 02:02:07< celticminstrel> (With map it's erase(key).) 20161020 02:02:15< celticminstrel> They basically both work the same way. There are some minor differences. 20161020 02:02:32< celticminstrel> (And of course they're quite different in purpose.) 20161020 02:02:36< vultraz> why would you use set over map? 20161020 02:03:18< celticminstrel> You could think of a set as map, I suppose. It's probably not accurate, but it should answer the question of why to choose set over map, I think. 20161020 02:06:42< vultraz> but you said map is pair. So why would you have pair. 20161020 02:07:00< celticminstrel> set is not an associative container. 20161020 02:07:43< celticminstrel> Saying map is just a way to show that a set and a map behave similarly. 20161020 02:07:47< vultraz> I see 20161020 02:08:02< celticminstrel> You wouldn't have a map or a pair (it wouldn't compile). 20161020 02:08:26< celticminstrel> Unlike a vector, deque, or list, a set cannot have duplicate elements. 20161020 02:08:35< celticminstrel> In C++, a set is always sorted. 20161020 02:08:42< celticminstrel> (In C++ STL, that is.) 20161020 02:09:08< celticminstrel> (unordered_set is unspecified order.) 20161020 02:11:48< celticminstrel> So you would use set when you don't want duplicates but need fast insertion and deletion, and might also use it if you want iteration to be in sorted order. 20161020 02:11:55< vultraz> sorted by? 20161020 02:12:08< vultraz> and how does one sort pointers 20161020 02:12:10< celticminstrel> operator< or a user-provided comparator 20161020 02:12:29< celticminstrel> Pointers are comparable with operator<, but I'm not sure how well-defined this is when they don't point into the same array. 20161020 02:12:39< celticminstrel> In practice I'm pretty sure it will work, but... 20161020 02:12:57< celticminstrel> If it's undefined behaviour, it's probably not a good idea. 20161020 02:13:52< celticminstrel> I think it's implementation-defined, though, which would be fine. 20161020 02:14:52< celticminstrel> This SO thread seems to imply that it is not undefined behaviour. 20161020 02:15:45< celticminstrel> It would likely be suboptimal if the number of open dialogs was very large, but it's pretty unlikely you'd have even a hundred of them open all at once. 20161020 02:17:08< vultraz> you'll never have more than 2 or 3 99% of the time. 20161020 02:17:28< celticminstrel> I think ten at a time wouldn't be that strange. 20161020 02:17:40< celticminstrel> But much more than that is pretty unlikely. 20161020 02:20:30< vultraz> the reason i used a vector is to have them in the order they were created 20161020 02:20:57< vultraz> if you want uniqueness what about vector 20161020 02:21:08< celticminstrel> Which makes sense for modal dialogs, since they'll always close in reverse order. 20161020 02:21:10< celticminstrel> I doubt you can guarantee that that's the case for nonmodal dialogs though. 20161020 02:21:39< celticminstrel> Huh? vector doesn't do anything about uniqueness of its elements. 20161020 02:22:04< vultraz> but i could do vec.erase(std::find(vec.begin(), vec.end(), ptr)), I don't need a set 20161020 02:22:12< celticminstrel> You could, yes. 20161020 02:22:32< celticminstrel> I'm not sure if any modeless dialogs need to close before the top modal dialog can close. 20161020 02:22:42< celticminstrel> Is the tooltip always closed before the dialog? 20161020 02:23:21< vultraz> afaik 20161020 02:23:34< celticminstrel> At present I doubt we ever have more than one modeless dialog open at any given time, so your current version will probably work fine, but it doesn't seem future-proof. 20161020 02:24:20< celticminstrel> For example, when we make floating textboxes GUI2, it should be possible to open the floating textbox, then mouseover the sidebar to get a tooltip, then close the floating textbox, and finally move the mouse away to close the tooltip. 20161020 02:25:07< celticminstrel> But with your current code, closing the floating text would remove the tooltip from the stack (and closing the tooltip would then remove the floating textbox). 20161020 02:25:42< celticminstrel> (Assuming tooltips use the stack at all.) 20161020 02:25:47< vultraz> they do 20161020 02:25:55< vultraz> or at least they should 20161020 02:26:18< celticminstrel> I think you said it inherits tpopup, but do they call window::show_non_modal? 20161020 02:26:32< celticminstrel> I thought there was a window::show_tooltip... maybe that's something else though... 20161020 02:27:35< vultraz> pretty sure ttip::show calls tpopup::show 20161020 02:27:48-!- gfgtdf [~chatzilla@x4e363b46.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 49.0.1/20160922113459]] 20161020 02:28:18< celticminstrel> So it has something like tpopup::show(...) in it? 20161020 02:29:16< celticminstrel> Oh. 20161020 02:29:23< celticminstrel> It doesn't even override show(). 20161020 02:29:39< celticminstrel> So yeah, that works then. 20161020 02:30:03< vultraz> " /* 20161020 02:30:04< vultraz> * Allocating a static tip object causes a segmentation fault when Wesnoth 20161020 02:30:06< vultraz> * terminates. So instead create an object on the heap and never free it. 20161020 02:30:12< vultraz> */" 20161020 02:30:12< vultraz> eh? 20161020 02:32:37< celticminstrel> Yeah I noticed that too. 20161020 02:32:37< celticminstrel> Looking at tpopup's destructor, it seems like it should be fine. 20161020 02:32:37< celticminstrel> It's not a trivial destructor, but all it really does is delete the window. 20161020 02:32:37< celticminstrel> Oh, I guess I should look at the window destructor then... 20161020 02:32:38< celticminstrel> If it can be fixed, then of course that's better. 20161020 02:32:39< celticminstrel> Yeah okay, the window destructor is very nontrivial and could be calling any number of child destructors. 20161020 02:33:05 * celticminstrel considers alternatives. 20161020 02:35:32< celticminstrel> I can't reproduce the segmentation fault on Windows... 20161020 02:36:05< celticminstrel> (ie when removing the two *'s from that function) 20161020 02:38:12< celticminstrel> (And everything after the =) 20161020 02:38:22< celticminstrel> (That's not supposed to be a smiley. :/ ) 20161020 02:39:48< celticminstrel> Oh huh, each different tooltip is a separate window. 20161020 02:40:30< celticminstrel> Rather than separate window definitions or whatever. 20161020 02:42:06< vultraz> what do you mean? 20161020 02:46:04< celticminstrel> I think? 20161020 02:46:20< celticminstrel> Like tooltip and tooltip_large are separate [window]s in the WML. 20161020 02:47:02< vultraz> yes, window definitions 20161020 02:47:19< vultraz> or wait, i think i see what you mean.. 20161020 02:47:41< vultraz> i guess that's why the [tooltip] tags are for 20161020 02:47:49< celticminstrel> The tooltip code uses set_window_id() rather than set_definition(). 20161020 03:23:52< vultraz> i'll confer further with Aginor 20161020 03:24:01< vultraz> he seems to want me to expand to window stack into its own class 20161020 03:38:24-!- Polsaker is now known as Porusaka 20161020 03:40:28-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 245 seconds] 20161020 03:44:13-!- heirecka [~heirecka@exherbo/developer/heirecka] has quit [Ping timeout: 245 seconds] 20161020 03:46:12< Aginor> indeed he does 20161020 03:46:18-!- heirecka [~heirecka@exherbo/developer/heirecka] has joined #wesnoth-dev 20161020 03:48:52< Aginor> I'd also imagine that a map does hashing on they key, whereas a set may not. That's implementation specific details though 20161020 03:50:31< vultraz> how exactly should i make use of this? 20161020 03:53:47< vultraz> i seem to recall you wanted to implement a sort of window stack 20161020 03:57:36-!- irker253 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20161020 04:14:17< celticminstrel> Aginor: No, set/map are both binary trees internally. 20161020 04:14:32< celticminstrel> unordered_set and unordered_map do are hashes. 20161020 04:14:41< celticminstrel> Uh. Remove one of those verbs. 20161020 04:34:01< vultraz> ive been pondering how the storyscreen could be ported to gui2 20161020 04:34:37< vultraz> not sure a multipage should be used or not 20161020 04:34:55< celticminstrel> Honestly, porting the storyscreen shouldn't be all that hard. 20161020 04:35:08< vultraz> yes 20161020 04:35:20< celticminstrel> A multipage can probably do the job, with a bit of work, but it might be easier to have a stacked widget. 20161020 04:35:31< vultraz> I would use both 20161020 04:35:34< vultraz> a page of stacks 20161020 04:35:42-!- Bonobo [~Bonobo@2001:44b8:254:3200:3591:b28:85fa:df47] has quit [Ping timeout: 250 seconds] 20161020 04:35:59< vultraz> but im wondering if perhaps the page isn't needed 20161020 04:36:05-!- Bonobo [~Bonobo@2001:44b8:254:3200:3591:b28:85fa:df47] has joined #wesnoth-dev 20161020 04:36:14< vultraz> multipages aren't really used... consistently. 20161020 04:36:16< celticminstrel> Oh I supposed you could use both... 20161020 04:36:24< celticminstrel> ^-d 20161020 04:36:27< vultraz> mostly bc you don't really know when one should use it vs value setting 20161020 04:37:33< celticminstrel> Huh? 20161020 04:38:33< vultraz> ok, think of it this way 20161020 04:38:38< vultraz> you have a label 20161020 04:38:42< vultraz> that can say either A or B 20161020 04:38:49< vultraz> but which is better design 20161020 04:39:04< vultraz> 2 pages, each with one value 20161020 04:39:09< vultraz> or a callback that changes the label 20161020 04:39:19< celticminstrel> There's not enough info to answer the question. 20161020 04:39:38< celticminstrel> A multipage is a list. 20161020 04:39:55< celticminstrel> (If I recall correctly.) 20161020 04:40:10< celticminstrel> So if you just want a generic label to change value, there's no need for a multipage. 20161020 04:40:35< celticminstrel> If you have a set of widgets that should change value simultaneously, that could be a reason for a multipage. 20161020 04:40:37< vultraz> obviously 20161020 04:40:50< celticminstrel> But depends on context. 20161020 04:40:56< vultraz> well, take MP Create 20161020 04:41:02< vultraz> it uses value setters exclusively 20161020 04:41:07< vultraz> should it have used a multipage? 20161020 04:41:16< vultraz> im facing the same dilemma when pondering the storyscreen 20161020 04:41:16< celticminstrel> It kinda can't. 20161020 04:41:22< celticminstrel> Because of how the layout works. 20161020 04:41:35< celticminstrel> The storyscreen should be able to. 20161020 04:41:48< celticminstrel> I think a multipage makes sense in the storyscreen. 20161020 04:42:15< celticminstrel> How would you handle images drawn in the storyscreen? 20161020 04:42:22< celticminstrel> Pass a list of images to the canvas formulas? 20161020 04:42:26-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20161020 04:42:36< vultraz> a custom window definition would be needed... 20161020 04:44:12< vultraz> but there's still the blinking images.. 20161020 04:44:12< vultraz> or more specifically, the fact that images aren't draw all at once\ 20161020 04:44:12< celticminstrel> I suppose you could have a timer that advances a frame variable in the canvas. 20161020 04:44:12< celticminstrel> For the fact that they're not all drawn at once... 20161020 04:44:12< vultraz> this is one of those things that anura excels at and wesnoth sucks at 20161020 04:44:12< celticminstrel> You could append values to the list formula list in the canvas. 20161020 04:44:12< vultraz> because ffl has a schedule() function 20161020 04:44:12< celticminstrel> Ack, remove the first "list" 20161020 04:44:49< celticminstrel> Well, if you can define exactly what schedule does, it could be added to WFL, but... I doubt you even really understand it well enough to define it... 20161020 04:45:08< vultraz> No, you couldn't add it to WFL 20161020 04:45:13< celticminstrel> Why not? 20161020 04:45:33< celticminstrel> Because GUI2 doesn't evaluate formula actions? 20161020 04:45:55< vultraz> Because it's part of a different design. 20161020 04:46:16< celticminstrel> Maybe you should start by explaining what it is and how to use it. 20161020 04:46:43< celticminstrel> Huh? I thought tad fixed that hiding issue. 20161020 04:47:09-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 04:47:20< celticminstrel> (Mac build just completed, that's what triggered the last comment.) 20161020 04:48:25< vultraz> "schedule(int cycles_in_future, list of commands) — schedules the given list of commands to be run on the current object the given number of cycles in the future. Note that the object must be valid (not destroyed) and still present in the level for the commands to be run." 20161020 04:48:52< celticminstrel> Well, it's clearly an action object, which doesn't fit well with the way GUI2 uses WFL. 20161020 04:49:01< celticminstrel> Or rather, GUI2 doesn't know about any action objects. 20161020 04:49:03< vultraz> exactly. 20161020 04:49:13< celticminstrel> WFL does have action objects though. 20161020 04:49:17< vultraz> in c++ I suppose this would essentially be a timer 20161020 04:49:21< celticminstrel> Only in FormulaAI, but still. 20161020 04:49:51< vultraz> problem being I don't want to blit directly on the screen 20161020 04:50:03< celticminstrel> Does GUI2 continuously re-evaluate the formula? 20161020 04:50:04< vultraz> but rather have something that handles it 20161020 04:50:08< vultraz> yes 20161020 04:50:11< vultraz> every draw cycle 20161020 04:50:22< celticminstrel> So adding a time() function or similar would make animations possible? 20161020 04:50:42< vultraz> how would that work? 20161020 04:50:49< celticminstrel> It would return the current time. 20161020 04:51:21< celticminstrel> Either a timestamp in seconds, or an object with keys hour, minutes, seconds. 20161020 04:51:34< celticminstrel> So you'd use it probably in conjunction with a modulus. 20161020 04:51:44-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 260 seconds] 20161020 04:51:56< celticminstrel> Then each time the formula is evaluated, it returns a different value. 20161020 04:52:07< celticminstrel> Thus, each time the canvas is drawn, you get a different result. 20161020 04:52:31< celticminstrel> It would be utterly trivial to add a timestamp function; slightly more work if you want an object. 20161020 04:55:16-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has joined #wesnoth-dev 20161020 04:58:17< vultraz> See, here's where there's a fundamental disconnect between WML and WFL.. 20161020 04:58:37< celticminstrel> I have no idea what you're talking about all of a sudden. 20161020 04:58:42< vultraz> I'd need to construct a vector of configs or something of the [image] tags.. 20161020 04:58:52< celticminstrel> Configs? What? 20161020 04:58:53< vultraz> then set the size of that to a WFL variable.. 20161020 04:59:06< celticminstrel> BTW, you can just pass a config as a WFL variable, if you want to. 20161020 04:59:29< vultraz> then somehow calculate which vector item to use at any time 20161020 04:59:32< celticminstrel> (It's possibly a little unintuitive to work with on the WFL side, mind you... maybe that could be improved though...) 20161020 04:59:56< vultraz> then draw the image from the config data 20161020 05:00:07< celticminstrel> I guess the canvas doesn't actually have a tag to draw a list of images though. 20161020 05:00:29< celticminstrel> Actually wait, you could probably do it by building an image path string... though... that feels pretty inefficient. 20161020 05:01:40< celticminstrel> Also, I feel like that might require recursion, which WFL can't handle... 20161020 05:02:08< vultraz> our WFL is primitive :( 20161020 05:02:39< vultraz> does WFL have containers? 20161020 05:02:51< celticminstrel> It has lists and maps, yes. 20161020 05:03:28< vultraz> can functionality be added to construct a WFL list from a config iterator? 20161020 05:03:33< vultraz> range 20161020 05:04:00< celticminstrel> Hmm, thinking about it, I guess the sort of image path string I'm thinking of would not require recursion - it'd be some sort of img~BLIT()~BLIT()~BLIT()... 20161020 05:04:13< vultraz> oh god no 20161020 05:04:31< celticminstrel> Yeah, not saying it's a good idea. It feels inefficient. 20161020 05:04:50< vultraz> do we have a set() function? 20161020 05:04:55< celticminstrel> Huh? 20161020 05:05:04< vultraz> or set_var 20161020 05:05:17< celticminstrel> set_var() is an action, so it only exists in FormulaAI. 20161020 05:05:19< vultraz> ability set a wfl variable to a value from within wfl? 20161020 05:05:28< celticminstrel> No, that's impossible even in FormulaAI. 20161020 05:05:32< vultraz> fuck 20161020 05:05:35< celticminstrel> I think. 20161020 05:05:42-!- Greywhind [~Greywhind@c-71-232-29-126.hsd1.ma.comcast.net] has quit [Ping timeout: 252 seconds] 20161020 05:05:43< celticminstrel> (It's also impossible in FFL IIRC.) 20161020 05:05:47< celticminstrel> ^IIUC 20161020 05:05:58< vultraz> "set_var(string varname, variant value) — sets the variable named varname within the current object. Note that you should generally use set(vars.blah, x) rather than set_var('blah', x). The only exception is if you want to create the command and save it for later execution on an object you don't yet have access to -- most useful with the spawn() function." 20161020 05:06:17< celticminstrel> set_var() returns an action object that instructs the AI to set a variable. 20161020 05:06:25< celticminstrel> It does not, in itself, set a variable. 20161020 05:06:35< celticminstrel> The closest thing you have to setting a WFL variable within WFL is the where clause. 20161020 05:06:45< vultraz> I don't think FFL has a concept of variables in the same way we do. 20161020 05:08:09< celticminstrel> From what I understand, FFL and WFL are about the same in this respect. 20161020 05:11:45< celticminstrel> The set_var() function is a FormulaAI function, so not generally available to WFL code. 20161020 05:13:28< celticminstrel> (And it shouldn't be generally available, because using it in eg a $() would produce bizarre results.) 20161020 05:17:16< celticminstrel> We could add a GUI2 canvas tag that uses a formula and evaluates action objects. 20161020 05:20:33-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20161020 05:21:35< vultraz> I'm imagining something like this... http://pastebin.com/rqZ5eUz0 20161020 05:21:47< vultraz> psuedocode, really, since it's not fully FFL or WFL 20161020 05:22:16< vultraz> it's hard to write wfl without the object paradigm 20161020 05:22:35< celticminstrel> ...object paradigm? 20161020 05:23:26< vultraz> wfl has no objects 20161020 05:23:30< vultraz> or is that just gui2 wfl 20161020 05:23:39< celticminstrel> You're approaching this from the wrong angle... 20161020 05:23:55< vultraz> how would you suggest this be done? 20161020 05:24:24< celticminstrel> WFL does have objects, even in GUI2, though the GUI2 formulas may not actually use them for anything. (Mostly the objects represent game data. Maybe GUI2 does use the location object, I guess.) 20161020 05:25:08< vultraz> I guess im getting paradigms mixed up 20161020 05:25:13< celticminstrel> Okay, so... 20161020 05:25:20< vultraz> in Anura, all of this would be delegated to the WML author 20161020 05:25:25< vultraz> not the core framework 20161020 05:25:47< vultraz> it would be their job to use schedule and spawn to fully control the content that appears on screen 20161020 05:25:52< vultraz> whereas we have a different approach 20161020 05:25:56< celticminstrel> First of all, a conditional on the time is not a workable paradigm. 20161020 05:26:06< celticminstrel> Instead, take get_time()%delay 20161020 05:26:23< celticminstrel> Or /delay 20161020 05:26:27< celticminstrel> Depending on exactly what you want. 20161020 05:26:34< celticminstrel> Something like that at least. 20161020 05:26:44< celticminstrel> Modulus is probably easier to work with. 20161020 05:27:13< celticminstrel> Anyway, you need to accept that formulas do not have the power to change anything. 20161020 05:27:28< vultraz> well that's absolutely horrendous 20161020 05:27:33< celticminstrel> It's not horrendous at all. 20161020 05:27:38< celticminstrel> It's just a different paradigm. 20161020 05:27:46< celticminstrel> I'm pretty sure FFL is the same. 20161020 05:28:08< celticminstrel> As I understand it, an FFL formula merely combines existing values to produce a new output value. 20161020 05:28:12< vultraz> in wfl you would be setting the image object's member variables 20161020 05:28:16< celticminstrel> It doesn't alter anything during execution. 20161020 05:28:36< celticminstrel> You can't set variables in WFL. 20161020 05:28:43< celticminstrel> You can only compute things. 20161020 05:28:48< celticminstrel> No side-effects. No assignment. 20161020 05:28:56< celticminstrel> It's sort of pure-functional in that sense. 20161020 05:29:05< celticminstrel> It's closer to mathematics. 20161020 05:29:25< vultraz> the difference here is we're setting values in the data language 20161020 05:29:32< vultraz> in anura that would be FSON 20161020 05:29:35< vultraz> not ffl. 20161020 05:29:59< celticminstrel> Well, you're using a WFL formula to calculate a value in GUI2, yes, and that value is used by GUI2 to alter one of its parameters. 20161020 05:30:15< vultraz> a thing to keep in mind is that FFL is NOT just a calculation engine 20161020 05:30:27< celticminstrel> I think you may be misunderstanding something. 20161020 05:30:57< celticminstrel> I looked at FFL awhile back when you linked a sample of it, and as far as I understand, even FFL functions that reputedly perform an action actually don't do anything at all. 20161020 05:31:15< celticminstrel> Or rather, they merely produce an output result. 20161020 05:31:19< celticminstrel> Just like any other function. 20161020 05:32:07< vultraz> I think we're both missing something here.. 20161020 05:32:14< vultraz> what do you mean "not do anything at all" 20161020 05:32:22< celticminstrel> It doesn't perform the action. 20161020 05:32:41< vultraz> pretty sure it does 20161020 05:32:49< celticminstrel> For example, the attack() FormulaAI function does not perform an attack. 20161020 05:33:01-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20161020 05:33:20< vultraz> https://github.com/anura-engine/wesnoth2/blob/master/data/objects/titlescreen_controller.cfg#L16-L68 20161020 05:33:25< celticminstrel> In order for those actions to actually be performed, the code (presumably C++ or, in the case of Wesnoth, possibly Lua code) which calls the formula needs to recognize that the result of the formula is an action object (or list of action objects). 20161020 05:33:31< celticminstrel> It can then choose to execute those actions. 20161020 05:33:39< vultraz> https://github.com/anura-engine/wesnoth2/blob/master/data/objects/titlescreen_controller.cfg#L171 20161020 05:33:45< celticminstrel> So the formula calculates the actions to be performed, but does not actually execute them. 20161020 05:34:10< celticminstrel> The attack() FormulaAI function returns an object describing the parameters of the attack. 20161020 05:34:27< celticminstrel> The AI code then recognizes this object as an attack action and executes the attack. 20161020 05:34:58< vultraz> I don't know how the anura background engine actually works 20161020 05:35:19< vultraz> but I'm pretty sure what you describe is not the case in ffl 20161020 05:35:29< vultraz> else there wouldn't be def() commands-> 20161020 05:35:33< vultraz> or set() 20161020 05:35:49< vultraz> ->commands* 20161020 05:36:30< vultraz> then again, that could either be 'this function returns commands' or 'this function executes these commands'. 20161020 05:36:38< vultraz> possibly the former 20161020 05:36:42< celticminstrel> It's the former, yes. 20161020 05:36:56< celticminstrel> It returns a list of commands, and the engine executes them. 20161020 05:37:13< vultraz> but either way, who executes the commands is semantics 20161020 05:37:20< celticminstrel> Well, not really. 20161020 05:37:33< vultraz> because from the programmer's point of view, it doesn't *matter* 20161020 05:37:37< celticminstrel> No, it does. 20161020 05:37:53< celticminstrel> If you have multiple commands to execute, it does make a difference. 20161020 05:38:24< vultraz> you should talk to Sirp more about this, since im not a ffl expert and i haven't worked with it in a few months 20161020 05:38:49< vultraz> But a *major* point here is that FFL can generate the list of commands 20161020 05:38:54< celticminstrel> Well, the way FFL works isn't as important as how WFL works. 20161020 05:39:00< vultraz> executor notwithstanding 20161020 05:39:04< vultraz> we *cannot* 20161020 05:39:07< celticminstrel> WFL can indeed generate a list of commands, but currently only the AI code actually knows to execute them. 20161020 05:39:28< vultraz> the execution of the [image] tag in this case is left to the GUI2 canvas 20161020 05:39:32< vultraz> it's dumb 20161020 05:39:35< celticminstrel> So, the GUI2 code could potentially be augmented to execute commands, in a way. 20161020 05:39:41< vultraz> it knows nothing except the value of its tags 20161020 05:39:47< celticminstrel> But I don't think you can make it work with an [image] tag. 20161020 05:39:49< vultraz> which can be evaluated as formulas 20161020 05:40:02< celticminstrel> You will need a new tag, for example [animation] with a formula= key. 20161020 05:40:21< vultraz> as I said, in FFL all of this would be left to the author 20161020 05:40:24< vultraz> not the core framework 20161020 05:40:34< celticminstrel> I'm not sure what you're talking about. 20161020 05:40:56< celticminstrel> Probably in Anura the engine is set up to accept commands in all contexts, or something; but that's not the case in Wesnoth. 20161020 05:41:01< vultraz> perhaps im getting slightly confused again 20161020 05:41:14< celticminstrel> At present only FormulaAI can handle actions. 20161020 05:41:20< vultraz> since in anura there's a distinction between the c++ engine and the ffl code which defines behavior 20161020 05:41:47< vultraz> and i don't know how it would handle external modules of modules 20161020 05:41:52< vultraz> (ie, umc) 20161020 05:42:41< vultraz> i wesnoth2, all behavior is defined in ffl, NOT c++ 20161020 05:42:55< vultraz> so you have a full, unified environment for "scripting" 20161020 05:42:58 * celticminstrel shrugs. 20161020 05:46:02< vultraz> I believe if i were doing this there, what would be done is a new storyscreen object would be written with a command property which would do some magic stuff with schedule() and spawn(). it would also own two button objects whose command callbacks would call set(page, page + 1) or something 20161020 05:46:42< vultraz> but here we have to figure out how to change the value of [image] name= 20161020 05:47:15< celticminstrel> You really don't pay attention to what I say, do you? 20161020 05:47:30< vultraz> maybe i just don't understand it :| 20161020 05:47:48< vultraz> at best, i can see the dialog using a timer to change this value 20161020 05:47:51< celticminstrel> I don't think you can do this with [image]. You need a new tag that can execute formula actions. 20161020 05:48:03< vultraz> a c++ time 20161020 05:48:10< celticminstrel> Actually I was thinking at one point that I should refactor the base action class out of the AI code, so maybe I'll do that soon. 20161020 05:48:25< celticminstrel> (It'd also simplify FormulaAI a little.) 20161020 05:48:41< vultraz> is there any reason a new key couldn't be added to [image] instead? 20161020 05:48:45< celticminstrel> You could use a C++ timer that changes the formula variables, sure. 20161020 05:49:27< vultraz> I guess the only reason set works in ffl is [image] in that case would be an object 20161020 05:49:30< celticminstrel> Well, I'm not 100% sure. You might be able to use a key in [image], but I actually think it makes more sense to use a different tag - what you're describing isn't really just an image anymore. 20161020 05:49:53< celticminstrel> That's why I suggested an [animation] tag. 20161020 05:50:53< celticminstrel> You'd probably only need one action function - image(). 20161020 05:51:17< vultraz> maybe the c++ time is simplest 20161020 05:51:22< celticminstrel> Some functions for manipulating the image might be useful too, but those wouldn't necessarily be actions. 20161020 05:51:38< celticminstrel> Yeah, you could use a C++ timer that changes the formula variables, if you prefer. 20161020 05:51:53< celticminstrel> I'm not really sure which way is simpler, to be honest, 20161020 05:52:11< vultraz> im feeling sidetracked here since i don't really know what the equivalent of a formula variable is in FFL... 20161020 05:52:31< celticminstrel> By the way, if you want to release 1.13.6 without pushing back the deadline yet again, I strongly suggest not working on this in master. 20161020 05:52:33< vultraz> does it eve have them.. 20161020 05:52:37< celticminstrel> Probably. 20161020 05:52:39< vultraz> even 20161020 05:52:44< celticminstrel> I mean, you have objects where you can do x.y. 20161020 05:52:52< celticminstrel> The "y" would be a variable. 20161020 05:52:57< vultraz> right, but that's object properties 20161020 05:53:02< vultraz> they're defined in the object's FSON 20161020 05:53:05< celticminstrel> Formula variables are object properties. 20161020 05:53:11< vultraz> oh? 20161020 05:53:13< celticminstrel> The formula is evaluated on an object. 20161020 05:53:16< vultraz> properties of what object 20161020 05:53:24< celticminstrel> The properties of that object are accessible without the dot notation. 20161020 05:53:51< celticminstrel> In the case of GUI2, the object is a map_formula_callable, which is the most basic type of object that you can just add whatever values you want to. 20161020 05:53:59< vultraz> I see 20161020 05:54:09< vultraz> so there's a slight functional difference here 20161020 05:54:27< celticminstrel> The object being evaluated on is accessible as self. 20161020 05:54:32< celticminstrel> So self.x is the same as just x. 20161020 05:54:33< vultraz> you cannot make your own objects in wfl 20161020 05:54:35< vultraz> is that right 20161020 05:54:47< celticminstrel> (Unless you're in a context where self is reassigned.) 20161020 05:54:51< vultraz> well, you can't in ffl either 20161020 05:54:58< celticminstrel> It's mostly right. There are some functions that return objects, such as loc(). 20161020 05:55:15< vultraz> but see, now this confuses me 20161020 05:55:22< celticminstrel> But you can't create your own custom objects in WFL. 20161020 05:55:30< celticminstrel> You can however create a map which can be used like an object. 20161020 05:55:55< celticminstrel> ie, ['ultimate_answer' => 42].ultimate_answer evaluates to 42. 20161020 05:56:16< vultraz> is you have x = (foo) and y = (bar) and foo and bar are in the same object 20161020 05:56:18< celticminstrel> (Maps in WFL use [] instead of {}.) 20161020 05:56:31< vultraz> why cannot you do foo = something 20161020 05:56:40< celticminstrel> I don't even know what you're asking. 20161020 05:56:53< celticminstrel> Note that = means equality in WFL, not assignment. 20161020 05:57:07< vultraz> right, right 20161020 05:57:09< celticminstrel> (That's true in FFL too, right?) 20161020 05:57:31< vultraz> I mean why cannot we have something like the set() function if all formula variables are object properties :/ 20161020 05:57:36< vultraz> i mean, you can do it from c++ 20161020 05:57:38< vultraz> why not wfl 20161020 05:57:43< vultraz> that's what I don't get 20161020 05:58:22< celticminstrel> Well, there is one detail about the formula_callable stuff that I don't get... some attributes are supposedly labelled as "writeable" even though, as far as I know, there's no way to actually write to them... 20161020 05:58:53< celticminstrel> You can add a set() function that returns an action instructing the caller to change a variable, certainly. 20161020 05:59:09< celticminstrel> Though with the way WFL is used, that won't really work everywhere at the moment. 20161020 05:59:18-!- vincent_c [~bip@vcheng.org] has quit [Quit: Coyote finally caught me] 20161020 05:59:39< vultraz> Because tag = () is essentially evaluating the value for that tag? 20161020 05:59:43< vultraz> er 20161020 05:59:47< vultraz> s/tag/key 20161020 05:59:54-!- vincent_c [~bip@vcheng.org] has joined #wesnoth-dev 20161020 06:00:03< vultraz> it's not actually executing anything 20161020 06:00:07< celticminstrel> ? 20161020 06:00:26< celticminstrel> Is that parentheses? 20161020 06:00:32< vultraz> yes 20161020 06:00:38< celticminstrel> That's not valid WFL... 20161020 06:00:49< vultraz> it's just an example 20161020 06:01:02< vultraz> key = (1 + 1) 20161020 06:01:07< vultraz> all it does is evaluate 1 + 1 20161020 06:01:27< celticminstrel> No, it evaluates 1 + 1, then compares it to the variable "key" and returns 1 if equal, 0 if not. 20161020 06:01:44< vultraz> I meant in a WML context 20161020 06:01:47< celticminstrel> Oh. 20161020 06:01:51< celticminstrel> Well, you'd need quotes. 20161020 06:01:55< celticminstrel> key = "(1 + 1)" 20161020 06:02:02< vultraz> apparently not, actually 20161020 06:02:03< celticminstrel> But yeah, that'll just set the key to 2. 20161020 06:02:10< celticminstrel> You do in that case, because there's a +. 20161020 06:02:19< celticminstrel> It's best to just use them always. 20161020 06:02:19< vultraz> oh 20161020 06:03:10< vultraz> so I don't think key = "(1 + 1; set(var, value))" would work 20161020 06:03:14< vultraz> nor would be elegant 20161020 06:03:16< vultraz> :/ 20161020 06:04:14< celticminstrel> The semicolon only ever separates function definitions. 20161020 06:04:25< vultraz> ah 20161020 06:04:33< celticminstrel> So, "def() ...; def() ...; formula" is the general form of a WFL formula. 20161020 06:04:44< vultraz> well in ffl it and the comma control parallel vs successive execution. 20161020 06:04:56< vultraz> er, switch those last two 20161020 06:04:57-!- iceiceice [~chris@unaffiliated/iceiceice] has joined #wesnoth-dev 20161020 06:05:07< celticminstrel> Which is which? 20161020 06:05:14< vultraz> commas are parallel 20161020 06:05:25< vultraz> semicolons are successive. 20161020 06:05:31< celticminstrel> Well, WFL doesn't have parallel execution though. 20161020 06:05:41< celticminstrel> So commas end up being successive. 20161020 06:05:47< vultraz> right 20161020 06:05:54< celticminstrel> (But that requires square brackets to produce a list.) 20161020 06:06:04< celticminstrel> (The comma isn't an operator in WFL.) 20161020 06:06:45-!- Rhonda [~rhonda@wesnoth/developer/rhonda] has quit [Remote host closed the connection] 20161020 06:06:56< vultraz> anyway, you say WFL *can* generate a command list... so I wonder if.. 20161020 06:07:08< celticminstrel> Yeah, that's how FormulaAI works. 20161020 06:07:29< celticminstrel> All the functions that generate commands are in the AI function table and not available to general WFL. 20161020 06:07:52< celticminstrel> But there's no particular reason why functions that generate commands cannot be made available to other WFL. 20161020 06:07:56< vultraz> were it enabled, key = "(commands [1 + 1], [set(var, val)])" would somehow work 20161020 06:08:03< vultraz> pseudocode again 20161020 06:08:13< celticminstrel> Possibly not to general WFL, since most of the current contexts require a string or numeric result. 20161020 06:08:30< celticminstrel> Uhh, very pseudocode. 20161020 06:08:54< celticminstrel> Also, I think you're reading too much into this. 20161020 06:09:01< vultraz> though why that would need to be a list... I don't know.. 20161020 06:09:04< vultraz> yeah, probably 20161020 06:09:09< vultraz> likely the c++ approach is best 20161020 06:09:21< celticminstrel> Every place where Wesnoth currently calls a WFL formula, it has an expectation about what kind of result the formula should return. 20161020 06:09:30< celticminstrel> Usually a string or number, depending on the key. 20161020 06:09:49< celticminstrel> So if the formula returned a list, or a command, or anything else... the code would not know what to do with it. 20161020 06:09:57< celticminstrel> Especially the places using the tformula class. 20161020 06:10:09< vultraz> in ffl there's def()->rettype for that 20161020 06:10:11< celticminstrel> The tformula class is essentially "a formula that returns type X". 20161020 06:10:27-!- Rhonda [~rhonda@anguilla.debian.or.at] has joined #wesnoth-dev 20161020 06:10:35< celticminstrel> So a formula stored in tformula must return a number. 20161020 06:10:44< celticminstrel> And a formula stored in tformula must return a string. 20161020 06:10:47< vultraz> hm, I see 20161020 06:11:22< celticminstrel> So what you'd need to use actions in GUI2 is something like a key which is stored in a C++ variable of type tformula. 20161020 06:11:38< celticminstrel> (formula_action is a hypothetical class, it doesn't currently exist.) 20161020 06:11:59< celticminstrel> (Currently all the AI actions do not have a common superclass, IIRC.) 20161020 06:12:11< celticminstrel> (Other than the general formula_callable class, of course.0 20161020 06:12:13< celticminstrel> ^) 20161020 06:13:50< vultraz> i feel we just wasted an hour and got nowhere :P\ 20161020 06:14:00< vultraz> except to conclude that c++ is best 20161020 06:14:03< celticminstrel> Was it that long? 20161020 06:14:11< celticminstrel> I do get the impression that we've been going in circles though. 20161020 06:14:24< celticminstrel> I don't know if C++ is best, but it should work, I think. 20161020 06:14:36< vultraz> almost 2 hours, actually :D 20161020 06:15:08< celticminstrel> Interesting. gfgtdf seemed to believe that Lua map generators cannot produce a scenario, but it appears that they are set up to do so... 20161020 06:15:55< vultraz> anyway 20161020 06:16:02< vultraz> sorry if i made it sound like i dont listen to you 20161020 06:21:19< celticminstrel> vultraz: I thought there was a random cave scenario in multiplayer, was I wrong? 20161020 06:21:33< vultraz> there ixs 20161020 06:21:35< vultraz> is 20161020 06:22:03< celticminstrel> In data/multiplayer/scenarios I can only see desert, marsh, winter, and standard... 20161020 06:22:26-!- Greywhind [~Greywhind@c-71-232-25-123.hsd1.ma.comcast.net] has joined #wesnoth-dev 20161020 06:22:43< vultraz> load up create 20161020 06:22:53< celticminstrel> No, I need to find the cfg for it. 20161020 06:25:13< vultraz> lua/cave_map_generator.lua? 20161020 06:25:40< celticminstrel> Uhh, no. 20161020 06:25:46< celticminstrel> That's the Lua, not the cfg. 20161020 06:26:53< celticminstrel> Looks like I was wrong after all...? 20161020 06:32:19-!- heirecka [~heirecka@exherbo/developer/heirecka] has quit [] 20161020 06:33:13-!- heirecka [~heirecka@p20030073AE5C8600BA6E79051A3EEFAC.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161020 06:35:33-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 06:39:38-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 245 seconds] 20161020 06:40:31-!- heirecka [~heirecka@p20030073AE5C8600BA6E79051A3EEFAC.dip0.t-ipconnect.de] has quit [] 20161020 06:42:09-!- heirecka [~heirecka@exherbo/developer/heirecka] has joined #wesnoth-dev 20161020 06:49:10< celticminstrel> vultraz: Yeah, there isn't one. 20161020 06:50:58-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20161020 06:54:45-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has joined #wesnoth-dev 20161020 06:56:46-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has joined #wesnoth-dev 20161020 07:20:22-!- irker592 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20161020 07:20:22< irker592> wesnoth: Gregory A Lundberg wesnoth:master 67e02fd62469 / src/CMakeLists.txt: Fix bug: CMake out of tree https://github.com/wesnoth/wesnoth/commit/67e02fd62469ab20434b9f7d8ef31f6a5d0a26fd 20161020 07:20:24< irker592> wesnoth: Charles Dang wesnoth:master e15e5aed5856 / src/CMakeLists.txt: Merge pull request #833 from GregoryLundberg/GL_Fix_CMake_for_Lua https://github.com/wesnoth/wesnoth/commit/e15e5aed5856cb67c4b04973cc36f56ad5a4f04f 20161020 07:20:48< matthiaskrgr_> :D 20161020 07:21:26< celticminstrel> I wish you'd warned me so I could push first... 20161020 07:22:10< irker592> wesnoth: Celtic Minstrel wesnoth:master 6513d6ac018c / src/ (11 files in 4 dirs): fixup! Fix Lua-invoked dialogs not showing before prestart https://github.com/wesnoth/wesnoth/commit/6513d6ac018cc8a6f346abb3f007de993401694f 20161020 07:22:46< celticminstrel> ^ fixes the hiding issue that tad noted 20161020 07:24:38-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20161020 07:25:07-!- matthiaskrgr_ is now known as matthiaskrgr 20161020 07:25:31< celticminstrel> mattsc: Do you know if changing the interface of location_set:iter would break a huge amount of code? 20161020 07:25:54-!- boucman_work [~boucman@gre92-5-82-237-199-7.fbx.proxad.net] has joined #wesnoth-dev 20161020 07:26:28< celticminstrel> Also, what's the point of stable_iter...? 20161020 07:34:35< matthiaskrgr> as a farmer, you might have numerous stables. you will want to iterate over these in some cases 20161020 07:34:38< matthiaskrgr> *hides* 20161020 07:35:42< vultraz> *facedesk* 20161020 07:35:47< celticminstrel> vultraz: Any chance that you could create a GUI2 dialog for cave generator configuration options? (I can do it myself if you prefer, though.) It'd have to be in Lua format, ie with T.tag{key=value} and such. 20161020 07:36:08 * celticminstrel sleep now. 20161020 07:36:22-!- celticminstrel is now known as celmin|sleep 20161020 07:37:15< vultraz> celmin|sleep: you do it please 20161020 07:38:00< celmin|sleep> I guess it wouldn't be a super-complicated one anyway. 20161020 07:43:32-!- Jetrel [~Jetrel@c-73-228-139-39.hsd1.mn.comcast.net] has quit [Read error: Connection reset by peer] 20161020 07:44:03-!- Jetrel [~Jetrel@2001:558:6014:1e:2422:435:dd84:bbf3] has joined #wesnoth-dev 20161020 07:46:01-!- horrowind [~Icedove@2a02:810a:8380:10a8:21b:fcff:fee3:c3ff] has joined #wesnoth-dev 20161020 08:23:43-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 08:27:58-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 250 seconds] 20161020 08:34:00-!- horrowind [~Icedove@2a02:810a:8380:10a8:21b:fcff:fee3:c3ff] has quit [Quit: horrowind] 20161020 08:49:05-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Remote host closed the connection] 20161020 08:58:56-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has quit [Quit: .] 20161020 09:18:54-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has joined #wesnoth-dev 20161020 09:25:19-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20161020 10:11:57-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 10:16:22-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 256 seconds] 20161020 10:19:49-!- mkdroid [~null@unaffiliated/matthiaskrgr] has joined #wesnoth-dev 20161020 10:22:12-!- irker592 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20161020 10:35:12-!- mkdroid [~null@unaffiliated/matthiaskrgr] has quit [Quit: I'll be back!] 20161020 11:04:04-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161020 11:06:38-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 11:10:40-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 244 seconds] 20161020 11:32:52-!- boucman_work [~boucman@gre92-5-82-237-199-7.fbx.proxad.net] has quit [Excess Flood] 20161020 11:33:02-!- boucman_work [~boucman@gre92-5-82-237-199-7.fbx.proxad.net] has joined #wesnoth-dev 20161020 11:54:36-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20161020 11:55:03-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161020 12:17:22-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20161020 12:21:53-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 12:22:55-!- irker366 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20161020 12:22:55< irker366> wesnoth: gfgtdf wesnoth:master 7b44cee405f1 / src/editor/map/editor_map.cpp: fix buffer overflow while expanding map https://github.com/wesnoth/wesnoth/commit/7b44cee405f1cbbcf5515f6fee1540b55c48dd36 20161020 12:26:40-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 260 seconds] 20161020 12:41:58-!- horrowind [~Icedove@2a02:810a:8380:10a8:21b:fcff:fee3:c3ff] has joined #wesnoth-dev 20161020 12:53:36-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: mattsc] 20161020 13:05:16-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20161020 13:09:13-!- Appleman1234_ [~Appleman1@KD106154015081.au-net.ne.jp] has joined #wesnoth-dev 20161020 13:10:03-!- Appleman1234 [~Appleman1@KD106154015144.au-net.ne.jp] has quit [Disconnected by services] 20161020 13:10:14-!- Appleman1234_ is now known as Appleman1234 20161020 13:40:13-!- Bonobo [~Bonobo@2001:44b8:254:3200:3591:b28:85fa:df47] has quit [Quit: Leaving] 20161020 14:03:23-!- JyrkiVesterinen [~JyrkiVest@nblzone-242-23.nblnetworks.fi] has quit [Quit: .] 20161020 14:04:42-!- Shiki [~Shiki@141.39.226.226] has joined #wesnoth-dev 20161020 14:04:49-!- Shiki is now known as shiki|sevu 20161020 14:42:21-!- shiki|sevu [~Shiki@141.39.226.226] has quit [Remote host closed the connection] 20161020 14:51:45-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: mattsc] 20161020 14:57:44-!- gfgtdf [~chatzilla@x4e363b46.dyn.telefonica.de] has joined #wesnoth-dev 20161020 14:57:59-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has joined #wesnoth-dev 20161020 15:08:10-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20161020 15:09:41-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161020 15:12:08-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has joined #wesnoth-dev 20161020 15:17:15-!- mattsc [~mattsc@wesnoth/developer/mattsc] has joined #wesnoth-dev 20161020 15:19:44-!- boucman_work [~boucman@gre92-5-82-237-199-7.fbx.proxad.net] has quit [Remote host closed the connection] 20161020 15:23:14-!- irker366 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20161020 15:41:13-!- tad_carlucci [~lundberg@173.217.65.103] has joined #wesnoth-dev 20161020 15:43:10 * vultraz ponders the addons manager UI 20161020 15:43:55-!- mjs-de [~mjs-de@x4e31eefa.dyn.telefonica.de] has joined #wesnoth-dev 20161020 15:44:03-!- irker958 [~irker@uruz.ai0867.net] has joined #wesnoth-dev 20161020 15:44:03< irker958> wesnoth: Charles Dang wesnoth:master 41672422a687 / data/gui/macros/_initial.cfg: Colorize spacer lines https://github.com/wesnoth/wesnoth/commit/41672422a687a35ee34c8baef8b73e3900ec4a3e 20161020 15:44:05< vultraz> shadowm: ^ 20161020 15:57:36-!- mjs-de [~mjs-de@x4e31eefa.dyn.telefonica.de] has quit [Remote host closed the connection] 20161020 16:10:13-!- prkc [~prkc@46.166.138.134] has quit [Ping timeout: 248 seconds] 20161020 16:14:06-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 16:14:08-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20161020 16:14:15-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 16:15:30-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has joined #wesnoth-dev 20161020 16:23:38-!- boucman_work [~boucman@bob75-2-81-56-46-209.fbx.proxad.net] has joined #wesnoth-dev 20161020 16:25:50-!- prkc [~prkc@catv-89-133-39-230.catv.broadband.hu] has joined #wesnoth-dev 20161020 16:31:18-!- boucman_work [~boucman@bob75-2-81-56-46-209.fbx.proxad.net] has quit [Ping timeout: 250 seconds] 20161020 16:36:42< irker958> wesnoth: mattsc wesnoth:master 25eb3dd20f72 / data/ai/micro_ais/cas/ca_fast_attack_utils.lua: Fast Micro AI: fix attack_filter when excluding leader https://github.com/wesnoth/wesnoth/commit/25eb3dd20f722a7ef76fde18d61cd565cbbda819 20161020 16:36:44< irker958> wesnoth: mattsc wesnoth:master fef404fdb912 / data/ai/micro_ais/cas/ (ca_fast_attack_utils.lua ca_fast_combat.lua ca_fast_combat_leader.lua): Fast Micro AI: simplify code by using new ai.aspect.attacks https://github.com/wesnoth/wesnoth/commit/fef404fdb9128e43adfe9c2079b895b5c6f4f0cf 20161020 16:37:21< mattsc> celmin|sleep: ^ I did a lot of testing of this, I think I got it all right. 20161020 16:40:16< mattsc> As for location_set:iter, well, your guess is as good as mine. 20161020 16:41:53< mattsc> I don’t expect too many UMC authors use location sets, but some people do some pretty complex stuff in Lua, so I am sure somebody does. And it’s used approximately 40 times in mainline (almost all of those in AI code). 20161020 16:42:36< tad_carlucci> mattsc, Oh, good. Looks like ice found and fixed that crash from your typo in an AI. 20161020 16:43:03< mattsc> tad_carlucci: nice; I’ll test that in a little while 20161020 16:43:43< tad_carlucci> Same here. Still sync'ing and make'ing 20161020 16:46:28< tad_carlucci> mattsc, No joy here. 20161020 16:48:00-!- boucman_work [~boucman@167.17.90.92.rev.sfr.net] has joined #wesnoth-dev 20161020 16:51:18< mattsc> tad_carlucci: that’s no fun then 20161020 16:52:31< tad_carlucci> mattsc, Well, I guess I'll get back to tracking it down. We're in the area, just need to figure out what to do to fix it. I was sorta hoping that ice's change would fix it. 20161020 16:59:11< mattsc> tad_carlucci, iceiceice: confirmed, I still get the panic also 20161020 17:09:20-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161020 17:12:54< zookeeper> tad_carlucci, in https://github.com/wesnoth/wesnoth/pull/701/commits/f2d6a00a8dc you refer to unit.id. do custom events for which no primary unit has been given automatically inherit it from the event from which they are fired from? 20161020 17:15:52< tad_carlucci> I'm not sure what you're asking but I added the check because he was speaking and it didn't seem right for him to do so. 20161020 17:16:00< zookeeper> (also it's easier to just do those sorts of checks in the [message] filter; x,y=$x1,$y1 [not] id=Delfador [/not] for example... but not worth changing it just for that reason) 20161020 17:16:17< zookeeper> my question is whether you tested that that actually works? :p 20161020 17:16:56< zookeeper> i mean, i suppose it has to work if the original message worked 20161020 17:16:57< tad_carlucci> zookeeper, Of course I tested. And I probably didn't know about filters inside message way back when I wrote that. 20161020 17:17:03< zookeeper> all right 20161020 17:17:33 * zookeeper is almost halfway through... 20161020 17:18:58-!- iceiceice [~chris@unaffiliated/iceiceice] has quit [Ping timeout: 250 seconds] 20161020 17:19:05< tad_carlucci> zookeeper, ISTC I tried every way I could think of for those custom events because it made me nervious how they were setting primary and secondary once I was looking for how to suppress Delfador's comment there 20161020 17:22:24-!- boucman_work [~boucman@167.17.90.92.rev.sfr.net] has quit [Remote host closed the connection] 20161020 17:25:49< zookeeper> tad_carlucci, how does that [modify_unit] make delfador advance a level? https://github.com/wesnoth/wesnoth/pull/701/commits/cb1fd2ce2 20161020 17:26:31 * zookeeper doesn't get why it (sh/w)ould 20161020 17:27:00< tad_carlucci> zookeeper, Ask celmin. I asked on irc and that was his suggestion. It works, that's all I know. 20161020 17:27:08< tad_carlucci> zookeeper, Does seem odd. 20161020 17:28:16-!- iceiceice [~chris@pool-173-61-153-221.cmdnnj.fios.verizon.net] has joined #wesnoth-dev 20161020 17:28:43< celmin|sleep> I just got a crash from a syntax error in location_set.lua. 20161020 17:29:00< celmin|sleep> Any progress on fixing the crashes? 20161020 17:29:30-!- celmin|sleep is now known as celticminstrel 20161020 17:30:51< tad_carlucci> ice put in a patch but no joy. I'm stepping through the crash site hoping to see whay's up 20161020 17:31:10< celticminstrel> Yeah, I saw the patch and the fact that it didn't help. 20161020 17:31:11< zookeeper> i was present when you discussed type="" before, but presumably i assumed you mean actually putting in the target type in the quotes 20161020 17:31:45< tad_carlucci> zookeeper, The question was how to do it without knowing the target, seems that's it there. 20161020 17:31:48< celticminstrel> ... 20161020 17:31:50< zookeeper> [modify_unit] type="" advancing the unit makes no sense to me, although i can't say whether it's a useful shortcut to have or not 20161020 17:32:15< tad_carlucci> zookeeper, I concur. But it is what it is and it works so I moved on 20161020 17:32:24< celticminstrel> I just launched up HTTT, did choose_level, selected #17, and... game closes, no errors whatsoever. 20161020 17:32:38< celticminstrel> (Probably related to my local changes, but the lack of error messages is disturbing.) 20161020 17:32:57-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has joined #wesnoth-dev 20161020 17:33:02< tad_carlucci> celticminstrel, Seens that before, too. Probably caught and exit()'d 20161020 17:33:24< zookeeper> tad_carlucci, okay, i'll let them be for now then 20161020 17:34:27< tad_carlucci> zookeeper, Personally, if you know of a better (more apparent) way to "Advance to the next level, and update XP accrodingly" I'd be willing to change. 20161020 17:35:28< zookeeper> tad_carlucci, can't remember off-hand anything that i know works reliably 20161020 17:36:01< tad_carlucci> zookeeper, which is probably why that hack-ish way was added. 20161020 17:36:44< tad_carlucci> zookeeper, ISTR checking the wiki and seeing something about type="" there, too. 20161020 17:39:48-!- makruni [~username@unaffiliated/matthiaskrgr] has joined #wesnoth-dev 20161020 17:41:40< zookeeper> phew, got through all. i guess i'll merge... 20161020 17:42:19< zookeeper> 60 commits incoming, cover your eyes 20161020 17:42:26< DeFender1031> 50?! 20161020 17:42:29< DeFender1031> 60* 20161020 17:42:40< DeFender1031> is there no way to pre-merge them or something? 20161020 17:43:11< zookeeper> well they're real commits going in so we still want them to go through here even if they're plentiful 20161020 17:43:52 * zookeeper presses the button and goes to grab a bite in the meantime 20161020 17:44:02< irker958> wesnoth: Gregory A Lundberg wesnoth:master b0c06d077d0d / data/campaigns/Delfadors_Memoirs/utils/misc.cfg: DM Remove unused macro https://github.com/wesnoth/wesnoth/commit/b0c06d077d0d38f0b014115c9f810e73075754e6 20161020 17:44:04< irker958> wesnoth: Gregory A Lundberg wesnoth:master d243b7ce2eee / data/campaigns/Delfadors_Memoirs/scenarios/ (3 files): DM Remove macro artifacts https://github.com/wesnoth/wesnoth/commit/d243b7ce2eee87ff24ce76ad99d4332c01aa7b36 20161020 17:44:06< irker958> wesnoth: Gregory A Lundberg wesnoth:master 8de87a2f651e / data/campaigns/Delfadors_Memoirs/scenarios/ (07_Night_in_the_Swamp.cfg 18_The_Portal_of_Doom.cfg): DM [if] must have [then] https://github.com/wesnoth/wesnoth/commit/8de87a2f651e68d97316a41f374d043750f3e541 20161020 17:44:08< irker958> wesnoth: Gregory A Lundberg wesnoth:master 26a238e8f7ac / data/campaigns/Delfadors_Memoirs/ (7 files in 2 dirs): DM Remove variable artifacts https://github.com/wesnoth/wesnoth/commit/26a238e8f7aca1d3f70fff4a01f4c79347b9e236 20161020 17:44:10< irker958> wesnoth: Gregory A Lundberg wesnoth:master 529ce87160da / data/campaigns/Delfadors_Memoirs/scenarios/03_The_Road_to_Weldyn.cfg: DM S03 Use new role features https://github.com/wesnoth/wesnoth/commit/529ce87160da94402a85b0dee2472c7eacb42f7a 20161020 17:44:12< irker958> wesnoth: Gregory A Lundberg wesnoth:master ee2d3999b768 / data/campaigns/Delfadors_Memoirs/scenarios/06_Swamps_of_Illuven.cfg: DM S06 Use gold.ogg sound https://github.com/wesnoth/wesnoth/commit/ee2d3999b768b53ff3b552c6b74e1ac7726dc8c2 20161020 17:44:14< irker958> wesnoth: Gregory A Lundberg wesnoth:master 23d1582739d7 / data/campaigns/Delfadors_Memoirs/ (5 files in 4 dirs): DM S07 Fix bug: Always early completion https://github.com/wesnoth/wesnoth/commit/23d1582739d7917d0241839dc9ef82f1f4421127 20161020 17:44:16< irker958> wesnoth: Gregory A Lundberg wesnoth:master eee874445824 / data/campaigns/Delfadors_Memoirs/scenarios/08_Ur_Thorodor.cfg: DM S08 Fix bug: Withdraw units at correct time https://github.com/wesnoth/wesnoth/commit/eee87444582447d03a3c8bc42402f744c96ed60b 20161020 17:44:18< irker958> wesnoth: Gregory A Lundberg wesnoth:master 604f2a03d414 / data/campaigns/Delfadors_Memoirs/scenarios/08_Ur_Thorodor.cfg: DM S08 Fix bug: Remove Delfador visual artifact https://github.com/wesnoth/wesnoth/commit/604f2a03d414b6a0473e035252d6eaf8f871206a 20161020 17:44:20< irker958> wesnoth: Gregory A Lundberg wesnoth:master e2610748e14a / data/campaigns/Delfadors_Memoirs/ (3 files in 3 dirs): DM S10 Animate gate opening https://github.com/wesnoth/wesnoth/commit/e2610748e14a132118991a27c24d082849fcbfe7 20161020 17:44:22< irker958> wesnoth: Gregory A Lundberg wesnoth:master e208f01770a0 / data/campaigns/Delfadors_Memoirs/scenarios/11_Wasteland.cfg: DM S11 Fix bug: Disallow recalls https://github.com/wesnoth/wesnoth/commit/e208f01770a0fc9eb1696928c71df7795f864610 20161020 17:44:24< irker958> wesnoth: Gregory A Lundberg wesnoth:master fe8d088fd389 / data/campaigns/Delfadors_Memoirs/ (scenarios/11_Wasteland.cfg utils/deaths.cfg): DM S11 Fix bug: Chantal defeat https://github.com/wesnoth/wesnoth/commit/fe8d088fd3891faca937342ec7338a9491e67f5c 20161020 17:44:26< irker958> wesnoth: Gregory A Lundberg wesnoth:master 80d15ec198b9 / data/campaigns/Delfadors_Memoirs/scenarios/11_Wasteland.cfg: DM S11 Fix bug: No recruits before Chantal https://github.com/wesnoth/wesnoth/commit/80d15ec198b9c6ed744fa5371e21611e94f94f7f 20161020 17:44:28< irker958> wesnoth: Gregory A Lundberg wesnoth:master b5608d032da1 / data/campaigns/Delfadors_Memoirs/scenarios/11_Wasteland.cfg: DM S11 Fix bug: Inconsistent objectives https://github.com/wesnoth/wesnoth/commit/b5608d032da1a730891a4ce7087cea33ac60a07d 20161020 17:44:30< irker958> wesnoth: Gregory A Lundberg wesnoth:master 997887cddeb4 / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Fix bugs: Several errors with Mages https://github.com/wesnoth/wesnoth/commit/997887cddeb47cc5119536f981c4077b2be107f7 20161020 17:44:32< irker958> wesnoth: Gregory A Lundberg wesnoth:master f2d6a00a8dcb / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Fix bug: Delfador knows about undead https://github.com/wesnoth/wesnoth/commit/f2d6a00a8dcbacdda50566e720e1916bcc874a1d 20161020 17:44:34< irker958> wesnoth: Gregory A Lundberg wesnoth:master 0229a24e052d / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Fix bug: Objectives already changed https://github.com/wesnoth/wesnoth/commit/0229a24e052d529d4263291f48865710b89c696b 20161020 17:44:36< irker958> wesnoth: Gregory A Lundberg wesnoth:master c5e60b846025 / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Fix bug: No objectives change https://github.com/wesnoth/wesnoth/commit/c5e60b846025332aebfc4031da751da1c921f6a6 20161020 17:44:38< irker958> wesnoth: Gregory A Lundberg wesnoth:master 3cf1e5a8e93a / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Fix bug: Niktor may be dead https://github.com/wesnoth/wesnoth/commit/3cf1e5a8e93aa9031184b6f623c70d031fc78989 20161020 17:44:40< irker958> wesnoth: Gregory A Lundberg wesnoth:master 9faeaf561bc2 / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Fix bug: Arpus may be dead https://github.com/wesnoth/wesnoth/commit/9faeaf561bc2ce6f1608bb9994774bef6e4eaf59 20161020 17:44:42< irker958> wesnoth: Gregory A Lundberg wesnoth:master f86b3c99ddd7 / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Fix bug: Inconsistent objectives https://github.com/wesnoth/wesnoth/commit/f86b3c99ddd7344eabbd36ac4769d6f617c1ca8e 20161020 17:44:44< irker958> wesnoth: Gregory A Lundberg wesnoth:master 971353580c35 / data/campaigns/Delfadors_Memoirs/scenarios/13_The_Return_of_Trouble.cfg: DM S13 Fix bug: Disallow recalls https://github.com/wesnoth/wesnoth/commit/971353580c35bf830e3358d1a99a72000ac7decb 20161020 17:44:46< irker958> wesnoth: Gregory A Lundberg wesnoth:master 407981422803 / data/campaigns/Delfadors_Memoirs/utils/sides.cfg: DM S13 Fix bug: Chantal returns in poor condition https://github.com/wesnoth/wesnoth/commit/4079814228038464b94c1f9a8a71b71a5d17d45c 20161020 17:44:48< irker958> wesnoth: Gregory A Lundberg wesnoth:master a5090357679a / data/campaigns/Delfadors_Memoirs/scenarios/13_The_Return_of_Trouble.cfg: DM S13 Fix bug: Chantal moves properly https://github.com/wesnoth/wesnoth/commit/a5090357679a7fab725294dc8423d0fa23f5907f 20161020 17:44:50< irker958> wesnoth: Gregory A Lundberg wesnoth:master f62cec98650d / data/campaigns/Delfadors_Memoirs/scenarios/14_Shadows.cfg: DM S14 Fix bug: Rudimil might be dead https://github.com/wesnoth/wesnoth/commit/f62cec98650d50ac5165856fba04f0747de6ee81 20161020 17:44:52< irker958> wesnoth: Gregory A Lundberg wesnoth:master 87a0212da41d / data/campaigns/Delfadors_Memoirs/utils/sides.cfg: DM S14 Fix bug: Clear fog around Delfador https://github.com/wesnoth/wesnoth/commit/87a0212da41d80a2dd1868b93daf16ac1eb6e0db 20161020 17:44:54< irker958> wesnoth: Gregory A Lundberg wesnoth:master 0e511658086f / data/campaigns/Delfadors_Memoirs/scenarios/15_Save_the_King.cfg: DM S15 Chantal already recalled https://github.com/wesnoth/wesnoth/commit/0e511658086f30c0bf36a5016652f0f2f510e9ef 20161020 17:44:56< irker958> wesnoth: Gregory A Lundberg wesnoth:master aaaaa7ee3bcb / data/campaigns/Delfadors_Memoirs/scenarios/16_Dark_Sky_Over_Weldyn.cfg: DM S16 Fix bug: Unexplained gold https://github.com/wesnoth/wesnoth/commit/aaaaa7ee3bcb2f43369be7a7d44baeaa4a28d131 20161020 17:44:58< irker958> wesnoth: Gregory A Lundberg wesnoth:master 17a7664f097e / data/campaigns/Delfadors_Memoirs/scenarios/18_The_Portal_of_Doom.cfg: DM S18 Highlight Iliah-Malal https://github.com/wesnoth/wesnoth/commit/17a7664f097eedb6cc0da69a17c41734adcfde53 20161020 17:45:00< irker958> wesnoth: Gregory A Lundberg wesnoth:master e83101a78515 / data/campaigns/Delfadors_Memoirs/scenarios/19_Showdown_in_the_Northern_Swamp.cfg: DM S19 Fix bug: Mismatched shroud https://github.com/wesnoth/wesnoth/commit/e83101a78515ec5d7ae8f08cafab9fdb5a9c09d1 20161020 17:45:02< irker958> wesnoth: Gregory A Lundberg wesnoth:master 7215b4403bd9 / data/campaigns/Delfadors_Memoirs/scenarios/19_Showdown_in_the_Northern_Swamp.cfg: DM S19 Fix bug: Defeat on undead death https://github.com/wesnoth/wesnoth/commit/7215b4403bd96266e7e4e7eb6389d161875bb8e0 20161020 17:45:04< irker958> wesnoth: Gregory A Lundberg wesnoth:master afe5fc1ca24d / data/campaigns/Delfadors_Memoirs/scenarios/19_Showdown_in_the_Northern_Swamp.cfg: DM S19 Kalenz is available https://github.com/wesnoth/wesnoth/commit/afe5fc1ca24d6c23596ac83e39bc0ffc080cb614 20161020 17:45:06< irker958> wesnoth: Gregory A Lundberg wesnoth:master e59cb908e093 / data/campaigns/Delfadors_Memoirs/scenarios/19_Showdown_in_the_Northern_Swamp.cfg: DM S19 Bring out your dead https://github.com/wesnoth/wesnoth/commit/e59cb908e0932505e272ce223cb067bbbcff886e 20161020 17:45:08< irker958> wesnoth: Gregory A Lundberg wesnoth:master 6603003e6292 / data/campaigns/Delfadors_Memoirs/utils/sides.cfg: DM S19 Fix bug: Kalenz returns in poor shape https://github.com/wesnoth/wesnoth/commit/6603003e6292922b8de8953c607148d814540d0d 20161020 17:45:10< irker958> wesnoth: Gregory A Lundberg wesnoth:master 68483ba98469 / data/campaigns/Delfadors_Memoirs/ (scenarios/20_Prince_of_Wesnoth.cfg utils/sides.cfg): DM S20 Since you've been away https://github.com/wesnoth/wesnoth/commit/68483ba98469a0d51a42344c2a4eeacfe7b4d264 20161020 17:45:12< irker958> wesnoth: Gregory A Lundberg wesnoth:master cb1fd2ce2c34 / data/campaigns/Delfadors_Memoirs/utils/sides.cfg: DM S20 Delfador's been busy, too https://github.com/wesnoth/wesnoth/commit/cb1fd2ce2c3453d5d9912eff072acdea1832e18d 20161020 17:45:14< irker958> wesnoth: Gregory A Lundberg wesnoth:master 8d3894a56554 / data/campaigns/Delfadors_Memoirs/scenarios/21_Clash_at_the_Manor.cfg: DM S21 Fix bug: Incomplete objectives https://github.com/wesnoth/wesnoth/commit/8d3894a5655410746793eeebf3ce10f397d5b77c 20161020 17:45:16< irker958> wesnoth: Gregory A Lundberg wesnoth:master d1c6a4ab0c27 / data/campaigns/Delfadors_Memoirs/ (4 files in 2 dirs): DM Fix bug: Kalenz takes over https://github.com/wesnoth/wesnoth/commit/d1c6a4ab0c27bf98ec5bbd4f03e65d331a9cf45d 20161020 17:45:18< irker958> wesnoth: Gregory A Lundberg wesnoth:master 430d19569b31 / data/campaigns/Delfadors_Memoirs/ (3 files in 2 dirs): DM Make heros https://github.com/wesnoth/wesnoth/commit/430d19569b31b28d1dce0799798cee9e2fde2e3d 20161020 17:45:20< irker958> wesnoth: Gregory A Lundberg wesnoth:master f8358bdfb35c / data/campaigns/Delfadors_Memoirs/ (3 files in 2 dirs): DM Hide unneeded sides https://github.com/wesnoth/wesnoth/commit/f8358bdfb35cd60effec6dbda9f7d3fe5560a2cb 20161020 17:45:22< irker958> wesnoth: Gregory A Lundberg wesnoth:master 76b549987c93 / data/campaigns/Delfadors_Memoirs/ (23 files in 2 dirs): DM Align teams and team names https://github.com/wesnoth/wesnoth/commit/76b549987c9389cc1b24fab92de7c0f4b6529222 20161020 17:45:24< irker958> wesnoth: Gregory A Lundberg wesnoth:master f86630273e1b / data/campaigns/Delfadors_Memoirs/scenarios/ (05_Council_in_Weldyn.cfg 08_Ur_Thorodor.cfg 20_Prince_of_Wesnoth.cfg): DM Debug/Next_Level fix https://github.com/wesnoth/wesnoth/commit/f86630273e1b3d0f31dcecaff149e28bf5696f14 20161020 17:45:26< irker958> wesnoth: Gregory A Lundberg wesnoth:master 39da9c8f9a9c / data/campaigns/Delfadors_Memoirs/utils/sides.cfg: DM Fix bug: Subsumed sides cannot move https://github.com/wesnoth/wesnoth/commit/39da9c8f9a9c8ce2c5e05db95f33f139f7591bcc 20161020 17:45:28< irker958> wesnoth: Gregory A Lundberg wesnoth:master 09e7006b1d0b / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Fix bug: second wave https://github.com/wesnoth/wesnoth/commit/09e7006b1d0bc90765d4896953e97b5f40151d13 20161020 17:45:30< irker958> wesnoth: Gregory A Lundberg wesnoth:master 2d2ac10ba5e0 / data/campaigns/Delfadors_Memoirs/scenarios/03_The_Road_to_Weldyn.cfg: DM S03 Fix bug: Include advancements https://github.com/wesnoth/wesnoth/commit/2d2ac10ba5e0f4a72b702c1f7b1f9f24c4a68c7b 20161020 17:45:32< irker958> wesnoth: Gregory A Lundberg wesnoth:master c38b5da9dcf9 / data/campaigns/Delfadors_Memoirs/scenarios/04_Leollyn.cfg: DM S04 Fix bug: Best bowman https://github.com/wesnoth/wesnoth/commit/c38b5da9dcf920f8cc724eb33c18c31e4ab00dcc 20161020 17:45:34< irker958> wesnoth: Gregory A Lundberg wesnoth:master ab0c6e53353f / data/campaigns/Delfadors_Memoirs/scenarios/04_Leollyn.cfg: DM S04 Fix bug: No defeat https://github.com/wesnoth/wesnoth/commit/ab0c6e53353f4ca587e2545761136b645f3ed92a 20161020 17:45:36< irker958> wesnoth: Gregory A Lundberg wesnoth:master dbcd2e948d48 / data/campaigns/Delfadors_Memoirs/scenarios/04_Leollyn.cfg: DM S04 Fix bug: Include advancements https://github.com/wesnoth/wesnoth/commit/dbcd2e948d485cb1c526a8ed24e1fa38d6299cac 20161020 17:45:38< irker958> wesnoth: Gregory A Lundberg wesnoth:master bf24d087ce1b / data/campaigns/Delfadors_Memoirs/scenarios/04_Leollyn.cfg: DM S04 Fix bug: Delfador was the victim https://github.com/wesnoth/wesnoth/commit/bf24d087ce1baf58d74795f5e9ee813ec1f92be5 20161020 17:45:40< irker958> wesnoth: Gregory A Lundberg wesnoth:master 68f7c0ec48d5 / data/campaigns/Delfadors_Memoirs/scenarios/04_Leollyn.cfg: DM S04 Fix bug: No scenario-start saved https://github.com/wesnoth/wesnoth/commit/68f7c0ec48d53d85290aa1ff4900d82414d84e8a 20161020 17:45:42< irker958> wesnoth: Gregory A Lundberg wesnoth:master f7ac9c62515a / data/campaigns/Delfadors_Memoirs/scenarios/05_Council_in_Weldyn.cfg: DM S05 Needlessly delayed https://github.com/wesnoth/wesnoth/commit/f7ac9c62515a04f7b460a6b785df539f29bbc956 20161020 17:45:44< irker958> wesnoth: Gregory A Lundberg wesnoth:master 906cb3b3a401 / data/campaigns/Delfadors_Memoirs/scenarios/06_Swamps_of_Illuven.cfg: DM S06 Improve chest https://github.com/wesnoth/wesnoth/commit/906cb3b3a401a5e4f95dc134f99ceecc49818850 20161020 17:45:46< irker958> wesnoth: Gregory A Lundberg wesnoth:master df785a453522 / data/campaigns/Delfadors_Memoirs/scenarios/07_Night_in_the_Swamp.cfg: DM S07 Fix bug: Include advancements https://github.com/wesnoth/wesnoth/commit/df785a453522ae27e5ec00b390d10a8d67126de0 20161020 17:45:48< irker958> wesnoth: Gregory A Lundberg wesnoth:master 2e84f59f76db / data/campaigns/Delfadors_Memoirs/scenarios/11_Wasteland.cfg: DM S11 Fix bug: Orc dies first https://github.com/wesnoth/wesnoth/commit/2e84f59f76db17748836b8e230584d686fa655cd 20161020 17:45:50< irker958> wesnoth: Gregory A Lundberg wesnoth:master e0125ea121d4 / data/campaigns/Delfadors_Memoirs/scenarios/11_Wasteland.cfg: DM S11 Fix bug: Chantal can move https://github.com/wesnoth/wesnoth/commit/e0125ea121d457ad034e4f89eaf7876959497006 20161020 17:45:52< irker958> wesnoth: Gregory A Lundberg wesnoth:master 984cf52d725e / data/campaigns/Delfadors_Memoirs/scenarios/11_Wasteland.cfg: DM S11 Hide sides https://github.com/wesnoth/wesnoth/commit/984cf52d725e01fb0d22029adba7ab6dc8e85673 20161020 17:45:54< irker958> wesnoth: Gregory A Lundberg wesnoth:master a14d25eba974 / data/campaigns/Delfadors_Memoirs/scenarios/ (03_The_Road_to_Weldyn.cfg 11_Wasteland.cfg): DM Fix bug: Grammar https://github.com/wesnoth/wesnoth/commit/a14d25eba974a754edd7570071e228cb21451c71 20161020 17:45:56< irker958> wesnoth: Gregory A Lundberg wesnoth:master 7337e963f314 / data/campaigns/Delfadors_Memoirs/scenarios/ (15_Save_the_King.cfg 22_Face_of_the_Enemy.cfg): DM Fix bug: No save https://github.com/wesnoth/wesnoth/commit/7337e963f31488cca87f7fc2b898b40bfe886496 20161020 17:45:58< irker958> wesnoth: Gregory A Lundberg wesnoth:master 8c2f8b0a7613 / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Fix bug: Warning radius https://github.com/wesnoth/wesnoth/commit/8c2f8b0a76134dbaa9e4cb0d6fc1df5df88d7f0f 20161020 17:46:00< irker958> wesnoth: Gregory A Lundberg wesnoth:master c21166cd2f69 / data/campaigns/Delfadors_Memoirs/scenarios/12_Terror_at_the_Ford_of_Parthyn.cfg: DM S12 Workaround: Primary unit unstable https://github.com/wesnoth/wesnoth/commit/c21166cd2f69c52bd09731b2fd03fc912a09874a 20161020 17:46:02< irker958> wesnoth: Lari Nieminen wesnoth:master 53758e011890 / data/campaigns/Delfadors_Memoirs/ (31 files in 5 dirs): Merge pull request #701 from GregoryLundberg/GL_DM_final https://github.com/wesnoth/wesnoth/commit/53758e011890badb76af1781b399f3348297d239 20161020 17:50:07-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20161020 17:50:35-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 17:51:01-!- makruni [~username@unaffiliated/matthiaskrgr] has quit [Quit: Reconnecting] 20161020 17:51:35-!- makruni [~username@134.99.122.143] has joined #wesnoth-dev 20161020 17:52:07-!- makruni [~username@134.99.122.143] has quit [Client Quit] 20161020 17:53:05-!- gfgtdf [~chatzilla@x4e363b46.dyn.telefonica.de] has quit [Quit: ChatZilla 0.9.92 [Firefox 49.0.1/20160922113459]] 20161020 17:53:54< DeFender1031> What a beautiful wall of text. 20161020 17:54:39< celticminstrel> Oh wow, I just found a typoed variable. 20161020 17:54:44< celticminstrel> "is_excaped" 20161020 17:55:07< DeFender1031> celticminstrel, there are a lot of typos. There's several typos in WML attribute names even. 20161020 17:55:25< celticminstrel> I'd sure like to fix all of those. 20161020 18:01:56-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20161020 18:06:27< DeFender1031> celticminstrel, the most recent one I came across was https://wiki.wesnoth.org/Creating_Custom_AIs "parms", but I know I noticed two or three pretty egregious ones aside from this one. Having trouble finding/remembing them at the moment though 20161020 18:06:57< celticminstrel> That's not really a typo so much as a slightly weird abbreviation... 20161020 18:07:47< DeFender1031> right, which is why I mentioned that I recall seeing some which were blatantly egregious rather than this one which is at least minimally defensible. 20161020 18:08:41< celticminstrel> Okay, so the cave generator is once more free of Lua errors, but no longer returns the map string... :| 20161020 18:15:20< DeFender1031> ah! found one of them! celticminstrel, https://wiki.wesnoth.org/SingleUnitWML "hp_bar_scalling" 20161020 18:15:30< celticminstrel> :| 20161020 18:15:36< celticminstrel> Who did that. 20161020 18:15:48-!- Shiki [~Shiki@141.39.226.226] has joined #wesnoth-dev 20161020 18:15:50< celticminstrel> (Guess it doesn't matter anymore.) 20161020 18:16:49< celticminstrel> DeFender1031: Do you happen to know if it's valid for a map to end with a comma? 20161020 18:17:49< celticminstrel> Hmm, I suppose it's a non-issue with table.concat. 20161020 18:17:54< celticminstrel> Never mind then. 20161020 18:17:57< DeFender1031> i don't think it is 20161020 18:18:10< DeFender1031> in fact, i'm pretty sure that a map row isn't allowed to end with a comma either. 20161020 18:18:32< celticminstrel> Well, that's vaguely annoying... 20161020 18:19:21< celticminstrel> Okay so I should iterate by coordinates rather than index, then. 20161020 18:19:32< celticminstrel> Uhh... y first, I guess. 20161020 18:20:02< DeFender1031> not really, you just need to apply some string.sub or string.gsub action. 20161020 18:20:31< celticminstrel> Uhh. Why would I want to do that when I can just build it correctly in the first place. 20161020 18:20:39< DeFender1031> celticminstrel, this might help you: http://paste.nachsoftware.com/DeFender1031/pKBVs8bb74fd9bccd5a26210458090af3d4c5fxl 20161020 18:21:48< DeFender1031> sometimes it's more straightforward to add the delimiter each iteration and then chop it off at the end. 20161020 18:22:23< celticminstrel> Hmm. I was actually planning to put them in a table and then concatenate it with table.concat. 20161020 18:23:54< DeFender1031> ah, that's also a trick I use sometimes. I know that in php and certain javascript engines, doing concatenation by table is actually more efficient, though in general, it shouldn't be. (It isn't in C++ for example.) 20161020 18:24:08< DeFender1031> I actually didn't realize that lua had a table.concat 20161020 18:24:36< celticminstrel> I only realized it because the map generator was already using it. :P 20161020 18:25:20< DeFender1031> that... works. 20161020 18:26:03< celticminstrel> I'm basically rewriting the code the generator was using because I have no idea why it wasn't working. >_> 20161020 18:26:12< celticminstrel> (The code for building up the map string.) 20161020 18:26:21< DeFender1031> right 20161020 18:26:38< DeFender1031> well what i sent you is code for building up a map string, so it might be useful to you. 20161020 18:26:40< celticminstrel> Also moving it into a helper library so other map generators can use it. 20161020 18:27:18< DeFender1031> (it's also a pretty useful little WML action.) 20161020 18:32:53< celticminstrel> ...now it's saying wesnoth is nil all of a sudden... :| 20161020 18:32:55-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161020 18:33:01< DeFender1031> celticminstrel, you can also feel free to use the logic in my link verbatim by replacing wesnoth.get_terrain() with the appropriate call... 20161020 18:33:47< DeFender1031> celticminstrel, try removing the line that says "wesnoth = nil" and see if it fixes it? :P 20161020 18:33:54< celticminstrel> Ha ha 20161020 18:34:00< celticminstrel> There is no such line 20161020 18:34:12< DeFender1031> (I know, I'm terribly insightful.) 20161020 18:34:17< DeFender1031> Yes, obviously. 20161020 18:34:18< tad_carlucci> If you load a lua script which has an error, you get nil 20161020 18:34:39< celticminstrel> But the error clearly is saying that wesnoth itself is nil. 20161020 18:34:48< DeFender1031> tad_carlucci, I imagine there'd be an error notice before the point where he's encountering the nil if that were the problem. 20161020 18:35:21< celticminstrel> Wait... it's not erroring where I thought it was... 20161020 18:35:50< celticminstrel> Okay, so tad_carlucci is correct, the problem is that require() returned nil and I did require().something 20161020 18:36:09< celticminstrel> Which means... a syntax error in the required script, right? 20161020 18:36:24< tad_carlucci> celticminstrel, usually. or a bad filename 20161020 18:36:39< celticminstrel> Can't be a bad filename, because it was working previously. 20161020 18:37:03< tad_carlucci> celticminstrel, And DeFender1031 is correct, there should have been a message out the syntax error on stderr 20161020 18:38:12< celticminstrel> Can we just make require throw an error instead of returning nil... 20161020 18:38:16 * DeFender1031 is usually correct, just sometimes in ways which are completely erroneous. 20161020 18:39:12< celticminstrel> I found the syntax error, at least. 20161020 18:39:53< celticminstrel> Okay, it's still returning nil for some reason... :| 20161020 18:42:32< tad_carlucci> IS this a new file or one I can look at being loaded with require? 20161020 18:42:54< celticminstrel> It's one that I'm hacking at right now. 20161020 18:43:15< celticminstrel> But it does already exist - data/lua/cave_map_generator.lua 20161020 18:43:50< tad_carlucci> Consider the entire file the body of a function (it is) .. does it return a table? or return anything? If it doesnot return something there you go. 20161020 18:43:54< celticminstrel> You'd need to use a multiplayer random map scenario (rather than HTTT17 or SoF4) to see the error. 20161020 18:44:13< celticminstrel> The function is returning the result of table.concat. 20161020 18:46:00< tad_carlucci> I don't get any errors using "random" and taking the defaults. MP came up and is playable. 20161020 18:46:59< celticminstrel> Well, I'm hacking at it, so you won't be able to produce the exact issue. What I meant is that you'd need MP to see any mapgen error, because in single-player it just exits silently. 20161020 18:47:32< tad_carlucci> I'm in MP. Random, random, all defaults. No messages and it's playable. 20161020 18:48:04< celticminstrel> Oh right, I forgot there's no Lua ones there... Sorry. 20161020 18:48:40< celticminstrel> Anyway, even if there was a random cave one, it does work on master as far as I know. 20161020 18:49:03< celticminstrel> What I'd like to know now is, why isn't wesnoth.show_lua_console() working in the mapgen kernel? 20161020 18:52:11-!- ancestral [~ancestral@75-168-80-79.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20161020 18:54:17< celticminstrel> Oh. Hmm. Looks like my metafunction actually isn't being called. 20161020 18:55:45< celticminstrel> BTW, tad_carlucci, we should probably do something about the __ipairs metamethods, right? 20161020 18:55:53< celticminstrel> Since that's deprecated in 5.3. 20161020 18:56:31< celticminstrel> I suppose it could wait awhile though. 20161020 18:57:14< tad_carlucci> If it's in mainline, it should be fixed. Compat is enabled so it should not cause problems, but we don't want to forget to fix them. 20161020 18:58:21< celticminstrel> Yeah, some of the core userdatas use it. 20161020 18:58:31< celticminstrel> Grep src for "__ipairs" 20161020 18:58:38< celticminstrel> Well, src/scripting really. 20161020 18:59:23< celticminstrel> I don't understand why it's returning nil. It's almost as if there's a return statement being executed early... 20161020 18:59:58< celticminstrel> ... 20161020 19:00:19< celticminstrel> Okay, it was a really dumb mistake on my part. I just forgot the "return" in the scenario definition,. 20161020 19:00:46-!- horrowind [~Icedove@2a02:810a:8380:10a8:21b:fcff:fee3:c3ff] has quit [Quit: horrowind] 20161020 19:00:47< celticminstrel> I even remembered it in SoF. 20161020 19:00:52< celticminstrel> But not in HTTT. 20161020 19:02:35< celticminstrel> Okay, now it seems like the output map is not valid or something... 20161020 19:05:12< celticminstrel> Seems that tostring() didn't call my __tostring. 20161020 19:05:36< celticminstrel> It's supposed to, right? I'm not remembering wrong? 20161020 19:06:52-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20161020 19:07:26-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 19:09:18-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20161020 19:10:07< celticminstrel> Oh wait. 20161020 19:10:11< celticminstrel> I see the problem. 20161020 19:10:19< celticminstrel> __tostring does not belong in __index. 20161020 19:10:21< celticminstrel> Duh. 20161020 19:13:21-!- gfgtdf [~chatzilla@x4e363b46.dyn.telefonica.de] has joined #wesnoth-dev 20161020 19:19:56< tad_carlucci> iceiceice you available to glance at something? 20161020 19:26:30< tad_carlucci> iceiceice, Nevermind. I found what I needed. 20161020 19:30:15< celticminstrel> Finally works, at least insofar as not producing any errors. 20161020 19:30:37< celticminstrel> Instant defeat upon entering HTTT17 though. 20161020 19:31:32< DeFender1031> celticminstrel (or whoever else), according to the wiki for [store_villages], "The only advantage/difference this tag has, in comparison to using [store_locations]terrain=*^V*, is that the amount of hexes which are considered for a possible match is previously restricted to those with villages." Except that village terrains having a string matching *^V* is by convention only. A [terrain_type] could in theory have a string of 20161020 19:31:33< DeFender1031> Y1XQ and still have gives_income set to true. My question is, is it, as one would expect, checking properly for gives_income internally, or is it doing what the note says it is and only comparing *^V* hexes? 20161020 19:34:37< celticminstrel> Looks like it uses gives_income. 20161020 19:35:53< celticminstrel> Okay, so this map that it outputs looks perfectly valid to me... why am I getting instant defeat... 20161020 19:36:50< celticminstrel> Hmm, I see locations 5, 6, 7, and scepter, but no 1, 2, 3, 4... could that be it? 20161020 19:36:58< DeFender1031> so then i assume no one has an issue with me either removing or reworking that note to make it less misleading? 20161020 19:37:08< celticminstrel> Ooh. I switched width and height. 20161020 19:37:14< celticminstrel> for x = 1, map.h do 20161020 19:37:27< celticminstrel> That should be y 20161020 19:37:44< celticminstrel> DeFender1031: Go for it. 20161020 19:38:13< celticminstrel> Map not a rectangle. :| 20161020 19:39:01< celticminstrel> Hmm, looks like it's just missing one terrain tile at the very end...? 20161020 19:39:14< tad_carlucci> I'm getting there! I got past the crash and it's starting too look like it used to. Hit another crash. 20161020 19:39:23< celticminstrel> Yay! 20161020 19:40:22-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 19:40:34< celticminstrel> So why would the last row be one tile short... 20161020 19:42:39< tad_carlucci> celticminstrel, You need to reread this part: https://www.lua.org/manual/5.3/manual.html#4.3 and not use the return value from lua_absindex as a parameter to ANY lua API .. EVER 20161020 19:42:50< celticminstrel> What? Why? 20161020 19:43:30< tad_carlucci> Because you too the index from the BOTTOM of the stack and passed into an API function, which always indexes from the TOP of the stack 20161020 19:44:08< celticminstrel> Uhh... what? 20161020 19:44:20< celticminstrel> Negative numbers index from the top, positive from the bottom, I thought... 20161020 19:44:51-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Ping timeout: 250 seconds] 20161020 19:45:05< tad_carlucci> So draw the stack the other way. Doesn't matter you can't count from one end when it need you to be counting from the other. 20161020 19:45:23< celticminstrel> I don't understand. 20161020 19:45:38< celticminstrel> First of all, what's the point of lua_absindex if it's not valid as a parameter to a Lua API? 20161020 19:46:22< tad_carlucci> It's for C to use when it's wanting to treat the stack and a C array. 20161020 19:46:47< celticminstrel> Since when is C allowed to treat the stack as a C array? 20161020 19:47:27< tad_carlucci> Probably since Lua 1.0 .. that's what it is. 20161020 19:47:45< celticminstrel> And if I can't use lua_absindex, then how am I supposed to convert a negative index (ie, relative to the to of the stack) to a positive index (ie, relative to tbe bottom of the stack)? 20161020 19:48:06< celticminstrel> Anyway, where does it say that the API always indexes from the top of the stack? 20161020 19:48:20< celticminstrel> I'm pretty sure I remember reading somewhere that this is not the case. 20161020 19:48:43< tad_carlucci> The manual link to section 4.3 ^ 20161020 19:49:33< celticminstrel> Where does it talk about negative stack indices? 20161020 19:50:50< celticminstrel> Based on lua_gettop, index 1 is the bottom of the stack. 20161020 19:51:10< tad_carlucci> Then do a push and gettop is 2 20161020 19:51:11< DeFender1031> celticminstrel, edited. I hope I worded the new note clearly enough. 20161020 19:52:46< tad_carlucci> celticminstrel, This fixes the crash .. pastebin.com/Lsgkrwk7 .. which proceeds to segfault later on. Working on that next. 20161020 19:52:52< celticminstrel> Oh, it's implied by 1 < abs(index) < top 20161020 19:52:55< celticminstrel> The abs, in particular. 20161020 19:53:43< celticminstrel> But it seems pretty clear to me from the description of lua_gettop that index 1 is the bottom of the stack and index -1 is the top, which makes it seem like lua_absindex should be safe. 20161020 19:53:52< celticminstrel> So what makes you think it's unsafe? 20161020 19:54:22< celticminstrel> Wesnoth suddenly stopped responding to keyboard input... 20161020 19:54:27< celticminstrel> Weird... 20161020 19:54:38-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 245 seconds] 20161020 20:00:02 * zookeeper fixed the scalling typos since apparently no one else did 20161020 20:06:59-!- Shiki [~Shiki@141.39.226.226] has quit [Ping timeout: 265 seconds] 20161020 20:07:14-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20161020 20:09:48-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 20:13:59< irker958> wesnoth: gfgtdf wesnoth:master 00e008df5d59 / src/actions/advancement.hpp: attempt to fix use after free when advancing unit in test scenario https://github.com/wesnoth/wesnoth/commit/00e008df5d59bb87fb482bf60915b107ffc7446a 20161020 20:14:10-!- Kwandulin [~Miranda@p5DDD2B8F.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20161020 20:16:00< celticminstrel> Okay, so with "tbl = {}; for x = 1, map.w do table.insert(tbl, something) end; assert(#tbl == map.w"... how is it possible for the insertion to fail? 20161020 20:16:09< celticminstrel> ^assertion 20161020 20:16:21< celticminstrel> Also missed a close paren but whatever. 20161020 20:17:08-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20161020 20:19:43-!- Shiki [~Shiki@141.39.226.226] has joined #wesnoth-dev 20161020 20:20:33< gfgtdf> can onesome try to reproduce https://gna.org/bugs/?25194 ? it the crash happens inside lua_pushglobaltable(L) which is bad since it doesnt take any arguments that could be wrong. 20161020 20:21:27< gfgtdf> celticminstrel: that assertion got triggered to you ? 20161020 20:21:37< celticminstrel> Yes. 20161020 20:21:48< celticminstrel> (There's a bit more code in the loop, mind you.) 20161020 20:21:56< celticminstrel> (But no continues or anything.) 20161020 20:22:00< gfgtdf> celticminstrel: what are you currently wokring on ? 20161020 20:22:05< celticminstrel> Cave generator 20161020 20:22:17< gfgtdf> celticminstrel: does it have bugs ? 20161020 20:22:25< celticminstrel> No, I want to make it work for scenario generation and allow user configuration. 20161020 20:22:41< celticminstrel> Also refactoring out some stuff that's generally useful for map generators into a helper lib. 20161020 20:22:46< gfgtdf> celticminstrel: hmm ok 20161020 20:24:06< gfgtdf> celticminstrel: dontknow how that could fail,, maybe map.w changes in between? or maybe map has a metatable so .w is actuall a function ? 20161020 20:24:23< celticminstrel> map does have a metatable, but __index doesn't include a w 20161020 20:24:29< celticminstrel> (__index is a table) 20161020 20:25:25-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20161020 20:25:52< gfgtdf> maybe table.insert was overwritten by some other lua code, unlikeley scenario though. 20161020 20:36:46< celticminstrel> Well, as far as I can see, #tbl and map.w differ by only 1, so... pretty unlikely yes. 20161020 20:37:10< Aginor> hmmz 20161020 20:37:17< Aginor> sdl 2.0.5 has been released 20161020 20:40:19-!- Shiki [~Shiki@141.39.226.226] has quit [Ping timeout: 250 seconds] 20161020 20:41:44< DeFender1031> zookeeper, did you fix the typo in code as well? 20161020 20:41:54< zookeeper> there was none 20161020 20:42:25< DeFender1031> oh. It was just the wiki documentation that was typoed, not reflecting an actually misspelled parameter in code? 20161020 20:43:33< celticminstrel> Still have no idea why this assertion fails. 20161020 20:43:40< zookeeper> DeFender1031, yeah 20161020 20:43:47< DeFender1031> well if i'd known that, i'd just have fixed it myself. For some reason I thought it was that way because that's what it was in code. 20161020 20:45:47< zookeeper> well, it's a reasonable assumption, needed to grep the source to check it 20161020 20:47:10< tad_carlucci> celticminstrel, I may need you help fixing all this bad references and Lua crashes. The files effected are: src/ai/lua/lua_object.hpp src/scripting/lua_formula_bridge.cpp src/scripting/lua_unit_attacks.cpp src/scripting/lua_kernel_base.cpp src/scripting/lua_common.cpp 20161020 20:48:25< tad_carlucci> Those are everywhere you used lua_absindex 20161020 20:49:30< celticminstrel> The definition of lua_absindex is return (idx > 0 || ispseudo(idx)) ? idx : cast_int(L->top - L->ci->func) + idx... 20161020 20:50:03< celticminstrel> No idea what ci->func is, but it seems to do basically what I was expecting it to do. 20161020 20:50:12< celticminstrel> Hmm. 20161020 20:50:28< celticminstrel> lua_gettop returns cast_int(L->top - L->ci->func + 1). 20161020 20:50:45< celticminstrel> And where I used lua_absindex, I think the desired result should be... 20161020 20:51:12< celticminstrel> lua_gettop(L) + idx 20161020 20:51:21< celticminstrel> Uhh... +1 20161020 20:51:46< celticminstrel> So basically lua_absindex(L, -1) should return lua_gettop(L)... 20161020 20:52:11< celticminstrel> Or rather, that's what I expected it to return. 20161020 20:52:42< tad_carlucci> The problem is use passed it into other routines so it'll have to be tracked down and every use ensured to NEVER be passed to a Lua API function. 20161020 20:52:45< matthiaskrgr> about the "Leaks in ai vs ai" and "leaks in tutorial" there might be some different leaks that come from different areas like ai/gui or other dialogs 20161020 20:52:49< DeFender1031> zookeeper, I seem to recall one other typoed attribute somewhere that actually IS the typo internally and didn't work when I tried the properly spelled version, but I can't remember where. 20161020 20:53:03< celticminstrel> tad_carlucci: No, it's specifically done for passing to API functions. 20161020 20:53:22< tad_carlucci> celticminstrel, Well you specifically did the wrong thing. 20161020 20:53:23< celticminstrel> So if it's really not the right thing for what I wanted, the solution is to change to something involving lua_gettop. 20161020 20:54:09< celticminstrel> It does look like lua_absindex doesn't do quite what I expected... 20161020 20:54:29< gfgtdf> celticminstrel: how so ? 20161020 20:54:40< celticminstrel> If I pass -1, it returns top - ci->func - 1, whereas gettop returns top - ci->func + 1 -- a difference of 2... 20161020 20:54:50< celticminstrel> gfgtdf: Does that answer your question? 20161020 20:55:22-!- Shiki [~Shiki@141.39.226.226] has joined #wesnoth-dev 20161020 20:55:24< gfgtdf> celticminstrel: hmm yes 20161020 20:55:53< celticminstrel> tad_carlucci: So I think you can just replace all lua_absindex(L, n) with lua_gettop(L) + n + 1, provided n is known t be negative. 20161020 20:56:05< celticminstrel> ^to 20161020 20:56:44< gfgtdf> celticminstrel: you sure that you didnt just get teh backets in theose functions wrong? 20161020 20:57:39< celticminstrel> gfgtdf: Huh? 20161020 20:57:50< tad_carlucci> How about I jsut delete the index=lua_absindex(L,index) line instead. And if that crashes your map, unit, forumala, or whatever else you did with it, someone deal with the segfaults? 20161020 20:58:13-!- Shiki is now known as shiki|sevu 20161020 20:58:16< celticminstrel> tad_carlucci: Uhh, no, I wouldn't recommend that... 20161020 20:58:19< gfgtdf> celticminstrel: absindex(-1) = cast_int(L->top - L->ci->func) + -1 = L->top - L->ci->func - 1 gettop() = (L->top - (L->ci->func + 1)) = L->top - L->ci->fun - 1, looks liek the same to me 20161020 20:59:08< celticminstrel> gfgtdf: Ah, you're right. So I guess lua_absindex does return the correct value then? 20161020 20:59:14< celticminstrel> At least for -1. 20161020 20:59:18< celticminstrel> What about -2... 20161020 20:59:50< tad_carlucci> It seems a lot wiser to do it right instead of trying to cobble together some patch to attempt fix the conversion of a good index into a bad index by converting it, maybe, sorta, back into a good index. 20161020 20:59:58< celticminstrel> absindex returns top - ci->func - 2, gettop-1 is top - (ci->func + 1) - 1... so it's the same again. 20161020 21:00:32< celticminstrel> tad_carlucci: I'm confused by your assertion that lua_absindex is the problem, because it appears to do exactly what I expected it to do, which is to convert a negative stack index to a positive stack index. 20161020 21:00:49< tad_carlucci> NO 20161020 21:00:51< tad_carlucci> NO 20161020 21:00:54< tad_carlucci> NO 20161020 21:01:11< celticminstrel> I'm saying this from looking at the Lua source code. 20161020 21:01:30< tad_carlucci> It turns an index counting from the top of the stack into an index counting from the bottom. 20161020 21:01:39< tad_carlucci> You're not undertanding it then 20161020 21:01:41< celticminstrel> Yes, that's exactly what I want it to do. 20161020 21:01:54< celticminstrel> An index counting from the top is a negative number. 20161020 21:02:08< tad_carlucci> Then why are you passing it to functions which require an index from the top of the stack? 20161020 21:02:26< celticminstrel> They don't require an index from the top of the stack. 20161020 21:02:33< celticminstrel> Why would you think that? 20161020 21:02:51< tad_carlucci> Because that is what it says on http://www.lua.org/ 20161020 21:02:58< tad_carlucci> In the manual 20161020 21:03:02< tad_carlucci> Section 4.3 20161020 21:03:04< celticminstrel> I know you linked that before and I didn't see it. 20161020 21:03:06< tad_carlucci> Read it, please. 20161020 21:03:19< celticminstrel> I read it. I didn't see anything saying that it requires to be counted from the top of the stack. 20161020 21:03:28< celticminstrel> Actually I suspect the section is misleading though. 20161020 21:03:40< celticminstrel> I mean, it doesn't really explain the way indices work very well. 20161020 21:04:13< celticminstrel> It doesn't even mention the fact that a positive index is taken as counting from the bottom, and a negative index is taken as counting from the top. It only barely manages to mention that positive and negative stack indices are both valid. 20161020 21:04:52< celticminstrel> We use indices counting from the bottom all over the API code, not just where I called lua_absindex. 20161020 21:04:56< tad_carlucci> It says 'acceptible index' You're reading that as "an index which can be accepted" .. it's a proper noun 20161020 21:05:06< celticminstrel> Any place there's a luaL_checkstring(L, 1) for example. 20161020 21:05:16< celticminstrel> That's fetching the element at the bottom of the stack. 20161020 21:06:07< celticminstrel> This isn't even in the realm of acceptable indices. We're only working with valid indices here. 20161020 21:06:16< celticminstrel> ie, 1 <= abs(index) <= gettop() 20161020 21:06:18< celticminstrel> Note the abs 20161020 21:06:37-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20161020 21:06:54< tad_carlucci> stackoverflow.com/questions/18445022/lua-c-api-whats-the-difference-between-lua-gettop-and-1 20161020 21:07:29< celticminstrel> The reason I used lua_absindex in places is so that I can push more stuff and the index will still be the same. 20161020 21:08:54< tad_carlucci> That's fine. As long as C/C++ is using the index. But CAN NOT pass that index to a Lua API function. EVER. 20161020 21:09:28< celticminstrel> I don't understand why you've drawn that conclusion. 20161020 21:09:40< tad_carlucci> \BECAUSE THATS WHAT THE MANUAL SAYS. 20161020 21:09:59< celticminstrel> As far as I can tell, lua_absindex always returns a valid index when passed a valid index, and I don't see anything saying otherwise in the manual. Maybe you could quote the exact sentence that you're interpreting that way? 20161020 21:10:18-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 256 seconds] 20161020 21:10:37< celticminstrel> I suppose there's a chance I'm misunderstanding what you mean by Lua API function (I'm assuming the lua_* functions). 20161020 21:11:39< tad_carlucci> lua_ luaL_ 20161020 21:11:44< celticminstrel> Oooh, I think I figured out how that assertion can fail. 20161020 21:11:55< celticminstrel> It looks like table.insert(tbl, nil) is a no-op. 20161020 21:12:48< celticminstrel> Or rather... it doesn't affect the output of #tbl 20161020 21:12:53< celticminstrel> Maybe it's not actually a no-op, I dunno. 20161020 21:13:27< celticminstrel> So now I have to figure out why get_tile(height, width) returns nil... 20161020 21:14:12< tad_carlucci> celticminstrel, How about I put up a PR to fix mattsc's crash and someone else track down the segfaults caused by your use of lua_absvalue? 20161020 21:14:18-!- tad_carlucci [~lundberg@173.217.65.103] has quit [Quit: Off to resolve a merge conflict between the wife and husband branches of my real life.] 20161020 21:15:56< celticminstrel> I still haven't seen any evidence that lua_absindex is actually a problem. 20161020 21:16:09< celticminstrel> I've only seen evidence that it's not a problem. 20161020 21:18:00-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 21:23:12< celticminstrel> Hmm... the generator seems to basically work now, but... why don't the leaders have keeps? 20161020 21:23:52< celticminstrel> Some don't even have castles... 20161020 21:24:07< celticminstrel> There's also lots of unreachable areas, and the cave touches the border which is probably a bad idea. 20161020 21:24:34< celticminstrel> But those are minor, so I'll probably ignore them. 20161020 21:25:53-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Ping timeout: 245 seconds] 20161020 21:26:46< DeFender1031> why is it a bad idea if it touches the border? 20161020 21:27:18< celticminstrel> Well, my reasoning was that it makes it appear as though the cave continues on, but... on second thoughts, maybe that doesn't really matter too much. 20161020 21:28:39< gfgtdf> celticminstrel: are you gaing to change the maps that are generated? 20161020 21:28:47< celticminstrel> Huh? 20161020 21:28:55< celticminstrel> I'm not changing the algorithm. Probably. 20161020 21:29:04< gfgtdf> ok 20161020 21:29:16< celticminstrel> What's this about a volcano... 20161020 21:29:25< celticminstrel> That suggests there should be a lot more than just one tile of lava... 20161020 21:29:48< celticminstrel> (Though it's nothing to do with what I'm doing.) 20161020 21:30:04< gfgtdf> i think its sometimes happens that the caste is near teh border so that the player he has 2 hexes less to recuit from. 20161020 21:30:19< celticminstrel> No, what's happening is that the keep simply isn't placed at all, for some reason. 20161020 21:30:24< celticminstrel> There's castle tiles, but no keep. 20161020 21:30:29-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20161020 21:30:32< celticminstrel> (And one of the leaders doesn't even have castles. 20161020 21:30:33< gfgtdf> celticminstrel: hmm that sounds liek adiffernt issue 20161020 21:30:33< celticminstrel> ) 20161020 21:30:36< celticminstrel> Yeah, 20161020 21:30:49< gfgtdf> celticminstrel: you got the issue with the current 1.13 cavegen ? 20161020 21:31:01< celticminstrel> Well, my modified form of it, but yes. 20161020 21:31:12< celticminstrel> I don't know if it's an issue in master. 20161020 21:31:19< celticminstrel> You could load HTTT17 yourself and check? 20161020 21:31:25< gfgtdf> celticminstrel: this happen onyl reareley or often ? 20161020 21:31:33< celticminstrel> Well, I only tried it once so far. 20161020 21:31:33< gfgtdf> celticminstrel: dnt havea working master currently 20161020 21:31:50-!- ChipmunkV [~vova@static-89-94-113-91.axione.abo.bbox.fr] has quit [Quit: ChipmunkV] 20161020 21:32:18< celticminstrel> vultraz: Unit list dialog has a scrollbar. Please fix. 20161020 21:32:37< gfgtdf> celticminstrel: im sure that i teste the lua cavegen > times when i after i wrote it and it didnt happen to me, but there is a bugreport in the forum where someone has teh same issue on 1.12, saying it happes in ~1/10 of cases. 20161020 21:32:47< gfgtdf> >5 times* 20161020 21:33:19< celticminstrel> gfgtdf: I also have only 4 enemy leaders instead of 6. 20161020 21:33:43< gfgtdf> celticminstrel: the wml code of that scneario also removes some leaders. 20161020 21:34:13< celticminstrel> Ah, okay then? Though there aren't even seven castles, but I guess one of the leaders also doesn't have a castle, so maybe some of the other areas should've had a castle. 20161020 21:35:12-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20161020 21:35:13-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20161020 21:35:42< vultraz> celticminstrel: where? 20161020 21:35:52< celticminstrel> vultraz: The unit list dialog. 20161020 21:35:57< celticminstrel> And of course, 800x600. 20161020 21:36:04< celticminstrel> It's just a little bit too tall. 20161020 21:36:06< vultraz> god DAMMIT :| 20161020 21:36:07< gfgtdf> celticminstrel: i wonder whether the keep rmeoving issue coudl also be casued by wml code, maybe it makes sesne to test the map generator code without the wml code. 20161020 21:36:14< celticminstrel> (And slightly too wide as well, but that's less important.) 20161020 21:36:20< vultraz> I did NOT want to hear this minutes after waking up 20161020 21:36:30< celticminstrel> gfgtdf: I'll look at that... 20161020 21:37:39< gfgtdf> celticminstrel: that lua code coudl mostlikeley also be improved by replacing the math.foor with integer devision lua 5.3 operators. 20161020 21:37:56< celticminstrel> I think math.floor is more intuitive, so I'll leave it. 20161020 21:38:17< celticminstrel> I find the integer division operator to be weird in Python, too. 20161020 21:38:25< celticminstrel> So I doubt my opinion of it would change in Lua. 20161020 21:41:34-!- iceiceice [~chris@pool-173-61-153-221.cmdnnj.fios.verizon.net] has quit [Ping timeout: 250 seconds] 20161020 21:43:57< celticminstrel> gfgtdf: It doesn't seem to be a problem in the WML. 20161020 21:44:05< gfgtdf> celticminstrel: ok 20161020 21:44:22< celticminstrel> If I comment out the ERASE_CASTLE macro calls and the foreach loop that adds castle near Konrad, there are still missing keeps all over the place. 20161020 21:44:57< gfgtdf> celticminstrel: you contaed the castles ? 20161020 21:44:59< gfgtdf> counted* 20161020 21:45:12< celticminstrel> One leader still has no castle. 20161020 21:45:18< celticminstrel> And most of them have no keep. 20161020 21:45:22< celticminstrel> Konrad also still has no keep. 20161020 21:45:36< celticminstrel> I'm adding debug lines to see if I can track this down... 20161020 21:45:45< celticminstrel> (It's probably something related to my changes.) 20161020 21:47:11< celticminstrel> Well, the code is certainly at least executed each time... 20161020 21:49:18< celticminstrel> ...why are the in-game coordinates one less than the printed coordinates. 20161020 21:49:51< celticminstrel> My debug output is "Placing keep at 36,56"; there's a leader at 35,55. 20161020 21:49:56< celticminstrel> (Though there's no keep or castle.) 20161020 21:52:20< gfgtdf> celticminstrel: hard to say without seeing your lua code. 20161020 21:53:35< irker958> wesnoth: Celtic Minstrel wesnoth:lua_mapgen_stuff cde408fd4bc8 / src/ (game_launcher.cpp play_controller.cpp): Improve handling of map generator errors https://github.com/wesnoth/wesnoth/commit/cde408fd4bc831f36870a06a8d722fff82e80ec8 20161020 21:53:37< irker958> wesnoth: Celtic Minstrel wesnoth:lua_mapgen_stuff ffe356fc7f17 / / (12 files in 7 dirs): WIP: Work on Lua cave map generator https://github.com/wesnoth/wesnoth/commit/ffe356fc7f172366f22180d126dfb2246f83ae1a 20161020 21:53:37< celticminstrel> gfgtdf: Feel free to take a look 20161020 21:54:01< vultraz> uh what that 20161020 21:54:15< celticminstrel> vultraz: Something wrong? 20161020 21:54:24< vultraz> what are you doing there 20161020 21:54:28< vultraz> i just woke up 20161020 21:54:50< celticminstrel> 1. Refactoring out some stuff from the Lua cave generator which is generally useful for map generation. 20161020 21:55:11< celticminstrel> 2. Enabling the Lua cave generator to produce scenarios and accept user configuration (haven't really touched that yet though). 20161020 21:55:43< vultraz> i see you might have fixed the game crashing at loadscreen if it hits a wml error 20161020 21:56:05< celticminstrel> Apparently mapgen errors get converted to WML errors, so yeah, I guess so. 20161020 21:56:10< gfgtdf> celticminstrel: it looks liek your complteley changes te coordiante syntes, previousl loc_to_index was "x + 1 + y * width" now its "x + (y - 1) * map.w" 20161020 21:56:44< celticminstrel> The trouble there is that it was on a different thread. 20161020 21:56:59< vultraz> ah, the joys of threading 20161020 21:57:03< celticminstrel> gfgtdf: Yes, the old syntax was giving incorrect results, namely the bottom right tile was missing. 20161020 21:57:15< celticminstrel> Though I'm not entirely confident that the new syntax is correct, either. 20161020 21:58:06< gfgtdf> celticminstrel: quite sure it gave corrent results.., note that the positions weer o bases (the topleft lcoatosn was (0,0)) to match in ingame locations 20161020 21:58:20< gfgtdf> were 0 based* 20161020 21:58:24< vultraz> celticminstrel: btw, do you remember what thing it was we left using boost:: but stuck the commit in boost_trimmings post-merge...? 20161020 21:58:26< celticminstrel> It might've given incorrect results because of something else I changed. 20161020 21:58:34< celticminstrel> vultraz: Regex IIRC 20161020 21:59:02< vultraz> not thread? 20161020 21:59:31< celticminstrel> Thread is also using Boost, but that's not the one that was in boost_trimmings IIRC 20161020 21:59:44< gfgtdf> celticminstrel: by user confisation you mean showign a dialog the the normal mapgen? 20161020 21:59:51< vultraz> ah, right, i remember gfgtdf said there was some reason we needed boost::thread 20161020 21:59:52< celticminstrel> I recall MinGW didn't support std::thread at some point, which is part of the reason for sticking to Boost thread. 20161020 22:00:00< vultraz> and yes, it appears to be regex that was the problem 20161020 22:00:07< celticminstrel> Also, Boost thread provides the ability to interrupt the thread, which std thread does not have. 20161020 22:00:10< gfgtdf> vultraz: i actuayl think somone else said that 20161020 22:00:13< celticminstrel> gfgtdf: Yes 20161020 22:00:21< vultraz> celticminstrel: what is with mingw and not supporting shit :| 20161020 22:00:29< celticminstrel> Don't ask me. 20161020 22:00:40< celticminstrel> Note that the regex problem was because GCC something didn't support it. 20161020 22:01:38< vultraz> yes, which is why I want to test it again on travis but I appear to have lost it :| 20161020 22:01:56< vultraz> hm, wait, no, I think it's here.. 20161020 22:02:01< celticminstrel> It's still in boost_trimmings on master, is it not? 20161020 22:02:15< celticminstrel> Maybe you can even just ask Travis to rerun the build on that commit. 20161020 22:02:23-!- iceiceice [~chris@pool-173-61-153-221.cmdnnj.fios.verizon.net] has joined #wesnoth-dev 20161020 22:02:28< vultraz> how? 20161020 22:02:53< celticminstrel> I dunno, I haven't bothered to login to Travis before. 20161020 22:03:00< celticminstrel> It requires linking your github account or something. 20161020 22:03:35< vultraz> i could just update my boost trimmings branch, push to my fork, and open a pr 20161020 22:04:00< celticminstrel> If you want, sure. That would work. 20161020 22:04:04< vultraz> or cherry pick 20161020 22:04:14< vultraz> ah, conflicts 20161020 22:04:44< celticminstrel> So gfgtdf, are x,y supposed to go from 0..width-1 and 0..height-1? 20161020 22:04:50< celticminstrel> vultraz: Well, no surprise there. 20161020 22:05:02< vultraz> surprisingly minor 20161020 22:05:02< celticminstrel> vultraz: Try not to undo the raw-string commit by accident. 20161020 22:05:15< vultraz> yeah, that's the conflicts 20161020 22:05:36< gfgtdf> celticminstrel: yes, the do that in masters cavegen: https://github.com/wesnoth/wesnoth/blob/master/data/lua/cave_map_generator.lua#L188 20161020 22:06:22< celticminstrel> gfgtdf: But the index should still run from 1..width*height, right? 20161020 22:06:39< gfgtdf> celticminstrel: yes 20161020 22:07:51< celticminstrel> gfgtdf: Oh, I think I see the problem. It's the loops in __tostring, they should be running from 0 to n-1. 20161020 22:08:08-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20161020 22:08:46-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 22:09:44< celticminstrel> Still missing keeps though... 20161020 22:10:07< gfgtdf> celticminstrel: so the calces are cirecles of caslte hexes ? 20161020 22:10:36< celticminstrel> No, actually it's more like set_tile sometimes randomly... wait... 20161020 22:10:47< celticminstrel> I think I have an idea... 20161020 22:11:08 * celticminstrel was going to say "randomly fails". 20161020 22:11:25< celticminstrel> Maybe I broke the part that prevents it from ever overwriting a castle or keep with something else. 20161020 22:11:52< celticminstrel> Yeah, looks like that was it. 20161020 22:13:20< celticminstrel> Okay, works now. 20161020 22:14:02< celticminstrel> gfgtdf: How does the generator know to sometimes substitute rockbound cave or dirt? 20161020 22:14:28< gfgtdf> celticminstrel: there is a [terrain_mask] in the scenarios wml 20161020 22:14:43< celticminstrel> ...that seems like something that should be done in the generator. 20161020 22:15:22< gfgtdf> celticminstrel: maybe zookeper knows why it was done liek that 20161020 22:15:41< celticminstrel> Okay so... I guess I can commit this properly now... 20161020 22:19:28< irker958> wesnoth: Celtic Minstrel wesnoth:lua_mapgen_stuff eb1c06e7f4e2 / src/ (game_launcher.cpp play_controller.cpp): Improve handling of map generator errors https://github.com/wesnoth/wesnoth/commit/eb1c06e7f4e2e15ec1806bc302ffaf6e67ef2916 20161020 22:19:30< irker958> wesnoth: Celtic Minstrel wesnoth:lua_mapgen_stuff 0e47e72549a3 / / (6 files in 4 dirs): Refactor Lua cave map generator https://github.com/wesnoth/wesnoth/commit/0e47e72549a3895729c0907979688baed1a73e5a 20161020 22:20:27< celticminstrel> Whoops, forgot to remove debug statements. 20161020 22:20:32< irker958> wesnoth: Celtic Minstrel wesnoth:lua_mapgen_stuff 71327215577d / / (6 files in 4 dirs): Refactor Lua cave map generator https://github.com/wesnoth/wesnoth/commit/71327215577d4054ec85bfa0f9b0d33a7e724dfc 20161020 22:22:41< vultraz> well, travis's running on my pr, let's see what happens 20161020 22:25:24< shiki|sevu> Could you have a look at #wesnoth ? I posted a crash there while you were working on the mapgen 20161020 22:26:09< celticminstrel> I saw. 20161020 22:27:25< shiki|sevu> ok 20161020 22:29:17< celticminstrel> It reminds me of something I got when trying to investigate the flg problem, not sure if it was fixed though. 20161020 22:31:30< shiki|sevu> maybe git blame can tell us? but I don't know about which file this bug was 20161020 22:34:55-!- tad_carlucci [~lundberg@173.217.65.103] has joined #wesnoth-dev 20161020 22:35:27< tad_carlucci> celticminstrel, OK. I appologize. I wrote some tests and you're use should work. 20161020 22:35:29-!- travis-ci [~travis-ci@ec2-54-167-110-124.compute-1.amazonaws.com] has joined #wesnoth-dev 20161020 22:35:30< travis-ci> wesnoth/wesnoth#11677 (lua_mapgen_stuff - ffe356f : Celtic Minstrel): The build passed. 20161020 22:35:31< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/169370724 20161020 22:35:32-!- travis-ci [~travis-ci@ec2-54-167-110-124.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161020 22:44:25-!- mattsc [~mattsc@wesnoth/developer/mattsc] has quit [Quit: So long and thanks for all the fish.] 20161020 22:49:41-!- travis-ci [~travis-ci@ec2-54-234-148-173.compute-1.amazonaws.com] has joined #wesnoth-dev 20161020 22:49:42< travis-ci> wesnoth/wesnoth#11679 (lua_mapgen_stuff - 0e47e72 : Celtic Minstrel): The build has errored. 20161020 22:49:42< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/169377515 20161020 22:49:42-!- travis-ci [~travis-ci@ec2-54-234-148-173.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161020 22:49:48-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20161020 22:51:57-!- Greg-Boggs [~greg_bogg@173.240.241.83] has joined #wesnoth-dev 20161020 22:52:40< shiki|sevu> Good Night 20161020 22:53:18-!- Bonobo [~Bonobo@2001:44b8:254:3200:f82b:1118:8096:6cd2] has joined #wesnoth-dev 20161020 23:03:17-!- shiki|sevu [~Shiki@141.39.226.226] has quit [Quit: Verlassend] 20161020 23:07:48-!- iceiceice [~chris@pool-173-61-153-221.cmdnnj.fios.verizon.net] has quit [Ping timeout: 250 seconds] 20161020 23:11:56-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20161020 23:19:31-!- tad_carlucci [~lundberg@173.217.65.103] has quit [Quit: Off to resolve a merge conflict between the wife and husband branches of my real life.] 20161020 23:27:14-!- travis-ci [~travis-ci@ec2-54-80-28-96.compute-1.amazonaws.com] has joined #wesnoth-dev 20161020 23:27:15< travis-ci> wesnoth/wesnoth#11680 (lua_mapgen_stuff - 7132721 : Celtic Minstrel): The build passed. 20161020 23:27:15< travis-ci> Build details : https://travis-ci.org/wesnoth/wesnoth/builds/169377737 20161020 23:27:15-!- travis-ci [~travis-ci@ec2-54-80-28-96.compute-1.amazonaws.com] has left #wesnoth-dev [] 20161020 23:40:20< vultraz> hmmm 20161020 23:40:25< vultraz> travis failed on my pr.. 20161020 23:41:01-!- iceiceice [~chris@50-245-222-235-static.hfc.comcastbusiness.net] has joined #wesnoth-dev 20161020 23:41:14< vultraz> but it looks like linker rather than compiler? 20161020 23:41:36< vultraz> undefined reference to std::regex_iterator 20161020 23:43:59< vultraz> but the file includes 20161020 23:44:50< vultraz> ...ah... 20161020 23:44:57< vultraz> "The GNU C++ standard library supports , but not until version 4.9.0. (The headers were present in earlier versions, but were unusable.)" 20161020 23:45:06< vultraz> and we're still on ... 4.8 I guess :| 20161020 23:45:10< vultraz> god dammit 20161020 23:45:26< vultraz> curse you, gcc 4! 20161020 23:47:11< irker958> wesnoth: Charles Dang wesnoth:boost_to_std_regex 2ad9a24854f0 / src/ (7 files in 6 dirs): Convert uses of boost::regex and related functions/types to their stdlib counter https://github.com/wesnoth/wesnoth/commit/2ad9a24854f025ca38588dad9305622c38af09c1 20161020 23:47:23< vultraz> putting it in a separate branch until we upgrade 20161020 23:47:30< vultraz> from this ancient compiler 20161020 23:47:39< vultraz> we can delete boost_trimmings 20161020 23:54:12< DeFender1031> vultraz, WTH would you still be on GCC 4? 20161020 23:54:28< vultraz> minimum compiler support :| 20161020 23:54:31< vultraz> 4.8 20161020 23:56:49< vultraz> celticminstrel has a chart somewhere about compiler support 20161020 23:57:42< DeFender1031> is there really a need to be tied to such an old version? --- Log closed Fri Oct 21 00:00:46 2016