Search found 1229 matches
- September 30th, 2026, 11:34 am
- Forum: Forum Games
- Topic: Word association
- Replies: 1343
- Views: 291970
- September 23rd, 2026, 10:05 am
- Forum: WML Workshop
- Topic: Is there a way to disable attacking certain units?
- Replies: 5
- Views: 131
Re: Is there a way to disable attacking certain units?
A thought: you could temporarily give the challenger the [berserk] melee special although that alone wouldn't absolutely guarantee that one combatant would die (even if you increased number of rounds of combat above the usual 30).
This could be added via [effect] , maybe inside a 1 turn duration ...
This could be added via [effect] , maybe inside a 1 turn duration ...
- September 14th, 2026, 11:03 am
- Forum: Forum Games
- Topic: Word association
- Replies: 1343
- Views: 291970
- September 13th, 2026, 11:40 am
- Forum: Forum Games
- Topic: Word association
- Replies: 1343
- Views: 291970
Re: Word association
walker
- September 10th, 2026, 1:54 pm
- Forum: WML Workshop
- Topic: regen with filter not working
- Replies: 9
- Views: 121
Re: regen with filter not working
I think I have it working. :D
I had to ensure that the unit vars had the correct value when the ability filter saw them plus, as they are static values I didn't need to use unit variables.
I wanted this code to work with variables and this seems to work:
First, make the coordinates explicit values ...
I had to ensure that the unit vars had the correct value when the ability filter saw them plus, as they are static values I didn't need to use unit variables.
I wanted this code to work with variables and this seems to work:
First, make the coordinates explicit values ...
- September 10th, 2026, 1:21 pm
- Forum: WML Workshop
- Topic: regen with filter not working
- Replies: 9
- Views: 121
Re: regen with filter not working
@gnombat,Soliton
Thanks for your posts, been prioritising another issue that's now (I think :fingers_crossed: ) resolved.
Update
:inspect shows that the actual filter (for unit and location) doesn't see the unit variable; i.e. x="" and y="".
My bad; should've looked there first - checked the ...
Thanks for your posts, been prioritising another issue that's now (I think :fingers_crossed: ) resolved.
Update
:inspect shows that the actual filter (for unit and location) doesn't see the unit variable; i.e. x="" and y="".
My bad; should've looked there first - checked the ...
- September 10th, 2026, 1:09 pm
- Forum: WML Workshop
- Topic: regen with filter not working
- Replies: 9
- Views: 121
Re: regen with filter not working
To access a container you can try: wml_vars.__children['return_guardian'][0].__attributes['return_x']
I suggest to test these things interactively on the formula console (press f) in-game first. (i.e. my_leader.wml_vars will print a representation of wml_vars of the current side's leader ...
- September 10th, 2026, 12:49 pm
- Forum: Lua Labs
- Topic: Feasibility of customising return guardian micro ai
- Replies: 23
- Views: 452
Re: Feasibility of customising return guardian micro ai
...So this is always going to happen eventually.
Thanks for that last info-nugget, it helped. :D
Based on somewhat sparse testing I think I have two working return_guardian variants. :shock:
return_guardian_u , only uses unit variables for return co-ordinates.
return_guardian_ur as above ...
- September 8th, 2026, 11:27 pm
- Forum: Forum Games
- Topic: Word association
- Replies: 1343
- Views: 291970
Re: Word association
claws
- September 8th, 2026, 11:25 pm
- Forum: Lua Labs
- Topic: Feasibility of customising return guardian micro ai
- Replies: 23
- Views: 452
Re: Feasibility of customising return guardian micro ai
What about if they don't have any moves remaining?
Is it possible for the same unit to be processed multiple times by a micro ai?
If so then yes I suppose it could happen.
Bit doubtful tho' TBH because this issue only arises when I use the version that doesn't have return_x, return_y keys inside ...
- September 8th, 2026, 11:18 pm
- Forum: WML Workshop
- Topic: regen with filter not working
- Replies: 9
- Views: 121
Re: regen with filter not working
I suspect this would work better if you just used simple scalar variables instead of container variables, since Wesnoth tends to get confused if you try to do complicated stuff with container variables.
Good point: that'll be my plan B if I can't get this to work with unit variables - but it'll ...
- September 8th, 2026, 11:15 pm
- Forum: WML Workshop
- Topic: regen with filter not working
- Replies: 9
- Views: 121
Re: regen with filter not working
You say you want location dependent ability, but your test is about variable dependent one.
Ah... my mistake.
I thought:
[filter]
formula="x = wml_vars.return_guardian.return_x and y = wml_vars.return_guardian.return_y"
[/filter]
Would dynamically test if the unit's current x,y location ...
- September 8th, 2026, 11:03 pm
- Forum: Lua Labs
- Topic: Feasibility of customising return guardian micro ai
- Replies: 23
- Views: 452
Re: Feasibility of customising return guardian micro ai
I guess this is complaining that line 12: if guardian_u.variables.return_guardian then references an empty guardian_u ?
Yes, AH.get_units_with_moves() might not return any units. In that case guardian_u will be nil . You need to check for this before trying to do anything with guardian_u ...
- September 8th, 2026, 6:12 pm
- Forum: WML Workshop
- Topic: regen with filter not working
- Replies: 9
- Views: 121
regen with filter not working
Am setting up a location dependent regen ability but it doesn't work. :annoyed:
Here's the ability definition:
#define ABILITY_WOODWARD_REGENERATES AMOUNT
[regenerate]
[filter]
formula="x = wml_vars.return_guardian.return_x and y = wml_vars.return_guardian.return_y"
[/filter]
value={AMOUNT ...
Here's the ability definition:
#define ABILITY_WOODWARD_REGENERATES AMOUNT
[regenerate]
[filter]
formula="x = wml_vars.return_guardian.return_x and y = wml_vars.return_guardian.return_y"
[/filter]
value={AMOUNT ...
- September 8th, 2026, 4:07 pm
- Forum: Lua Labs
- Topic: Feasibility of customising return guardian micro ai
- Replies: 23
- Views: 452
Re: Feasibility of customising return guardian micro ai
Baffled again. :annoyed:
Plan was to simplify working version of return_guardian_uv to only use unit vars, partly as a lua exercise.
However I'm stuck.
Edit: using v1.19.27 on windows.
Here's the working code:
mai_return_guardian_uv.lua
--[[ mai_return_guardian_uv.lua
Modified return ...
Plan was to simplify working version of return_guardian_uv to only use unit vars, partly as a lua exercise.
However I'm stuck.
Edit: using v1.19.27 on windows.
Here's the working code:
mai_return_guardian_uv.lua
--[[ mai_return_guardian_uv.lua
Modified return ...