Search found 1290 matches

by Celtic_Minstrel
November 2nd, 2018, 12:03 am
Forum: Lua Labs
Topic: Lua & WML, when to use what?
Replies: 24
Views: 7445

Re: Lua & WML, when to use what?

You get that error dialog for syntax errors or preprocessor errors, yeah; but for ActionWML logic errors, you get a Lua stack trace at best.
by Celtic_Minstrel
October 31st, 2018, 12:35 am
Forum: Lua Labs
Topic: Lua & WML, when to use what?
Replies: 24
Views: 7445

Re: Lua & WML, when to use what?

Using GUI2 dialogs in add-ons, which you can only invoke from lua(ironically), are much easier to for me to read when written as WML rather a giant lua table. This is why my way of using GUI2 dialogs is something like this: [lua] code=<<wesnoth.show_dialog(...)>> [args] # define the actual dialog h...
by Celtic_Minstrel
October 30th, 2018, 2:28 am
Forum: WML Workshop
Topic: How many persistent side I can use in a single campaign?
Replies: 12
Views: 5011

Re: How many persistent side I can use in a single campaign?

Logically I'd expect the use of a nonexistent side to match nothing... so if that code is deleting a side's saved data, I would classify it as a bug.
by Celtic_Minstrel
October 30th, 2018, 2:27 am
Forum: Lua Labs
Topic: Lua & WML, when to use what?
Replies: 24
Views: 7445

Re: Lua & WML, when to use what?

One way in which you cannot use Lua, and must use WML, is when you want a variable to persist from scene to scene, or in a saved game. It's possible to do it in Lua but it's a painful operation. This is being worked on, but it's only one of several problems. This is what I added wesnoth.persistent_...
by Celtic_Minstrel
October 28th, 2018, 11:54 pm
Forum: WML Workshop
Topic: How many persistent side I can use in a single campaign?
Replies: 12
Views: 5011

Re: How many persistent side I can use in a single campaign?

I'm pretty sure there's no hard limit on how many persistent sides you can have, and it's definitely possible for a persistent side to go unused for a few scenarios and then come back. For starters, I'd suggest making sure all your [side] tags have a save_id that specifies which persistent side they...
by Celtic_Minstrel
October 28th, 2018, 11:44 pm
Forum: WML Workshop
Topic: Teleport Formula
Replies: 4
Views: 1096

Re: Teleport Formula

The formula in a location filter is passed a terrain object, which has these keys available. For an example of how to detect adjacency, see the backstab formula.
by Celtic_Minstrel
October 28th, 2018, 11:30 pm
Forum: WML Workshop
Topic: Custom race doesn't work
Replies: 3
Views: 1010

Re: Custom race doesn't work

I've never heard of issues with empty strings in WML. An empty translatable string is pointless mind you (but I think wmlxgettext will just ignore it), but description="" should not cause any problems.
by Celtic_Minstrel
October 14th, 2018, 1:30 pm
Forum: Ideas
Topic: Building an alternative to ActionWML
Replies: 42
Views: 3832

Re: Building an alternative to ActionWML

I think "some of" is pretty similar to "not all of", though I suppose not exactly the same. The direct generalization of "xor" to higher arity actually gives "odd number of" which would not be very useful, but I agree that "one of" could be very useful. I don't think "xnor" or its generalization to ...
by Celtic_Minstrel
October 13th, 2018, 11:38 pm
Forum: Ideas
Topic: Building an alternative to ActionWML
Replies: 42
Views: 3832

Re: Building an alternative to ActionWML

That's my point – they are well-defined, yes, but their meaning is not necessarily obvious to someone not already familiar with the math, and I'm actually not certain gfgtdf even used them correctly. I know I've gotten confused about them in the past. I think this is a good way to think about it tho...
by Celtic_Minstrel
October 13th, 2018, 12:40 am
Forum: Ideas
Topic: Building an alternative to ActionWML
Replies: 42
Views: 3832

Re: Building an alternative to ActionWML

Well, "nand" and "nor" are fine as long as "nand" means "not all" and "nor" means "not any", but I find these terms can actually be confusing. I'll also point out that "none" means "not any", so that could be an alternative to "nor". You could rename "nand" to "some", which is functionally similar t...
by Celtic_Minstrel
October 12th, 2018, 2:57 am
Forum: Ideas
Topic: Building an alternative to ActionWML
Replies: 42
Views: 3832

Re: Building an alternative to ActionWML

The [not] tag doesn't make sense extended to higher arities – its underlying operation is "but not", also called material nonimplication, and it's not commutative. However, I think it would make sense to have a "none" option - it's true if all its children are false. If used with only a single child...
by Celtic_Minstrel
October 12th, 2018, 12:15 am
Forum: Ideas
Topic: Building an alternative to ActionWML
Replies: 42
Views: 3832

Re: Building an alternative to ActionWML

The biggest problem I can see with that is that you seem to be using all global functions. I don't think we should be polluting the global namespace with lots of functions like that. I also think the order of arguments is wrong – for the simple case where you want to transform only exactly matching ...
by Celtic_Minstrel
October 6th, 2018, 1:27 am
Forum: Ideas
Topic: Building an alternative to ActionWML
Replies: 42
Views: 3832

Re: Building an alternative to ActionWML

I imagine the implications of attempting to rid the world of ActionWML entirely include positive premises such as changing the standard format for scenario, era, ability & all things WML to such that you'd be writing somesort of lua equivalent datastructures instead of WML datastructures. For an ex...
by Celtic_Minstrel
October 4th, 2018, 11:58 pm
Forum: Ideas
Topic: [engine] alternate meta-condition behavior
Replies: 20
Views: 2245

Re: [engine] alternate meta-condition behavior

Which definitely smells of a hack though...
by Celtic_Minstrel
October 4th, 2018, 1:01 am
Forum: Ideas
Topic: [engine] alternate meta-condition behavior
Replies: 20
Views: 2245

Re: [engine] alternate meta-condition behavior

It can be made unambiguous, but currently the ActionWML engine only ignores tags that begin with "filter", so it would try to execute the [any_of] . You could of course add additional exceptions in the ActionWML engine if you wanted to, and I guess that could even allow you to do things like this: [...