--- Log opened Sun Jul 01 00:00:54 2018 20180701 03:02:18< discordbot1> Hi, Is the vision key of a unit deprecated, or is it still a thing? It seems I can change the value, but it has no effect on fog or shroud (in 1.14.2 at least.) 20180701 03:05:27< discordbot1> While I'm here, I'll also ask, is it possible to still have the tooltip show at the bottom of the screen, instead of an actual tooltip? From some of the lua files, I thought that might be a 'helptip', but that doesn't seem to be it. Does it still exist somewhere, that I could see as an example? Thanks. 20180701 03:22:52< discordbot1> Helptips were supposed to be something else entirely at first, no idea if they were recycled/adopted in 1.13.x or they still live in some kind of legacy code limbo. 20180701 03:23:47< discordbot1> If you've used Windows for long enough you might remember the What's This function. I have a feeling that's the purpose they were meant to serve. 20180701 03:24:26< discordbot1> There was/is even a dedicated hotkey for triggering them. 20180701 03:53:30-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180701 03:53:36-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180701 05:27:46< discordbot1> @shadowm @doofus-01 I decided not to use them. It seems like an outdated UX component, though, AFAIK, it still works if you specify helptip= text. Now, doofus, if you want the other type of tooltip you need lua T.tooltip { id = "tooltip_large" } 20180701 05:27:59< discordbot1> (as opposed to "id = tooltip" 20180701 05:28:01< discordbot1> ) 20180701 06:11:48< discordbot1> @shadowm - Thanks. They are not something from 1.13, they are older. I think before 1.10? @Vultraz - Thanks, as well, I'll have to experiment more, I thought I'd tried that. In any case, I'd advocate for keeping them, as the proper tooltip can get in the way (they are pop-up balloons, in obsolete parlance, and have been annoying since the 1990s). I'd agree that the bottom tooltips don't look slick, but they are less 20180701 06:11:49< discordbot1> obnoxious in some circumstances. 20180701 06:12:18< discordbot1> it's customizable by-dialog 20180701 06:12:34< discordbot1> and helptips would use the same tooltip "balloon" 20180701 06:12:56< discordbot1> (well, unless you set it to tooltip_large) 20180701 06:13:17< discordbot1> I'll likely remove them at some point 20180701 06:14:00< discordbot1> I think helptips have been around since as far back as 1.5.x. 20180701 06:14:06< discordbot1> Just unused. 20180701 06:16:16< discordbot1> Aww, well, if they will be removed, I suppose there is no point figuring this out. Thanks anyways. 20180701 06:17:03< discordbot1> I don't know what there is to figure out 20180701 06:17:12< discordbot1> I just told you how to get the other style of tooltip 20180701 06:17:15< discordbot1> it is not a helptip 20180701 06:19:56< discordbot1> Well, if you're up for it, a functioning example would be more helpful. Snippet in isolation isn't worth much. 20180701 06:24:42< discordbot1> Thereโ€™s a table entry in every lua dialog layout, in toplevel 20180701 06:24:53< discordbot1> A tooltip and helptip type ID 20180701 06:25:27< discordbot1> I just meant use the other type ID to make tooltips for the dialog use the bottom-of-the-screen style 20180701 06:41:59< discordbot1> hmm, is it possible to use the main menu etc. style tooltips in the game itself? 20180701 06:44:16< discordbot1> Also, would be nice to know about the vision key, I always thought it was a good idea, but it seems it wasn't really explored 20180701 06:44:57< discordbot1> I use it in Genesis 20180701 06:45:00< discordbot1> once 20180701 06:45:05< discordbot1> conditionally ๐Ÿ˜‚ 20180701 06:46:39< discordbot1> haha, that's at least something ๐Ÿ˜„ 20180701 06:47:17< discordbot1> I'll use it again 20180701 06:47:20< discordbot1> if it still works 20180701 06:47:27< discordbot1> do you simply change the vision points of a unit or change the movement_type vision cost? 20180701 06:47:35< discordbot1> let me check 20180701 06:47:37< discordbot1> as those seem to be 2 different things 20180701 06:47:43< discordbot1> wait no, I use it unconditionally 20180701 06:48:08< discordbot1> [modify_unit] [filter] id=Yumi [/filter] vision=8 [/modify_unit] 20180701 06:48:17< discordbot1> ah ok, so just the vision points 20180701 06:48:20< discordbot1> yup 20180701 06:48:28< discordbot1> personally I'm more interested in messing around the cost 20180701 06:48:39< discordbot1> could be interesting 20180701 06:49:45< discordbot1> I was actually even thinking about would it be possible to completely replace the current vision mechanics with something that doesn't use movement pathfinding, but after pondering it for a while I came to a conclusion it would be incredibely inefficient, if at all possible, to do it in WML/lua 20180701 06:50:02< discordbot1> and even that would probably be beyond me 20180701 06:50:08< discordbot1> so I dropped it for now 20180701 07:08:37-!- hk238 [~kvirc@unaffiliated/hk238] has joined #wesnoth-umc-dev 20180701 09:57:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180701 09:57:37-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180701 10:51:56< hk238> hm 20180701 10:52:40< hk238> what does wesnoth.random do when there's more than 1 argument? 20180701 10:52:56< hk238> integer in range between? 20180701 11:00:33< discordbot1> I believe so 20180701 11:00:39< discordbot1> https://wiki.wesnoth.org/LuaWML/Misc#wesnoth.random 20180701 11:02:54< Ravana_> if it is not documented, check https://github.com/wesnoth/wesnoth/issues/2653 20180701 11:09:29< discordbot1> it is documented, I just linked to it 20180701 11:24:01< hk238> :d 20180701 11:24:20< hk238> sorry to ask about this but when doing "for i=10 do" does i start from 1 or 0? 20180701 11:24:29< hk238> 1 I think? 20180701 11:25:45< discordbot1> for i=10 do is invalid Lua. You must give at least two expressions. 20180701 11:26:00< hk238> huh :D 20180701 11:26:15< discordbot1> for i=1,10 starts from 1 and continues until it reaches 10. 20180701 11:26:36< hk238> oh okay does that work with 0 also? of course it has to work 20180701 11:29:24< hk238> trying to think about some interesting function for determining gold per wave, or a function that takes the argument, that is a fraction, " turn number/max turns " 20180701 11:29:49< hk238> so basically a function for the domain 0,1 20180701 11:31:39< Ravana_> if you use custom logic, better use while 20180701 11:32:56< hk238> huh? why? 20180701 11:33:41< Ravana_> with for you might need to skip some iterations when your step increment is not constant 20180701 11:34:38< discordbot1> http://www.lua.org/pil/4.3.4.html recommends: "Third, you should never change the value of the control variable: The effect of such changes is unpredictable. If you want to break a for loop before its normal termination, use break." 20180701 11:52:05< hk238> oh right 20180701 11:52:10< hk238> I think I came up with the function for the gold per wave 20180701 11:52:17< hk238> it's unnecessarily complex but looks neat 20180701 11:52:18< hk238> :D 20180701 11:52:32< hk238> https://www.desmos.com/calculator/yfnbk7mpuj 20180701 11:53:26< hk238> note that only the part where x is between 0 and 1 is relevant for this 20180701 11:57:04< hk238> and now to write that with lua without making errors :D 20180701 11:57:51< discordbot1> Transforming mathematical expressions to code is straightforward. Among the easiest programming tasks out there. 20180701 11:58:05< hk238> :D 20180701 11:58:28< hk238> I think so too except that it's easy to mix up where the parentheses go 20180701 12:00:02< hk238> what's "e" in lua btw? :o 20180701 12:00:36< hk238> oh it's math.exp 20180701 12:00:42< discordbot1> Use math.exp(-x). 20180701 12:00:44< discordbot1> http://www.lua.org/manual/5.3/manual.html#6.7 20180701 12:04:33< hk238> how about exponents? accordin to this page ^ works but i'm not sure: https://www.lua.org/pil/3.1.html 20180701 12:05:53< discordbot1> Like the page says, ^ is the exponentiation operator. 20180701 12:06:10< hk238> okay 20180701 12:07:55< hk238> well that's written down I wonder if I got it correct also the posted version had some unnecessary braces and also was adding + 1 twice 20180701 12:07:56< hk238> :D 20180701 12:10:40< hk238> okay then now there's a "new" gold per wave function :D 20180701 12:11:24< hk238> there's also a new syntax error 20180701 12:11:32< hk238> I think I forgot to write math. in front of pi :D 20180701 14:08:27-!- irker123 [~irker@uruz.ai0867.net] has joined #wesnoth-umc-dev 20180701 14:08:28< irker123> mattsc: mattsc AI-demos:master 7249f0a91e28 / AI-demos/lua/ (4 files): Fred ops: completely rework leader objectives eval https://github.com/mattsc/AI-demos/commit/7249f0a91e281337860f1cf7933bc01acacdc6ee 20180701 14:08:29< irker123> mattsc: mattsc AI-demos:master 69b80e9e1756 / AI-demos/lua/fred_ops_utils.lua: Fred ops: combine leader, village and unit protection eval https://github.com/mattsc/AI-demos/commit/69b80e9e1756f6f464f1d2e813a3c73a470e4005 20180701 16:10:17-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180701 16:10:23-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180701 16:55:12-!- hk238 [~kvirc@unaffiliated/hk238] has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/] 20180701 18:50:53-!- irker123 [~irker@uruz.ai0867.net] has quit [Quit: transmission timeout] 20180701 21:02:57-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180701 21:03:03-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev --- Log closed Mon Jul 02 00:00:55 2018