--- Log opened Thu Aug 02 00:00:33 2018 20180802 00:07:17-!- AI0867 [~ai@wesnoth/developer/ai0867] has quit [Ping timeout: 276 seconds] 20180802 00:07:25-!- AI0867 [~ai@wesnoth/developer/ai0867] has joined #wesnoth-umc-dev 20180802 00:58:24<+wesdiscordbot> Is there a way I can manually give the leader crown to a unit? 20180802 00:59:10<+wesdiscordbot> There's some add-ons which make you able to do that, but I'd suggest the coding instead. 20180802 01:02:45<+wesdiscordbot> In case you mean by means of WML, you can change this part of the unit (e.g. during cration with [unit] overlays="misc/leader-expendable.png" 20180802 01:04:29<+wesdiscordbot> (other crows include leader-crown.png and leader-crown-alt.png) 20180802 01:12:49<+wesdiscordbot> If you want to use the real leader crown you really should consider setting canrecruit=yes instead. 20180802 01:13:23<+wesdiscordbot> It can be highly confusing for a player if there is more than one unit visually marked as a leader but only one of them actually functions as such. 20180802 01:19:44<+wesdiscordbot> There is a way to assign leadercrowns via the scenario editor, right? 20180802 01:20:01<+wesdiscordbot> You mean set canrecruit=yes? Yes. 20180802 01:20:23<+wesdiscordbot> But who uses the scenario editor anyway? 20180802 01:20:47<+wesdiscordbot> I think that you can set canrecruit, recruit lists, units, and sides via the editor, but WML and coding are superior when it comes to making scenarios. 20180802 01:21:14<+wesdiscordbot> I used it for a few things but fell out of it. 20180802 01:43:54<+wesdiscordbot> Well the unit I'm doing it to was previously a hero, so when I enabled recruitment via canrecruit=yes it stays as the hero crown 20180802 01:44:07<+wesdiscordbot> I suppose I should just store and recreate the unit 20180802 01:47:50<+wesdiscordbot> got it. thanks. canrecruit works when I do that 20180802 02:58:24-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180802 02:58:30-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180802 05:32:24-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180802 05:32:30-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180802 06:13:36-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20180802 08:40:27-!- shadowm_desktop [~iris@wesnoth/developer/shadowm] has quit [Ping timeout: 240 seconds] 20180802 08:42:43-!- shadowm_desktop [~iris@wesnoth/developer/shadowm] has joined #wesnoth-umc-dev 20180802 08:56:32-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180802 08:56:38-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180802 10:22:19-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180802 10:22:25-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180802 10:52:26-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 244 seconds] 20180802 11:51:23-!- shadowm_desktop [~iris@wesnoth/developer/shadowm] has quit [Remote host closed the connection] 20180802 12:38:09-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20180802 13:56:40-!- hk238 [~kvirc@unaffiliated/hk238] has joined #wesnoth-umc-dev 20180802 13:56:51< hk238> hi 20180802 13:59:10< hk238> hm how would I test if an argument is given to a function? 20180802 13:59:36< hk238> I was thinking about making the match function with an optional comparison function in the case of hard to compare values like arrays 20180802 13:59:59< hk238> but to make an if condition for the case where it's present and where it's not I'd need to write a test whether the argument is given 20180802 14:08:42<+wesdiscordbot> in lua? 20180802 14:09:03< hk238> I may have found the answer from lua channel :D 20180802 14:09:05< hk238> yes in lua 20180802 14:09:36<+wesdiscordbot> example: local enable = cfg.enable or 1 20180802 14:09:50<+wesdiscordbot> function declaration is function wesnoth.wml_actions.refresh_spell_menu(cfg) 20180802 14:37:29< hk238> how can I get the current schedule in game? 20180802 14:37:37< hk238> in lua? I mean like if it's morning 20180802 14:37:47< hk238> more specifically how do I get the current lawful_bonus ? 20180802 14:38:00< hk238> I don't want to overwrite that with campfire if it's higher 20180802 14:38:15<+wesdiscordbot> https://wiki.wesnoth.org/LuaWML/Time#wesnoth.get_time_of_day 20180802 14:38:59< hk238> wait what 20180802 14:39:06< hk238> you can get the lawful bonus on any hex? 20180802 14:39:17< hk238> :D 20180802 14:40:01<+wesdiscordbot> idk, you'll have to look at teh documentation more indepth yourself 20180802 14:40:09< hk238> yeah thanks sorry it seems you can 20180802 14:40:20< hk238> it was more of a rhetorical question 20180802 14:45:18< hk238> okay the campfire function is done, although it's pretty terrible it might work after.. so many syntax errors expected 20180802 14:45:18< hk238> :D 20180802 14:50:18-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180802 14:50:24-!- janebot_ [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180802 14:50:24-!- janebot_ is now known as janebot 20180802 15:43:09< hk238> https://pastebin.com/DydadWfK 20180802 15:43:15< hk238> any idea what might be wrong with this one? 20180802 15:43:28< hk238> I get error attempt to compare function with a number 20180802 15:44:24< Ravana_> that means you compare some values - so output those values and you will see if one is function 20180802 15:44:25< vn971> hk238: that's a lot of code. And no error log attached... 20180802 15:44:44< hk238> :D 20180802 16:07:51-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180802 16:07:57-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180802 16:22:31<+wesdiscordbot> Hmm, I thought we had it, but it appears not as it's not working. I'm trying to sort and recall units by level. I only wanted to recall 5 of them. I'm not sure what's going wrong. https://pastebin.com/DNEpcnqh 20180802 16:54:10< vn971> @V_aricks I wonder why you're programming in WML instead of Lua. Anyway, can't help with WML because I don't really know it, sorry.( 20180802 17:08:23<+wesdiscordbot> thanks 20180802 17:12:20<+wesdiscordbot> why not use [for] instead of [while] 20180802 17:13:04<+wesdiscordbot> line 38 id=$AFT_recall_list[$i].id doesn't need the $ in front of the AFT_recall_list 20180802 17:13:26<+wesdiscordbot> 🤔 20180802 17:13:28<+wesdiscordbot> or wait 20180802 17:13:36<+wesdiscordbot> that's not right 20180802 17:13:52<+wesdiscordbot> line 41 id=AFT_recall_list[$i].id needs a $ in front of the AFT_recall_list, disregard my previous statement 20180802 17:42:06<+wesdiscordbot> I tried that, also changed id= to variable= and it says that the variable doesn't exist. 20180802 17:42:11<+wesdiscordbot> which is weird 20180802 17:43:25<+wesdiscordbot> oh wait 20180802 17:43:53<+wesdiscordbot> it should just be `variable=AFT_recall_list[$i} 20180802 17:43:55<+wesdiscordbot> ah 20180802 17:44:02<+wesdiscordbot> there 20180802 17:47:04-!- hk238 [~kvirc@unaffiliated/hk238] has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/] 20180802 18:04:57< Ravana_> recently people have been trying to use [set_variable] with variable= instead of name= 20180802 18:07:50<+wesdiscordbot> I've tried that too, but it says the variable does n't exist, oddly enough. 20180802 18:08:51<+wesdiscordbot> well because i isn't defined at that point as far as I can see 20180802 18:09:03<+wesdiscordbot> although it might be auto defined in [while], not sure 20180802 18:11:05<+wesdiscordbot> let's see, I've got this code in my campaign 20180802 18:11:22<+wesdiscordbot> [store_unit] [filter] side=1 [not] x,y=recall,recall [/not] [/filter] variable=units [/store_unit] ... [for] array=units [do] [unstore_unit] 20180802 18:11:23<+wesdiscordbot> variable=units[$i] x,y=14,7 find_vacant=yes [/unstore_unit] [/do] [/for] 20180802 18:13:01< vn971> Question. Is `wesnoth.random(integer)` safe in "preload" event? 20180802 18:14:12<+wesdiscordbot> says it's synced 20180802 18:14:36< vn971> I see here that "preload" is listed among "safe" ones except UI part: https://wiki.wesnoth.org/EventWML#Multiplayer_safety 20180802 18:14:48< vn971> But I observe the total opposite if I understand my code correctly.( 20180802 18:15:22<+wesdiscordbot> oh, well it says preload isn't a synced event 20180802 18:15:29<+wesdiscordbot> so may not be safe in MP 20180802 18:15:43<+wesdiscordbot> but wesnoth.random seems to be synced according to the documentation 🤷 20180802 18:15:51<+wesdiscordbot> is it necessary to do whatever you're doing in preload? 20180802 18:16:43< vn971> @Yumi I can probably move to prestart. Was just wondering. Or rather -- I _will_ move to pre-start. And see how it goes. 20180802 18:17:34<+wesdiscordbot> prestart only applies at the start of scenario 20180802 18:17:45<+wesdiscordbot> well, literally before the start, but not if you load a save 20180802 18:19:41< vn971> @Yumi: yeah I'm supposed to know that part (though to be honest, I did in fact forget partially about it). 20180802 18:19:51< vn971> (already understood my error, anyway.) 20180802 18:19:58<+wesdiscordbot> mkay 20180802 18:21:13< Ravana_> everything you do in unsynced event is unsynced 20180802 18:22:06< vn971> Ravana_: "preload". 20180802 18:22:30< vn971> Ravana_: but I decided to move to "prestart" anyway, so I guess it could already be irrelevant. 20180802 18:22:33< Ravana_> and everything you do in preload might fire any number of times 20180802 18:22:39< vn971> because "prestart" should be safe IIRC. 20180802 18:23:02< vn971> Ravana_: yes, I know that part (or should know, though I did forget yesterday). 20180802 18:23:28< vn971> Anyway, all good! Thanks for the help. Hopefully the new version I almost wrote will have no such bugs. 20180802 18:23:41< vn971> Ravana_, @Yumi: thanks! 20180802 18:57:23< vn971> Ravana_ and others. How do you folks think, is it proper -- or ethical -- to make my modification "require_modification=yes", even though it actually works pretty fine without the flag? 20180802 18:57:23< vn971> The add-on I'm deciding to switch is "Plan Unit Advance". Basically I want the add-on to be more widely used. Requiring to download it should make observing a bit harder for those who to not have the add-on at all, but probably will increase visibility due to it being available after watching/participating in said games. 20180802 18:57:55< Ravana_> I did that for color mod, but people complained, so I changed it back 20180802 19:00:06< vn971> I see. 20180802 20:16:47-!- sevu [~Shiki@141.57.61.193] has joined #wesnoth-umc-dev 20180802 20:44:34-!- sevu [~Shiki@141.57.61.193] has quit [Quit: Verlassend] 20180802 20:44:55-!- sevu [~Shiki@141.57.61.193] has joined #wesnoth-umc-dev 20180802 20:45:57-!- sevu is now known as not 20180802 20:46:32-!- not is now known as sevu 20180802 21:08:33-!- sevu [~Shiki@141.57.61.193] has quit [Quit: Verlassend] 20180802 21:39:57-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180802 21:40:03-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180802 21:41:10-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 260 seconds] 20180802 21:46:10-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180802 21:46:16-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180802 22:57:15-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev 20180802 23:05:27-!- wesdiscordbot [~wesdiscor@baldras.wesnoth.org] has quit [Changing host] 20180802 23:05:27-!- wesdiscordbot [~wesdiscor@wesnoth/bot/discord-bridge] has joined #wesnoth-umc-dev 20180802 23:05:27-!- ServerMode/#wesnoth-umc-dev [+v wesdiscordbot] by card.freenode.net 20180802 23:07:15-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has quit [Quit: Verlassend] 20180802 23:07:28-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev 20180802 23:12:32-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has quit [Quit: Verlassend] 20180802 23:12:47-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev 20180802 23:14:20-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has quit [Client Quit] 20180802 23:14:30-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev 20180802 23:18:04-!- shiki [~Shiki@p5485581A.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev 20180802 23:19:04-!- shiki [~Shiki@p5485581A.dip0.t-ipconnect.de] has quit [Client Quit] 20180802 23:19:04-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has quit [Client Quit] 20180802 23:19:44-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev 20180802 23:20:29-!- sevu [~Shiki@p5485581A.dip0.t-ipconnect.de] has quit [Client Quit] 20180802 23:20:56-!- sevu [~sevu@p5485581A.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev 20180802 23:22:21-!- sevu [~sevu@p5485581A.dip0.t-ipconnect.de] has quit [Client Quit] 20180802 23:23:23-!- sevu [~sevu@p5485581A.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev 20180802 23:23:28-!- vn971 [~vasya@94.158.103.15] has quit [Quit: Leaving.] 20180802 23:23:53-!- sevu [~sevu@p5485581A.dip0.t-ipconnect.de] has quit [Client Quit] 20180802 23:24:05-!- sevu [~sevu@p5485581A.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev --- Log closed Fri Aug 03 00:00:34 2018