--- Log opened Sat Sep 01 00:00:10 2018 20180901 01:18:42<+wesdiscordbot> hmm so I a variable x that hasn't been initialized yet. when I do [variable] name=x numerical_equals=0 [/variable] it seems to return true 20180901 01:18:55<+wesdiscordbot> however when I do $x it just doesn't return anything 20180901 01:19:03<+wesdiscordbot> I'd like it to return 0 20180901 01:20:24<+wesdiscordbot> wellllll 20180901 01:20:34<+wesdiscordbot> if you're trying to use it without initializing it that's probably not a good thing to begin with 20180901 01:20:48<+wesdiscordbot> the reason i didn't put {VARIABLE x 0} before is because this is the puzzle menu and it repeatedly gets used 20180901 01:21:07<+wesdiscordbot> couldn't you use like puzzle_x then? 20180901 01:21:08<+wesdiscordbot> so if I initialized the variables in the menu they'd keep getting reset to 0? 20180901 01:21:23<+wesdiscordbot> initialize it elsewhere 😮 20180901 01:21:49<+wesdiscordbot> ah, like where? 20180901 01:21:57<+wesdiscordbot> well before you ever call the puzzle menu 20180901 01:22:11<+wesdiscordbot> using uninitialized variables is like throwing darts in the dark 20180901 01:22:22<+wesdiscordbot> who knows what you'll hit 😂 20180901 01:22:31<+wesdiscordbot> i think i read on the wiki that the default value is 0 or something like that 20180901 01:22:41<+wesdiscordbot> 🤔 hopefully that's true 20180901 01:23:16<+wesdiscordbot> you could just make a block of lua or wml just to initialize all the variables you use 20180901 01:23:40<+wesdiscordbot> then you'll know what values they start out with for sure 20180901 01:24:38<+wesdiscordbot> is it possible to do it in main.cfg? Or I need to make a new scenario 20180901 01:25:23<+wesdiscordbot> actually is it possible to test whether a variable exists or not 20180901 01:25:41<+wesdiscordbot> because then I could just set it to 0 if not, and leave it alone if it already exists 20180901 01:26:21<+wesdiscordbot> why not have it at the start of the first scenario? 😮 20180901 01:26:26<+wesdiscordbot> like before anything else ever happens 20180901 01:26:47<+wesdiscordbot> ah well currently the puzzle menu is the first scenario, so I'd have to make a new one 20180901 01:28:08<+wesdiscordbot> that should work though, I didn't think of that! thanks for the help 😄 20180901 01:28:53<+wesdiscordbot> WML probably has some safeguards to keep people from doing bad things with code, but still best to not rely on those 20180901 01:28:53<+wesdiscordbot> :p 20180901 01:29:16<+wesdiscordbot> now that I think of it, you can probably make a special loader.cfg file and then just load that in with main.cfg 20180901 01:29:31<+wesdiscordbot> you'll need to load it first before loading any scenarios tho 😮 20180901 01:31:10<+wesdiscordbot> ah I don't know how that works, I think i'll just do it the old fashioned way 😃 20180901 01:31:42<+wesdiscordbot> hmm 20180901 01:32:19<+wesdiscordbot> time to just dl your thing to see what the code looks like 😂 20180901 01:32:49<+wesdiscordbot> yikes!!! 😮 20180901 01:32:52<+wesdiscordbot> wait 20180901 01:32:57<+wesdiscordbot> I can't actually run it on this computer 20180901 01:33:51<+wesdiscordbot> yeah 20180901 01:34:08<+wesdiscordbot> so why can't you initialize variables in a prestart event? 😮 20180901 01:34:22<+wesdiscordbot> in the first scenario 20180901 01:35:31<+wesdiscordbot> the first scenario is the puzzle menu, and after each puzzle you return to the menu, so wouldn't it reset all variables to 0 when you returned to the menu? 20180901 01:36:23<+wesdiscordbot> waiiiit a minute 20180901 01:36:45<+wesdiscordbot> ohhhh I see that's how you have it set up 20180901 01:36:58<+wesdiscordbot> i think i can initialize the local variables to 0 which won't affect the global ones 20180901 01:37:08<+wesdiscordbot> another way is 20180901 01:37:35<+wesdiscordbot> you set a flag whenever you finish a puzzle so you know not to reinitialize the variables 20180901 01:38:18<+wesdiscordbot> oh I also never thought about that wow 20180901 01:41:54<+wesdiscordbot> There's a new syntax / operator to initialize variable 20180901 01:41:57<+wesdiscordbot> ? 20180901 01:43:38<+wesdiscordbot> [variable] name=x numerical_equals=$y?10| [/variable] 20180901 01:44:03<+wesdiscordbot> This would initialize the variable y with 10 if it has not been initialized before 20180901 01:44:50<+wesdiscordbot> I don't think that alters the referenced variable. 20180901 01:45:16<+wesdiscordbot> It'll definitely return the default value if the variable is not set but I think it's supposed to remain unset. 20180901 01:45:55<+wesdiscordbot> true 20180901 01:46:44<+wesdiscordbot> If you want to substitute a default value when the variable is uninitialized or empty, you can use the syntax $varname?default text|. In this case, the | is required. 20180901 01:47:18<+wesdiscordbot> Doesn't set y, just substitutes it 20180901 01:50:10<+wesdiscordbot> The other thing which is special about numerical_equals in comparison to equals: equals just compares whatever the value is, as text / string. numerical_equals takes an uninitialized value as 0 (and boolean_equals as false), that's why the variable can still return nothing besides matching 20180901 02:28:54<+wesdiscordbot> okay hmmm so I initialized a bunch of local variables to 0 in the prestart event: [event] name=prestart {VARIABLE s1 0} {VARIABLE s2 0} {VARIABLE s3 0} {VARIABLE s4 0} {VARIABLE s5 0} {VARIABLE s6 0} [/event] 20180901 02:30:01<+wesdiscordbot> then I did [get_global_variable] namespace=tactics_puzzles from_global=backstabs_solved to_local=s1 [/get_global_variable] for all of them (the global variable does not exist yet) and somehow doing this makes the variable s1 uninitialized again 20180901 02:30:52<+wesdiscordbot> because when i commented that global thing out it worked fine but otherwise wasn't returning anything 20180901 02:35:52-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180901 02:35:58-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180901 06:57:03-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20180901 07:12:35-!- hk238 [~kvirc@a458.ip20.netikka.fi] has joined #wesnoth-umc-dev 20180901 08:20:30-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 272 seconds] 20180901 09:40:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180901 09:40:33-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180901 11:22:02<+wesdiscordbot> You could make sure that they are initialized if with {VARIABLE s1b $s1?0|} afterwards, using s1 only as a temp variable. I wonder if the ? is even accepted at from_global=backstabs_solved?0| Or you use ? or operators such as numerical_equals instead in all the places so it doesn't matter if it is uinitialized. 20180901 13:01:07-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180901 13:01:13-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180901 14:58:24-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20180901 15:01:19<+wesdiscordbot> thanks sevu! I'll see if I can do that 20180901 15:02:30<+wesdiscordbot> Konrad2 reported my addon uses the old tentacle of the deep and sea serpent sprites and I've noticed it too, but I have no idea why. Any idea what could have caused that? 20180901 15:54:40<+wesdiscordbot> Are they in your add on 's binary path(s)? 20180901 15:55:25<+wesdiscordbot> Or some other add on that the both of you have coincidentally installed? 20180901 16:19:31<+wesdiscordbot> no the only new unit/sprites I included in my add-on is the Noble Youth. The old sprites showed up in help even after I deleted my add-on so it might be another add-on, i'll check the other ones I have installed 20180901 16:22:43<+wesdiscordbot> If it's another one you ought to demand a refund from the author 20180901 16:23:26<+wesdiscordbot> Unless it's intentional add ons shouldn't be exposing their own binary paths in the wrong context without consent 20180901 16:23:35<+wesdiscordbot> oooh i found thhe culprit, it's the Obscured Folklore era 20180901 16:49:15-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180901 16:49:21-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180901 17:11:10< Ravana_> I intentionally overwrite core paths since there is no better way https://github.com/wesnoth/wesnoth/issues/3136 20180901 17:29:13<+wesdiscordbot> Why would you override perfectly serviceable mainline assets? 20180901 17:29:28<+wesdiscordbot> I assume that's for Ageless Era. 20180901 17:30:38< Ravana_> because of vultraz 20180901 17:30:56< Ravana_> for Mirror Schedule Images 20180901 17:31:20<+wesdiscordbot> Okaaaaaay never mind then. 20180901 17:31:33< Ravana_> but ageless stuff I would prefer to put with lower priority to not unintentionally overwrite 20180901 18:31:23-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180901 18:31:29-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180901 19:56:28-!- hk238 [~kvirc@a458.ip20.netikka.fi] has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/] 20180901 20:42:55<+wesdiscordbot> Is there a way to alter a field on a vconfig object? For example, if I wanted to do something equivalent to this: function wesnoth.wml_actions.red_message(cfg) cfg.color = red wesnoth.wml_actions.message(cfg) end 20180901 21:05:37< Ravana_> try https://wiki.wesnoth.org/LuaAPI/wml#wml.literal 20180901 21:09:50< vn971> > function wesnoth.wml_actions.red_message(cfg) what's the problem with this code? Doesn't it work? 20180901 21:10:39< vn971> I'm using code similarly looking to that one, and it works just fine. IDK what a vconfig is though TBH. 20180901 21:10:50<+wesdiscordbot> directly setting fields on the cfg vconfig object isn't allowed. 20180901 21:11:40<+wesdiscordbot> it gives the error: attempt to index a vconfig value (local 'cfg') 20180901 21:13:02<+wesdiscordbot> using wml.literal() does work, though 20180901 21:13:08< vn971> interesting. I wonder if this'll work: rawset(cfg, "color", "red") 20180901 21:13:15< vn971> oh, okay cool.) 20180901 21:14:20<+wesdiscordbot> nope: bad argument #1 to 'rawset' (table expected, got vconfig) 20180901 21:15:02< vn971> thanks for testing, clear. 20180901 22:06:24-!- irker716 [~irker@wesnoth/umc-dev/bot/shikadibot] has joined #wesnoth-umc-dev 20180901 22:06:24-!- mode/#wesnoth-umc-dev [+v irker716] by ChanServ 20180901 22:06:24<+irker716> project-ethea: Iris Morelle After_the_Storm:master bb606550d82f / units/fake/Dream_Controller.cfg: Make the Dream Controller unit nameless https://github.com/project-ethea/After_the_Storm/commit/bb606550d82fc3d27e21c0cbdda844e517e67f35 20180901 22:23:36-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 252 seconds] 20180901 23:09:53<+irker716> morningstar: Ignacio R. Morelle :master * 39b7e5b / morningstar.pro: Enable the Qt widgets volume for building with Qt 5 https://git.io/fAlGR 20180901 23:09:56<+irker716> morningstar: Ignacio R. Morelle :master * c27c1ee / src/main.cpp: Include path fix for Qt 5 https://git.io/fAlG0 20180901 23:09:59<+irker716> morningstar: Ignacio R. Morelle :master * 33b27de / src/mainwindow.cpp: Qt 5 include fixes https://git.io/fAlGE 20180901 23:10:02<+irker716> morningstar: Ignacio R. Morelle :master * 829f37d / src/mainwindow.ui: Fix path to the ImageLabel header file https://git.io/fAlGu 20180901 23:10:05<+irker716> morningstar: Ignacio R. Morelle :master * f5c4eda / src/mainwindow.cpp: Port code to use the QStandardPaths class https://git.io/fAlGz 20180901 23:10:08<+irker716> morningstar: Ignacio R. Morelle :master * f3cc758 / src/mainwindow.cpp: Rewrite supported input formats detection logic, add .kra and .ora https://git.io/fAlGg 20180901 23:10:11<+irker716> morningstar: Ignacio R. Morelle :master * 1e835e2 / src/mainwindow.cpp: Remove unused variable https://git.io/fAlG2 20180901 23:10:14<+irker716> morningstar: Ignacio R. Morelle :master * 66fdb76 / / (7 files): Convert to using range-for https://git.io/fAlGa 20180901 23:10:17<+irker716> morningstar: Iris Morelle :master * eee3cc1 / BUGS,INSTALL,README: Update documentation https://git.io/vAcMK 20180901 23:10:20<+irker716> morningstar: Iris Morelle :master * fdb1a7b / / (28 files): Copyright update https://git.io/vAcM6 20180901 23:16:47<+irker716> morningstar: Iris Morelle :master * b5bcb8f / src/codesnippetdialog.cpp: Fix build with Qt 5.11.1 https://git.io/fAlGi 20180901 23:47:15-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180901 23:47:21-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev --- Log closed Sun Sep 02 00:00:08 2018