--- Log opened Wed Mar 13 00:00:10 2013 --- Day changed Wed Mar 13 2013 20130313 00:00:10-!- _8680_ [~quassel@S010620aa4b739215.vw.shawcable.net] has joined #wesnoth-dev 20130313 00:11:21-!- thunderstruck [~thunderst@82.44.238.175] has quit [Quit: Leaving] 20130313 00:14:52-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 250 seconds] 20130313 00:22:10-!- Rei2 [ayanami@unaffiliated/shadowmaster/bot/rei2] has joined #wesnoth-dev 20130313 00:22:20< shadowm> %log 56169 20130313 00:22:29< Rei2> shadowm: Revision 56169 (jamit) on Sun Feb 3 19:05:22 2013: 20130313 00:22:29< Rei2> shadowm: Give animations a chance (optional) to progress while fog/shroud clearing occurs. 20130313 00:22:32< Rei2> shadowm: 20130313 00:22:33< Rei2> shadowm: This should help with bug #20324, maybe fix it. 20130313 00:22:34< Rei2> shadowm: (+2 discarded lines) 20130313 00:22:35< Rei2> shadowm: Web interface URL: http://svn.gna.org/viewcvs/wesnoth?view=rev&rev=56169 20130313 00:23:12< shadowm> _Coffee, boucman: git bisect says this is the cause of #20602. I'm posting in the bug tracker in a few minutes. 20130313 00:23:22< shadowm> wesbot: bug 20324 20130313 00:23:23< wesbot> Bug #20324 Assigned to: J Tyne Status: Fixed Priority: 5 - Normal 20130313 00:23:26< wesbot> Summary: Choppy movement on fogged maps 20130313 00:23:29< wesbot> Original submission: Due to the fog changes in the dev branch, units pause on 20130313 00:23:32< wesbot> each hex of the route when revealing fogged locations. The lag is clearly visibl 20130313 00:23:35< wesbot> URL: https://gna.org/bugs/?20324 20130313 00:33:06-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20130313 00:35:41< shadowm> boucman: I deassigned #20602 from you and reassigned to jamit as I said above (see the logs). 20130313 00:35:49< shadowm> *reassigned it 20130313 00:36:07< boucman> k 20130313 00:37:44< shadowm> Upthorn: What's up with bug #20385? 20130313 00:38:02< shadowm> Upth: same question. 20130313 00:38:54-!- Rei2 [ayanami@unaffiliated/shadowmaster/bot/rei2] has left #wesnoth-dev [] 20130313 00:39:22< Upthorn> same status as last time you asked, I was able to track it as far as an empty wml node crashing on child_or_add 20130313 00:39:38< Upthorn> as far as I'm aware, that shouldn't be happening 20130313 00:39:48< Upthorn> completely unable to determine why it does 20130313 00:40:31< Upthorn> WML code is far too dense for me to try and piece it together 20130313 00:42:26< shadowm> Uh. 20130313 00:42:35< shadowm> The invalid read first happens in your code. 20130313 00:43:02-!- iwaim [~iwaim@2001:2c0:40e:2002:0:4:14:80] has joined #wesnoth-dev 20130313 00:43:20< shadowm> I mean, triggered by it. 20130313 00:43:38< shadowm> Empty WML nodes are used a lot, so there must be something in the persistent store implementation that somehow corrupts the config object's state. 20130313 00:44:38< Upthorn> the crash is happening in a newly created config object 20130313 00:45:47< Upthorn> and even if it's my code causing the state to become invalid, which is likely, I still can't figure out why it's becoming invalid because the config object code is too dense for me to read 20130313 00:47:41< Upthorn> I have no idea why anything that occurs in my code should cause the config object to become corrupt 20130313 00:48:45< shadowm> Do config objects track some static state? 20130313 00:49:10< shadowm> I mean, do they deal with any static class members or global variables? 20130313 00:49:55< Upthorn> nothing in my code does 20130313 00:50:14< shadowm> No, I meant the config class itself. 20130313 00:54:18-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130313 01:09:15< Upthorn> I didn't notice any, but there's a lot to read through 20130313 01:12:09-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 252 seconds] 20130313 01:13:44-!- Nephro [~neph@cpc4-broo8-2-0-cust224.14-2.cable.virginmedia.com] has quit [Remote host closed the connection] 20130313 01:21:52-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20130313 01:33:27-!- stikonas_ [~gentoo@128.232.240.234] has joined #wesnoth-dev 20130313 01:33:27-!- stikonas_ [~gentoo@128.232.240.234] has quit [Changing host] 20130313 01:33:27-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20130313 01:34:06-!- loonybot [~loonybot@wesnoth/bot/loonybot] has quit [Remote host closed the connection] 20130313 01:34:24-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Read error: Connection reset by peer] 20130313 01:34:50-!- Espreon [~sabayonus@wesnoth/developer/espreon] has quit [Ping timeout: 260 seconds] 20130313 01:42:41-!- Espreon [~sabayonus@c-68-81-222-181.hsd1.pa.comcast.net] has joined #wesnoth-dev 20130313 01:43:05-!- Espreon is now known as Guest35624 20130313 01:43:23-!- faabumc [~vcr@wesnoth/developer/faabumc] has joined #wesnoth-dev 20130313 01:43:43-!- Guest35624 [~sabayonus@c-68-81-222-181.hsd1.pa.comcast.net] has quit [Changing host] 20130313 01:43:43-!- Guest35624 [~sabayonus@wesnoth/developer/espreon] has joined #wesnoth-dev 20130313 01:43:48-!- Guest35624 is now known as Espreon 20130313 01:52:36-!- AI0867 [~ai@wesnoth/developer/ai0867] has quit [Ping timeout: 252 seconds] 20130313 01:54:29-!- AI0867 [~ai@wesnoth/developer/ai0867] has joined #wesnoth-dev 20130313 01:59:24-!- trewe [~trewe@87.196.145.61] has quit [Ping timeout: 276 seconds] 20130313 02:52:54-!- Gambit [~gambit@wesnoth/developer/grickit] has quit [Remote host closed the connection] 20130313 02:54:20-!- Elvish_Pillager [~eli@dhip-029.rrw.residences.colby.edu] has quit [Ping timeout: 250 seconds] 20130313 03:05:56-!- vultraz [~chatzilla@124.109.10.167] has joined #wesnoth-dev 20130313 03:05:57-!- vultraz [~chatzilla@124.109.10.167] has quit [Changing host] 20130313 03:05:57-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20130313 03:12:48-!- iwaim [~iwaim@2001:2c0:40e:2002:0:4:14:80] has quit [Ping timeout: 264 seconds] 20130313 03:17:45-!- iwaim [~iwaim@2001:2c0:40e:2002:0:4:14:80] has joined #wesnoth-dev 20130313 03:21:06-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20130313 03:30:59-!- faabumc [~vcr@wesnoth/developer/faabumc] has quit [Quit: Ex-Chat] 20130313 04:26:03-!- faabumc [~vcr@wesnoth/developer/faabumc] has joined #wesnoth-dev 20130313 04:31:42-!- Ivanovic_ [~ivanovic@dtmd-4db2a4a8.pool.mediaWays.net] has joined #wesnoth-dev 20130313 04:34:30-!- Ivanovic [~ivanovic@wesnoth/developer/ivanovic] has quit [Ping timeout: 260 seconds] 20130313 04:35:29-!- Ivanovic_ is now known as Ivanovic 20130313 04:37:55-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 245 seconds] 20130313 04:50:42-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130313 04:54:46-!- Espreon [~sabayonus@wesnoth/developer/espreon] has quit [Quit: Konversation terminated!] 20130313 06:13:36-!- _8680_ [~quassel@S010620aa4b739215.vw.shawcable.net] has quit [] 20130313 07:23:39-!- Ivanovic [~ivanovic@dtmd-4db2a4a8.pool.mediaWays.net] has quit [Changing host] 20130313 07:23:39-!- Ivanovic [~ivanovic@wesnoth/developer/ivanovic] has joined #wesnoth-dev 20130313 07:35:36-!- mattsc [~mattsc@d154-20-34-165.bchsia.telus.net] has quit [Quit: bye] 20130313 08:11:08-!- Ivanovic changed the topic of #wesnoth-dev to: 1.10.6 and 1.11.2 planned for March 16 | 168 bugs, 333 feature requests, 19 patches | Logs: http://irclogs.wesnoth.org | Don't paste on IRC! Use a pastebin: http://pastebin.com | http://imagebin.org 20130313 08:21:08-!- soundlst [~quassel@24.246.80.197] has quit [Remote host closed the connection] 20130313 08:22:20-!- Soundlust [~quassel@24.246.80.197] has joined #wesnoth-dev 20130313 08:26:32-!- Rei2 [ayanami@unaffiliated/shadowmaster/bot/rei2] has joined #wesnoth-dev 20130313 08:26:40< shadowm> %log HEAD 20130313 08:26:44< Rei2> shadowm: Revision 56485 (shadowmaster) on Wed Mar 13 07:26:30 2013: 20130313 08:26:44< Rei2> shadowm: storyscreen: Increase bottom padding when reaching the bottom of the screen 20130313 08:26:47< Rei2> shadowm: 20130313 08:26:48< Rei2> shadowm: This seems to have been an oversight on my part ages ago that only 20130313 08:26:49< Rei2> shadowm: (+2 discarded lines) 20130313 08:26:50< Rei2> shadowm: Web interface URL: http://svn.gna.org/viewcvs/wesnoth?view=rev&rev=56485 20130313 08:27:16< shadowm> Ivanovic: What's up with the topic? fendrin hasn't reverted his code yet and there's still that animation glitch awaiting to be fixed. 20130313 08:45:35-!- _Coffee [~david@ppp118-210-51-209.lns20.adl2.internode.on.net] has joined #wesnoth-dev 20130313 08:51:16-!- boucman_work [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20130313 08:57:50-!- thunderstruck [~thunderst@cpc5-sgyl29-2-0-cust174.sgyl.cable.virginmedia.com] has joined #wesnoth-dev 20130313 09:01:44-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20130313 09:06:26< shadowm> Why is the persistent variables implementation code so dense, come on. 20130313 09:32:32-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-dev 20130313 09:36:46-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [] 20130313 09:44:05-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20130313 09:44:08< shadowm> (gdb) p this->cfg_.empty() 20130313 09:44:08< shadowm> $23 = false 20130313 09:44:08< shadowm> (gdb) p *(this->cfg_.ordered_begin()) 20130313 09:44:08< shadowm> Attempt to take address of value not located in memory. 20130313 09:44:30< shadowm> ^ Am I doing something wrong or is gdb trying to tell me that there's something wrong with the return value of ordered_begin() for this config object? 20130313 09:45:39< shadowm> Hm. 20130313 09:45:41< shadowm> (gdb) p this->cfg_.ordered_children.size() 20130313 09:45:41< shadowm> $24 = 2 20130313 09:45:42< shadowm> (gdb) p *(this->cfg_.ordered_children.begin()) 20130313 09:45:42< shadowm> Attempt to take address of value not located in memory. 20130313 09:45:55< shadowm> ^ Yeah, I must be doing something wrong. 20130313 09:46:52< shadowm> It guess gdb doesn't understand generic iterators. 20130313 09:49:33< shadowm> I'm a little disappointed that #20385 no longer causes a segmentation fault here but I still get the valgrind warning flood. 20130313 09:53:08-!- AI0867 [~ai@wesnoth/developer/ai0867] has quit [Ping timeout: 248 seconds] 20130313 09:54:51-!- AI0867 [~ai@wesnoth/developer/ai0867] has joined #wesnoth-dev 20130313 09:58:38< shadowm> Sigh, that was frustrating and pointless. 20130313 09:58:45-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [] 20130313 09:58:49-!- Rei2 [ayanami@unaffiliated/shadowmaster/bot/rei2] has quit [Quit: shutting down] 20130313 10:05:04-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20130313 10:05:35-!- wesbot changed the topic of #wesnoth-dev to: 1.10.6 and 1.11.2 planned for March 16 | 169 bugs, 333 feature requests, 19 patches | Logs: http://irclogs.wesnoth.org | Don't paste on IRC! Use a pastebin: http://pastebin.com | http://imagebin.org 20130313 10:27:12-!- molgrum__ [~molgrum@h-234-238.a189.priv.bahnhof.se] has joined #wesnoth-dev 20130313 10:29:22-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130313 10:31:13-!- mjs-de [~mjs-de@d185075.adsl.hansenet.de] has joined #wesnoth-dev 20130313 10:32:03-!- Crab_ [Crab_@wesnoth/developer/crab] has joined #wesnoth-dev 20130313 10:36:26-!- Netsplit *.net <-> *.split quits: molgrum_ 20130313 10:52:18-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-dev 20130313 10:55:44-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130313 11:01:24-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130313 11:04:39-!- faabumc [~vcr@wesnoth/developer/faabumc] has quit [Quit: Ex-Chat] 20130313 11:08:53-!- stikonas [~gentoo@128.232.240.234] has joined #wesnoth-dev 20130313 11:08:53-!- stikonas [~gentoo@128.232.240.234] has quit [Changing host] 20130313 11:08:53-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20130313 11:15:30-!- Anakonda [aomaal@linux.utu.fi] has joined #wesnoth-dev 20130313 11:28:30-!- timotei [~pi@wesnoth/developer/timotei] has quit [Ping timeout: 240 seconds] 20130313 11:28:44-!- timotei [~pi@79.119.96.64] has joined #wesnoth-dev 20130313 11:28:45-!- timotei [~pi@79.119.96.64] has quit [Changing host] 20130313 11:28:47-!- timotei [~pi@wesnoth/developer/timotei] has joined #wesnoth-dev 20130313 11:40:49-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20130313 11:48:01-!- exciton [chuck-the-@89.208.169.104] has quit [Read error: Connection reset by peer] 20130313 11:48:15-!- exciton [chuck-the-@89.208.169.104] has joined #wesnoth-dev 20130313 12:08:32-!- loonybot [~loonybot@158.255.133.34] has joined #wesnoth-dev 20130313 12:08:32-!- loonybot [~loonybot@158.255.133.34] has quit [Changing host] 20130313 12:08:32-!- loonybot [~loonybot@wesnoth/bot/loonybot] has joined #wesnoth-dev 20130313 12:10:58< shadowm> _Coffee: Re http://forums.wesnoth.org/viewtopic.php?f=10&t=38487, why not use the bug tracker too? 20130313 12:11:08< shadowm> That is, most developers do not read the forums. 20130313 12:34:13-!- Elvish_Pillager [~eli@dhip-029.rrw.residences.colby.edu] has joined #wesnoth-dev 20130313 12:52:35-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Quit: Lost terminal] 20130313 13:09:17-!- DCW [~Thunderbi@cpc1-finc14-2-0-cust12.4-2.cable.virginmedia.com] has joined #wesnoth-dev 20130313 13:19:41-!- Blueblaze [~Blueblaze@adsl-99-158-46-191.dsl.hstntx.sbcglobal.net] has quit [Quit: Blueblaze] 20130313 13:27:41-!- DCW [~Thunderbi@cpc1-finc14-2-0-cust12.4-2.cable.virginmedia.com] has quit [Quit: DCW] 20130313 13:42:05-!- AI0867 [~ai@wesnoth/developer/ai0867] has quit [Ping timeout: 246 seconds] 20130313 13:49:17-!- AI0867 [~ai@wesnoth/developer/ai0867] has joined #wesnoth-dev 20130313 13:50:51-!- AI0867 [~ai@wesnoth/developer/ai0867] has quit [Client Quit] 20130313 13:50:53-!- AI0867_ [~ai@wesnoth/developer/ai0867] has joined #wesnoth-dev 20130313 13:50:59-!- AI0867_ is now known as AI0867 20130313 14:22:23-!- prkc [~negusnyul@dsl51B68226.pool.t-online.hu] has joined #wesnoth-dev 20130313 14:23:06-!- prkc [~negusnyul@dsl51B68226.pool.t-online.hu] has quit [Remote host closed the connection] 20130313 15:22:25-!- trewe [~trewe@87.196.10.226] has joined #wesnoth-dev 20130313 15:31:45-!- trewe [~trewe@87.196.10.226] has quit [Quit: Quit] 20130313 15:39:09-!- _8680_ [~quassel@S010620aa4b739215.vw.shawcable.net] has joined #wesnoth-dev 20130313 15:48:11-!- prkc [~negusnyul@dsl51B68226.pool.t-online.hu] has joined #wesnoth-dev 20130313 15:52:06-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 245 seconds] 20130313 15:57:15-!- vultraz [~chatzilla@124.109.10.167] has joined #wesnoth-dev 20130313 15:57:16-!- vultraz [~chatzilla@124.109.10.167] has quit [Changing host] 20130313 15:57:16-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20130313 16:06:37-!- stikonas [~gentoo@128.232.240.234] has joined #wesnoth-dev 20130313 16:06:38-!- stikonas [~gentoo@128.232.240.234] has quit [Changing host] 20130313 16:06:38-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20130313 16:11:16-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 248 seconds] 20130313 16:13:52-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20130313 16:25:00-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Ping timeout: 240 seconds] 20130313 16:29:04-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20130313 16:36:36-!- _8680_ [~quassel@S010620aa4b739215.vw.shawcable.net] has quit [] 20130313 16:38:42-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-dev 20130313 16:51:06-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130313 16:57:06-!- mattsc [~mattsc@fw.hia.nrc.ca] has joined #wesnoth-dev 20130313 17:00:19-!- _8680_ [~quassel@S0106002564d593e5.vw.shawcable.net] has joined #wesnoth-dev 20130313 17:41:30-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-dev 20130313 18:22:07-!- [Relic] [~relic@99-58-54-211.lightspeed.milwwi.sbcglobal.net] has joined #wesnoth-dev 20130313 18:22:20-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130313 18:40:19-!- zookeeper2 [~lmsnie@87-100-211-108.bb.dnainternet.fi] has joined #wesnoth-dev 20130313 18:41:27-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 260 seconds] 20130313 18:58:36-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has quit [Remote host closed the connection] 20130313 18:58:44-!- EdB [~edb@89-93-184-215.hfc.dyn.abo.bbox.fr] has joined #wesnoth-dev 20130313 18:59:19-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-dev 20130313 19:00:29< bumbadadabum> mattsc: Could you help me with my (noob) problem 20130313 19:00:41-!- skyfaller [~skyfaller@ool-43551edd.dyn.optonline.net] has joined #wesnoth-dev 20130313 19:00:41-!- skyfaller [~skyfaller@ool-43551edd.dyn.optonline.net] has quit [Changing host] 20130313 19:00:41-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has joined #wesnoth-dev 20130313 19:01:39< mattsc> bumbadadabum: That depends on the problem. I can try. 20130313 19:02:03< bumbadadabum> mattsc: I just started trying out luaai 20130313 19:02:20< bumbadadabum> and I have trouble making it work in my scenario 20130313 19:02:47< bumbadadabum> I wrote some simple code as a test 20130313 19:02:48< bumbadadabum> http://pastebin.com/fQZ8V3wC 20130313 19:03:09< bumbadadabum> and it spews out an error about me appointing a nil value 20130313 19:03:55< mattsc> What's the exact error message? 20130313 19:04:11< bumbadadabum> gimme a second, I'll have to load up wesnoth 20130313 19:04:29< mattsc> Also, is this 1.10 or 1.11? 20130313 19:04:33< bumbadadabum> 1.11 20130313 19:05:48< mattsc> Well, one of the problems I see is that dachnor_ai is not defined in the [stage] tags. So that might be what the error means. 20130313 19:05:59< mattsc> ... where it comes from, I mean. 20130313 19:06:23< bumbadadabum> [string "dachnow_ai:retreat_undead()"]:1: attempt to index global 'dachnor_ai' (a nil value) 20130313 19:06:37< mattsc> yeah, that's what I mean. 20130313 19:06:56< bumbadadabum> and 'The LuaAI debug library is only available in debug mode' 20130313 19:07:16< bumbadadabum> mattsc: How do I fix it? 20130313 19:07:45< mattsc> Let me start with a few questions first, just to make sure that I understand what you're trying to do (because I probably wouldn't set it up quite in this way) 20130313 19:08:05< mattsc> Are you intentionally using different stages, rather than one stage with different candidate actions? 20130313 19:08:15< bumbadadabum> No 20130313 19:08:39< bumbadadabum> should I change that? 20130313 19:08:48< mattsc> Ok. 20130313 19:09:15< mattsc> Well, it depends what you want to accomplish. The CA approach is much more versatile, so that's what I/we usually do. 20130313 19:09:40< mattsc> And it can (probably do) pretty much everything you can accomplish with separate stages. 20130313 19:09:46< bumbadadabum> ok 20130313 19:10:17< mattsc> Other question: the units on that side, are they only supposed to do the things here, or display the default behavior as well? 20130313 19:10:29< bumbadadabum> this is additional 20130313 19:10:32< mattsc> And finally: SP or MP? 20130313 19:10:37< bumbadadabum> but more important that the normal stuff 20130313 19:10:40< bumbadadabum> and it's for SP 20130313 19:11:08< mattsc> Ok, I would go with one stage then, and separate CAs. 20130313 19:11:24< mattsc> Do you have the AI-demos add-on downloaded? 20130313 19:11:38< bumbadadabum> Yes. 20130313 19:11:46< mattsc> I think it's easiest if I just point you to an example... 20130313 19:11:56< mattsc> Let me just have a look... 20130313 19:12:36< bumbadadabum> Also, would it better if I combine function 1 and 2? 20130313 19:13:38< mattsc> That's pretty much up to you. Sometimes it's easier to combine them, sometimes to keep them separate. 20130313 19:13:57< mattsc> Ok, so looking for an example that has not been converted to a Micro AI... 20130313 19:14:12< bumbadadabum> if acolytes >= 2 or enemy >= 5 20130313 19:14:26< bumbadadabum> That's how this stuff is done in Lua, right? 20130313 19:14:27< mattsc> Have a look at scenarios/prune-cart.cfg 20130313 19:14:45-!- _8680_ [~quassel@S0106002564d593e5.vw.shawcable.net] has quit [] 20130313 19:14:50< mattsc> As in, is that a valid if statement? 20130313 19:15:00< bumbadadabum> yes 20130313 19:15:25< mattsc> assuming that acolytes and enemy are variables containing numerical values, then yes 20130313 19:15:40< mattsc> oh, but they aren't, 20130313 19:15:48< mattsc> You want: 20130313 19:15:57< bumbadadabum> should I use acolytes.length? 20130313 19:16:09< mattsc> if (#acolytes >= 2) or (#enemies >=5) then ... 20130313 19:16:36< mattsc> The () are not necessary here, I just add them for readability 20130313 19:17:09< mattsc> Do you have prune_cart.cfg in front of you? 20130313 19:17:14< bumbadadabum> so I should use the macro? 20130313 19:17:37< mattsc> Which macro? 20130313 19:18:06< bumbadadabum> MODIFY_AI_ADD_CANDIDATE_ACTION 20130313 19:18:57< mattsc> I usually do that, but you can also put the [candidate_action] tags directly into the [stage] tag above. 20130313 19:19:36< mattsc> Also, notice that in that case I have some of the default CAs commented out in the [stage] tag. You probably don't want to do that if you also want default behavior. 20130313 19:20:26< bumbadadabum> What more? 20130313 19:20:49< bumbadadabum> engine should be lua, name and id are my choice 20130313 19:20:56< mattsc> That's pretty much it. The functions doing the work can either be directly in the [engine] tag, or included in a file as in this example. 20130313 19:21:04< bumbadadabum> ok 20130313 19:21:08< mattsc> yes 20130313 19:21:49< bumbadadabum> and evaluation and execution? 20130313 19:21:51< mattsc> Also, you can give the CAs hard-coded scores, if it's always the same. 20130313 19:22:08< mattsc> evaluation is the score I just talked about. 20130313 19:22:27< mattsc> Values for the default CAs are 200,000 down to 10,000 20130313 19:22:49< bumbadadabum> so I should use score= 200,000? 20130313 19:22:49< mattsc> So if you want your CAs executed first, give them scores higher than 200000 20130313 19:23:18< mattsc> Check out lua/prune-cart_engine.lua for examples. 20130313 19:23:38< mattsc> And execution= calls the functions you define in the engine. 20130313 19:23:54< mattsc> For example: 20130313 19:23:54< bumbadadabum> so it should be dachnor_ai 20130313 19:24:07< mattsc> execution="(...):retreat_undead()" 20130313 19:24:28< mattsc> No, dachnor_ai is just a local (internal) variable inside the engine tag. 20130313 19:24:45< mattsc> It gets returned and access through the ... variable 20130313 19:24:58< mattsc> accessed 20130313 19:25:47-!- Upthorn [~ogmar@108-85-91-228.lightspeed.frokca.sbcglobal.net] has quit [Ping timeout: 252 seconds] 20130313 19:27:06-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20130313 19:28:24< bumbadadabum> mattsc: Is the Lua syntax correct? 20130313 19:30:14< mattsc> bumbadadabum: ? 20130313 19:30:33< bumbadadabum> mattsc: Is the lua correct? 20130313 19:30:40< bumbadadabum> (it does run now, thank you) 20130313 19:30:43< mattsc> which lua? 20130313 19:30:48< bumbadadabum> the ai 20130313 19:32:15< mattsc> Generally it looks ok, but I haven't gone over every detail. One problem: 20130313 19:32:33< mattsc> race = undead needs to be race = "undead" 20130313 19:33:05< mattsc> Otherwise it filters for the races stored in a lua variable called undead (which is not defined) 20130313 19:33:19< bumbadadabum> ok 20130313 19:34:12< mattsc> While you are writing this, you should include lots of debug message, e.g. with print() or wesnoth.message() functions 20130313 19:34:25< bumbadadabum> Ok 20130313 19:35:23< mattsc> Also, looking at the structure of tables often helps when the code doesn't seem to do what it should. debug_utils.dbms() from WLP is extremely useful for this. 20130313 19:35:55< mattsc> And the it's just a lot of trial and error. :) 20130313 19:36:02< mattsc> s/the/then 20130313 19:36:11< bumbadadabum> So it's like wml 20130313 19:36:31< mattsc> It's like any coding ... 20130313 19:36:42< bumbadadabum> only the game loads when there's something wrong 20130313 19:36:48< mattsc> You learn by making mistakes and get better at it in time. But you'll always make mistakes. 20130313 19:36:52< mattsc> Or at least I do. 20130313 19:37:15< bumbadadabum> I never make mistakes. I am perfect. 20130313 19:37:22< mattsc> Good for you! 20130313 19:37:29< bumbadadabum> "x = humans[p].x" 20130313 19:37:39< bumbadadabum> is this correct in lua? 20130313 19:38:24< mattsc> One of the advantages of lua is that you don't even have to turn control over to the AI. You can test the individual CAs using a right-click menu option. 20130313 19:38:39< mattsc> should be humans[i], but besides that, yes 20130313 19:38:53< bumbadadabum> for i, p in ipairs(humans) 20130313 19:39:09< bumbadadabum> oh, this makes i the variable 20130313 19:39:18< mattsc> Oh, also it's unnecessary, because p = humans[i] 20130313 19:39:30< mattsc> so it can simply be: x = p.x 20130313 19:39:33< bumbadadabum> ok 20130313 19:40:11< bumbadadabum> I must say, I like lua 20130313 19:41:10< mattsc> If you want to try out the right-click testing, check out scenarios/test.cfg and lua/test_lua.lua 20130313 19:41:32< bumbadadabum> I'm going to test by putting 2 acolytes near the leader 20130313 19:41:47< bumbadadabum> because I'm very lazy 20130313 19:41:48< mattsc> You'll have to adapt them a bit to your situation, of course, but it makes testing much quicker, esp. in debug mode 20130313 19:42:27-!- trewe [~trewe@87.196.10.226] has joined #wesnoth-dev 20130313 19:43:05< bumbadadabum> It doesn't seem to work 20130313 19:43:10< bumbadadabum> the ai still attacks acolytes 20130313 19:44:38< mattsc> Well, the default combat stage is still there, right? 20130313 19:44:47< mattsc> sorry: s/stage/CA 20130313 19:46:04< bumbadadabum> But my score (230000) should be more important 20130313 19:46:50< mattsc> But does it "disable" the respective units from attacking after it's done? 20130313 19:47:22< mattsc> Your CA gets executed first, then the AI goes on to the CA with the next highest score. 20130313 19:47:22< bumbadadabum> they don't even move to 18,24 20130313 19:47:37< bumbadadabum> right 20130313 19:48:06< mattsc> Well, then you need to find out why that isn't the case. Put in some debug messages and see if things are happening as you expect them. 20130313 19:48:08< mattsc> bumbadadabum: I'll be afk for a few minutes 20130313 19:48:15< bumbadadabum> how do you disable combat once the CA is met 20130313 19:48:31< bumbadadabum> (or wait, it doesn't even execute) 20130313 19:55:19< mattsc> bumbadadabum: I'm back. Any specific question at this time? 20130313 19:58:14< bumbadadabum> mattsc: Why doesn't it work 20130313 19:58:39< mattsc> That's a generic question, not a specific one. :) 20130313 19:59:00< bumbadadabum> then no 20130313 19:59:21< mattsc> What OS are you using? 20130313 19:59:37< bumbadadabum> Mac OS 10.6.8 20130313 19:59:43< mattsc> What I mean is: can you easily check your stdout and stderr? 20130313 20:00:00< bumbadadabum> I can run if from the commandline 20130313 20:00:19< mattsc> Well, if you can, put a print() meassage at the very beginning of the execution function 20130313 20:00:32< mattsc> If you'd rather have it appear int he Wesnoth window, use wesnoth.message() 20130313 20:00:58< mattsc> That way, you can see if the execution function even gets called. 20130313 20:01:07< Ivanovic> shadowm: planned != will happen for sure 20130313 20:01:27< bumbadadabum> mattsc: I think I found the problem 20130313 20:03:54< bumbadadabum> nope 20130313 20:04:06< bumbadadabum> mattsc: I'm going to add messages noe 20130313 20:04:08< bumbadadabum> *now 20130313 20:04:52< mattsc> bumbadadabum: ok 20130313 20:06:48-!- trewe [~trewe@87.196.10.226] has quit [Ping timeout: 264 seconds] 20130313 20:12:09< bumbadadabum> mattsc: nothing triggers 20130313 20:13:08< mattsc> Are you sure your evaluation function really returns a valid score then? 20130313 20:13:17-!- Blueblaze [~Blueblaze@adsl-99-158-47-208.dsl.hstntx.sbcglobal.net] has joined #wesnoth-dev 20130313 20:13:37< bumbadadabum> http://pastebin.com/xPvGGYXJ 20130313 20:13:41< bumbadadabum> mattsc: ^ 20130313 20:14:02< bumbadadabum> Sorry if the non-ideal indentation bothers you 20130313 20:14:14< bumbadadabum> I haven't run wmlindent yet 20130313 20:15:37< mattsc> evaluation="return 230000" 20130313 20:16:11< bumbadadabum> ok 20130313 20:16:31< bumbadadabum> oh lord this is stupid 20130313 20:16:32< bumbadadabum> :p 20130313 20:16:45< bumbadadabum> *lawd 20130313 20:19:21< bumbadadabum> mattsc: Now I get the nil value error again 20130313 20:25:42-!- zookeeper2 is now known as zookeeper 20130313 20:25:47-!- zookeeper [~lmsnie@87-100-211-108.bb.dnainternet.fi] has quit [Changing host] 20130313 20:25:47-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20130313 20:30:30< _Coffee> shadowm: I intend to put the bugs on the tracker when I know I've got most of the important ones (wrt http://forums.wesnoth.org/viewtopic.php?f=10&t=38487&p=549549#p549549) 20130313 20:48:04-!- Blueblaze [~Blueblaze@adsl-99-158-47-208.dsl.hstntx.sbcglobal.net] has quit [Quit: Blueblaze] 20130313 20:56:10-!- mordante [~mordante@wesnoth/developer/mordante] has joined #wesnoth-dev 20130313 20:56:25< mordante> servus 20130313 21:00:32-!- Espreon [~sabayonus@wesnoth/developer/espreon] has joined #wesnoth-dev 20130313 21:02:12< Espreon> mordante: Hello. 20130313 21:02:29< bumbadadabum> *servatus 20130313 21:03:19< mordante> hi Espreon 20130313 21:04:15< Espreon> mordante: So, do you think you'll have time to inspect the patch today? 20130313 21:07:54< mordante> Espreon, yes about to compile test the patch 20130313 21:10:25< Espreon> Huzzah/ 20130313 21:10:26< Espreon> *. 20130313 21:10:44< thunderstruck> mordante: Hi. I think I can make implementation a bit more efficient by checking if month or weekday is in the date. 20130313 21:11:24< thunderstruck> E.g. if %b was specified, I only then apply translations on months. 20130313 21:11:56< mordante> thunderstruck, do you have that already done or not? 20130313 21:13:07< thunderstruck> No. I just thought about that now. But it won't take lot of time to implement it. 20130313 21:14:47< mordante> then rather not, I'm compiling now 20130313 21:15:09< mordante> and it's rather annoying to have different versions while reviewing 20130313 21:21:59< thunderstruck> And I'm not really sure what you meant yesterday then you said that implementation won't handle '%c'. 20130313 21:22:27< mordante> what will %c return? 20130313 21:22:28< thunderstruck> when* 20130313 21:22:39< thunderstruck> e.g. Thu Aug 23 14:55:02 2001? 20130313 21:23:02< thunderstruck> so Thu and Aug in this case would be translated. 20130313 21:23:30< thunderstruck> Because I still rely on strftime. 20130313 21:23:56< mordante> which will look silly in some languages since the location of the 23 will be wrong 20130313 21:25:38< thunderstruck> Yes. But the time formats are already translated in Wesnoth. 20130313 21:25:42< Espreon> Indeed. 20130313 21:25:49< Espreon> We don't even use %c 20130313 21:26:01< mordante> says who? 20130313 21:26:16< Espreon> Says grep? 20130313 21:26:31< Espreon> Are you implying that we may use it indrectly? 20130313 21:27:20< mordante> I'm quite sure there is a user preference to set the time format 20130313 21:27:20< thunderstruck> It's possible that the translator put %c instead of some formatting string. 20130313 21:27:55< Espreon> mordante: Just for twelve-hour vs. twenty-four hour 20130313 21:29:39-!- trewe [~trewe@87.196.66.47] has joined #wesnoth-dev 20130313 21:29:40< mordante> Espreon, and regardless whether it is used at the moment or not, the implementation does _not_ work properly 20130313 21:29:54< Espreon> Well, then there is a problem. 20130313 21:29:59< Espreon> ... maybe. 20130313 21:30:13< mordante> so when somebody adds code to Wesnoth using %c that person's code is broken due to this bug 20130313 21:30:43< Espreon> And why would we use it? 20130313 21:31:01< Espreon> (or anyone really) 20130313 21:31:31< mordante> I don't know, but adding code with know defects sounds like a bad idea to me 20130313 21:31:36< thunderstruck> mordante: I don't see why a code will brake because of %c or any other formatting parameter. 20130313 21:32:04< mordante> it breaks since the translation is wrong 20130313 21:32:10< thunderstruck> break* 20130313 21:32:47< thunderstruck> Do you mean the ordering of words/numbers of the translation of the words? 20130313 21:32:50< mordante> it does not show the date format in the proper locale 20130313 21:32:53< thunderstruck> or the* 20130313 21:32:55< mordante> yes 20130313 21:34:06< thunderstruck> Formatting was translated using gettext before me uploading this patch. 20130313 21:34:12< Espreon> Indeed. 20130313 21:34:39< thunderstruck> So if someone adds %c, nothing will brake. There will be just untranslated format. 20130313 21:34:49< thunderstruck> break* 20130313 21:35:13< mordante> thunderstruck, in the patch why the do{}while(false) loop? 20130313 21:35:33< thunderstruck> so that I could use break if the match was found. 20130313 21:35:58< thunderstruck> It might be not the best option. I tried to ask guys here about better ways to do it. 20130313 21:36:26< mordante> personally I would prefer small helper functions 20130313 21:36:44< Espreon> Boost.Locale may be able to work magicks, but... ... ... who knows? 20130313 21:36:57< mordante> or a chained if/else if 20130313 21:37:59< thunderstruck> hmm.. small helper functions could improve it. But if/else if won't be less efficient, I think. 20130313 21:38:12< thunderstruck> will be less* 20130313 21:39:09< mordante> thunderstruck, what would happen if in language x Saturday is translated as Sunny? 20130313 21:40:19< thunderstruck> Oh. I see. 20130313 21:41:26< thunderstruck> I could fix this and add helper functions at the same time. 20130313 21:42:38< mordante> eeek I see an evil strcpy 20130313 21:45:39< thunderstruck> Could you suggest how to avoid it? 20130313 21:46:32< mordante> using its nice cousin, strncpy 20130313 21:48:18< thunderstruck> Thanks. I've never known it. 20130313 21:48:44< mordante> you're welcome 20130313 21:49:31< mordante> the same for sprintf, use snprintf 20130313 21:49:45< mordante> unless you have to work with C89 code... 20130313 21:50:00-!- Octalot [~noct@host86-147-144-75.range86-147.btcentralplus.com] has joined #wesnoth-dev 20130313 21:51:29< thunderstruck> I think I could solve issue of ' anguage x Saturday is translated as Sunny' by translating things in order. E.g. if %b goes first I translate it first. 20130313 21:54:20< mordante> yes, also if somebody adds extra text to the string it might accidentally be 'translated' as date 20130313 21:54:54< mordante> so if the string contains 'Weder' it shouldn't turn into 'Miter' 20130313 21:56:00< thunderstruck> I see you left some notes on gna. Thanks. 20130313 21:56:43< thunderstruck> Why do you doubt about this approach? And do you have an alternative to it in mind? 20130313 21:57:04-!- mattsc [~mattsc@fw.hia.nrc.ca] has quit [Quit: bye] 20130313 21:57:27-!- mattsc [~mattsc@fw.hia.nrc.ca] has joined #wesnoth-dev 20130313 21:58:20< mordante> it's quite fragile if somebody adds text to the format string it might be interpreted as part of a date 20130313 21:58:54< Espreon> Examples please. 20130313 21:59:12< thunderstruck> I think that could be solved while taking formatting into account. 20130313 21:59:48< mordante> Espreon, I already gave examples 20130313 22:00:42< mordante> thunderstruck, might be I look forward to the patch 20130313 22:01:08< mordante> but I consider the approach as in the current patch fragile 20130313 22:02:19< mordante> btw thunderstruck are you familiar with RAII (and exception safe code)? 20130313 22:02:26< Espreon> OK 20130313 22:03:39< thunderstruck> mordante: Not really. I think I've read something about RAII in Wesnoth coding standards page. 20130313 22:04:43< thunderstruck> So I should put 'set locale back' part into a function and if something fails during wesnoth_strftime, I can call that function and exit? 20130313 22:05:09-!- prkc [~negusnyul@dsl51B68226.pool.t-online.hu] has quit [Remote host closed the connection] 20130313 22:05:34-!- wesbot changed the topic of #wesnoth-dev to: 1.10.6 and 1.11.2 planned for March 16 | 170 bugs, 333 feature requests, 19 patches | Logs: http://irclogs.wesnoth.org | Don't paste on IRC! Use a pastebin: http://pastebin.com | http://imagebin.org 20130313 22:05:51< mordante> no that's the wrong approach ;-) looking for an example to explain the better approach 20130313 22:06:25-!- EdB [~edb@89-93-184-215.hfc.dyn.abo.bbox.fr] has quit [Quit: Konversation terminated!] 20130313 22:07:10< mordante> thunderstruck, have a look at clip_rect_setter in sdl_utils.hpp:449 20130313 22:07:42< mordante> when the class is created it sets a clipping rectangle (or a locale for your case) 20130313 22:08:09< mordante> when it is destroyed it restores the original clipping rectangle (or a locale for your case) 20130313 22:08:40< mordante> so once the object is created, regardless how you terminate the function, a call to return or an exception the original value is reset 20130313 22:09:21< mordante> since setting the locale can return an error itself you need to test for the error in the constructor 20130313 22:09:35< mordante> then either throw an exception or set an error code you can test for 20130313 22:13:01-!- LordNasty [~NaSTy@93-43-168-243.ip92.fastwebnet.it] has quit [Ping timeout: 256 seconds] 20130313 22:13:17< thunderstruck> Ok. I'll use it in my patch. 20130313 22:16:11< mordante> ok 20130313 22:16:23< mordante> do have more questions? 20130313 22:17:32< thunderstruck> Hmm.. I'm still not sure if you doubt about the whole approach or the implementation issues? 20130313 22:20:02< mordante> I see no difference between the approach and the implementation 20130313 22:20:34< mordante> but you said you wanted to use a different approach 20130313 22:22:44< thunderstruck> I think of an approach as a general idea how to solve a problem and and implementation is just an implementation of that approach. 20130313 22:25:14< thunderstruck> I thought that another way to solve that date translations could be writing my own strftime like function. 20130313 22:25:33< thunderstruck> to solve date translations problem* 20130313 22:25:58< mordante> at the moment convert the timestring in the C locale and then match it against the English 20130313 22:27:00< mordante> that is fragile; when the translated string has another match in English it might get translated again 20130313 22:27:40< mordante> so that is what I think is the wrong approach 20130313 22:27:56< mordante> writing your own strftime would solve that issue 20130313 22:28:18< mordante> I don't know how easy it is to plug a new time locale in C/C++ 20130313 22:28:59< mordante> it is possible and maybe as Espreon suggested boost locale might be an option, never looked at it 20130313 22:30:12< Espreon> http://www.boost.org/doc/libs/1_53_0/libs/locale/doc/html/index.html 20130313 22:30:15< Espreon> Problems: 20130313 22:30:23< Espreon> a. Not sure if our minimum version has it 20130313 22:30:27< thunderstruck> I think it will add extra weight to the project as it depends on ICU library as far as I understand. 20130313 22:30:29< Espreon> *minimum required version 20130313 22:30:37< Espreon> b. Not sure if this "locale generation" is what I think it is 20130313 22:30:40< thunderstruck> But it might be an elegant solution. 20130313 22:30:44-!- Gambit [~gambit@wesnoth/developer/grickit] has joined #wesnoth-dev 20130313 22:30:50< Espreon> I think there was a c., but I forgot 20130313 22:31:14< Espreon> Well, from what I read, ICU is not a strict requirement. 20130313 22:31:28< Espreon> ... ICU just provides you with all the nice bells in whistles we probably don't really need. 20130313 22:31:33< Espreon> *and whistles 20130313 22:33:29< thunderstruck> Boost.Locale first realease was 1.48.0. 20130313 22:33:36< mordante> I'm off night 20130313 22:33:45< thunderstruck> Good night. 20130313 22:33:51< mordante> that means we can't use boost locale 20130313 22:34:00< Espreon> Until... 20130313 22:35:21 * mordante looks in his crystal ball, too bad still broken 20130313 22:35:36< Espreon> What is our minimum required version of boost anyway? 20130313 22:35:51< mordante> 1.36 20130313 22:36:09< Espreon> We're mostly bound by Debian stable, right? 20130313 22:36:44< mordante> Debian stable has 1.42 and we're kind of bound to that and the Pandora toolchain 20130313 22:37:07< Espreon> Hoo boy 20130313 22:37:55< mordante> anyway still off, bye 20130313 22:38:07-!- mordante [~mordante@wesnoth/developer/mordante] has quit [Quit: Leaving] 20130313 22:44:27-!- _Coffee [~david@ppp118-210-51-209.lns20.adl2.internode.on.net] has quit [Quit: Konversation terminated!] 20130313 22:51:49-!- DCW [~Thunderbi@cpc1-finc14-2-0-cust12.4-2.cable.virginmedia.com] has joined #wesnoth-dev 20130313 23:03:12-!- DCW [~Thunderbi@cpc1-finc14-2-0-cust12.4-2.cable.virginmedia.com] has quit [Quit: DCW] 20130313 23:25:41< shadowm> Ivanovic: Okay. 20130313 23:30:16-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has quit [Quit: bumbadadabum] 20130313 23:35:56-!- Elvish_Pillager [~eli@dhip-029.rrw.residences.colby.edu] has quit [Ping timeout: 260 seconds] 20130313 23:44:32-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [] 20130313 23:46:16-!- thunderstruck [~thunderst@cpc5-sgyl29-2-0-cust174.sgyl.cable.virginmedia.com] has quit [Quit: Leaving] 20130313 23:48:45-!- Elvish_Pillager [~eli@dhip-029.rrw.residences.colby.edu] has joined #wesnoth-dev 20130313 23:50:31-!- shadowm_desktop [~ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130313 23:52:34-!- Elvish_Pillager [~eli@dhip-029.rrw.residences.colby.edu] has quit [Read error: Operation timed out] 20130313 23:57:00-!- mjs-de [~mjs-de@d185075.adsl.hansenet.de] has quit [Remote host closed the connection] 20130313 23:59:36-!- _8680_ [~quassel@198.134.88.245] has joined #wesnoth-dev --- Log closed Thu Mar 14 00:00:48 2013