--- Log opened Mon Jul 30 00:00:28 2018 20180730 00:41:21-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180730 00:41:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180730 01:01:21-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180730 01:01:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180730 01:14:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180730 01:14:33-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180730 01:48:25-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180730 01:48:31-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180730 02:10:47-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180730 02:10:53-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180730 06:30:35-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20180730 07:58:05-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180730 07:58:11-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180730 09:21:59-!- vn971 [~vasya@94.158.103.15] has joined #wesnoth-umc-dev 20180730 09:25:09< vn971> Hi. Does anybody know a way to reference image "images/icons/unit-groups/race_orc_30.png" ? The problem with that image is that it lives outside of "data/core/images" directory. 20180730 09:26:11<+discordbot> In what context? 20180730 09:27:18< vn971> @shadowm: _server.pbl file. 20180730 09:27:34< vn971> the "icon". 20180730 09:29:01< Ravana_> font image is also outside of that, so it is possible 20180730 09:29:37<+discordbot> If using icons/unit-groups/race_orc_30.png or images/icons/unit-groups/race_orc_30.png doesn't work then URI encode it. 20180730 09:29:42< vn971> Though I've actually found this while searching for an answer: https://wiki.wesnoth.org/DataURI This may actually be a solution for me. Indeed, why not just do your work conveniently inside GIMP if it's only one icon in _server.pbl 20180730 09:29:48<+discordbot> I'm pretty sure the former should work though. 20180730 09:30:04<+discordbot> (Unless someone messed up a check somewhere.) 20180730 09:32:08< vn971> @shadowm: referencing "icons/" works, thanks! // I didn't try starting it from "icons". Actually I just thought it wouldn't work regardless, because it's not inside "data". 20180730 09:32:28<+discordbot> It's just a binary path. 20180730 09:32:43<+discordbot> /data/core and are the default binary paths. 20180730 09:33:18<+discordbot> The implications are that images, sounds, and music are recognized in both. 20180730 13:12:39< zookeeper> @shadowm @Yumi are the physical worlds (such as the world of wesnoth) of the IftU/genesis/etc continuity just planets, or some other shape? 20180730 13:22:57<+discordbot> "physical worlds", what a term… Guess I should look what'suo in the "physical world" 20180730 13:25:22-!- hk238 [~kvirc@unaffiliated/hk238] has joined #wesnoth-umc-dev 20180730 13:25:23< hk238> hi 20180730 13:27:19< hk238> is it possible to alter the color of hexes as in terms of night/day cycle? 20180730 13:29:34<+discordbot> you can assign a [time_area] to a set of hexes – and there you can define a seperate nicght/day cycle, including seperate colors. The color is set in [time]. https://wiki.wesnoth.org/TimeWML 20180730 13:31:38< hk238> thx 20180730 13:57:40< hk238> hm 20180730 14:02:56< hk238> hmm how would I modify the time of day from a lua function on certain hex? 20180730 14:03:21< hk238> like time_area and remove_time_area are the WML tags but how to use them in a lua function? 20180730 14:03:33< hk238> I was thinking about creatin a sideturn event although I guess it's doable in wml 20180730 14:03:57< hk238> hmm is random available in wml? :d I think lua would be syntactically neater 20180730 14:05:18< hk238> I have a fairly simple idea which is that 20180730 14:05:28< hk238> I want to make this forest where it's night at random locations 20180730 14:05:37< hk238> so I'll have a sideturn function which 20180730 14:05:53< hk238> uses the time_area or something like that on each hex depending on a random roll 20180730 14:06:00< hk238> and it also removes the time areas depending on random roll 20180730 14:06:08< hk238> and the time_area is just night 20180730 14:06:32< hk238> so at night it has no visible effect, but at day dawn dusk you have these nocturnal areas kind of like shadows 20180730 14:06:44< hk238> meanwhile I was also thinking making these campfires illuminate surround terrain 20180730 14:07:03< hk238> I guess that can be done with just wml 20180730 14:07:35< hk238> or can it? D 20180730 14:07:36< hk238> :D 20180730 14:07:56< hk238> well I guess there's no need for that although 20180730 14:08:09< hk238> it would be nicer to use the illuminate version for that 20180730 14:16:45< vn971> "I think lua would be syntactically neater" -- it could be a matter of personal preference, but I'd strongly suggest trying to do everything in Lua if you can. It's so much effective and saner.. 20180730 14:17:35< hk238> yeah :o 20180730 14:18:11< vn971> "are the WML tags but how to use them in a lua function?" -- if you want to use WML tags from Lua, use `wesnoth.wml_actions.your_wml_tag_name` 20180730 14:18:55< hk238> okay thanks 20180730 14:19:35< vn971> For example, to kill a unit, use wesnoth.wml_actions.kill { id = "your_unit_id" } 20180730 14:19:35< vn971> Or to kill all leaders from side 1: wesnoth.wml_actions.kill { canrecruit = true, side = 1 } 20180730 14:19:53-!- hk238 [~kvirc@unaffiliated/hk238] has left #wesnoth-umc-dev [] 20180730 14:19:59-!- hk238 [~kvirc@unaffiliated/hk238] has joined #wesnoth-umc-dev 20180730 14:20:02< hk238> oops misclick 20180730 14:20:08< hk238> left channel by accident 20180730 14:20:59< vn971> If you get lost with the WML <-> Lua conversion at any point, feel free to ask here. It's feels somewhat tricky until you get used to it, best of all is to just get some help on that. 20180730 14:22:08< hk238> hmm 20180730 14:22:42< hk238> is there a command for illumination rather than time of day? I mean it can be implemented by implementing the illumination logic or creating a custom schedule 20180730 14:22:52< hk238> but illumination already has the correct images for schedule and such 20180730 14:30:54<+discordbot> what is even worse, illumination (as the white mages one) doesn't stack, but if the terrain is already illuminated (such as lava) it can stack with the white mages illumination 20180730 14:31:24< hk238> hmm that is kind of troublesome 20180730 14:31:50< hk238> what about if I have a variable in lua named x, and the key for time_area includes x 20180730 14:32:40< hk238> does it work if you write like wesnoth.wml_actions.time_area { x = x , y = y{SCHEDULE_MIDNIGHT} } 20180730 14:33:02< hk238> since the variable name and the key name are different things, should I change the variable name to avoid collision? 20180730 14:33:40<+discordbot> I can't help you with lua related questions, but what x do you mean? 20180730 14:36:01< zookeeper> i don't think you need to change the variable name in those particular kinds of cases. or at least i'm pretty sure i've seen a lot of x = x -style code. 20180730 14:36:14< hk238> okay 20180730 14:37:00< hk238> so the compiler or whatever it is can figure out from the syntax that the first x in x = x refers to a keyname and is a string despite the missing "" , were as the second x is a variable name 20180730 14:37:22< hk238> hmm this looks like it might be much easier than I thought do you think this looks correct? 20180730 14:37:53< hk238> https://pastebin.com/VY0qwRi4 20180730 14:37:54< hk238> ? 20180730 14:38:09< hk238> although it's pretty inane to manually type those coordinates 20180730 14:38:11< hk238> : 20180730 14:39:06< hk238> the for_each_index function is in another file but it might work 20180730 14:39:31< hk238> well I don't think it works but can test it 20180730 14:42:16< vn971> hk238: Lua variables live in a completely separate space than WML variables. In Lua code, WML variable is `wesnoth.get_variable("x")`. 20180730 14:42:41< vn971> hk238: but a Lua variable itself is just `x`, no attention needed at all. 20180730 14:44:03< vn971> The Lua thing can be anything: string, table, or even a function. The WML variable can only store a limited type of static data (no functions). On the other hand, a WML variable is also stored in the savefile. Lua environment is always lost upon re-start and should be re-constructed back in the "preload" event. 20180730 14:44:24< vn971> Luckily you don't need to store anything though. 20180730 14:45:26< hk238> Yeah I meant that even though there's a variable named x, writing x in that wml tag call doesn't get evaluated as a variable name, but is interpreted as a string due to it's syntactical placement in the expression 20180730 14:45:40< hk238> where as x following immediately after the = gets evaluated as a variable 20180730 14:46:02< vn971> In the code. This won't work: {MIDNIGHT} The thing in curly braces is a WML macro. It doesn't work from Lua...:( 20180730 14:46:19< hk238> oh 20180730 14:46:30< hk238> what should I do instead? 20180730 14:46:48< vn971> Lua will assume that you're trying to pull a local Lua variable named MIDNIGHT, which will be `nil`. Then `nil` will in turn be wrapped into an array { nil } and that's about it. 20180730 14:47:10< vn971> hk238: can you look up for definition of MIDNIGHT? Maybe it'd be trivially to just implement in Lua. 20180730 14:47:25< hk238> I could try that okay :o 20180730 14:47:44< hk238> but I don't know where to look for it :D 20180730 14:48:01< vn971> > but is interpreted as a string due to it's syntactical placement in the expression -- if it's on the left side, then yes, it's key name, just a string. 20180730 14:48:12<+discordbot> in data/core/macros 20180730 14:48:18< zookeeper> you grep for "define MIDNIGHT" in dat... yeah 20180730 14:48:27< vn971> Like here, "my_key_name" is just a string: { my_key_name = 12 + 16 } 20180730 14:49:57< hk238> okay I found it 20180730 14:50:35< vn971> local MIDNIGHT = {"time", {id = "midnight", name = "Midnight", image = "misc/time-schedules/tod-schedule-24hrs.png~CROP(0,195,125,39)", red=-75, green=-45, blue=-13 }} 20180730 14:50:45< vn971> That should do the trick I think. hk238 ^ 20180730 14:51:02< hk238> okay thanks 20180730 14:51:13< vn971> except that I skipped translation of the name. I don't know how to use translations properly in Lua TBH. Maybe someone more experienced will help. 20180730 14:51:47< vn971> (Or rather, I know it, but the recommended technique involves using `_`, which I disagree with. Anyway, just wait from someone else-s answer.) 20180730 14:52:44< hk238> how do I make a side_turn function from lua? or actually I could look that up from another file nevermind 20180730 14:54:42< hk238> okay let's test it, chances are it's definitely not working for at least another hour 20180730 14:54:43< hk238> D: 20180730 14:55:18< vn971> hk238: yeah it's usually so with programming... :D 20180730 14:55:29< hk238> wow no errors 20180730 14:55:33< hk238> I must have forgotten to enable the code file 20180730 14:55:34< hk238> :D 20180730 14:56:35< hk238> yeah it's not working 20180730 14:58:25< hk238> yes I had not enabled it correctly 20180730 14:58:29< hk238> now there are errors. Progress! 20180730 15:00:28< hk238> hmm remove_time_area requires id? 20180730 15:00:55< hk238> however the midnight thing is working, just the remove par tis not working 20180730 15:01:47< hk238> oh it works on id basis and not on coordinate basis 20180730 15:02:08< hk238> but I guess I can set the id in the function and then use that to remove it? 20180730 15:02:29< hk238> how do I make a string out of two numbers in lua? 20180730 15:02:50< hk238> I have the ingredients for the id but not sure how to put them together 20180730 15:02:50< hk238> :D 20180730 15:04:39< hk238> how about concatenation of two strings? 20180730 15:05:05< hk238> two dots apparently 20180730 15:07:20< hk238> hmm it's working but the math isn't right 20180730 15:07:39< hk238> oh I got the > sign pointing the wrong way 20180730 15:07:39< hk238> :D 20180730 15:08:58< hk238> hmm 20180730 15:09:13< hk238> it works 20180730 15:09:34< hk238> that was actually pretty easy 20180730 15:09:34< hk238> :D 20180730 15:10:42< hk238> is there a WML or lua command for illumunation? For the campfires? 20180730 15:10:59< hk238> well this is good enough for one version I'll do the fires for the next one 20180730 15:13:19< vn971> hk238: I've never encountered illumination, I don't know. 20180730 15:24:51< hk238> hm how do I enable view sharing with AI side? 20180730 15:25:10< vn971> OK nice, I think I have a new add-on ready.:) Not polished yet, maybe even Beta quality. But works in simple cases for sure. 20180730 15:25:18<+discordbot> share_vision in side 20180730 15:25:31< vn971> hk238: during development or as add-on feature? 20180730 15:25:39< hk238> add on feature 20180730 15:25:50< hk238> so I put that for the AI side tag? 20180730 15:26:01< vn971> (then as @sevu suggests.) 20180730 15:26:15<+discordbot> I think in the side who shares, but better test it 20180730 15:27:17< hk238> okay I'll test that thanks 20180730 15:28:17<+discordbot> you're welcome 20180730 15:35:13-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [] 20180730 15:52:13< hk238> hm 20180730 15:52:31< hk238> share view didn't work when putting it just for the AI, does it have to enabled for both sides perhaps? let's try that 20180730 15:53:31< hk238> hmm still doesn't work I wonder if they're actually in the same team after all 20180730 15:54:17< hk238> maybe if only one side has fog it doesnt work? 20180730 15:54:38< hk238> well duh.. 20180730 15:54:40< hk238> :D 20180730 15:55:37< hk238> yeah it's working now but I wonder if the AI knows what to do with fog enabled :o 20180730 16:05:26< vn971> hk238: IIRC AI ignores fog completely, i.e. it sees everything regardless. 20180730 16:06:17< hk238> oh cool 20180730 16:21:39<+discordbot> I think it only ignored shroud, though I'm not sure 20180730 16:22:43<+discordbot> share_vision is not a yes/no value, maybe that's why it didnt work? https://wiki.wesnoth.org/SideWML 20180730 16:41:54<+discordbot> I think AI ignores both shroud and fog 20180730 16:42:08<+discordbot> at least this is the assumption I always made 20180730 17:09:26< Soliton> AFAIK it only ignores shroud and not even that for certain targets like side leaders. 20180730 17:32:35-!- hk238 [~kvirc@unaffiliated/hk238] has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/] 20180730 17:34:48<+discordbot> zookeeper: I don't know if shadowm has replied to you yet, but I think they're planets 20180730 17:35:16<+discordbot> well, it wouldn't really make sense for them to be anything else, they're not like separate dimensions of the same world 20180730 17:35:20<+discordbot> they're different worlds 20180730 18:16:35-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180730 18:16:41-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180730 18:37:10-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180730 18:37:17-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180730 19:41:09-!- vn971 [~vasya@94.158.103.15] has quit [Ping timeout: 264 seconds] 20180730 20:49:36-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20180730 21:56:10-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 264 seconds] --- Log closed Tue Jul 31 00:00:30 2018