--- Log opened Tue Oct 16 00:00:42 2018 20181016 00:02:10-!- celmin|sleep is now known as celticminstrel 20181016 00:06:57< buhman> is there an API to add customized status text to a persistent place in the UI (not a dialog) 20181016 00:07:36< buhman> modifying the sidebar or topbar, or maybe "background dialog" that doesn't need to be dismissed 20181016 00:10:32<+wesdiscordbot> don't think so, but you can always make a dummy ability that can serve as a stand-in status 20181016 00:11:22< buhman> yeah, I was thinking I could muck with units to show that 20181016 00:12:42<+wesdiscordbot> you can also tint a unit using different colors to indicate a specific status too 20181016 00:12:47<+wesdiscordbot> like slightly red, slightly violet, etc. 20181016 00:37:56< celticminstrel> There is an API for that actually. 20181016 00:38:08< celticminstrel> I think there's a pinned thread in the WML Workshop that shows how? 20181016 00:38:24< celticminstrel> It's not a very good API, admittedly, but... 20181016 00:38:49< celticminstrel> It is definitely possible to add a custom status icon, and if you need to add status text somewhere you can probably find a way to do it. 20181016 00:39:49< celticminstrel> Where do you want the status text to appear, exactly? 20181016 00:40:35<+wesdiscordbot> celticminstrel: you mean https://wiki.wesnoth.org/LuaWML/Display#wesnoth.theme_items ? 20181016 00:40:39< celticminstrel> Yes. 20181016 00:40:57< celticminstrel> The pinned thread I was referring to is specifically about icons for status effects. 20181016 00:41:07< celticminstrel> But there's a lot more possible besides that. 20181016 00:48:31< buhman> celticminstrel: I don't really care, anywhere I can fit about ~5-6 lines comfortably 20181016 00:48:53< celticminstrel> Maybe add it to the top of unit_weapons? 20181016 00:49:05< celticminstrel> The weapons are about the only place you'll definitely find spare space. 20181016 00:49:22< celticminstrel> Provided you don't have units with tons of weapons, of course. 20181016 00:49:52< buhman> I could also do colored icons actually 20181016 00:50:02< buhman> like 5-6 icons, in a particular sequence 20181016 00:50:10< buhman> where's the API you were thinking about? 20181016 00:50:50< celticminstrel> See Pentarctagon's link, though I'm not sure how good that documentation is... also see the pinned thread I mentioned. 20181016 00:52:08< buhman> hmm, so I can add weapons/attacks, without actually adding them? 20181016 00:52:10< buhman> that sounds great 20181016 00:52:40< celticminstrel> You should be able to add arbitrary text, rather than "weapons/attacks". 20181016 00:53:04< buhman> right 20181016 02:06:42< buhman> celticminstrel: am I completely crazy, or does it want the text to be in a specific format? 20181016 02:09:02< celticminstrel> It's a WML table format IIUC. 20181016 02:09:42< celticminstrel> Here's that thread I kept mentioning: https://wiki.wesnoth.org/LuaWML/Display#wesnoth.theme_items 20181016 02:09:56< celticminstrel> Though that shows how to show icons rather than text, but I think text is similar? 20181016 02:10:35< celticminstrel> ... 20181016 02:10:54< celticminstrel> Oh, that's not the thread, but I guess someone transplanted the example to the wiki and I completely forgot about it. 20181016 02:11:19< celticminstrel> Try using a "text = " instead of "image = " maybe? 20181016 02:12:37< buhman> oh 20181016 02:12:45< buhman> I thought it was a straight table 20181016 02:13:00< buhman> does wesnoth come with any sane/accurate table dumping utility? 20181016 02:13:16< celticminstrel> There's wml.tostring? 20181016 02:13:22< celticminstrel> Which is only for WML tables mind you. 20181016 02:13:46< celticminstrel> IIRC it turns a table into WML code. 20181016 02:14:13< celticminstrel> Maybe we should change that example to make it more clear that it's a WML table. 20181016 02:14:30< celticminstrel> Instead of {"element",{...}}, wml.tag.element{...} 20181016 02:18:07-!- mthe878 [~mthe@unaffiliated/mthe] has quit [Ping timeout: 250 seconds] 20181016 02:18:34-!- mthe878 [~mthe@unaffiliated/mthe] has joined #wesnoth 20181016 02:20:11< buhman> oh, because "element" seems to work 20181016 02:20:39< celticminstrel> ? 20181016 02:27:06< buhman> http://dpaste.com/139S7K5 20181016 02:27:20< buhman> why does line 7 not work, but 11 does ? 20181016 02:28:34< celticminstrel> Uh. You want to replace the unit's weapons? 20181016 02:28:46< buhman> yes 20181016 02:28:48< buhman> sure 20181016 02:28:57< celticminstrel> No, wait, what you're doing there is replacing... what are you even replacing... 20181016 02:29:09< buhman> all of the attacks? :) 20181016 02:29:23< celticminstrel> Basically, you can assume that old_unit_weapons() returns the list of the unit's weapons. If you don't want to show that list at all, you don't even need to call it. 20181016 02:29:39< buhman> but if I don't, my new list is ignored 20181016 02:29:47< celticminstrel> Hmm. 20181016 02:30:34< buhman> http://dpaste.com/3TXTBDC 20181016 02:30:46< buhman> ^ seemingly has no effect on attack output 20181016 02:31:02< celticminstrel> So the attacks are shown and your replacement text is not? 20181016 02:31:20< buhman> yes 20181016 02:31:54< buhman> but if I `nil` each attack line in place, and add my own line, that works 20181016 02:31:56< celticminstrel> Curious... 20181016 02:32:26< celticminstrel> You're saying it's not enough to just cal old_unit_weapons, you have to actually modify what it returns? 20181016 02:32:28< celticminstrel> ^call 20181016 02:32:36< buhman> I wonder if that's related to whatever `config()` does in reports.cpp 20181016 02:32:38< buhman> yes 20181016 02:32:45< celticminstrel> ie, calling it and ignoring the value and just returning your own thing does nothing. 20181016 02:32:59< buhman> seems like it 20181016 02:36:28< buhman> isn't that also exactly how this reads? https://github.com/wesnoth/wesnoth/blob/master/src/scripting/game_lua_kernel.cpp#L3835 ? 20181016 02:37:52< buhman> luaW_toconfig makes my eyes bleed; not sure 20181016 02:38:01< celticminstrel> I don't remember what luaW_pcall returns... 20181016 02:38:40< celticminstrel> Was it the number of return values? In which the early return occurs if the Lua theme item returns nothing. 20181016 02:39:09< celticminstrel> If the theme item returns anything, then the last return value is converted to a config. 20181016 02:40:43< celticminstrel> Okay, so it seems impl_theme_item is essentially old_unit_weapons... 20181016 02:41:01< celticminstrel> ie, calling old_unit_weapons will call that with m = "unit_weapons". 20181016 02:41:46< celticminstrel> It just returns an ordinary WML config encoded as a Lua table (as opposed to a vconfig). 20181016 02:43:19< celticminstrel> My guess as to what line 3847 does is to create a reports context that doesn't have a Lua state associated. 20181016 02:43:36< celticminstrel> But it just returns a normal config... 20181016 02:43:48-!- synthpopisback [~synthpopi@cpe-2606-A000-7947-5000-29AB-3AB-4407-EF1D.dyn6.twc.com] has joined #wesnoth 20181016 02:44:13< buhman> hmm, I think I'm just insane and this actually works fine 20181016 02:44:18< celticminstrel> Oh? 20181016 02:44:21< celticminstrel> Is it working now? 20181016 02:44:53< buhman> yeah, I think I was crashing the interpreter coincidentally on every run where I tried a direct return 20181016 02:45:00< buhman> so it just wasn't running my code at all 20181016 02:45:11< celticminstrel> Crashing it? 20181016 02:45:22< buhman> causing a runtime error 20181016 02:45:50< celticminstrel> I don't see any such obvious thing in the code you posted... 20181016 02:46:06< buhman> :) sorry for doctored code 20181016 02:46:11< celticminstrel> Ah. 20181016 02:48:06< buhman> oh you can *hover* over the attacks to see more stuff 20181016 02:48:10< buhman> I never knew 20181016 02:48:29< celticminstrel> That's what the tooltip attribute of the WML table is. 20181016 02:48:50< buhman> I'm going to add this to the article 20181016 02:48:52< celticminstrel> You can hover over nearly everything in the UI to see more stuff. Sometimes stuff that's not obviously related. 20181016 02:50:19-!- synthpopisback [~synthpopi@cpe-2606-A000-7947-5000-29AB-3AB-4407-EF1D.dyn6.twc.com] has quit [Quit: Leaving] 20181016 02:51:04-!- synthpopisback [~synthpopi@cpe-2606-A000-7947-5000-29AB-3AB-4407-EF1D.dyn6.twc.com] has joined #wesnoth 20181016 03:56:33< celticminstrel> ...I wonder what getmetatable(wesnoth.theme_items.anything) returns... 20181016 04:18:37-!- celticminstrel is now known as celmin|sleep 20181016 04:47:00-!- Nobun [~user@51.179.110.13] has joined #wesnoth 20181016 06:19:03-!- HeyCitizen [HeyCitizen@gateway/vpn/privateinternetaccess/heycitizen] has quit [Ping timeout: 250 seconds] 20181016 06:22:48-!- HeyCitizen [HeyCitizen@gateway/vpn/privateinternetaccess/heycitizen] has joined #wesnoth 20181016 06:38:57-!- Haudegen [~quassel@178.115.237.87.static.drei.at] has joined #wesnoth 20181016 07:07:27-!- Tobbi [~Tobbi@supertux/tobbi] has joined #wesnoth 20181016 07:11:37-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth 20181016 07:25:19-!- Tobbi [~Tobbi@supertux/tobbi] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 20181016 07:33:46-!- behalebabo [~behalebab@unaffiliated/behalebabo] has quit [Ping timeout: 244 seconds] 20181016 07:46:59-!- behalebabo [~behalebab@unaffiliated/behalebabo] has joined #wesnoth 20181016 10:29:10-!- Haudegen [~quassel@178.115.237.87.static.drei.at] has quit [Remote host closed the connection] 20181016 10:44:13-!- hk238 [~kvirc@unaffiliated/hk238] has joined #wesnoth 20181016 11:23:45-!- Nobun [~user@51.179.110.13] has quit [Quit: WeeChat 2.1-dev] 20181016 11:30:05-!- Haudegen [~quassel@212-186-77-29.static.upcbusiness.at] has joined #wesnoth 20181016 12:58:22-!- celmin|sleep is now known as celmin|away 20181016 15:12:58-!- behalebabo [~behalebab@unaffiliated/behalebabo] has quit [Ping timeout: 246 seconds] 20181016 15:17:50-!- behalebabo [~behalebab@unaffiliated/behalebabo] has joined #wesnoth 20181016 15:35:04<+wesdiscordbot> @Ravana Thanks for moving those complaints (core units for EoMa, Kylix) and for putting your foot down. xD 20181016 15:37:45< Ravana_> EoMa is the reason I originally took over ageless 20181016 15:38:39< Ravana_> having "random not defaultlike" as first option in ageless factions shows how much I want to see core units 20181016 15:44:10-!- Tobbi [~Tobbi@supertux/tobbi] has joined #wesnoth 20181016 15:48:52-!- Haudegen [~quassel@212-186-77-29.static.upcbusiness.at] has quit [Remote host closed the connection] 20181016 16:38:37<+wesdiscordbot> xD 20181016 16:41:44-!- Tobbi [~Tobbi@supertux/tobbi] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 20181016 16:42:31-!- Haudegen [~quassel@178.115.237.87.static.drei.at] has joined #wesnoth 20181016 20:32:11-!- Haudegen [~quassel@178.115.237.87.static.drei.at] has quit [Read error: Connection reset by peer] 20181016 20:40:27-!- Tobbi [~Tobbi@supertux/tobbi] has joined #wesnoth 20181016 22:02:54-!- Haudegen [~quassel@178.115.237.87.static.drei.at] has joined #wesnoth 20181016 22:41:18-!- Tobbi [~Tobbi@supertux/tobbi] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 20181016 22:43:40-!- Haudegen [~quassel@178.115.237.87.static.drei.at] has quit [Read error: Connection reset by peer] 20181016 23:07:31-!- hk238 [~kvirc@unaffiliated/hk238] has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/] 20181016 23:08:23-!- kitsunenokenja [~kitsunech@68.91.220.96] has joined #wesnoth 20181016 23:28:47-!- Haudegen [~quassel@178.115.237.87.static.drei.at] has joined #wesnoth 20181016 23:44:24<+wesdiscordbot> HI! 20181016 23:46:16-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 260 seconds] 20181016 23:47:24<+wesdiscordbot> I see the Wesnoth 2 channel has been removed 20181016 23:47:34<+wesdiscordbot> it is sad 20181016 23:48:31<+wesdiscordbot> i thought something might come of it, provided that the powers that be do not do something crazy like requesting that the 4000 images in images/terrain be remade in 2x2x higher resolution 20181016 23:51:37<+wesdiscordbot> It's not be removed 20181016 23:51:50<+wesdiscordbot> The effort is still progressing, but I decided to take it private 20181016 23:52:08<+wesdiscordbot> You'll learn more when there's news 20181016 23:52:12<+wesdiscordbot> o 20181016 23:52:18<+wesdiscordbot> great to hear! --- Log closed Wed Oct 17 00:00:43 2018