--- Log opened Sun Sep 08 00:00:23 2013 20130908 00:00:38-!- gfgtdf_ [~chatzilla@f054140168.adsl.alicedsl.de] has joined #wesnoth-dev 20130908 00:02:09-!- gfgtdf [~chatzilla@f054160094.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 20130908 00:02:19-!- gfgtdf_ is now known as gfgtdf 20130908 00:15:55-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 260 seconds] 20130908 00:20:02-!- Queen_Skyla [~SkyNet@99-111-224-165.lightspeed.rcsntx.sbcglobal.net] has quit [Ping timeout: 264 seconds] 20130908 00:26:30-!- justinzane is now known as absent_justinzan 20130908 00:31:22-!- Queen_Skyla [~SkyNet@99-111-224-165.lightspeed.rcsntx.sbcglobal.net] has joined #wesnoth-dev 20130908 00:32:35-!- absent_justinzan is now known as justinzane 20130908 00:49:33-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20130908 00:54:06-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130908 00:57:06-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has joined #wesnoth-dev 20130908 01:01:13< gfgtdf> AI0867: you have any questions about the pull request? because i'll go to bed soon. 20130908 01:06:47-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 260 seconds] 20130908 01:08:25-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130908 01:11:15-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has joined #wesnoth-dev 20130908 01:22:49-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Read error: Connection reset by peer] 20130908 01:27:20-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130908 01:27:25< AI0867> gfgtdf: I don't know how those scenarios work or what they do 20130908 01:27:36< AI0867> is this assigning hotkeys to the menu items? 20130908 01:27:49< AI0867> right, that's what the description says -_-' 20130908 01:28:07< AI0867> anyway, *how* do you do that? 20130908 01:28:13< AI0867> from WML that is 20130908 01:29:01< gfgtdf> from wml with the "default_hotkey" tga in set_menu_items, but more importantly the user can set it in the preferences/hotkeys dialog if the wml author specified nothing 20130908 01:29:21< gfgtdf> the hotkeys should be in the same format as in teh preferences file 20130908 01:36:50< gfgtdf> i can give you the scenario i used to test if if you want 20130908 01:36:55< gfgtdf> AI0867^ 20130908 01:37:10< gfgtdf> AI0867: ^ 20130908 01:46:28< gfgtdf> the scenario i used for testing: http://pastebin.com/JJsLh6mE 20130908 01:50:19< gfgtdf> i'll sleep now bb. 20130908 01:50:23-!- gfgtdf [~chatzilla@f054140168.adsl.alicedsl.de] has quit [Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212]] 20130908 02:04:11-!- mjs-de [~mjs-de@e182032149.adsl.alicedsl.de] has quit [Remote host closed the connection] 20130908 02:07:55-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 245 seconds] 20130908 02:08:50-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130908 02:35:00-!- justinzane is now known as absent_justinzan 20130908 02:35:51-!- absent_justinzan is now known as justinzane 20130908 02:45:10-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130908 02:53:48-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has joined #wesnoth-dev 20130908 03:09:34< justinzane> I'm getting an error building wesnoth-old:master. "src/mp_game_utils.cpp:51:37: error: cannot convert ‘const config’ to ‘bool’ in return return level.child("next_scenario");" 20130908 03:11:08-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has quit [Quit: tomreyn] 20130908 03:21:48< jamit> justinzane: Are you compiling in C++11 mode? 20130908 03:22:40< justinzane> gotta look at SConstruct, probably... 20130908 03:23:09< jamit> Regardless, It looks like that line would be better (clearer, maybe more efficient) if it were: return level.has_child("next_scenario"); 20130908 03:24:22< jamit> C++11 mode would just explain why it compiles fine for me. Under C++11, the conversion from config to bool is flagged "explicit". 20130908 03:25:13< justinzane> thanks. 20130908 03:25:14< shadowm> Current master with -std=c++98 builds for me. 20130908 03:26:40< justinzane> trying without cxx0x... and making supper in the meantime... 20130908 03:27:14< jamit> Looks like that function was added 11 days ago in https://github.com/wesnoth/wesnoth-old/commit/1083d6d7cc2e6b136c76530defce56a5a33c4424 20130908 03:27:44< jamit> thunderstruck: ^ 20130908 03:37:12< irker583> wesnoth: JaMiT wesnoth-old:master d1c643cff962 / src/ (gamestatus.cpp gamestatus.hpp): Define wmi_container::operator= http://git.io/2YvobQ 20130908 03:37:14< irker583> wesnoth: JaMiT wesnoth-old:master 45d557273520 / src/ (gamestatus.cpp gamestatus.hpp): Make wmi_container responsible for cleaning up its memory. http://git.io/1egIag 20130908 03:37:16< irker583> wesnoth: JaMiT wesnoth-old:master 8fabb58f6a47 / src/gamestatus.hpp: Better use of "explicit" for constructors. http://git.io/WjS91g 20130908 03:38:31-!- justinzane is now known as absent_justinzan 20130908 03:42:44-!- absent_justinzan is now known as justinzane 20130908 03:56:43-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130908 04:09:42-!- horon [~horon@nttkyo176024.tkyo.nt.ngn2.ppp.infoweb.ne.jp] has joined #wesnoth-dev 20130908 04:19:47-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has quit [Read error: Connection reset by peer] 20130908 04:20:07-!- vultraz [~chatzilla@wesnoth/developer/vultraz] has joined #wesnoth-dev 20130908 04:36:31-!- TooLmaN [~TooLmaN@c-71-226-1-37.hsd1.ga.comcast.net] has quit [Quit: Leaving] 20130908 04:47:16< justinzane> Stupid question, but can I assign AI modifiers to a .cfg? 20130908 04:54:13< mattsc> justinzane: things like aggression etc.? If so, no. 20130908 04:58:41-!- Ivanovic_ [~ivanovic@x2f4d7ed.dyn.telefonica.de] has joined #wesnoth-dev 20130908 05:01:51-!- Ivanovic [~ivanovic@wesnoth/developer/ivanovic] has quit [Ping timeout: 260 seconds] 20130908 05:02:34-!- Ivanovic_ is now known as Ivanovic 20130908 05:04:34-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has joined #wesnoth-dev 20130908 05:14:01< justinzane> Ahh, bummer. 20130908 05:15:16< justinzane> So, to modify the AI parameters per unit type, it is necessary to use fai/lua? 20130908 05:17:21< mattsc> except for a few hacky tricks, yes 20130908 05:21:32< justinzane> Man, somehow my expectations of the AI were totally and utterly bogus. I'm almost overwhelmed by the scattered nature of AI -- c++, lua, wml, python(?). 20130908 05:22:56< shadowm> No Python here. 20130908 05:23:44< justinzane> I had hoped that the AI algorithms were implemented solely in C++ so that I could try and step through the decision process using gdb or generate a callgraph to see what actually happens. 20130908 05:24:29< mattsc> The default AI is entirely written in C++ 20130908 05:25:44< justinzane> If I understand, though, it is possible to on-the-fly call fai or lua from wml. That means that there are any number of odd code paths, doesn't it? 20130908 05:28:31< mattsc> It is possible to include custom lua and formula AI code from WML, yes. I do not know whether that means a yes to your last question. :) 20130908 05:33:56< justinzane> mattsc: sounds like a yes. 20130908 05:53:44< justinzane> So, in src/ai/default/contexts.cpp:109-112 we have a bunch of const ints defined without any comments or docstrings. Why? 20130908 05:54:03< jamit> Because developers hate documenting. :P 20130908 05:54:28< _8680_> I don’t. 20130908 05:54:40< _8680_> Or did you mean only Wesnoth developers? 20130908 05:54:52-!- esr [~esr@wesnoth/developer/esr] has quit [Read error: Connection reset by peer] 20130908 05:55:20< _8680_> (But yes, I know that is indeed a general problem.) 20130908 05:55:29< jamit> I meant the developers who write code without any comments or docstrings. There certainly have been a good number contributing to Wesnoth, although certainly not all. 20130908 05:55:55-!- esr [~esr@static-71-162-243-5.phlapa.fios.verizon.net] has joined #wesnoth-dev 20130908 05:55:55-!- esr [~esr@static-71-162-243-5.phlapa.fios.verizon.net] has quit [Changing host] 20130908 05:55:55-!- esr [~esr@wesnoth/developer/esr] has joined #wesnoth-dev 20130908 05:57:54< jamit> justinzane: Looking at the context, I would guess those values are added to the defensive rating of terrain, so that the AI prefers to, for example, capture an enemy village to occupying slightly more defensible terrain. 20130908 05:58:11< justinzane> I'm as bad or worse with that than most. :) 20130908 06:00:09< justinzane> jamit: I'm just wondering why these parameters are "buried" in the .cpp file. The AI, generally, has a large number of parameters, and it seems like putting as many of them together in on place would make reading the code easier. 20130908 06:01:43< jamit> Meh, if they are only used in one function, then defining them within that function means their definition is close to their use. That can make reading that particular function easier. 20130908 06:01:43-!- Jetrel_new [~richard_k@c-75-73-180-126.hsd1.mn.comcast.net] has quit [Read error: Connection reset by peer] 20130908 06:02:01< justinzane> gotta point 20130908 06:02:22-!- Jetrel_new [~richard_k@c-75-73-180-126.hsd1.mn.comcast.net] has joined #wesnoth-dev 20130908 06:04:34-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130908 06:06:37< justinzane> though I would think that enemy_village_value would be dependent on both the income value of villages, the enemy gold remaining and the enemy recruit options. Which would indicate that... 20130908 06:06:53< justinzane> `int default_ai_context_impl::rate_terrain(const unit& u, const map_location& loc) const` should be 20130908 06:08:25< justinzane> `int default_ai_context_impl::rate_terrain(const unit& u, const map_location& loc, int enemey_village_value=15) const` or something similar 20130908 06:12:47-!- EliDupree [~quassel@66-189-34-122.dhcp.oxfr.ma.charter.com] has quit [Ping timeout: 260 seconds] 20130908 06:18:02< jamit> How much of a difference would that make? Sometimes the AI accepts an approximation so it can focus its time on things that make a bigger difference. 20130908 06:19:57< jamit> "How much" encompasses both how much the 15 would change and how often it would fall outside the 11-19 range (since those values more-or-less represent the same priority). 20130908 06:24:44< jamit> That's not to say that is not a good idea, of course. Maybe it would make a difference. 20130908 06:24:49< justinzane> I haven't the vaguest idea. I'm not thinking of it in a functional manner at the moment, but in a code structure manner. 20130908 06:27:15< jamit> Well, if you were to make enemy_village_value variable, you would either need to pass it as a parameter or calculate it within rate_terrain. Between those two options, the former looks better, on the assumption that rate_terrain gets called many times without enemy_village_value changing. 20130908 06:28:30< jamit> So, yeah, if you make it variable, that is probably the sort of change you'd want to make to rate_terrain. 20130908 06:34:58< justinzane> so, given a map_location, how does one check what unit, if any is on it? 20130908 06:36:35< jamit> In C++? 20130908 06:37:18< jamit> resources::units->find() 20130908 07:13:57-!- Gambit [~derek@wesnoth/developer/grickit] has quit [Remote host closed the connection] 20130908 07:17:54-!- desophos [~desophos@n138h11.dhcp.oxy.edu] has quit [Quit: Leaving] 20130908 07:43:03-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20130908 07:52:41-!- mattsc [~mattsc@154.20.32.246] has quit [Quit: Computer's asleep] 20130908 08:11:30-!- Ivanovic [~ivanovic@x2f4d7ed.dyn.telefonica.de] has quit [Changing host] 20130908 08:11:30-!- Ivanovic [~ivanovic@wesnoth/developer/ivanovic] has joined #wesnoth-dev 20130908 08:24:42-!- justinzane is now known as absent_justinzan 20130908 08:44:33-!- thunderstruck [~thunderst@cpc5-sgyl29-2-0-cust174.sgyl.cable.virginmedia.com] has joined #wesnoth-dev 20130908 08:57:00-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20130908 09:13:42-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 264 seconds] 20130908 09:16:17-!- lipkab [~the_new_l@apn-94-44-254-164.vodafone.hu] has joined #wesnoth-dev 20130908 09:51:19-!- lipkab [~the_new_l@apn-94-44-254-164.vodafone.hu] has quit [Ping timeout: 260 seconds] 20130908 09:55:23-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20130908 09:59:42-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20130908 09:59:54-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Ping timeout: 264 seconds] 20130908 10:14:36-!- mjs-de [~mjs-de@e182032149.adsl.alicedsl.de] has joined #wesnoth-dev 20130908 10:20:23-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20130908 10:27:24-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20130908 10:41:49-!- markus_ [~mjs-de@d117129.adsl.hansenet.de] has joined #wesnoth-dev 20130908 10:45:00-!- mjs-de [~mjs-de@e182032149.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 20130908 10:51:18-!- Kostic [~marko@net89-1-245-109.mbb.telenor.rs] has joined #wesnoth-dev 20130908 10:55:36< thunderstruck> fabi: Hello. Do you recall anything special about "The Elvish Treasury" side controllers set up? mp::connect behaves odd with it. I'm doing some debugging but so far I'm clueless and wondering if there's something special about it or if I got some strange bug. 20130908 11:09:39< thunderstruck> fabi: Nevermind. I've found a problem. 20130908 11:22:18< thunderstruck> fabi: "Elves' Last Stand" got 4 playable sides, but other scenarios in chapter2 got 3. How is it supposed to be? 20130908 11:45:54-!- lipkab [~the_new_l@apn-94-44-254-164.vodafone.hu] has joined #wesnoth-dev 20130908 11:57:35-!- tomreyn [~tomreyn@megaglest/team/tomreyn] has joined #wesnoth-dev 20130908 12:15:00-!- lipkab [~the_new_l@apn-94-44-254-164.vodafone.hu] has quit [Ping timeout: 245 seconds] 20130908 12:15:02-!- Kostic [~marko@net89-1-245-109.mbb.telenor.rs] has quit [Quit: Ex-Chat] 20130908 12:32:54< fabi> thunderstruck: one moment , phone 20130908 12:40:03< fabi> thunderstruck: Elves' Last Stand features the same amount of sides like scenario 3. You play at the Kalian again, The player of Kalenz should also play Galtrid, like in 3, Landar should play the other guy, also like in 3. Both sides should have the gold carried over from 3 and have their recall lists. 20130908 12:44:01< thunderstruck> fabi: Ok. What about "The Chief Must Die". It has only 1 playable side. I can see how I could make it into 2 sides, but we need 4 there. 20130908 12:46:50< fabi> thunderstruck: "The Chief Must Die" is an exception that should already be taken out in MP. I mean if you play MP it is handled by story text only, at least that was the plan. But we can think about other solutions if you like. I always wanted to redesign this scenario completely. But I suggest that this is a work for after the gsoc time. 20130908 12:48:49< fabi> thunderstruck: The whole last chapter, which isn't cooperative anymore but competitive is not ready for MP yet. It needs some time of thinking about the game mechanics before coding can start. 20130908 12:49:17< thunderstruck> fabi: I noticed that. 20130908 12:49:33< thunderstruck> fabi: http://git.io/Qf9D5A 20130908 12:50:09< thunderstruck> I've separated some sides for MP already. 20130908 12:50:15< thunderstruck> However, that's the stub only. 20130908 12:52:54< thunderstruck> fabi: "handled by story text only" - does that story text exist? 20130908 12:56:21-!- Queen_Skyla [~SkyNet@99-111-224-165.lightspeed.rcsntx.sbcglobal.net] has quit [Quit: Leaving] 20130908 12:56:41-!- Skyla [~SkyNet@99-111-224-165.lightspeed.rcsntx.sbcglobal.net] has joined #wesnoth-dev 20130908 12:59:41< fabi> thunderstruck: No, it seems not. My attempts at converting chapter4 into MP ended with 14. 20130908 13:00:42< thunderstruck> fabi: OK. So I will make the MP to skip that scenario and we will sort out story later, right? 20130908 13:01:05< thunderstruck> fabi: Or redesigning scenario. 20130908 13:05:14< fabi> thunderstruck: Fine, I will look forward to it. At least chapter 4 should be convert-able into MP without much problems. 20130908 13:05:26< fabi> I am looking forward to it. 20130908 13:15:57-!- Skyla [~SkyNet@99-111-224-165.lightspeed.rcsntx.sbcglobal.net] has quit [Quit: Leaving] 20130908 13:44:40-!- qal [~sabban@90.84.144.99] has joined #wesnoth-dev 20130908 13:47:01-!- markus_ is now known as mjs-de 20130908 13:48:48-!- Gambit [~derek@wesnoth/developer/grickit] has joined #wesnoth-dev 20130908 13:50:02-!- lipkab [~the_new_l@apn-5-206-133-232.vodafone.hu] has joined #wesnoth-dev 20130908 14:00:34-!- lipkab [~the_new_l@apn-5-206-133-232.vodafone.hu] has quit [Quit: Nettalk6 - www.ntalk.de] 20130908 14:01:15-!- qal [~sabban@90.84.144.99] has quit [Ping timeout: 245 seconds] 20130908 14:32:24< thunderstruck> fabi: Some scenarios don't give a "save_id" for persistent sides. E.g. 14 scenario What's the reason for that? 20130908 14:44:57-!- absent_justinzan is now known as justinzane 20130908 14:48:24-!- EliDupree [~quassel@66-189-34-122.dhcp.oxfr.ma.charter.com] has joined #wesnoth-dev 20130908 15:25:33-!- gfgtdf [~chatzilla@f054142107.adsl.alicedsl.de] has joined #wesnoth-dev 20130908 15:26:19-!- _Coffee [~david@ppp121-45-78-176.lns20.adl6.internode.on.net] has quit [Read error: Connection reset by peer] 20130908 15:28:19-!- justinzane is now known as absent_justinzan 20130908 15:31:53-!- absent_justinzan is now known as justinzane 20130908 16:16:22-!- justinzane is now known as absent_justinzan 20130908 16:20:59-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has joined #wesnoth-dev 20130908 16:31:37-!- irker583 [~irker@ai0867.net] has quit [Quit: transmission timeout] 20130908 16:44:54-!- skyfaller [~skyfaller@ool-2f11697b.dyn.optonline.net] has joined #wesnoth-dev 20130908 16:44:54-!- skyfaller [~skyfaller@ool-2f11697b.dyn.optonline.net] has quit [Changing host] 20130908 16:44:54-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has joined #wesnoth-dev 20130908 16:55:48-!- DCW1 [~Thunderbi@cpc1-finc14-2-0-cust12.4-2.cable.virginmedia.com] has joined #wesnoth-dev 20130908 16:56:21-!- horon [~horon@nttkyo176024.tkyo.nt.ngn2.ppp.infoweb.ne.jp] has quit [Quit: Leaving...] 20130908 17:04:41< fabi> thunderstruck: The reason is that is not necessary. save_id defaults to id if not given. I just put it in most files to get sure, I think it was at least needed if the side "paused" for one or more scenarios. 20130908 17:05:43< fabi> thunderstruck: Anyway, I would prefer to have it in every file. Just add the missing ones if you like. 20130908 17:07:38< thunderstruck> fabi: Thanks. I already noticed that and tweaked mp::connect to behave the same. 20130908 17:10:09< thunderstruck> fabi: I've got LoW converted to a state where factions/leaders/genders issues are gone. 20130908 17:11:05< thunderstruck> fabi: Now I was testing to see if users got carried over and placed in the right sides. It seem to work, but to be sure, I need to test with multiple players. However, debug mode doesn't work with server. 20130908 17:11:18< thunderstruck> fabi: Do you know any workaround on that? 20130908 17:11:35< fabi> thunderstruck: Nice. I can't pull the changes right now, too many local changes which I do not want to git stack yet. I will see that I can do so soon and test the new situation. 20130908 17:12:19< fabi> thunderstruck: Yes, just start a local game. It should use the same codepath as multiplayer server, just without the server. 20130908 17:12:41< thunderstruck> fabi: Well, I could push my changes to master so that it would be easier for you. I am quite sure I didn't break LoW's SP and only improved MP. 20130908 17:13:37< thunderstruck> fabi: I was testing with local game now. But I want to test with 2 or more users. I.e. a multiple wesnoth clients. 20130908 17:14:26< fabi> thunderstruck: That is fine for me. Even if you broke LoW SP, that is not a big deal, at least not at this time (long before a next stable release and not before the next development release either). 20130908 17:15:54< fabi> thunderstruck: Soliton might know more. I think I remember him talking with crab_ about the same issue. 20130908 17:16:28< fabi> thunderstruck: Maybe you can start a local server that allows debug mode. 20130908 17:16:46< thunderstruck> fabi: That would be great. I will check that. 20130908 17:17:17< fabi> thunderstruck: http://forums.wesnoth.org/viewtopic.php?p=559497#p559497 20130908 17:17:29< fabi> thunderstruck: The report about the not working replay... 20130908 17:20:16< thunderstruck> fabi: Does this have anything in common with our conversation? 20130908 17:21:06< thunderstruck> Or MP? I'm just not sure why you suddenly linked me with it :) 20130908 17:22:05< fabi> It is a problem with changing the save_id during a campaign ( or not, just a guess). 20130908 17:22:16< thunderstruck> fabi: Ahh.. It's today's post. I looked at the wrong date and thought that it's very old. 20130908 17:22:58< fabi> The report is about SP. 20130908 17:23:15-!- lipkab [~the_new_l@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20130908 17:23:42< fabi> Still you need to check if replays work after all your changes anyway. 20130908 17:24:42< thunderstruck> fabi: Are you talking about MP campaign's replays or replays of LoW? 20130908 17:25:09< fabi> MP campaign replays in general. 20130908 17:25:59< fabi> Checking the state with LoW as an example can't be a mistake. 20130908 17:26:30< thunderstruck> Ok. I will keep that mind. 20130908 17:44:49-!- lipkab [~the_new_l@host-91-147-212-174.biatv.hu] has quit [Ping timeout: 268 seconds] 20130908 17:52:15-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has quit [Quit: i go nstuf kthxbai] 20130908 17:56:35-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has quit [Remote host closed the connection] 20130908 18:11:08-!- DCW1 [~Thunderbi@cpc1-finc14-2-0-cust12.4-2.cable.virginmedia.com] has quit [Quit: DCW1] 20130908 18:22:12< thunderstruck> fabi: Is it ok if I run wmlindent on LoW? The indentation changed quite a bit after I removed those [multiplayer] tags. 20130908 18:23:33-!- absent_justinzan is now known as justinzane 20130908 18:26:26< fabi> thunderstruck: Yes 20130908 18:26:38< fabi> thunderstruck: And wmllint as well. 20130908 18:26:45< fabi> thunderstruck: And wmlscope. 20130908 18:30:49< thunderstruck> fabi: wmlscope gives me this: UnboundLocalError: local variable 'args' referenced before assignment 20130908 18:31:23< fabi> No file or line number? 20130908 18:32:13< jamit> vultraz: Regarding http://pastebin.com/VCC8jHnA, it turns out a SUF does support lua_function=. You should be able to use that if you change your function to take a unit instead of a filter. 20130908 18:32:52< thunderstruck> fabi: I've provided a directory to LoW as an argument. It worked for wmllint and wmlindent. 20130908 18:33:46< vultraz> jamit: er...I feel stupid, but what does lua_function have to do with this 20130908 18:33:46< jamit> thunderstruck: Have you read the logs? In particular, the part from 03:09:34 to 03:27:44 in http://www.wesnoth.org/irclogs/2013/09/%23wesnoth-dev.2013-09-08.log 20130908 18:34:16< fabi> thunderstruck: Sorry, I have not the slightest idea what you are talking about :-) 20130908 18:35:39< fabi> vultraz: SUF return a list of matching units. (In some cases only the first match is used). You can use a lua function to determine the units to return. 20130908 18:35:40< jamit> vultraz: You wanted to have a WML conditional along the lines of [have_item] [filter][/filter] item=id [/have_item], right? 20130908 18:36:03< vultraz> yes, meant to be used in [if]/[filter_condition] blocks 20130908 18:36:33< jamit> vultraz: So instead you would do [have_unit] lua_function= [/have_unit] 20130908 18:36:47< fabi> gfgtdf: Hi. Have you noticed that AI0867 replied to your merge request? 20130908 18:37:09< gfgtdf> gfgtdf: today? 20130908 18:37:17< gfgtdf> fabi: today? 20130908 18:37:33< fabi> gfgtdf: No, it was yesterday. 20130908 18:37:45< gfgtdf> fabi: then i have already replied to hir reply 20130908 18:37:49< gfgtdf> his* 20130908 18:38:11-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has joined #wesnoth-dev 20130908 18:38:32< jamit> Hmm... "hir" as a gender-nonspecific pronoun to replace "his" and "her"? :) 20130908 18:38:53< vultraz> jamit: hm...that might work. but the underlying lack of user ability to register custom conditions is still there 20130908 18:39:15< thunderstruck> jamit: Thanks for pointing it out. 20130908 18:39:37< gfgtdf> jamit: :), but no hir just was a speeling mistake 20130908 18:40:52< gfgtdf> speaking about lua functions i think it would be nice to implement your own [effect]s in lua too, 20130908 18:41:04< jamit> vultraz: Come up with another use for custom conditionals? It would be better to know what the need actually is, instead of guessing wrongly at what is needed. 20130908 18:41:42< vultraz> hm, true. at present mine is the only case I can think of 20130908 18:43:06< thunderstruck> jamit: I didn't wrote that line from scratch, but I changed it from something like "while(!level.child("next_scenario"))". 20130908 18:43:59< thunderstruck> jamit: write* 20130908 18:44:35< thunderstruck> jamit: I'll fix it as you suggested, however, I don't know why it doesn't work for someone. 20130908 18:45:13< jamit> thunderstruck: Might it have been 'while ( config & cfg = level.child("next_scenario") )'? If the child config is used later, then the conversion to boolean makes sense. 20130908 18:45:27< jamit> Otherwise, you may have inherited inefficient code. ;) 20130908 18:46:00< jamit> The reason it doesn't work under the latest C++ standard is the way the conversion from config to bool is defined. 20130908 18:46:19< fabi> jamit: "Hir", is it a modern word? I never heard about it. 20130908 18:47:03< jamit> thunderstruck: For the older standard, a config can be implicitly converted to something that can be converted to bool. So a config can be used anywhere a bool is expected. 20130908 18:47:46< gfgtdf> fabi: are there any plans to use c++11 in future? 20130908 18:48:15< jamit> thunderstruck: For the newer standard, a config can be converted directly to a bool, but that conversion is flagged "explicit". That means you can use a config as a boolean in if(), while(), etc., but to assign a config to a bool, you have to explicitly convert it. 20130908 18:48:31< fabi> gfgtdf: Well, yes. At the moment every c++ compiler supports them properly and every OS ships with this new compiler versions. Than can take years... 20130908 18:48:54< thunderstruck> jamit: Just for the interest, I've checked and it was like that. https://github.com/wesnoth/wesnoth-old/blob/0001b355e0b09c595e821779b9f72bed7276780c/src/playcampaign.cpp#L577 20130908 18:48:56< fabi> s/Than/That 20130908 18:49:02< jamit> thunderstruck: So it would also work to use: return bool(level.has_child("next_scenario")); 20130908 18:49:09< thunderstruck> jamit: However, thanks for the insight :0 20130908 18:49:15< thunderstruck> :) * 20130908 18:49:45< jamit> fabi: No, "hir" is not a word. I was just amused at how the typo turned out to be a merging of the two words. 20130908 18:50:41< fabi> jamit: Ah, yes :-) There are some attempts to add new words to the German language to avoid gender specific stuff. So far none of them has made it into day to day language. 20130908 18:50:48< thunderstruck> jamit: I'm also wondering why this line didn't break https://github.com/wesnoth/wesnoth-old/blob/master/src/mp_game_utils.cpp#L49 20130908 18:52:12< jamit> thunderstruck: Hmm... not sure. Maybe because the config is being fed into "&&"? Still, that looks like another good thing to change to have_child(). 20130908 18:55:35< gfgtdf> fabi: you mean linux os? becuas i dont tink windows ships wich a c++ compiler at all. (does mac comes with a cpp compiler?) 20130908 18:55:36< jamit> Oops. Earlier I meant 'return bool(level.child("next_scenario"));' That was supposed to be an (inferior) alternative to using has_child. 20130908 18:56:38< fabi> gfgtdf: Well in case of mac and windows: If a proper compiler is available and/or the most common ones support them. 20130908 18:56:58< fabi> them == all the new c++11 features. 20130908 19:01:49< thunderstruck> jamit: What about "if(cfg.has_child("some_child"))"? I can find plenty examples of that. 20130908 19:01:56< thunderstruck> cfg.child* 20130908 19:02:44-!- wesbot [~wesbot@wesnoth/bot/wesbot] has quit [Remote host closed the connection] 20130908 19:03:01< jamit> thunderstruck: If the return value of config::child() is only being used as a boolean, then has_child() would be better. 20130908 19:03:24< gfgtdf> fabi: well why can you just rely some of the c++ featues that most of the compilers support? 20130908 19:03:46< jamit> A wrong/inferior way to do something does not become right simply because it has been done a lot. :) 20130908 19:04:22< jamit> And the config interface gets some getting used to. There are a lot of functions in there that some people might have never seen. 20130908 19:05:44-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130908 19:05:52< thunderstruck> jamit: I'm not arguing that it is fine, because "it has been done a lot". I want to say that things like that will be all over Wesnoth's code and if they don't cause a problem for me, I will find it hard to fix them. 20130908 19:06:31< fabi> gfgtdf: Well, especially the new foreach construct could replace all the boost::foreachs, I am looking forward to this. But that is hard to handle. Having different compilers that support a different subset of the features leads to confusion. 20130908 19:07:32< fabi> gfgtdf: Currently you can rely on the compiler to give errors with most issues, still you can produce code that runs on one but not the other. This problems would increase. 20130908 19:07:45< thunderstruck> jamit: What's more, that was not the code written by me, so I think it would be fair if the person who has problems with it (breaks his build) could fix that. Because he is at advantage of being able to see where the problems are. 20130908 19:07:54< jamit> thunderstruck: You don't have to fix all of them. Just if you notice it, you could change them. It's "only" an efficiency gain. 20130908 19:09:15< jamit> Well, aside from that one that broke compilation... but that was you taking the condition out of an "if" and making it the return value of a function. 20130908 19:09:30-!- Rhonda [~rhonda@anguilla.debian.or.at] has quit [Ping timeout: 264 seconds] 20130908 19:10:30< jamit> I don't think it is expected that you never break things for other ways of compiling, only that you make some effort not to, and be willing to fix things when you do. 20130908 19:14:34< gfgtdf> fabi: do you have any problems with boost_foreach? well there are pages that give some kind of overwie wich compilers support wich featues, just type "c++11 compiler support" in google, and use the featues wich are supported by the most used compilers, maybe mak a poll in forums wich compilers are currently used. you can also check wich compiler supportrs wich fearues using the boost... 20130908 19:14:36< gfgtdf> ...library: http://www.boost.org/doc/libs/1_44_0/libs/config/doc/html/boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_possible_c__0x_features 20130908 19:14:54< jamit> For example, people will probably get royally pissed off if I keep re-introducing static initialization fiascos. But I try to remember the danger areas, and I have fixed the ones I've created. 20130908 19:15:20< fabi> gfgtdf: boost_foreach macros are not handled right by most semantic checkers. 20130908 19:15:32< fabi> gfgtdf: Also, we do not wan't to be early adopters. 20130908 19:15:51< gfgtdf> fabi: was are "early adopters" ? 20130908 19:16:01-!- Skyla [~SkyNet@99.111.224.165] has joined #wesnoth-dev 20130908 19:16:06< thunderstruck> jamit: Alright. I agree. 20130908 19:16:07-!- Rhonda [~rhonda@anguilla.debian.or.at] has joined #wesnoth-dev 20130908 19:16:19-!- wesbot [~wesbot@wesnoth/bot/wesbot] has joined #wesnoth-dev 20130908 19:16:22< fabi> gfgtdf: Still, it is not me you have to convince. I am quite open to new stuff most of the time. 20130908 19:17:06< jamit> thunderstruck: Oh good. You agree to get royally pissed off. That will keep me on my toes. :) 20130908 19:17:41< fabi> gfgtdf: https://de.wikipedia.org/wiki/Early_Adopter 20130908 19:19:31< gfgtdf> fabi: ok 20130908 19:20:01-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number] 20130908 19:20:28-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130908 19:21:50-!- wesbot [~wesbot@wesnoth/bot/wesbot] has quit [Ping timeout: 264 seconds] 20130908 19:22:36-!- wesbot [~wesbot@wesnoth/bot/wesbot] has joined #wesnoth-dev 20130908 19:25:40< thunderstruck> jamit: Was this irony or a joke? 20130908 19:25:56< jamit> joke 20130908 19:26:27< jamit> If you take the development too seriously, it's not fun. :) 20130908 19:26:39< fabi> jamit: You say it brother! 20130908 19:27:45< thunderstruck> jamit: and who is fun if taken too seriously? 20130908 19:28:48< thunderstruck> and what is* 20130908 19:29:38< jamit> Nothing that I can think of. 20130908 19:36:54-!- haudegen [~quassel@213162068057.public.t-mobile.at] has joined #wesnoth-dev 20130908 19:45:37-!- desophos [~desophos@n138h11.dhcp.oxy.edu] has joined #wesnoth-dev 20130908 19:46:15-!- desophos [~desophos@n138h11.dhcp.oxy.edu] has left #wesnoth-dev [] 20130908 19:48:19-!- irker370 [~irker@ai0867.net] has joined #wesnoth-dev 20130908 19:48:19< irker370> wesnoth: Andrius Silinskas wesnoth-old:master eea06ff7688b / data/campaigns/Legend_of_Wesmere/ (26 files in 6 dirs): Remove now unused parts of multiplayer code from LoW. http://git.io/yyVGgg 20130908 19:48:19< irker370> wesnoth: Andrius Silinskas wesnoth-old:master 8a36b47769cc / data/campaigns/Legend_of_Wesmere/ (6 files in 6 dirs): Add newly introduced MP campaign attributes to LoW. http://git.io/-scLcw 20130908 19:48:20< irker370> wesnoth: Andrius Silinskas wesnoth-old:master a6500f8f7a50 / src/ (4 files): Adjust mp::connect and mp::configure for debug mode. http://git.io/P9IiXg 20130908 19:48:21< irker370> wesnoth: Andrius Silinskas wesnoth-old:master 432e69ba3ee2 / data/campaigns/Legend_of_Wesmere/ (6 files in 5 dirs): Add default "Custom" faction for sides without recruits in LoW. http://git.io/Sz4Eww 20130908 19:48:22< irker370> wesnoth: Andrius Silinskas wesnoth-old:master 2e606044b20b / src/flg_manager.cpp: Adjust mp::connect for "no_leader" SideWML attribute. http://git.io/bDVGpQ 20130908 19:48:23< irker370> wesnoth: Andrius Silinskas wesnoth-old:master f16dd9e40019 / src/flg_manager.cpp: Adjust gender locking (mp::connect). http://git.io/HDjyQA 20130908 19:48:25< irker370> wesnoth: Andrius Silinskas wesnoth-old:master 90446ec5ab63 / / (8 files in 5 dirs): Adjusted playable sides for LoW. http://git.io/z6tvYw 20130908 19:48:27< irker370> wesnoth: Andrius Silinskas wesnoth-old:master c2c4d819fdde / data/campaigns/Legend_of_Wesmere/scenarios/ (chapter2/07_Elves_Last_Stand.cfg chapter4/15_The_Treaty.cfg): Further adjustment for playable sides for LoW. http://git.io/6vNNdg 20130908 19:48:29< irker370> wesnoth: Andrius Silinskas wesnoth-old:master e45df51a0d1b / src/ (multiplayer_connect_engine.cpp multiplayer_connect_engine.hpp): Improved "save_id" handling for SideWML (mp::connect). http://git.io/6XK7Zg 20130908 19:48:31< irker370> wesnoth: Andrius Silinskas wesnoth-old:master fbd61456e0f2 / data/campaigns/Legend_of_Wesmere/scenarios/ (17 files in 5 dirs): Ran wmlindent on LoW. http://git.io/DJHjzQ 20130908 19:48:33< irker370> wesnoth: Andrius Silinskas wesnoth-old:master e127fd7cbe8b / data/campaigns/Legend_of_Wesmere/scenarios/ (5 files in 5 dirs): Ran wmllint on LoW. http://git.io/6owl7A 20130908 19:48:35< irker370> wesnoth: Andrius Silinskas wesnoth-old:master f689a51d59d9 / src/mp_game_utils.cpp: Fixed config to bool explicit conversion. http://git.io/LPBaow 20130908 19:49:18< thunderstruck> jamit, justinzane: ^ hope it will compile now 20130908 19:49:24< thunderstruck> I hope* 20130908 19:51:33-!- bumbadadabum [~bumbadada@d155109.upc-d.chello.nl] has joined #wesnoth-dev 20130908 20:05:47-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20130908 20:06:29< justinzane> thunderstruck: not for me... I've introduced my own new errors :( I'll stash and reset to test in a bit, though. 20130908 20:24:26-!- haudegen [~quassel@213162068057.public.t-mobile.at] has quit [Ping timeout: 240 seconds] 20130908 20:25:58< justinzane> Silly question: Why does `find(const map_location &loc) const` return an iterator? How is it possible for a loc to have more than one unit? 20130908 20:28:58< thunderstruck> justinzane: iterator doesn't mean that it returns multiple units. It returns an iterator to a unit. 20130908 20:29:50< thunderstruck> justinzane: similarly like a pointer to an object. 20130908 20:30:42< justinzane> ok 20130908 20:31:57< thunderstruck> justinzane: here is the picture http://en.cppreference.com/w/cpp/container/vector/begin 20130908 20:33:38< justinzane> I've got a general (not c++ specific) grasp of iterators. How do I get a unit& from a unit_iterator? 20130908 20:34:43< thunderstruck> justinzane: the same way as with pointer, dereference it using "*" 20130908 20:35:41< thunderstruck> justinzane: however, keep in mind that it might be an "end" iterator, in which case you've a problem 20130908 20:37:02-!- Skyla [~SkyNet@99.111.224.165] has quit [Read error: Connection reset by peer] 20130908 20:37:44< thunderstruck> jamit: You were talking about static initialization fiascos. Could you point me to a common way to solve them? 20130908 20:38:27-!- lipkab [~the_new_l@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20130908 20:39:52-!- Skyla [~SkyNet@99-111-224-165.lightspeed.rcsntx.sbcglobal.net] has joined #wesnoth-dev 20130908 20:41:54-!- haudegen [~quassel@77.119.129.217.wireless.dyn.drei.com] has joined #wesnoth-dev 20130908 20:44:54-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 264 seconds] 20130908 20:46:29-!- shadowm_desktop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-dev 20130908 20:49:09-!- lipkab [~the_new_l@host-91-147-212-174.biatv.hu] has quit [Read error: Connection reset by peer] 20130908 21:06:13< justinzane> So, I'm obviously thoroughly unqualified with c++... After rofl, could someone provide guidance on this https://gist.github.com/anonymous/6487484 20130908 21:10:45< thunderstruck> justinzane: does it compile? 20130908 21:14:24-!- mattsc [~mattsc@154.20.32.246] has joined #wesnoth-dev 20130908 21:16:59< justinzane> most definately not! 20130908 21:18:25< justinzane> All I want to do is loop through the 6 adjacent locations, find what units are on them, and if they are allied healers, count them. 20130908 21:19:27< thunderstruck> justinzane: just glancing at the function, line 14 seems wrong. function find() returns an interator, so you shouldn't access it with "[]" 20130908 21:20:17< thunderstruck> I told you before that to get a reference from an interator you need to dereference it: 20130908 21:20:34< thunderstruck> e.g. *find(loc); 20130908 21:20:40-!- stikonas [~gentoo@host-89-241-167-135.as13285.net] has joined #wesnoth-dev 20130908 21:20:40-!- stikonas [~gentoo@host-89-241-167-135.as13285.net] has quit [Changing host] 20130908 21:20:40-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20130908 21:21:08< thunderstruck> However, that would also be a problem in this case, since it might be an "end" iterator. 20130908 21:21:28< thunderstruck> So, before dereferencing it, you should check for that. 20130908 21:26:01-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20130908 21:26:38-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Ping timeout: 264 seconds] 20130908 21:26:57-!- stikonas_ is now known as stikonas 20130908 21:36:21-!- Kostic [~marko@net89-1-245-109.mbb.telenor.rs] has joined #wesnoth-dev 20130908 21:46:09-!- haudegen [~quassel@77.119.129.217.wireless.dyn.drei.com] has quit [Remote host closed the connection] 20130908 21:56:23< justinzane> thunderstruck: I'm having trouble with that... https://gist.github.com/anonymous/6487902 20130908 21:59:22< justinzane> forget it... fixed dereference 20130908 22:00:24< thunderstruck> justinzane: alright. By the way (*it).some_member == it->some_member 20130908 22:00:45< thunderstruck> and "->" is usually a preferred syntax 20130908 22:10:09-!- lipkab [~the_new_l@host-91-147-212-174.biatv.hu] has joined #wesnoth-dev 20130908 22:13:47-!- ancestral [~ancestral@65-128-232-98.mpls.qwest.net] has quit [Quit: And that’s the end of THAT chapter.] 20130908 22:23:04-!- lipkab [~the_new_l@host-91-147-212-174.biatv.hu] has quit [Quit: Nettalk6 - www.ntalk.de] 20130908 22:26:43-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Ping timeout: 260 seconds] 20130908 22:26:49-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20130908 22:36:33-!- stikonas__ [~gentoo@host-89-241-167-135.as13285.net] has joined #wesnoth-dev 20130908 22:37:34-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has quit [Read error: Connection reset by peer] 20130908 22:38:31-!- Vandal [Ganrao@cpe-65-189-245-210.woh.res.rr.com] has quit [Read error: Connection reset by peer] 20130908 22:38:43-!- Vandal [Ganrao@cpe-65-189-245-210.woh.res.rr.com] has joined #wesnoth-dev 20130908 22:57:12< justinzane> yup, that is what I fixed. playing it now. thanks! 20130908 23:02:41-!- thunderstruck [~thunderst@cpc5-sgyl29-2-0-cust174.sgyl.cable.virginmedia.com] has quit [Quit: Leaving] 20130908 23:05:40< jamit> justinzane: In case you haven't figure this part out yet: find() returns an iterator into the map of all units on the board, not an iterator into some list of units at your location. 20130908 23:05:58< jamit> So a more common way to test the result of find() would be: if ( adj_units_iter != resources::units->end() ) 20130908 23:07:22< jamit> Another thing you might want to be aware of is get_adjacent_tiles(), defined in map_location.cpp. It simplifies your call to get the adjacent tiles, but you have to allocate the space in advance. 20130908 23:07:54-!- gfgtdf_ [~chatzilla@f054132085.adsl.alicedsl.de] has joined #wesnoth-dev 20130908 23:08:32-!- justinzane is now known as absent_justinzan 20130908 23:09:40< jamit> thunderstruck: I don't have a link handy. The first way to avoid the fiasco is to avoid "complex" initializations of static variables. Basically if an initialization depends on something else being done in another file first, it might not work. 20130908 23:11:00< jamit> Usually, the problem comes when you have a static object, but can also occur if initializing a static int based on a global int defined in another file. 20130908 23:11:16-!- gfgtdf [~chatzilla@f054142107.adsl.alicedsl.de] has quit [Ping timeout: 264 seconds] 20130908 23:11:20-!- gfgtdf_ is now known as gfgtdf 20130908 23:12:32< jamit> One trick for solving the fiasco is to create a wrapper function that returns your the thing being depended on, and define that thing as a static variable inside that function, instead of as a global variable. 20130908 23:18:14-!- absent_justinzan is now known as justinzane 20130908 23:26:09-!- irker370 [~irker@ai0867.net] has quit [Quit: transmission timeout] 20130908 23:42:33-!- boucman [~rosen@wesnoth/developer/boucman] has quit [Remote host closed the connection] 20130908 23:50:00-!- stikonas__ [~gentoo@host-89-241-167-135.as13285.net] has quit [Ping timeout: 245 seconds] --- Log closed Mon Sep 09 00:00:49 2013