--- Log opened Thu Nov 22 00:00:53 2018 20181122 00:52:55< celmin|away> Heh. 20181122 00:53:27-!- celmin|away is now known as celticminstrel 20181122 01:21:57< hk238> wow I'm so lazy. Managed to work for like 5 minutes on this 20181122 01:21:58< hk238> :D 20181122 01:22:10< hk238> then got derailed into some random stuff 20181122 01:22:19< hk238> but you can always make more coffee 20181122 01:23:28< celticminstrel> Heh. 20181122 01:25:13< hk238> it's also because I don't like have a spark for developing this faction now, I'm just trying to continue because it's a long-term project and I know that if I get it to a playable state then I'll probably feel motivated to actually develop abilities and such 20181122 01:25:24< hk238> I'm not sure why that is 20181122 01:28:09< hk238> well I'll just continue for a bit now otherwise I'll just feel stupid or lazy :D 20181122 01:30:19< hk238> okay I managed to write the recruit table 20181122 01:30:24< hk238> now to just make the function and done 20181122 01:30:25< hk238> :D 20181122 01:32:37< hk238> hm 20181122 01:33:11< hk238> I forgot again how do I use a WML tag from lua? 20181122 01:34:40<+wesdiscordbot> wesnoth.fire 20181122 01:34:58<+wesdiscordbot> or wesnoth.wml_actions.tag/wesnoth.wml_conditionals.tag 20181122 01:35:19< celticminstrel> If it's a conditional tag, wesnoth.evaluate_conditional might be better. 20181122 01:35:48< hk238> hm this might be easier than I thought 20181122 01:36:11< hk238> but I still don't know how to do it. :D 20181122 01:36:14< hk238> let's see 20181122 01:38:37< hk238> https://pastebin.com/JF0X9yUT 20181122 01:38:45< hk238> on line 18 does the wesnoth.fire thing look even remotely correct? 20181122 01:38:46< hk238> :D 20181122 01:40:48< hk238> so this is probably the only thing that's tricky to figure out about this whole add-on, modifying the side to have recruits based on which leader unit they have 20181122 01:41:00< hk238> and probably just fixing this line 18 is enough to make it work 20181122 01:41:12< hk238> although it's still missing a bunch of units but it's most of them 20181122 01:43:50< hk238> hmm at least filter part is missing the key 20181122 01:44:16< hk238> wesnoth.fire(allow_extra_recruit{ value, { id=key, canrecruit=true } }) 20181122 01:44:20< hk238> should probably be like that 20181122 01:47:22<+wesdiscordbot> I would suggest looking at the example on the wiki 20181122 01:49:03< hk238> okay thanks 20181122 01:50:09< hk238> I think it's missing just a comma? Well let's try that 20181122 01:51:06< hk238> however since I'm doing an era I'm not sure where to put the event that reads the lua file? era tags ? 20181122 01:51:10< hk238> probably let's try that 20181122 01:51:18< celticminstrel> Yeah just missing a comma. 20181122 01:51:29< celticminstrel> Oh. 20181122 01:51:39< celticminstrel> ...oh, you already fixed that other issue. 20181122 01:52:37< hk238> the quotation marks around canrecruit? 20181122 01:52:40< celticminstrel> Yeah. 20181122 01:52:45< celticminstrel> Also WTH is value. 20181122 01:52:52< celticminstrel> That's not gonna work. 20181122 01:53:18< celticminstrel> (FTR, the key can be quoted but in that case it must also be enclosed in square brackets, ie ["canrecruit"]=...) 20181122 01:53:36< celticminstrel> (Useful if you need to use a key that's a keyword, such as, I dunno "break".) 20181122 01:53:52< celticminstrel> (Or a key that's not an identifier, but those aren't allowed in WML tables anyway.) 20181122 01:54:32< celticminstrel> I think you need to look up how [allow_extra_recruit] works, because you seem to be using it wrong there. 20181122 01:54:33< hk238> oh is key a keyword? 20181122 01:54:40< celticminstrel> No. 20181122 01:54:55< celticminstrel> I don't think "canrecruit" is an allowed key in [allow_extra_recruit]. 20181122 01:55:16< hk238> oh 20181122 01:59:25< hk238> hmm but it says standard unit filter in the wiki, and that's part of standard unit filter? according to wiki at least? 20181122 01:59:48< hk238> but I seem to have declared the table incorrectly since I get a lua syntax error in console 20181122 02:00:23< celticminstrel> Ohhh. Yeah, okay.. 20181122 02:00:25< hk238> hmm can you use quotation marks when declaring keys in a table? local example = { "key" = "value" } ? 20181122 02:00:33< celticminstrel> But yes you declared it wrong. 20181122 02:00:38< celticminstrel> You can. 20181122 02:00:43< celticminstrel> ["key"] = value 20181122 02:00:51< celticminstrel> Need the square brackets in addition to the quotes. 20181122 02:01:01< hk238> right if I just remove the quotation marks then it works, i think? 20181122 02:01:27< celticminstrel> As long as it's a valid Lua identifier, yes (but nearly all WML keys are). 20181122 02:02:24< celticminstrel> (WML keys can start with a digit, Lua identifiers can't. The only place I know that that's done though is for StatsWML.) 20181122 02:04:48< hk238> hmm I was missing also a brace.. now this generic_functions I'm trying to import is failing 20181122 02:04:53< hk238> wonder what's up with that 20181122 02:07:19< hk238> I guess I Could figure that out later and just use a non modularized version of that file 20181122 02:07:32< hk238> or nevermind just copy the function here 20181122 02:12:17< hk238> hmm now it says 'wml table expected, got table' 20181122 02:13:14< hk238> I wonder if that means that the values in the table I manually declared are not suitable to be given as an argument to the allow_extra_recruits thing? 20181122 02:13:49< hk238> also I added quotation marks around "allow_extra_recruit" 20181122 02:13:53< hk238> before I got to that error 20181122 02:13:54< hk238> D: 20181122 02:14:50<+wesdiscordbot> a WML table is of the form {"wml_tag_name", {a=1, b=2}} 20181122 02:15:23< hk238> hmm does tha tmean I should do like { "extra_recruit" , value } ? probably does? 20181122 02:15:28< hk238> let's try that 20181122 02:16:27< hk238> nope :D 20181122 02:17:31<+wesdiscordbot> what you provide wesnoth.fire should be as: wesnoth.fire("wml_tag_name", {a=1, b=2}) 20181122 02:17:44< hk238> right okay 20181122 02:18:38< hk238> alright I got rid of the error 20181122 02:18:44< hk238> but it's not actually producing the desired result 20181122 02:19:32< hk238> It's probably because I'm using "id" where I should use unit type id or something like that 20181122 02:20:06< hk238> type 20181122 02:20:17< hk238> though I'm confused by this but let's try that since it would make sense if it was the reason 20181122 02:21:03< hk238> yes that was the reason it works now awesome 20181122 02:21:11< hk238> thanks for help Pentarctagon & celticminstrel 20181122 02:24:29< hk238> that's a bit confusing though since in unit declaration it's called "id" and called "type" in standard unit filter, so easy to mix them up 20181122 02:24:52< hk238> and inconsistency for the label 20181122 02:27:10< hk238> https://github.com/n832sv/wesnoth_vampire_faction 20181122 02:27:12< hk238> updated github also 20181122 02:27:20< hk238> amazingly managed not to upload the pbl file 20181122 02:27:54< hk238> it's still not even close to being finished but I think this leader thing was probably the most complicated effort and even that was just a couple of lines of lua 20181122 02:29:16< hk238> just a couple of unit files, a couple of images 20181122 02:29:24< hk238> then got to write all the abilities, specials and unit stats 20181122 02:29:41< hk238> it's quite a lot of work but still.. it wouldn't really take that long, if I only managed to keep myself at it for like two hours or something 20181122 02:31:12< celticminstrel> Uhh. 20181122 02:31:42< celticminstrel> Okay yeah, in [unit_type] it's id, sure. But it's type literally everywhere else. 20181122 02:33:59< hk238> yeah but why wouldn't it be type in unit_type ? 20181122 02:34:30< hk238> I mean I'm not complaining even though that was the source of the problem I figured it out almost immediately, but you know, I don't see any reason for the inconsistency so.. shrugh 20181122 02:34:39< celticminstrel> Because it's the id of the type? 20181122 02:35:00< hk238> yeah but why is it called type then instead of id in the standardunitfilter? 20181122 02:35:14< celticminstrel> Because units also have an id which is different from the unit type id. 20181122 02:35:33< hk238> yes I know, and it's not logical way to set it up, because they collide then :D 20181122 02:35:46< hk238> you could just as well have separate labels for the two different things and avoid that 20181122 02:35:56< celticminstrel> It's totally logical, given the meaning of id. 20181122 02:36:13< hk238> yeah are we actually going to start an argument over this? :d 20181122 02:36:23< celticminstrel> It means id has the same meaning in two contexts - something that uniquely identifies something. 20181122 02:36:29< hk238> you could also call the 'id' 'unique_id' and 'id' for the 'id' 20181122 02:36:42< celticminstrel> Well, they're both unique ids though... 20181122 02:36:44< hk238> instead of callign 'id' the 'type' and 20181122 02:36:47< hk238> :D 20181122 02:37:23< celticminstrel> And lots of other things also have ids. It's a different sort of consistency from what you're thinking, but it's still consistent. 20181122 02:37:35< hk238> I mean there's nothing magical about it, it's just a key, that is referred to by it's name somewhere, and by something else in some other context. 20181122 02:38:10< celticminstrel> I mean, the argument you're making could just as well apply to traits, or unit abilities, or weapon specials. 20181122 02:38:23< hk238> yeah I guess 20181122 02:40:12< hk238> but not exactly since they don't have the same problem 20181122 02:41:01< hk238> anyway this is extremely minor :D 20181122 02:43:14< celticminstrel> I mean... unit filters support trait= and ability= (or something similar), so I'm not sure if that qualifies as not having the same problem. 20181122 02:43:56< hk238> yeah you're right about that, but they don't have unique ids 20181122 02:44:14< celticminstrel> Um. I'd say they do? 20181122 02:44:18< hk238> they do? 20181122 02:44:37< celticminstrel> They definitely have ids, it might be debateable whether they count as unique ones. 20181122 02:44:56< hk238> yeah but when you create a unit it's given a unique id to distinguish it from other units of the same type(id) 20181122 02:45:04< celticminstrel> No? 20181122 02:45:14< celticminstrel> It's given a unique id to distinguish it from other units, period. 20181122 02:45:25< celticminstrel> You can't have two units with the same id but different types. 20181122 02:45:39< hk238> yes..and when you give units weaponspecials you don't generate them uniqueweaponspecialids 20181122 02:45:57< celticminstrel> (Well, maybe you technically can, but it'll cause weird stuff with things that assume the IDs are unique.) 20181122 02:46:06< hk238> because there's only 1 special of each type(id) simultaneously present so you don't need that 20181122 02:46:26< celticminstrel> I think I sorta see what you mean. 20181122 02:46:32< hk238> Yay! :D 20181122 03:43:42-!- celticminstrel is now known as celmin|sleep 20181122 05:31:25-!- hk238 [~kvirc@unaffiliated/hk238] has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/] 20181122 09:00:59-!- vn971 [~vasilii@office.zivver.org] has joined #wesnoth-umc-dev 20181122 12:24:00-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20181122 13:51:12-!- celmin|sleep is now known as celmin|away 20181122 15:11:14-!- hk238 [~kvirc@unaffiliated/hk238] has joined #wesnoth-umc-dev 20181122 17:39:08-!- vn971 [~vasilii@office.zivver.org] has quit [Quit: Leaving.] 20181122 18:43:16-!- vn971 [~vasilii@2a02:a210:2203:c000:17d8:fb4:d26c:78c8] has joined #wesnoth-umc-dev 20181122 19:54:55-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has quit [] 20181122 19:56:32-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has joined #wesnoth-umc-dev 20181122 20:22:44-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has quit [Changing host] 20181122 20:22:44-!- Ravana_ [~Ravana@wesnoth/mp-mod/ravana] has joined #wesnoth-umc-dev 20181122 21:04:49-!- Ravana_ [~Ravana@wesnoth/mp-mod/ravana] has quit [] 20181122 21:05:52-!- Ravana [~Ravana@wesnoth/mp-mod/ravana] has joined #wesnoth-umc-dev 20181122 21:08:54-!- vn971 [~vasilii@2a02:a210:2203:c000:17d8:fb4:d26c:78c8] has quit [Ping timeout: 264 seconds] 20181122 21:38:45-!- vn971 [~vasilii@ip-213-127-112-235.ip.prioritytelecom.net] has joined #wesnoth-umc-dev 20181122 21:38:50-!- vn971 [~vasilii@ip-213-127-112-235.ip.prioritytelecom.net] has quit [Client Quit] 20181122 21:59:53-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 276 seconds] --- Log closed Fri Nov 23 00:00:54 2018