Search found 2265 matches

by Celtic_Minstrel
6 minutes ago
Forum: Lua Labs
Topic: units on the recall list
Replies: 6
Views: 172

Re: units on the recall list

Wait, why are you grabbing .__cfg off the unit in the first place? There isn't really any reason to do that unless you want to stuff it into a variable or read stuff that's not otherwise accessible. It serializes the entire unit to WML. Just don't do that and you should be fine… or if you absolutely...
by Celtic_Minstrel
10 minutes ago
Forum: Developers’ Discussions
Topic: A grand design for singleplayer mainline lore
Replies: 63
Views: 41270

Re: A grand design for singleplayer mainline lore

Since they will be just another evil entity. I don't know why you're assuming that anything is "just another evil entity". Orcs are clearly not evil, as seen by Son of the Black Eye. Undead are really more chaotic neutral than evil in Wesnoth, as seen in the two undead campaigns (and prob...
by Celtic_Minstrel
Today, 1:08 am
Forum: Lua Labs
Topic: units on the recall list
Replies: 6
Views: 172

Re: units on the recall list

But I've search high and low for a definition of proxy unit (or proxy table) in the past and not found anything. "proxy unit" just refers to the Lua userdata that represents a unit. And now I'm starting to run into references to private units. I think the paragraph above may have attempte...
by Celtic_Minstrel
Today, 12:36 am
Forum: Lua Labs
Topic: units on the recall list
Replies: 6
Views: 172

Re: units on the recall list

I'm not sure that's a safe assumption. The x,y might just be set to whatever location the unit was at when it was last on the map. The canonical way to check what you're looking for is with unit.valid, which returns a string.
by Celtic_Minstrel
Today, 12:20 am
Forum: Developers’ Discussions
Topic: A grand design for singleplayer mainline lore
Replies: 63
Views: 41270

Re: A grand design for singleplayer mainline lore

I don't know about making them the centre of events, but I would very much welcome demons in core Wesnoth.

(To be honest, it's probably better not to have any single race be behind everything.)
by Celtic_Minstrel
Yesterday, 1:07 pm
Forum: Lua Labs
Topic: [resolution] problems
Replies: 4
Views: 123

Re: [resolution] problems

This sounds like a bug to me.
by Celtic_Minstrel
Yesterday, 1:05 pm
Forum: Lua Labs
Topic: [unsolvable] Access event content
Replies: 9
Views: 278

Re: [unsolvable] Access event content

Maybe queue a second event with the exact same conditions? Or insert extra code at the start of the event that does whatever you need it to do?
by Celtic_Minstrel
Yesterday, 5:09 am
Forum: WML Workshop
Topic: WFL conditionals and variable substitution
Replies: 9
Views: 248

Re: WFL conditionals and variable substitution

That's roughly correct, except that increase_damage is never actually parsed as a formula. The formula is parsed by $(...) in this case. Dollar substitutions are always evaluated from right to left, and $(...) is just a special type of dollar substitution. So yes, by the time it's parsing as a formu...
by Celtic_Minstrel
May 15th, 2024, 1:42 am
Forum: WML Workshop
Topic: [heal_unit] and status=unhealable
Replies: 15
Views: 479

Re: [heal_unit] and status=unhealable

Yeah, I saw that somewhere after posting. But from what I've read about [filter_wml] it sounds like there's no penalty for using it where it is not necessary, and that way you don't need to remember if you need it or not in cases you don't deal with regularly. ? There is a special optimization for ...
by Celtic_Minstrel
May 15th, 2024, 1:39 am
Forum: WML Workshop
Topic: WFL conditionals and variable substitution
Replies: 9
Views: 248

Re: WFL conditionals and variable substitution

For substituting WML variables into any moderately complicated WFL formula, I'd recommend using a where clause. [effect] apply_to=attack increase_damage="$(met_lilith*2-lilith_deaths where met_lilith = $quests.met_lilith - 0, lilith_deaths = $quests.lilith_deaths - 0)" [/effect] [effect] a...
by Celtic_Minstrel
May 10th, 2024, 2:00 pm
Forum: WML Workshop
Topic: fire event in teleport
Replies: 13
Views: 457

Re: fire event in teleport

Have you looked at unit_placed? It seems to be a bit of a last restort, but you should be able to make it work. [I assume you mean fire event after unit uses the teleport ability, not [teleport] ] yes. as I mentioned before, I am trying to make an event that fire after a unit uses the teleport abil...
by Celtic_Minstrel
May 10th, 2024, 1:00 pm
Forum: Lua Labs
Topic: [solved] weapon specials inside [abilities]
Replies: 5
Views: 192

Re: [solved] weapon specials inside [abilities]

Sorry, I'm not sure. It might interact and cancel out because they have the same ID, but I can't be sure.
by Celtic_Minstrel
May 9th, 2024, 11:54 pm
Forum: Lua Labs
Topic: [solved] weapon specials inside [abilities]
Replies: 5
Views: 192

Re: weapon specials inside [abilities]

The second one.
by Celtic_Minstrel
May 7th, 2024, 1:16 pm
Forum: Lua Labs
Topic: [unsolvable] Access event content
Replies: 9
Views: 278

Re: Access event content

There's no official way. If wesnoth.scenario.__cfg exists, you might be able to get them from there.
by Celtic_Minstrel
May 6th, 2024, 11:07 pm
Forum: Lua Labs
Topic: [solved] How to move WML table
Replies: 12
Views: 343

Re: How to move WML table

Loading it back in is going to be pretty much the same procedure as saving it was. The scalar ones should be easy, literally the exact same loop you used to save but flip the assignment. Container variables will be a bit more tricky. I think something along these lines may work? local tags = {} for ...