Search found 2993 matches

by Ravana
Today, 2:30 pm
Forum: Ideas
Topic: Twitch integrations?
Replies: 2
Views: 52

Re: Twitch integrations?

Just use :gold then.
by Ravana
Today, 2:28 pm
Forum: WML Workshop
Topic: traits
Replies: 10
Views: 168

Re: traits

From code review, unit should be hidden during night on specific terrain. You did not say what situations you tested.
by Ravana
Yesterday, 11:30 pm
Forum: WML Workshop
Topic: traits
Replies: 10
Views: 168

Re: traits

You should clarify what you mean by doesnt work.
by Ravana
Yesterday, 9:30 am
Forum: WML Workshop
Topic: Let the gold rain down!
Replies: 13
Views: 306

Re: Let the gold rain down!

Spaces in event names can be interchanged with underscores (for example, name=new turn and name=new_turn are equivalent).
by Ravana
Yesterday, 7:59 am
Forum: WML Workshop
Topic: Let the gold rain down!
Replies: 13
Views: 306

Re: Let the gold rain down!

Looks correct name.
by Ravana
April 14th, 2024, 11:57 pm
Forum: WML Workshop
Topic: Setting multiple objectives
Replies: 5
Views: 116

Re: Setting multiple objectives

Check all of these conditions before using [endlevel].
by Ravana
April 13th, 2024, 5:59 pm
Forum: Lua Labs
Topic: [closed] remove unit from array
Replies: 11
Views: 251

Re: remove unit from array

Because u.id is empty.
by Ravana
April 13th, 2024, 5:56 pm
Forum: WML Workshop
Topic: variable expansion
Replies: 4
Views: 159

Re: variable expansion

It is possible to make it shorter but I think it is not worth the effort yet. Your first example looks similar to orocia upgrades before I rewrote them in Lua.

If you want to try then yes, [insert_tag] will solve your use case.
by Ravana
April 13th, 2024, 9:41 am
Forum: Lua Labs
Topic: [closed] remove unit from array
Replies: 11
Views: 251

Re: remove unit from array

wml.find_child also gives you index, if u_table only contains tag of that name just use table.remove with that index.

And your version doesnt work because you havent read wml.remove_children documentation.
by Ravana
April 11th, 2024, 10:19 pm
Forum: WML Workshop
Topic: Now THIS is funny
Replies: 9
Views: 245

Re: Now THIS is funny

Once wesnoth knows your addon is invalid it does not bother looking again. You can use f5 to let it try again. Some kinds of errors also require manually deleting cache files.
by Ravana
April 11th, 2024, 10:16 pm
Forum: Lua Labs
Topic: Working lua need advice deciding which method is best
Replies: 34
Views: 1068

Re: Working lua need advice deciding which method is best

wiki is wrong, wml.variable does not exist. It was supposed to be wml.tag.have_unit and wml.tag.variable.

Lua also knows some comparison operators, so you can use for example wesnoth.current.side ~= side_candc
by Ravana
April 11th, 2024, 4:33 pm
Forum: WML Workshop
Topic: Clone unit in WML
Replies: 5
Views: 191

Re: Clone unit in WML

[unit]to_variable

It might happen that if you delete id completely then it is generated for copy too.
by Ravana
April 11th, 2024, 3:40 pm
Forum: Lua Labs
Topic: Working lua need advice deciding which method is best
Replies: 34
Views: 1068

Re: Working lua need advice deciding which method is best

Code: Select all

    [dbck_setup]
      event_name  = "dbck_test"		# name of event to fire
      side        = 1			# Only enabled on this side's turn
[unit_filter]
      x,y=4,4
[/unit_filter]
    [/dbck_setup]
would make it much easier to parse.
by Ravana
April 11th, 2024, 3:36 pm
Forum: WML Workshop
Topic: Clone unit in WML
Replies: 5
Views: 191

Re: Clone unit in WML

Store, change id, unstore. If you do not trust yourself to avoid id conflicts then generate new [unit], save its id, kill it, and assign that id to copy.
by Ravana
April 11th, 2024, 9:25 am
Forum: Lua Labs
Topic: Working lua need advice deciding which method is best
Replies: 34
Views: 1068

Re: Working lua need advice deciding which method is best

_G is about Lua variables, [set_global_variable] is about WML variables which are stored in file.