--- Log opened Sat Feb 26 00:00:05 2011 20110226 00:55:19-!- zookeeper [~l@wesnoth/developer/zookeeper] has quit [] 20110226 01:28:50< fendrin> hi vultraz 20110226 01:38:50-!- shadowmaster [~ignacio@wesnoth/developer/shadowmaster] has quit [Disconnected by services] 20110226 01:40:13-!- shadowmaster [~ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20110226 02:06:10-!- noy [~Noy@wesnoth/developer/noy] has quit [Quit: noy] 20110226 02:21:31-!- fendrin [~fabi@88-134-128-112-dynip.superkabel.de] has quit [Remote host closed the connection] 20110226 02:29:25<+CIA-41> wesnoth-umc-dev: grickit * r8892 /branches/irc-bots/Gambot/processors/ (3 files in 2 dirs): Made the @ redirection more friendly with my reflexive typing style. (Yes. That's totally a bug!) 20110226 03:02:37-!- loonycyborg [~sergey@wesnoth/developer/loonycyborg] has quit [Quit: Zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz] 20110226 03:02:59-!- loonybot [~loonybot@wesnoth/bot/loonybot] has quit [Remote host closed the connection] 20110226 03:16:57-!- un214 [~un214@adsl-75-45-1-223.dsl.scrm01.sbcglobal.net] has joined #wesnoth-umc-dev 20110226 03:37:33<+CIA-41> wesnoth-umc-dev: mystic-x * r8893 /branches/1.8/Grafted_Era/ (6 files in 4 dirs): merged in changes from NoM: spelling/translation 20110226 03:47:51<+CIA-41> wesnoth-umc-dev: mystic-x * r8894 /branches/1.8/Grafted_Era/ (6 files in 3 dirs): merged in changes from NoM: bugfix/optimization 20110226 04:37:23-!- un214 [~un214@adsl-75-45-1-223.dsl.scrm01.sbcglobal.net] has quit [Remote host closed the connection] 20110226 05:06:19-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20110226 05:06:21-!- Gambit [~Gambit@wesnoth/developer/grickit] has quit [Read error: Connection reset by peer] 20110226 05:24:44-!- mysticX [wyrruq@178.73.198.130] has quit [Remote host closed the connection] 20110226 05:51:02-!- vultraz [~chatzilla@124.109.10.174] has quit [Ping timeout: 240 seconds] 20110226 05:52:15-!- vultraz [~chatzilla@124.109.10.174] has joined #wesnoth-umc-dev 20110226 05:58:37-!- fendrin [~fabi@88-134-182-178-dynip.superkabel.de] has joined #wesnoth-umc-dev 20110226 06:06:55-!- vultraz [~chatzilla@124.109.10.174] has quit [Ping timeout: 250 seconds] 20110226 06:07:46-!- vultraz [~chatzilla@124.109.10.174] has joined #wesnoth-umc-dev 20110226 06:07:48-!- Blueblaze [~Blueblaze@adsl-99-148-245-203.dsl.hstntx.sbcglobal.net] has quit [Quit: Blueblaze] 20110226 06:35:31-!- fendrin [~fabi@88-134-182-178-dynip.superkabel.de] has quit [Remote host closed the connection] 20110226 07:21:45-!- PetePorty [~pete@wesnoth/translator/PetePorty] has quit [Remote host closed the connection] 20110226 10:17:00-!- shikadibot [~shikadi@wesnoth/umc-dev/bot/shikadibot] has quit [Ping timeout: 264 seconds] 20110226 10:17:07-!- shikadibot [~shikadi@wesnoth/umc-dev/bot/shikadibot] has joined #wesnoth-umc-dev 20110226 10:17:10-!- mode/#wesnoth-umc-dev [+v shikadibot] by ChanServ 20110226 10:32:41-!- fendrin [~fabi@88-134-182-178-dynip.superkabel.de] has joined #wesnoth-umc-dev 20110226 10:34:29-!- fendrin [~fabi@88-134-182-178-dynip.superkabel.de] has quit [Remote host closed the connection] 20110226 10:36:16-!- fendrin [~fabi@88-134-182-178-dynip.superkabel.de] has joined #wesnoth-umc-dev 20110226 10:36:41-!- Rei2 [ayanami@unaffiliated/shadowmaster/bot/rei2] has quit [Ping timeout: 252 seconds] 20110226 10:37:02-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 240 seconds] 20110226 12:20:39-!- loonybot [~loonybot@46.138.77.200] has joined #wesnoth-umc-dev 20110226 12:20:40-!- loonybot [~loonybot@46.138.77.200] has quit [Changing host] 20110226 12:20:40-!- loonybot [~loonybot@wesnoth/bot/loonybot] has joined #wesnoth-umc-dev 20110226 12:20:43-!- mode/#wesnoth-umc-dev [+v loonybot] by ChanServ 20110226 12:21:07-!- loonycyborg [~sergey@wesnoth/developer/loonycyborg] has joined #wesnoth-umc-dev 20110226 13:57:42-!- Gambit [~Gambit@wesnoth/developer/grickit] has joined #wesnoth-umc-dev 20110226 13:59:58-!- zookeeper [~l@wesnoth/developer/zookeeper] has joined #wesnoth-umc-dev 20110226 14:00:01-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-umc-dev 20110226 14:00:04-!- mode/#wesnoth-umc-dev [+v janebot] by ChanServ 20110226 14:27:38-!- mysticX [ckooafo@178.73.198.130] has joined #wesnoth-umc-dev 20110226 15:12:46< vultraz> what does {FOREACH} do? 20110226 15:13:39< vultraz> make something for each of something? 20110226 15:31:03< Gambit> it loops through an array 20110226 15:31:10< Gambit> so if you had an array like array[5] 20110226 15:31:18< Gambit> you can do {FOREACH array i} 20110226 15:31:24< Gambit> then put some code below that 20110226 15:31:29< Gambit> and then at the end put {NEXT i} 20110226 15:31:45< Gambit> inbetween those you can access the current element of array using array[$i] 20110226 15:32:17< vultraz> ok. i'm tryinf to understand the SXRPG shop code for reading attacks off units 20110226 15:33:13< Gambit> yeah it probably loops through their attacks 20110226 15:33:32< Gambit> Since $unit.attack is an array 20110226 15:34:01< vultraz> http://wesnoth.pastebin.com/a7MFrjy0 is the code 20110226 15:34:30< vultraz> but all those calling up if weaponsell_j and weaponsell_i confuse me 20110226 15:35:37< Gambit> he's using weaponsell_i as his index 20110226 15:35:48< Gambit> instead of i 20110226 15:35:50< vultraz> the what is _j 20110226 15:36:07< vultraz> then* 20110226 15:36:32< vultraz> if i could understand this i could maybe use it 20110226 15:36:35< vultraz> for mine 20110226 15:36:42< vultraz> after tweaking 20110226 15:37:46< Gambit> weaponsell_j is there because he doesn't understand what {FOREACH} does 20110226 15:37:48 * Gambit chuckles 20110226 15:38:06< Gambit> He's setting it to 0 before {FOREACH} and incrementing it at each iteration. 20110226 15:38:36< Gambit> vultraz: He's using $weaponsell_j to keep track of what loop he's on. 20110226 15:38:40< Gambit> But it's redundant. 20110226 15:38:46< Gambit> He could just use $weaponsell_i 20110226 15:39:03< Gambit> They will have the same value at every iteration of that loop. :| 20110226 15:42:13< zookeeper> you don't need to ask anyone what a macro does, when you can look what it does yourself. if you don't know what macros are or how they work then i'm sure gambit here will gladly explain. ;) 20110226 15:42:16 * zookeeper goes afk 20110226 15:46:45< Gambit> I do ♥ me some macros. 20110226 15:48:10< vultraz> so weponsell_j isn't needed, u could just use weaponsell_i? 20110226 15:50:22< Gambit> From what I can see in this pastebin yes. 20110226 15:52:27< vultraz> so, if i was using that, i just replace all weaponsell_j with _i 20110226 15:52:28< Gambit> and get rid of lines 29 and 46 after you do that 20110226 15:52:42< Gambit> yeah 20110226 16:00:06< vultraz> i'm still unclear on what the index is/does 20110226 16:01:01< Gambit> Do you know what an array is? 20110226 16:02:16< vultraz> is it like multiple variables collected into one? 20110226 16:02:57< Gambit> Yes that's a good way to put it. 20110226 16:03:08< Gambit> So you refer to the individuals in the group by array[number] 20110226 16:03:24< Gambit> That number is the index. 20110226 16:04:42-!- Mussious [~kamil@dgb169.neoplus.adsl.tpnet.pl] has joined #wesnoth-umc-dev 20110226 16:05:26< Gambit> vultraz: Does that make sense? 20110226 16:08:43< vultraz> so.....he's using 'weaponsell_i' for the index instead of the numbers? 20110226 16:10:56< Gambit> Yes that's what FOREACH does 20110226 16:11:16< Gambit> it does some WML once for each value in the array 20110226 16:11:49< Gambit> and it gives you a variable that represents the current iteration 20110226 16:14:23< Gambit> In this case he chose "weaponsell_i" to be that variable 20110226 16:14:35< Gambit> vultraz: So the first time it does the code weaponsell_i will be 0. 20110226 16:14:40< Gambit> The next time through it will be 1. 20110226 16:14:56< Gambit> And it keeps doing that until the end of the array. 20110226 16:21:31< vultraz> i see 20110226 16:24:43< vultraz> so {VARIABLE name_$weaponsell_j $weaponsell.attack[$weaponsell_i].name} actually is {VARIABLE name_0 $weaopnsell.attack[0].name}? 20110226 16:27:34-!- fendrin [~fabi@88-134-182-178-dynip.superkabel.de] has quit [Remote host closed the connection] 20110226 16:28:51-!- fendrin [~fabi@88-134-182-178-dynip.superkabel.de] has joined #wesnoth-umc-dev 20110226 16:35:27< Gambit> vultraz: yes 20110226 16:35:41< Gambit> Well it does the same thing as that on the first iteration 20110226 16:36:21< vultraz> and the 0s become 1s next? 20110226 16:36:51< Gambit> Yes 20110226 16:37:39< Gambit> If your unit has 4 attacks, it will do that from 0 to 3 20110226 16:38:18< vultraz> just to make sure i get it, that line is creating a variable with a value of the name of the attack of the stored unit that has the name "name_0'? 20110226 16:39:01< Gambit> no. It's creating a variable called name_0 that has the same name as the stored unit's first attack. 20110226 16:39:17< Gambit> So if the unit's first attack is "sword" 20110226 16:39:23< Gambit> $name_0 will equal "sword" 20110226 16:41:08< Gambit> so for a drake burner you'd have 20110226 16:41:14< Gambit> $name_0 = "claws" 20110226 16:41:20< vultraz> oh...because $weaponsell.attack[0].name is the value and is calling up the attack name 20110226 16:41:21< Gambit> $name_1 = "fire breath" 20110226 16:41:32< Gambit> vultraz: yes 20110226 16:41:55< vultraz> and sets that as the variable's name 20110226 16:42:00< Gambit> $weaponsell is a unit. $weaponsell.attack[0].name is the name of the first attack 20110226 16:42:04< Gambit> vultraz: The variable's value. 20110226 16:43:07< Gambit> It does likewise for the other values of the attack. 20110226 16:43:18< Gambit> (however you're losing weapon specials with this method as zookeeper noted the other day) 20110226 16:43:39< vultraz> oh 20110226 16:43:45< vultraz> how do i keep them 20110226 16:43:46< vultraz> then 20110226 16:44:20< Gambit> You need to use [set_variables] to make a copy of $weaponsell.attack[i] 20110226 16:46:04< Gambit> Something like this I think: http://pastebin.com/9vJ2WMCT 20110226 16:46:25< Gambit> but replace unit.attack with the appropriate variable 20110226 16:47:06< Gambit> Hmm actually I don't think that code is right. 20110226 16:47:17< Gambit> I don't use [set_variables] often and it's always a trial and error experience for me. 20110226 16:47:25< Gambit> Anyone else here know how to copy an array with it? 20110226 16:48:10< Gambit> Oh and I'm missing a closing tag. 20110226 16:48:11< Gambit> Heh. 20110226 17:00:13< vultraz> so is that method completely different? 20110226 17:00:26< vultraz> requiring a whole new set of variables? 20110226 17:40:43-!- Mussious [~kamil@dgb169.neoplus.adsl.tpnet.pl] has quit [Quit: Ex-Chat] 20110226 17:57:07< Gambit> vultraz: it copies the entire attack into a new variable 20110226 17:57:18< Gambit> rather than taking individual fields like damage and name 20110226 18:01:45< vultraz> but how does that affect the weapon specials 20110226 18:29:38< Gambit> Because weapon specials are inside of [attack] 20110226 18:29:58-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20110226 18:30:18< Gambit> vultraz: Have you seen a unit as WML? 20110226 18:30:28< Gambit> When you store a unit as a variable, you can access anything inside of it. 20110226 18:30:35-!- noy_ [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev 20110226 18:30:37< Gambit> tags become arrays. 20110226 18:30:53< Gambit> (probably not explaining this right/with the right vocabulary) 20110226 18:31:39< Gambit> vultraz: go to the wesnoth directory and open up data/core/units/goblins/Impaler.cfg and I'll explain better. 20110226 18:32:09< Gambit> When you store a goblin impaler in a variable you can access any of this (and more. See the inspect dialog) 20110226 18:32:14< Gambit> Well not all of this… 20110226 18:32:20< Gambit> anyway 20110226 18:32:35< Gambit> if you wanted to get the size of that second portrait for example 20110226 18:32:44< Gambit> You could do $unit.portrait[1].size 20110226 18:33:10< Gambit> if you wanted the third image in his death animation you can do $unit.death[0].frame[2].image 20110226 18:33:54-!- un214 [~un214@adsl-75-45-1-223.dsl.scrm01.sbcglobal.net] has joined #wesnoth-umc-dev 20110226 18:34:14-!- noy [~Noy@wesnoth/developer/noy] has quit [Ping timeout: 240 seconds] 20110226 18:34:14-!- noy_ is now known as noy 20110226 18:34:32< Gambit> You could get the number of strikes for his spear attack with $unit.attack[0].number 20110226 18:34:44< Gambit> Similarly, if you look there he has a weapon special on his first attack 20110226 18:34:48< Gambit> It's part of [attack] 20110226 18:35:00< Gambit> Now, we can't predict all the WML that is inside weapon specials. 20110226 18:35:15< Gambit> But by copying the whole [attack] into another variable, you can make sure that you have it all. 20110226 18:51:07-!- PetePorty [~quassel@pc-74-249-120-200.cm.vtr.net] has joined #wesnoth-umc-dev 20110226 18:56:49-!- fabi [~fabi@88-134-182-178-dynip.superkabel.de] has joined #wesnoth-umc-dev 20110226 18:57:30-!- Aethaeryn [~Michael@wesnoth/umc-dev/developer/aethaeryn] has joined #wesnoth-umc-dev 20110226 19:00:02-!- fendrin [~fabi@88-134-182-178-dynip.superkabel.de] has quit [Ping timeout: 276 seconds] 20110226 19:15:57-!- un214 [~un214@adsl-75-45-1-223.dsl.scrm01.sbcglobal.net] has quit [Remote host closed the connection] 20110226 19:37:28-!- Blueblaze [~Blueblaze@adsl-99-148-245-203.dsl.hstntx.sbcglobal.net] has joined #wesnoth-umc-dev 20110226 19:45:11-!- mordante [~mordante@wesnoth/developer/mordante] has joined #wesnoth-umc-dev 20110226 19:53:40-!- PetePorty [~quassel@pc-74-249-120-200.cm.vtr.net] has quit [Remote host closed the connection] 20110226 19:59:42-!- PetePorty [~pete@wesnoth/translator/PetePorty] has joined #wesnoth-umc-dev 20110226 20:21:37-!- Rei2 [ayanami@unaffiliated/shadowmaster/bot/rei2] has joined #wesnoth-umc-dev 20110226 20:21:40-!- mode/#wesnoth-umc-dev [+v Rei2] by ChanServ 20110226 20:21:47-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20110226 20:28:20-!- Mussious [~kamil@dgb169.neoplus.adsl.tpnet.pl] has joined #wesnoth-umc-dev 20110226 20:34:15-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has quit [Ping timeout: 240 seconds] 20110226 20:34:49-!- Rei2 [ayanami@unaffiliated/shadowmaster/bot/rei2] has quit [Ping timeout: 272 seconds] 20110226 20:35:10-!- shadowm_laptop [ignacio@wesnoth/developer/shadowmaster] has joined #wesnoth-umc-dev 20110226 20:35:13-!- Rei2 [ayanami@unaffiliated/shadowmaster/bot/rei2] has joined #wesnoth-umc-dev 20110226 20:35:16-!- mode/#wesnoth-umc-dev [+v Rei2] by ChanServ 20110226 20:46:19-!- Mussious [~kamil@dgb169.neoplus.adsl.tpnet.pl] has quit [Remote host closed the connection] 20110226 20:54:50< vultraz> http://wesnoth.pastebin.com/jWnLtzrg Gambit: i was trying to follow the SXRPG sellweapon method but it tells me my VARIABLES has only 1 argument. 20110226 21:03:38< Gambit> Huh? 20110226 21:04:03< Gambit> Line 50 20110226 21:04:06< Gambit> you're missing a space I think 20110226 21:04:25< Gambit> And line 44 20110226 21:04:43< Gambit> And 41 20110226 21:04:51< Gambit> And 39 20110226 21:05:02< vultraz> oh 20110226 21:11:47< vultraz> ok it's fine now 20110226 21:24:06-!- noy [~Noy@wesnoth/developer/noy] has quit [Read error: Connection reset by peer] 20110226 21:31:43-!- PK_ [4ac01e39@gateway/web/freenode/ip.74.192.30.57] has joined #wesnoth-umc-dev 20110226 21:38:46< vultraz> gerrrrrrrrrrr 20110226 22:41:58-!- PK_ [4ac01e39@gateway/web/freenode/ip.74.192.30.57] has quit [Quit: Page closed] 20110226 22:52:47-!- mordante [~mordante@wesnoth/developer/mordante] has quit [Quit: Leaving] 20110226 23:32:58-!- noy [~Noy@wesnoth/developer/noy] has joined #wesnoth-umc-dev --- Log closed Sun Feb 27 00:00:10 2011