--- Log opened Tue Jul 24 00:00:10 2018 20180724 03:38:01<+discordbot> Modifying a side to change gold won't ADD gold, right? Just change it to the amount you put 20180724 04:01:09-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180724 04:01:15-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180724 04:46:27-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180724 04:46:33-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180724 05:22:05-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180724 05:22:11-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180724 06:34:04-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20180724 08:48:23-!- discordbot [~discordbo@baldras.wesnoth.org] has quit [Remote host closed the connection] 20180724 08:48:32-!- discordbot [~discordbo@baldras.wesnoth.org] has joined #wesnoth-umc-dev 20180724 08:48:35-!- mode/#wesnoth-umc-dev [+v discordbot] by ChanServ 20180724 09:51:42-!- sevu [~Shiki@p548551BC.dip0.t-ipconnect.de] has joined #wesnoth-umc-dev 20180724 10:16:39-!- sevu [~Shiki@p548551BC.dip0.t-ipconnect.de] has quit [Quit: Verlassend] 20180724 10:20:07<+discordbot> If you're using [modify_side], yes. 20180724 10:20:54<+discordbot> As opposed to the [gold] action, which adds or substracts gold. 20180724 10:53:48-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 268 seconds] 20180724 13:22:47<+discordbot> thanks shadowm 20180724 14:13:20-!- hk238 [~kvirc@unaffiliated/hk238] has joined #wesnoth-umc-dev 20180724 14:33:36< hk238> hm 20180724 14:33:56< hk238> I was thinking about making this scenario WML event that if there's a unit on a certain hex it gets healed 20180724 14:34:18< hk238> is there some existing map with such a feature it would be easy to copy that 20180724 14:35:51< Ravana_> should be faster to just implement it 20180724 14:36:35< hk238> my WML is pretty rusty :D 20180724 14:36:54< hk238> but I imagine it's merely a couple of lines and somekind of an event 20180724 14:38:16< hk238> how about standing on a campfire increasing resistance to cold? :d 20180724 14:38:34< Ravana_> if you want it not stacking with normal heal, it is more complex 20180724 14:39:32<+discordbot> hk238: UtBS S06a has such a hex. 20180724 14:39:33<+discordbot> https://github.com/wesnoth/wesnoth/blob/1e449a193a3ab46ec529a1851610b39fdc4e251d/data/campaigns/Under_the_Burning_Suns/scenarios/06a_In_the_Tunnels_of_Trolls.cfg#L987 20180724 14:39:55< hk238> thanks : ) 20180724 14:40:24< hk238> heh it's also a pool of water in this scenario 20180724 14:41:01<+discordbot> I used exactly that pool to test my fix for https://github.com/wesnoth/wesnoth/issues/2295 20180724 14:42:15< hk238> I might also use the narrative since it fits well.. :o 20180724 14:42:43< hk238> by the way an even that fires on a new turn, do I need to filter for side? So it doesnt happen on every player's turn? 20180724 14:43:32<+discordbot> No, you don't need to do it. 20180724 14:43:50<+discordbot> Use the "side turn" event if you want an event to fire every time the active side changes. 20180724 14:45:03< hk238> hm so does the new turn apply on player 1 turn or for each player? 20180724 14:45:39<+discordbot> "new turn" only fires on player 1 turns. 20180724 14:47:38< hk238> right so I should probably use side turn since this is for a multiplayer map? 20180724 14:48:53<+discordbot> I don't know if the common practice on MP is to use side turn events for that... 20180724 14:49:14< hk238> but it should pretty simple? :o 20180724 14:49:21<+discordbot> The "side X turn" (where you replace X with any number) event might also be useful. 20180724 14:49:36< hk238> just filter for side? 20180724 14:49:59< hk238> oh wait this doesn't work the way I thought it would 20180724 14:50:29< hk238> I need to first filter for side then do the heal unit and filter for side again 20180724 14:50:44<+discordbot> If you want to filter for a side, the question is which side you'd filter for. 20180724 14:51:02< hk238> can I use IF for that? 20180724 14:51:09<+discordbot> For example, if you simply add side=1 the result is that only side 1 can use the pool. 20180724 14:51:13< hk238> is there a then for IF? :D 20180724 14:51:43< hk238> btw what is the $this.unit syntax.. just $this.unit.id? 20180724 14:51:47<+discordbot> https://wiki.wesnoth.org/ConditionalActionsWML#.5Bif.5D 20180724 14:51:58< hk238> thanks 20180724 14:54:36< hk238> okay I made it.. let's test if it works. I mean "made" = copypaste 20180724 14:54:38< hk238> :D 20180724 14:55:09< hk238> oh darn the IF needs to nest te thing 20180724 14:56:43< hk238> invalid wml found [IF] not supported 20180724 14:56:49< hk238> hmm is the capital letters? 20180724 14:58:52<+discordbot> It's supposed to be in lowercase, yes. 20180724 15:00:01< hk238> okay this doesnt work properly instead it heals the unit on on player 1 side every turn but 20180724 15:00:33< hk238> https://pastebin.com/MKVbDnaW 20180724 15:00:36< hk238> any ideas? :D 20180724 15:01:04< hk238> it basically has the required elements 20180724 15:01:12< hk238> check side, check location, check unit side, do the healing 20180724 15:01:21< hk238> but the parts are not correctly connected 20180724 15:01:21< hk238> :D 20180724 15:01:58< hk238> is the correct way to check which player's side it is tto type [if] side? 20180724 15:02:27<+discordbot> Remove the [if], and in the filter, use side=$side_number 20180724 15:03:33< hk238> okay thanks 20180724 15:04:09< hk238> hmm can you multiple locations into a single location query? 20180724 15:04:14< hk238> or do Ineed to use [or] ? 20180724 15:04:57< hk238> well I put in or let see how it works 20180724 15:05:12<+discordbot> You can indeed specify multiple locations. 20180724 15:05:13<+discordbot> https://wiki.wesnoth.org/StandardLocationFilter#Notes_about_Coordinate_Usage 20180724 15:05:28<+discordbot> Also, please browse the reference instead of constantly asking us. 20180724 15:06:29< hk238> it works thanks 20180724 15:06:45< hk238> sorry you're right I should do more independent research... 20180724 15:06:46< hk238> :D 20180724 16:26:36-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20180724 17:45:06-!- hk238 [~kvirc@unaffiliated/hk238] has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/] 20180724 20:54:15-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 256 seconds] 20180724 21:49:47<+discordbot> How do I go about truncating a variable's value via WML? Is there an operand I could use with {VARIABLE_OP} ? 20180724 21:55:28<+discordbot> I'm doing lots of dividing and multiplication with variables, but would like the end value to be truncated, but I dunno how to accomplish this 20180724 21:58:39< Ravana_> it might be possible, but I suggest using Lua 20180724 22:00:05<+discordbot> Alright :/ Lua stuff still above me at this time 20180724 22:06:17< Ravana_> actually, when you only want to manipulate numbers, then rounding is enough 20180724 22:06:56<+discordbot> How do I round 'em using VML, then? 🤔 20180724 22:07:10<+discordbot> Because t hat'd be sufficient 20180724 22:07:22< Ravana_> set_variable 20180724 22:08:22<+discordbot> Yeah I know that's hwo to access and modify variables 20180724 22:09:00<+discordbot> But what's the operand to round the variable's value? 🤔 20180724 22:10:36< Ravana_> you say its not documented then? 20180724 22:11:54<+discordbot> Ah, derp. I looked in haste. Sorry! 20180724 22:12:10<+discordbot> Thanks for the heads up, Ravana 😃 You're very helpful, as always 👍 20180724 22:21:37-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20180724 22:21:43-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20180724 23:33:13<+discordbot> Does the AI change behavior at all when they have fog/shroud 20180724 23:49:44<+discordbot> https://wiki.wesnoth.org/InternalActionsWML#.5Bset_variable.5D says that round rounds the specified variable to specified number of digits, so I tried the following: {VARIABLE attack_combined "$($attack_damage * $attack_number)"} [if] [variable] name=attack_combined greater_than=15 [/variable] [then] [set_variable] name=attack_damage value="(15 / $attack_number)" 20180724 23:49:44<+discordbot> round=1 [/set_variable] [/then] [if] but I end up with the error seen in pasted image 20180724 23:49:45<+discordbot> https://cdn.discordapp.com/attachments/442775044590927873/471464023657938955/unknown.png 20180724 23:50:43<+discordbot> That is supposed to be value="$(15 / $attack_number)". 20180724 23:50:54<+discordbot> The dollar sign in front of the opening parentheses is important. 20180724 23:51:21<+discordbot> D'oh. Dunno how I missed that 😅 Should fix it, yes 20180724 23:53:56<+discordbot> Aye, it sure did. THanks! --- Log closed Wed Jul 25 00:00:12 2018