Search found 10 matches
- July 23rd, 2024, 2:22 pm
- Forum: Lua Labs
- Topic: [solved] Updating side variables from LUA script.
- Replies: 2
- Views: 3430
Re: Updating side variables from LUA script.
Thanks for the pointer, I think I've figured it out now.
- July 23rd, 2024, 1:24 pm
- Forum: Lua Labs
- Topic: [solved] Updating side variables from LUA script.
- Replies: 2
- Views: 3430
[solved] Updating side variables from LUA script.
In Wesnoth 1.18.2, in my scenario WML, for some sides I have the following variables section: [variables] [tactics] [tactic] role=assassin count=0 weigth=3 [/tactic] [tactic] role=hunter count=0 weight=2 [/tactic] [tactic] # no particular role count=0 weight=1 [/tactic] total_counts=0 total_weights=...
- August 17th, 2023, 7:06 am
- Forum: WML Workshop
- Topic: [SOLVED] Side filter does not seem to work
- Replies: 8
- Views: 4287
Re: [SOLVED] Side filter does not seem to work
But
set_extra_recruits
will define additional recruits attached to the leader, right? To achieve what I want I'd need to set the side's standard recruit list to be empty and only use extra recruits. Right?- August 14th, 2023, 7:38 am
- Forum: WML Workshop
- Topic: [SOLVED] Side filter does not seem to work
- Replies: 8
- Views: 4287
Re: Side filter does not seem to work
Okay, I debugged the issue and understood it. The problem was actually not in the piece of code that I have shown, buit in another, handling another type of castle, of which there were multiple instances. The reason for error was my misunderstanding of how [or] tag works. I wrote: [filter] side=1,2,...
- August 14th, 2023, 7:13 am
- Forum: WML Workshop
- Topic: [SOLVED] WML prestart event misbehaviour in on-line games
- Replies: 7
- Views: 3982
Re: WML prestart event misbehaviour in on-line games
I managed to solve it using formula condition instead of controller within filter_side like this: [event] name=prestart [kill] [filter_side] side=1,2,3,4 formula="not (is_human or is_network or is_ai)" [/filter_side] [/kill] [/event]
- August 14th, 2023, 6:20 am
- Forum: WML Workshop
- Topic: [SOLVED] WML prestart event misbehaviour in on-line games
- Replies: 7
- Views: 3982
Re: WML prestart event misbehaviour in on-line games
I thought to leave it there for the moment, while I'm still developing the scenario. Otherwise, what is the editor/scenarios directory good for if files in there don't load macros by default? In any case, this doesn't seem to work. When I enter any multiplayer game setup, I get Error: Macro/file 'da...
- August 13th, 2023, 5:55 pm
- Forum: WML Workshop
- Topic: [SOLVED] WML prestart event misbehaviour in on-line games
- Replies: 7
- Views: 3982
Re: WML prestart event misbehaviour in on-line games
Thanks a lot for the explanation and the workaround. I'll try to make it work! BTW, macros don't seem to work for me for some reason. I verified they're where they're supposed to be in /usr/share/wesnoth, but whenever I try to use one, I get file-not-found error mentioning the macro name. I place my...
- August 13th, 2023, 5:29 pm
- Forum: WML Workshop
- Topic: [SOLVED] Side filter does not seem to work
- Replies: 8
- Views: 4287
Re: Side filter does not seem to work
Initially I didn't write side=$unit.side, I added it later thinking maybe it'd solve the problem, but it didn't/ Thanks for explanation, anyway.
Not yet. But I observed that other sides' recruitment lists change in a way consistent with what I described above.Have you verified with :inspect that
- August 13th, 2023, 1:54 pm
- Forum: WML Workshop
- Topic: [SOLVED] Side filter does not seem to work
- Replies: 8
- Views: 4287
[SOLVED] Side filter does not seem to work
In a multiplayer scenario that I'm working on, I want a mechanics inspired by games like Heroes of Might and Magic. Namely, I want the list of units a leader can recruit depend on the type of castle they're currently in. To do it, I'm using moveto and exit_hex events as follows: # recruiting elves [...
- August 13th, 2023, 1:01 pm
- Forum: WML Workshop
- Topic: [SOLVED] WML prestart event misbehaviour in on-line games
- Replies: 7
- Views: 3982
[SOLVED] WML prestart event misbehaviour in on-line games
I'm building a multiplayer scenario, intended to be played by 1-4 players. Each side has a predefined leader, so if there is less than 4 players I need to remove non-playing leaders in a prestart event. I wrote the following code to accomplish this: [event] name=prestart [kill] [filter_side] side=1,...