--- Log opened Sun Sep 09 00:00:24 2012 20120909 00:19:41< mattsc> skyfaller: you could just save the game one turn before the one you want to test. :P 20120909 00:20:44< mattsc> But sure, (most) anything's possible, the question is what's worth the effort because somebody else might want exactly the opposite. I don't know. 20120909 00:26:37-!- Crendgrim [~crend@77-22-112-72-dynip.superkabel.de] has quit [Quit: ...] 20120909 01:06:54-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20120909 01:20:17-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20120909 01:20:47< skyfaller> mattsc: the problem is if I want to create situations from actual games, I can't just back up a turn, I have to recreate the situation with the time of day one turn earlier 20120909 01:21:25< skyfaller> I guess I 20120909 01:21:37< skyfaller> either way I end up manually cycling the time of day 20120909 01:22:04< skyfaller> I can't imagine why anyone would want it to automatically advance a turn, please just fix it if you can figure it out 20120909 01:36:33< mattsc> The only thing that I can think of that's easy to do is simply advancing 6 turns after each reload. (I do have to advance at least 1 turn, there is no way around that) 20120909 01:38:36< mattsc> Replacing the schedule is doable but a PITA, because you have to figure out what schedule you're on (this might not be the first save/reload after all) first and then calculate which of 6 different possible replacement schedules to use. 20120909 01:41:31-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20120909 01:43:38-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20120909 01:46:16< skyfaller> I think advancing 6 turns is fine, as long as we don't heal units or earn gold or anything 20120909 01:48:26<+CIA-59> wesnoth-umc-dev: SpoOkyMagician * r15905 /trunk/Unwelcome_Guests_Series/ (images/small_crate.png progress.TXT utils/common.cfg): new images/macros. 20120909 01:50:31-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20120909 01:50:40< mattsc> I don't think there's a way to turn off rest healing 20120909 01:50:46< skyfaller> :/ 20120909 01:50:50< skyfaller> then that's not very good 20120909 01:51:01< skyfaller> if you can't do it manually, how can I do it automatically? 20120909 01:51:13< skyfaller> erm 20120909 01:51:16< skyfaller> other way around 20120909 01:51:24< skyfaller> if you can't do it automatically, how can I do it manually? 20120909 01:51:49< mattsc> which part of "it"? 20120909 01:51:51< skyfaller> if I start off with a savegame that is on the correct turn, how can I test it? 20120909 01:52:01< mattsc> You cannot 20120909 01:52:15< skyfaller> so I don't really see how this is useful to me then 20120909 01:52:28< skyfaller> ok, that's unfair 20120909 01:52:31< mattsc> You need to let the AI play through one turn or the ai table commands are not available 20120909 01:52:56< skyfaller> this is not helpful for existing games, it's only useful for artificially created situations 20120909 01:53:32< skyfaller> I prefer real games, because artificial situations may never happen in a real game :P 20120909 01:53:58< mattsc> Not true. Anything you can potentially think of will happen in a game sometime. :) 20120909 01:54:25< mattsc> And lots of things you'd never thought of. That's why there are so many bugs in every program. :D 20120909 01:54:37< skyfaller> not in the initial rush, some positions are impossible 20120909 01:55:09< skyfaller> if you play long enough, weird things can happen, but we currently turn off the rush after a certain number of turns, no? 20120909 01:55:11< mattsc> Artificial situations are much more instructive when it comes to figuring out wth is going on though 20120909 01:55:38< mattsc> No, only if the AI gets strong enough. 20120909 01:59:18< mattsc> There might be a way after all ... sigh ... 20120909 02:01:49< vultraz> I wonder if it's possible to make an AI act exactly like a human would, even down to unexpected decisions and surprise tactics 20120909 02:02:48< AI0867> to do that properly, it would need actual insight into the game, not just some programmed rules 20120909 02:05:01< AI0867> wesnoth is too complex to bruteforce, so you'd need some clever shortcuts in your gamestate evaluation and future-extrapolation 20120909 02:05:20< vultraz> uh... 20120909 02:07:30< AI0867> of course, most of the rules it currently contains *are* clever shortcuts 20120909 02:08:09-!- SpoOkyMagician [~chatzilla@74-141-242-243.dhcp.insightbb.com] has quit [Quit: later all.] 20120909 02:10:30<+CIA-59> Wesnoth-AI-Demos: mattsc master * rd60424d / multiplayer/era.cfg : Debug era: advance games 6 turns at start and after reload - https://github.com/mattsc/Wesnoth-AI-Demos/commit/d60424de6bde7539bba806dadb189a78506318c0 20120909 02:12:34-!- vultraz [~chatzilla@124.109.10.167] has quit [Ping timeout: 268 seconds] 20120909 02:17:19-!- vultraz [~chatzilla@124.109.10.167] has joined #wesnoth-umc-dev 20120909 02:25:12<+CIA-59> wesnoth-umc-dev: shikadilord * r15906 /trunk/After_the_Storm/ (sounds/hellbent-1.ogg units/demons/Hellbent_Tide.cfg): AtS: add a modified faerie fire sound for Ergea's ranged attack 20120909 02:33:48<+CIA-59> wesnoth-umc-dev: vultraz * r15907 /trunk/NX-RPG/macros/unit_deaths.cfg: NX: nicer tag spacing 20120909 02:52:14< mattsc> vultraz: we are planning to build a variety of strategies into the grunt rush AIs, and some randomness too, but both those things are quite a long way off still 20120909 02:52:46< mattsc> First we need to get the non-random parts to stop making so many mistakes. 20120909 02:55:38-!- loonybot [~loonybot@wesnoth/bot/loonybot] has quit [Remote host closed the connection] 20120909 02:55:41< vultraz> lol 20120909 02:56:23< vultraz> would it have stuff like diversionary tactics and regrouping? 20120909 02:58:47< mattsc> Uh... Don't know yet. :) 20120909 03:00:18<+CIA-59> Wesnoth-AI-Demos: mattsc master * rd633cb4 / multiplayer/era.cfg : Debug era: Reset gold to start/savegame value - http://git.io/hjGyAQ 20120909 03:02:08< vultraz> yeah, that would be kinds complicated 20120909 03:08:09-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20120909 03:13:18< mattsc> skyfaller: ^ That same method will work for restoring units' hitpoints also. I'll do that when I get my next 10-min break from real life... 20120909 03:13:25< skyfaller> hooray! 20120909 03:13:40< skyfaller> I know this is a disgusting kludge, and I'm sorry for putting you through it 20120909 03:13:55< skyfaller> hopefully someday we'll discover a more graceful way to do it 20120909 03:14:15< mattsc> No worries. 20120909 03:15:50< mattsc> In 1.11 this will eventually not be necessary (it might be working already without, I forgot the details, but switching to 1.11 would be much more work than this right now) 20120909 03:16:11< skyfaller> I still vote that we forcefully transition everyone to 1.11 20120909 03:16:32< skyfaller> I just don't think there's much point in maintaining a legacy codebase, we don't have that many users 20120909 03:17:04< skyfaller> and if this is "ai demos" it's meant for other programmers, who can figure out how to install a development version of Wesnoth and keep it updated 20120909 03:17:55< skyfaller> just drop support for 1.10, do all of the work for 1.11 now so that we don't have to do it later, and abandon the work on 1.10 that we will eventually abandon anyway 20120909 03:30:43< mattsc> Umm, skyfaller, just noticed something: 20120909 03:31:10< mattsc> You cannot take savegames from a real MP game and load them and use the debugging mechanism 20120909 03:31:20< skyfaller> wait, really? 20120909 03:31:22< mattsc> That's a fundamental restriction of how WML works 20120909 03:31:29< skyfaller> I've debugged savegames 20120909 03:31:49< mattsc> You have to have started them with the debug area 20120909 03:31:59< skyfaller> ohhh 20120909 03:32:12< skyfaller> what was wrong with the way we were doing it before you created a special era? 20120909 03:32:12< mattsc> But you haven't done so by using custom-made right-click options etc. 20120909 03:32:41< mattsc> You could not test individual CAs in isolation 20120909 03:32:55< skyfaller> ok, well, that's annoying 20120909 03:33:16< skyfaller> the thing is that the AI should be making decisions based on the situation across the whole map 20120909 03:33:16< mattsc> That's how WML works... 20120909 03:33:34< skyfaller> I don't think it's realistic to just have one isolated problem, I'd rather test real game states 20120909 03:33:45< mattsc> You could always recreate things in the debug era 20120909 03:33:51< skyfaller> I guess so :( 20120909 03:33:59< skyfaller> any way you could automate that? :D 20120909 03:34:09< skyfaller> like, take a regular savegame and turn it into a debug era game? 20120909 03:34:24< mattsc> I don't want to think about that right now :) 20120909 03:34:26< skyfaller> lol 20120909 03:34:28< skyfaller> fine 20120909 03:35:06< skyfaller> how about this: I'll make a forum post with the savegames for the problems I listed in ABCDE and others 20120909 03:35:14< mattsc> Today it's my turn to be frustrated and I really need to take care of some other things. 20120909 03:35:15< skyfaller> and someone else can figure out how to debug them :P 20120909 03:35:16< skyfaller> lol 20120909 03:35:23< skyfaller> ok, don't worry about it 20120909 03:35:42< mattsc> Sounds good to me - if somebody else does it :) 20120909 03:36:04< skyfaller> sorry for putting you through a lot of work that may have been less than useful 20120909 03:36:40< mattsc> Not at all, I think it is still very useful, just not quite in the way you imagined it. 20120909 03:37:09< mattsc> And who knows, when I'm a little more awake than right now, I might come up with another trick... 20120909 03:37:17< mattsc> Blargh. 20120909 03:37:29< skyfaller> ok :) 20120909 03:38:03< mattsc> Oh, also, I should have told you that from the beginning - it's something I know quite well, I just didn't think of it. 20120909 03:38:15< mattsc> Oh well. 20120909 03:38:33< skyfaller> lol 20120909 03:39:25< mattsc> I'll give it a couple days, maybe somebody else knows an obvious way of doing this that I am missing right now (other than copy-pasting code into savefiles), then I'll think about it again. 20120909 03:39:37< skyfaller> ok 20120909 03:39:48< mattsc> Same with the switch to 1.11. I'm just too tired right now from lack of sleep all week long to think about that. 20120909 03:40:17< mattsc> ttyl 20120909 03:40:22< skyfaller> peace out 20120909 03:41:21<+CIA-59> Wesnoth-AI-Demos: mattsc master * r1a3fdf6 / multiplayer/era.cfg : Debug era: Reset unit stats to start/savegame values - http://git.io/iNXF0w 20120909 03:50:59-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20120909 03:59:06-!- mattsc [~mattsc@d154-20-32-241.bchsia.telus.net] has quit [Quit: bye] 20120909 04:15:59-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20120909 04:24:16-!- mattsc [~mattsc@d154-20-32-241.bchsia.telus.net] has joined #wesnoth-umc-dev 20120909 04:26:02< mattsc> skyfaller: Argh, of course my stupid brain doesn't stop thinking ... 20120909 04:26:10< skyfaller> lol! 20120909 04:26:14< skyfaller> go to sleep you silly goose 20120909 04:26:23< mattsc> I think there is a way of getting you what you want 20120909 04:26:33< skyfaller> yay!!! I like when I get what I want ;-) 20120909 04:26:58< mattsc> but it won't work with old savegames, only with those from after when I make the change 20120909 04:27:15< skyfaller> ???? 20120909 04:27:20< skyfaller> how can that be? 20120909 04:27:27< mattsc> so don't put too much effort into collecting those right now 20120909 04:27:40< mattsc> because the capability of doing so must be in the savefile 20120909 04:28:14< mattsc> A Wesnoth savefile does not only contain the situation of the map, but also the code 20120909 04:28:21< skyfaller> but I'll be able to use it in ladder games? 20120909 04:28:46< mattsc> Umm, no. Only with games played by Fred. 20120909 04:28:57< skyfaller> oh, I see 20120909 04:28:59< skyfaller> that's fine :) 20120909 04:29:19< skyfaller> sorry, I was briefly confused 20120909 04:29:34< mattsc> If you want it in ladder games, then it really requires messing with the savegame files themselves. 20120909 04:29:42< skyfaller> no, that's not necessary 20120909 04:29:47< mattsc> ok 20120909 04:30:16< mattsc> I think I'll just make a brief proof-of-concept test, and then I'll be off for real. 20120909 04:30:22< skyfaller> I was confusing myself b/c I just posted a bunch of replays of my ladder games as P1 orcs Freelands 20120909 04:30:39< skyfaller> so that you would have more samples of quality orc play (and some of my blunders) 20120909 04:30:49< mattsc> Yeah, saw those - but haven't looked at them yet 20120909 04:30:52< mattsc> :) 20120909 04:30:57< skyfaller> no prob :) 20120909 04:37:21<+CIA-59> Wesnoth-AI-Demos: mattsc master * r2a0883d / multiplayer/era.cfg : Debug era: restructuring some events - http://git.io/HK7t2g 20120909 04:45:44<+CIA-59> Wesnoth-AI-Demos: mattsc master * r6c8efe9 / lua/eval_exec_CA.lua : Added debug_CA() function to eval_exec_CA.lua - http://git.io/y-aIqg 20120909 04:45:53< mattsc> skyfaller: yep, can be done 20120909 04:46:06< skyfaller> h00ray! 20120909 04:46:56< mattsc> It'll require a bit of reworking things (again), but I now don't have to spend all night thinking about it :D 20120909 04:47:02< skyfaller> :D 20120909 04:47:05< mattsc> gn 20120909 04:47:09< skyfaller> l8r 20120909 04:47:15-!- mattsc [~mattsc@d154-20-32-241.bchsia.telus.net] has quit [Quit: bye] 20120909 04:47:37-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [] 20120909 05:24:51-!- Octalot [~noct@host86-130-60-64.range86-130.btcentralplus.com] has quit [] 20120909 05:30:37<+CIA-59> wesnoth-umc-dev: dringuet * r15908 /trunk/World_Conquest/ (12 files in 2 dirs): (log message trimmed) 20120909 05:30:37<+CIA-59> wesnoth-umc-dev: M _main.cfg 20120909 05:30:37<+CIA-59> wesnoth-umc-dev: M scenarios/dr_artifact.cfg 20120909 05:30:37<+CIA-59> wesnoth-umc-dev: A scenarios/main_sp.cfg 20120909 05:30:37<+CIA-59> wesnoth-umc-dev: M scenarios/dr_scenario.cfg 20120909 05:30:37<+CIA-59> wesnoth-umc-dev: M scenarios/dr_side.cfg 20120909 05:30:39<+CIA-59> wesnoth-umc-dev: M scenarios/dr_bonus.cfg 20120909 05:32:34< Espreon> Uh... 20120909 05:32:49< Espreon> Note to self: smack dringuet. 20120909 05:38:06< skyfaller> what did he do wrong? 20120909 06:07:37< Espreon> skyfaller: Look at the commit message. 20120909 06:08:13< skyfaller> you mean "(log message trimmed)"? 20120909 06:08:34< Espreon> No. 20120909 06:08:43< Espreon> The fact he used that for a message. 20120909 06:10:42< skyfaller> oh, I get it now, that is pretty silly 20120909 07:27:12-!- skyfaller_ [~skyfaller@ool-43551e75.dyn.optonline.net] has joined #wesnoth-umc-dev 20120909 07:27:12-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has quit [Read error: Connection reset by peer] 20120909 07:27:20-!- skyfaller_ is now known as skyfaller 20120909 07:27:21-!- skyfaller [~skyfaller@ool-43551e75.dyn.optonline.net] has quit [Changing host] 20120909 07:27:21-!- skyfaller [~skyfaller@wikipedia/Skyfaller] has joined #wesnoth-umc-dev 20120909 09:11:28-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20120909 09:12:42-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Remote host closed the connection] 20120909 09:26:36-!- Crendgrim [~crend@77-22-112-72-dynip.superkabel.de] has joined #wesnoth-umc-dev 20120909 10:06:45<+CIA-59> wesnoth-umc-dev: shikadilord * r15909 /trunk/After_the_Storm/lua/gui.lua: 20120909 10:06:45<+CIA-59> wesnoth-umc-dev: AtS: improve checking for nil attribute values for all Lua GUI2 WML actions 20120909 10:06:45<+CIA-59> wesnoth-umc-dev: The previous boolean approach simply didn't work properly when the 20120909 10:06:45<+CIA-59> wesnoth-umc-dev: tested attributes were non-nil false values. As a result, a debug test 20120909 10:06:45<+CIA-59> wesnoth-umc-dev: in E3 would behave incorrectly every time. 20120909 10:06:45<+CIA-59> wesnoth-umc-dev: The new approach ensures that the value is actually nil before filling 20120909 10:06:47<+CIA-59> wesnoth-umc-dev: in with a default. 20120909 10:07:14<+CIA-59> wesnoth-umc-dev: shikadilord * r15910 /trunk/After_the_Storm/lua/common.lua: 20120909 10:07:14<+CIA-59> wesnoth-umc-dev: AtS: implement [set_conditional_variable] WML action 20120909 10:07:14<+CIA-59> wesnoth-umc-dev: This should really be an extension for [set_variable], but whatever. 20120909 10:07:34<+CIA-59> wesnoth-umc-dev: shikadilord * r15911 /trunk/After_the_Storm/base-variables.cfg: 20120909 10:07:34<+CIA-59> wesnoth-umc-dev: AtS: implement VARIABLE_CONDITIONAL macro 20120909 10:07:34<+CIA-59> wesnoth-umc-dev: The current implementation uses [set_conditional_variable] and might be 20120909 10:07:34<+CIA-59> wesnoth-umc-dev: changed if I ever feel like dealing with mainline syntax drama to push a 20120909 10:07:34<+CIA-59> wesnoth-umc-dev: [set_variable] extension instead. 20120909 10:20:47-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20120909 10:21:59-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Remote host closed the connection] 20120909 10:40:14-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20120909 11:38:29-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20120909 13:05:08-!- loonybot [~loonybot@46.138.72.79] has joined #wesnoth-umc-dev 20120909 13:05:08-!- loonybot [~loonybot@46.138.72.79] has quit [Changing host] 20120909 13:05:08-!- loonybot [~loonybot@wesnoth/bot/loonybot] has joined #wesnoth-umc-dev 20120909 13:05:11-!- mode/#wesnoth-umc-dev [+v loonybot] by ChanServ 20120909 14:38:01-!- loonybot [~loonybot@wesnoth/bot/loonybot] has quit [Remote host closed the connection] 20120909 14:39:44-!- loonybot [~loonybot@46.138.72.79] has joined #wesnoth-umc-dev 20120909 14:39:44-!- loonybot [~loonybot@46.138.72.79] has quit [Changing host] 20120909 14:39:44-!- loonybot [~loonybot@wesnoth/bot/loonybot] has joined #wesnoth-umc-dev 20120909 14:39:45-!- mode/#wesnoth-umc-dev [+v loonybot] by ChanServ 20120909 16:34:25-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20120909 16:49:53-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20120909 17:25:19-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [] 20120909 17:26:56<+CIA-59> Wesnoth-AI-Demos: mattsc master * r55c9875 / (3 files in 3 dirs): Set up global ai variable available in debug mode only - http://git.io/RWl4oA 20120909 17:27:59-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20120909 17:33:23-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Read error: Connection reset by peer] 20120909 17:34:58-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20120909 17:36:14-!- mattsc [~mattsc@d154-20-32-241.bchsia.telus.net] has joined #wesnoth-umc-dev 20120909 17:40:02<+CIA-59> Wesnoth-AI-Demos: mattsc master * r7571a02 / multiplayer/era.cfg : Moved CA debugging functionality into standard expAI era - http://git.io/ddrcZg 20120909 17:48:07-!- shadowm_laptop2 [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20120909 17:50:02-!- shadowm_laptop is now known as Guest83114 20120909 17:50:03-!- Guest83114 [ignacio@wesnoth/developer/shadowmaster] has quit [Killed (lindbohm.freenode.net (Nickname regained by services))] 20120909 17:50:03-!- shadowm_laptop2 is now known as shadowm_laptop 20120909 17:57:15<+CIA-59> Wesnoth-AI-Demos: mattsc master * r80ae5d9 / multiplayer/era.cfg : CA debugging: added comments and a start-up message - http://git.io/xplKtQ 20120909 17:58:48< skyfaller> mattsc: at some point we should do another release. Are we done refactoring yet? 20120909 18:03:38-!- Neilarmius [5606b83e@gateway/web/freenode/ip.86.6.184.62] has joined #wesnoth-umc-dev 20120909 18:07:32-!- Neilarmius [5606b83e@gateway/web/freenode/ip.86.6.184.62] has quit [Client Quit] 20120909 18:45:14<+CIA-59> wesnoth-umc-dev: anonymissimus * r15912 /trunk/Era_Khalifate/ (6 files in 4 dirs): EK: adapt to changes in mainline r55246 20120909 18:46:18<+CIA-59> wesnoth-umc-dev: anonymissimus * r15913 /trunk/Era_Khalifate/units/Tabib.cfg: EK: give hakim portrait also to his advancement 20120909 18:57:00<+CIA-59> Wesnoth-AI-Demos: mattsc master * r151c93f / (lua/eval_exec_CA.lua multiplayer/era.cfg): CA debugging: added a right-click option for CA choice - http://git.io/3u9rOg 20120909 18:57:32-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 245 seconds] 20120909 18:59:12-!- shadowm_laptop [ignacio@190.91.124.251] has joined #wesnoth-umc-dev 20120909 18:59:13-!- shadowm_laptop [ignacio@190.91.124.251] has quit [Changing host] 20120909 18:59:13-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20120909 19:42:32<+CIA-59> Wesnoth-AI-Demos: mattsc master * rf85acb5 / multiplayer/era.cfg : CA debugging: set controller=human for enemy side also - http://git.io/4lOhlQ 20120909 19:50:24-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20120909 20:00:58<+CIA-59> Wesnoth-AI-Demos: mattsc master * r9a39c8f / lua/eval_exec_CA.lua : Commented out an unnecessary message - http://git.io/tjxEIw 20120909 20:07:09-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20120909 20:18:14< mattsc> skyfaller: around? 20120909 20:18:24< skyfaller> sort of, what's up? 20120909 20:19:09< mattsc> https://github.com/mattsc/Wesnoth-AI-Demos/wiki/CA-debugging 20120909 20:19:55< mattsc> It should be all in place now, so you can check out if things work the way you want them 20120909 20:20:21< mattsc> The wiki (hopefully) explains how to use it and why some choices are made they way they are 20120909 20:20:49< skyfaller> sw33t 20120909 20:21:27< mattsc> There's one remaining bug: if you load a savegame that was saved while in control of Side 2, the game actually advances 7 turns and Fred's units have no MP when they start. 20120909 20:21:38< mattsc> I know the reason for that, but need to think about how to fix it 20120909 20:21:55< skyfaller> ok 20120909 20:22:24< mattsc> I need to be doing other things for a few hours now though, so I wanted to get this info to you now 20120909 20:23:02< mattsc> I'll fix that bug sometime later today, and add a few more comments to the code, but other than that I think this is done (unless you find more problems with it) 20120909 20:23:11< skyfaller> awesome :) 20120909 20:23:42< mattsc> bb (I'll stay logged in though) 20120909 20:30:01< mattsc> skyfaller: hmm, the "bug" described might actually be "unavoidable", or at least kind of hard to deal with. 20120909 20:30:55< mattsc> Would it be acceptable that this can only be used with a save made from a replay state at the beginning of Fred's turn? I think that should be ok, right? 20120909 20:31:53< mattsc> off now for real now ... 20120909 21:35:15< skyfaller> I can accept it for now, I hope that we can fix it someday 20120909 21:38:42<+CIA-59> wesnoth-umc-dev: shikadilord * r15914 /trunk/After_the_Storm/ (changelog macros/abilities.cfg): AtS: remove Farmland from the list of terrains used for the Sylvan Spark and Sylvan Essence abilities 20120909 21:56:01< skyfaller> mattsc: most notably, what happens when we teach Fred to play side 2? :P 20120909 22:01:43-!- csarmi [csarmi@178-164-141-150.pool.digikabel.hu] has joined #wesnoth-umc-dev 20120909 22:11:01< mattsc> skyfaller: I'll worry about that when that happens. 20120909 22:11:23< mattsc> Generalizing the testing mechanism is easy compared to generalizing Fred himself 20120909 22:11:46<+CIA-59> wesnoth-umc-dev: shikadilord * r15915 /trunk/Invasion_from_the_Unknown/ (changelog macros/abilities.cfg): IftU: remove Farmland from the list of terrains used for the Sylvan Spark and Sylvan Essence abilities 20120909 22:18:26<+CIA-59> wesnoth-umc-dev: shikadilord * r15916 /trunk/Invasion_from_the_Unknown/ (changelog macros/amla.cfg): 20120909 22:18:26<+CIA-59> wesnoth-umc-dev: IftU: fixed flickering during Elynia's ranged pierce attack animation caused by references to removed images 20120909 22:18:26<+CIA-59> wesnoth-umc-dev: Also cleaned up the relevant macro a bit. 20120909 22:19:26-!- Crendgrim [~crend@77-22-112-72-dynip.superkabel.de] has quit [Quit: ...] 20120909 22:20:08< fendrin> shadowm: You are working on IftU again? 20120909 22:30:15< vultraz> mattsc: do you know how to execute a hunk of code store in a WML var via lua? 20120909 22:33:46< zookeeper> so who's this fred you keep talking about? 20120909 22:36:25< AI0867> one of the two grunt rush AIs 20120909 22:36:33< AI0867> fred = freelands orcs side 1 20120909 22:36:36< AI0867> ron = generic 20120909 22:37:11< vultraz> they should've made Ron George instead :P 20120909 22:37:22< AI0867> nah, ron the generic guy 20120909 22:38:02< AI0867> of course, you might name him ted instead 20120909 22:38:05< mattsc> vultraz: lua code or wml code? could you give me a simple example? 20120909 22:39:02< vultraz> mattsc: ok say the containter Rhyan.inventory[1].command has some WML code in it 20120909 22:39:16< vultraz> and I want to, at a certain time in lua, execute it 20120909 22:39:26< vultraz> from lua* 20120909 22:40:31< mattsc> vultraz: without having thought about it much, using the WML actions metatable should work, shouldn't it? 20120909 22:40:33< mattsc> http://wiki.wesnoth.org/LuaWML:Events#helper.set_wml_action_metatable 20120909 22:41:27< mattsc> You set up W as in the example, call the command you want with W[command_name] 20120909 22:41:29 * vultraz tries to understand the description 20120909 22:41:40< mattsc> and pass it the keys as a table 20120909 22:42:32< vultraz> so... 20120909 22:42:34< vultraz> uh... 20120909 22:42:57< vultraz> how does that relate to mine...I;m not sure 20120909 22:43:21< vultraz> (metatables have always confused me) 20120909 22:43:59< mattsc> Give me a specific example of what's stored in Rhyan.inventory[1].command and I'll try to show you 20120909 22:45:45< vultraz> that's the thing, it could be anything, from [gold] to [object] 20120909 22:46:04< zookeeper> can't you just invoke [insert_tag]? 20120909 22:46:05< vultraz> or [if][then] 20120909 22:46:50< vultraz> zookeeper: eh, like generate a custom event for each command? 20120909 22:47:12< zookeeper> no... 20120909 22:47:35< vultraz> *lost* 20120909 22:48:37< vultraz> this code is supposed to be fired when a user presses a certain button in the inventory 20120909 22:48:40< zookeeper> you know how [insert_tag] works, right? 20120909 22:48:50< zookeeper> in pure WML, that is 20120909 22:49:05< vultraz> er, yeah, I've used it 20120909 22:49:26< zookeeper> well if i understood your problem right, then can't you just use that tag from lua? 20120909 22:50:40< mattsc> vultraz: hold on, afk for a few minutes 20120909 22:51:00< vultraz> k 20120909 22:51:20< vultraz> hm..maybe there's a better way to implement this 20120909 22:51:37 * vultraz goes to see if he can find where [object] is coded 20120909 22:53:03< vultraz> well I can't find it in the lua files 20120909 22:54:21< vultraz> well letssee... 20120909 22:54:53< vultraz> I need something that allows me to turn item effects off and on 20120909 22:55:44< vultraz> current solution involves manually providing a [command] and [remove_command] 20120909 22:57:15< vultraz> I wonder how [object] turn then off after duration= has passed 20120909 22:59:18< mattsc> vultraz: back. Actually, what zookeeper says is true. Why not just use wesnoth.fire ? 20120909 22:59:48< mattsc> http://wiki.wesnoth.org/LuaWML:Events#wesnoth.fire 20120909 23:02:24< vultraz> er... 20120909 23:04:33< vultraz> but I don't have the name of the action 20120909 23:06:41-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 252 seconds] 20120909 23:07:57< mattsc> uh, ok. Apparently I really don't understand what you are talking about. So I'll ask again, please give me a concrete example of what's stored in the variable, otherwise I'm afraid I will keep not understanding 20120909 23:08:33< mattsc> You said you'd have a gold tag stored in there, this the name is right there, isn't it? 20120909 23:08:47< mattsc> s/this/thus 20120909 23:08:53< vultraz> it COULD me [gold] 20120909 23:08:59< vultraz> it could also be anything else 20120909 23:09:10< vultraz> I guess I have to explain more in-depth 20120909 23:09:14< mattsc> I understand that. 20120909 23:09:25< mattsc> Just give me an example... 20120909 23:10:11< vultraz> the thing is that I don't know what the code contained in that var will be 20120909 23:11:30< vultraz> I have a custom WML action that goes in a moveto event that allows me to set all these vars and stuff in the inventory arry of the character picking up the item 20120909 23:12:00< vultraz> Most wesnoth addon just allow you to pickup and IMMEDIATELY use items 20120909 23:12:28< vultraz> Mine is designed to allow players to use, stop using, drop, and give items 20120909 23:14:03< vultraz> items are 'used' and 'unused' via my custom GUI2 inventory. The code that I'm trying to fire is suppsoed to fire when you click a certain button 20120909 23:14:16< vultraz> but I don't know what that code is, only it's location 20120909 23:14:19< vultraz> which is 20120909 23:14:54< vultraz> $character.id|.inventory[index_of_selected_row - 1].command 20120909 23:15:36< vultraz> so I just want to say fire all WML code stored in that var 20120909 23:16:38< vultraz> it could be [object], or [remove_item] or [replace_map] or [teleport] or whatever 20120909 23:16:55< mattsc> Ok. Do you mind if _I_ give you an example then, using the [gold] tag 20120909 23:17:46< vultraz> ok, let's say it has a [gold] tag 20120909 23:17:48< vultraz> then what 20120909 23:18:02< mattsc> give me a few mins to make sure I get the syntax right... 20120909 23:24:32< mattsc> grrr... (sorry, keep making stupid typos) 20120909 23:28:23< mattsc> vultraz: http://pastebin.com/XMCeKpVq 20120909 23:29:02< mattsc> I'm just using variable 'command', rather than making that a sub-field of another variable, but that should be obvious enough, I hope :) 20120909 23:29:38< vultraz> hmmm 20120909 23:29:56< vultraz> how does command get multiple indexes? 20120909 23:30:32< mattsc> what do you mean? It does by defining it exactly as I did here. 20120909 23:30:48< mattsc> I tested it, it works. And this is the entire code, there's nothing else. 20120909 23:31:14< vultraz> hm... 20120909 23:31:37< vultraz> but wouldn't command just have 1 index, with an entire gold tag in it? 20120909 23:32:20< vultraz> wesnoth.set_variable(var_path .. ".command", item_action.__literal) 20120909 23:32:24< vultraz> is how it's stored 20120909 23:33:42< mattsc> So you need to define item_action in this way, or change the way how it is read by lua 20120909 23:33:55< vultraz> local item_action = helper.get_child(cfg, "command") 20120909 23:47:08< mattsc> vultraz: I'm sorry. I don't have enough information to say any more than what I have said already. 20120909 23:47:45< vultraz> it's ok 20120909 23:47:59< vultraz> I probably should implement this better first 20120909 23:49:28< mattsc> Who determines how the content of command looks? Do you choose that freely? 20120909 23:55:30< vultraz> yeah 20120909 23:56:01< mattsc> Then just set it up as in the example I showed you and it works like that --- Log closed Mon Sep 10 00:00:32 2012