Search found 86 matches

by Spannerbag
July 24th, 2021, 10:41 pm
Forum: Scenario & Campaign Development
Topic: After Eastern Invasion
Replies: 42
Views: 6084

Re: After Eastern Invasion

So yeah I'm up to Riverside now myself, and... I found the cave to the east before finding the cave to the west, and for some reason I assumed it was the only cave and then got frustrated when I couldn't find Flynn in it... if you could somehow hint that there's another cave, and maybe let the play...
by Spannerbag
June 30th, 2021, 11:33 pm
Forum: Lua Labs
Topic: Utter lua consufion
Replies: 3
Views: 213

Re: Utter lua consufion

Hi Luther, You're right first time again :D This line looks like a syntax error: local set_floor = tonumber(cfg.floor) or set_floor = tonumber(set_amount) You can't do an assignment in the middle of an expression. Change it to this: local set_floor = tonumber(cfg.floor) or tonumber(set_amount) See i...
by Spannerbag
June 30th, 2021, 4:44 pm
Forum: Lua Labs
Topic: Utter lua consufion
Replies: 3
Views: 213

Utter lua consufion

Hi, it's can't-code-lua-guy again... :? My orignal lua query was sorted in double quick time, thanks again to all who took the trouble to help. I made the fatal error fo fiddling with it and I can't work out how I broke it :annoyed: This is the original version which works, followed by the WML that ...
by Spannerbag
June 30th, 2021, 4:22 pm
Forum: Scenario & Campaign Development
Topic: After Eastern Invasion
Replies: 42
Views: 6084

Re: After Eastern Invasion

Hi guys, Sorry for the tardy reply - not online too often :oops: Just dropped by to say that I loved the campaign. Enjoyed everything about it, from the dialogue down to its execution. One of the more memorable campaigns for me. Just dropped by to say that I loved the campaign. Enjoyed everything ab...
by Spannerbag
June 9th, 2021, 11:52 pm
Forum: Lua Labs
Topic: Laststrike attack special
Replies: 2
Views: 249

Re: Laststrike attack special

Ravana wrote: June 9th, 2021, 10:36 pm Just [firststrike] with apply_to=opponent?
Great idea, hadn't thought of that. Thanks! :D

Cheers,
-- Spannerbag
by Spannerbag
June 9th, 2021, 10:27 pm
Forum: Lua Labs
Topic: Laststrike attack special
Replies: 2
Views: 249

Laststrike attack special

Hi again, I'd like to give a unittype a laststrike attack special (the reverse of firststrike). Presently I'm looking at adapting the code for initiative from HttT. However, if anyone happens to be able to post the (lua?) code for firststrike, I may be able to create this ability just by reversing a...
by Spannerbag
June 9th, 2021, 10:19 pm
Forum: Lua Labs
Topic: Lua newbie custom tag query
Replies: 12
Views: 562

Re: Lua newbie custom tag query

Aha! Thanks for taking the trouble to clarify, much appreciated! I see your problem is solved, but one minor query never got an answer. Here's an example of coding a list on this forum: [list=1] [*]One [*]Two [*]Three [/list] That produces the following list: One Two Three If you open it with [list]...
by Spannerbag
May 24th, 2021, 7:49 pm
Forum: Lua Labs
Topic: Lua newbie custom tag query
Replies: 12
Views: 562

Re: Lua newbie custom tag query *working*

Hi everyone, It's finally working! Many thanks to all who took the time and trouble to help me, it's really appreciated. File lua/set_gold.lua is loaded in _main.cfg and in scenario 1 [set_gold] works. I now (kinda) understand the basics of doing lua in Wesnoth. Thanks again! Cheers, -- Spannerbag
by Spannerbag
May 24th, 2021, 5:40 pm
Forum: Lua Labs
Topic: Lua newbie custom tag query
Replies: 12
Views: 562

Re: Lua newbie custom tag query

... I'd highly advise you to follow the Lua tutorials at http://lua-users.org/wiki/TutorialDirectory. ... you never defined set_sides anywhere... Ah, yet another helpful resource I somehow managed to miss! Thanks, will have a look. Also thanks for taking the time and trouble to reply, much apprecia...
by Spannerbag
May 24th, 2021, 5:36 pm
Forum: Lua Labs
Topic: Lua newbie custom tag query
Replies: 12
Views: 562

Re: Lua newbie custom tag query

Lua syntax ... I asume the :4: in [string " function wesnoth.wml_actions.set_gold(cfg)..."]:4: variable 'yes' must be assigned before being used refers to a line number? ... In this case, you're using set_sides as both a looping variable and the array to iterate through. I don't see it de...
by Spannerbag
May 24th, 2021, 5:31 pm
Forum: Lua Labs
Topic: Lua newbie custom tag query
Replies: 12
Views: 562

Re: Lua newbie custom tag query

Here's a rule of thumb to avoid headaches... You don't have to test cfg.variable against yes or true, only the true/false/nil test is needed... I didn't test it, but didn't what I write in the other post do exactly what you asked for and what you're trying to do here? Hi again, Thanks for the reply...
by Spannerbag
May 24th, 2021, 3:10 pm
Forum: Lua Labs
Topic: Lua newbie custom tag query
Replies: 12
Views: 562

Re: Lua newbie custom tag query

yes or no is allowed without quotes in WML as equivalent to true and false , but that is not the case in lua, where putting just yes or no without quotes means you're trying to use a variable that's named yes or no . Hi, Thanks for the reply - I did try with and without (double) quotes and the erro...
by Spannerbag
May 24th, 2021, 1:42 pm
Forum: Lua Labs
Topic: Lua newbie custom tag query
Replies: 12
Views: 562

Lua newbie custom tag query

Hi, I'm trying to learn some basic lua by creating a custom tag but am finding clear information regarding very basic language elements difficult to find (but then my google-fu is terrible ) and after perusing the web I now have more questions than ever, hence this post. Lua syntax Can someone pleas...
by Spannerbag
May 3rd, 2021, 8:58 pm
Forum: WML Workshop
Topic: show_objectives consufion
Replies: 3
Views: 548

show_objectives consufion *** resolved ***

Hi all,
no need to reply to my query as I managed to get it working.
Though I thought I'd tried this before, I just stripped out all the side=... clauses (including [objectives]) and it worked.
Happy days :D

Cheers!
-- Spannerbag
by Spannerbag
May 3rd, 2021, 8:55 pm
Forum: WML Workshop
Topic: show_objectives consufion
Replies: 3
Views: 548

Re: show_objectives consufion

Hi, thanks for the reply, much appreciated. [show_objectives] works when the starting objectives was changed due to some event/condition. Your initial objectives needs to have this added otherwise, [show_objectives] will do nothing. So, if I understand you, I need to add [show_objectives] sometime a...