Search found 2257 matches

by Celtic_Minstrel
Today, 1:42 am
Forum: WML Workshop
Topic: [heal_unit] and status=unhealable
Replies: 15
Views: 402

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
Today, 1:39 am
Forum: WML Workshop
Topic: WFL conditionals and variable substitution
Replies: 7
Views: 119

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: 444

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: 173

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: 173

Re: weapon specials inside [abilities]

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

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: 330

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 ...
by Celtic_Minstrel
May 5th, 2024, 2:48 pm
Forum: Lua Labs
Topic: Global_variables with Lua
Replies: 3
Views: 152

Re: Global_variables with Lua

The Lua API to global variables is not finalized, so it might change without warning, but it does exist. local GV = wesnoth.experimental.wml.global_vars local ns = "your_namespace" -- Set a global variable GV[ns].varname = "stuff" GV[ns]["varname"] = "stuff" -...
by Celtic_Minstrel
May 4th, 2024, 2:34 pm
Forum: Lua Labs
Topic: Messing with saving and reloading
Replies: 14
Views: 437

Re: Messing with saving and reloading

Wait until an add-on has a bug and writes millions of saves.
by Celtic_Minstrel
May 3rd, 2024, 11:33 pm
Forum: Lua Labs
Topic: How to save game into global variable
Replies: 3
Views: 180

Re: How to save game into global variable

There is probably no way to save the entire game with all the information of a real saved game. You might be able to get close by writing wesnoth.scenario.__cfg (if that exists, didn't check) and also dumping every unit and maybe a few other things. Maybe I could copy/reproduce code for saving and l...
by Celtic_Minstrel
May 3rd, 2024, 11:24 pm
Forum: Lua Labs
Topic: Messing with saving and reloading
Replies: 14
Views: 437

Re: Messing with saving and reloading

I don't think there's any reason why we couldn't have a way for an add-on to explicitly request a save or load, as long as: There are protections against overwriting other save files (maybe with the exception of save files explicitly requested by the same add-on). The user is not forced to load when...
by Celtic_Minstrel
May 3rd, 2024, 5:36 pm
Forum: Writers’ Forum
Topic: Gathering information about Scepter of Fire Campaign
Replies: 55
Views: 12268

Re: Gathering information about Scepter of Fire Campaign

I just want to note that if this has changed to actually working on the campaign rather than just "gathering information", you should probably create a new thread or at least rename the opening post and new posts.
by Celtic_Minstrel
May 3rd, 2024, 5:34 pm
Forum: Lua Labs
Topic: [closed] txt file creation
Replies: 2
Views: 138

Re: txt file creation

Wesnoth provides no facility for writing arbitrary files, only for reading them. There is a facility for writing arbitrary WML to disk in a fixed location though – look for PersistenceWML.
by Celtic_Minstrel
May 3rd, 2024, 5:33 pm
Forum: Lua Labs
Topic: Messing with saving and reloading
Replies: 14
Views: 437

Re: Messing with saving and reloading

ZombieKnight wrote: May 3rd, 2024, 4:52 pm Any idea how to save the game using add-on?
I don't think there's any way to do that.
by Celtic_Minstrel
May 3rd, 2024, 2:15 am
Forum: Writers’ Forum
Topic: Gathering information about Scepter of Fire Campaign
Replies: 55
Views: 12268

Re: Gathering information about Scepter of Fire Campaign

I thought that might be the case too, but I didn't read closely.