Search found 1280 matches
- Today, 4:50 am
- Forum: Lua Labs
- Topic: [resolution] problems
- Replies: 14
- Views: 303
Re: [resolution] problems
I put your code in scenario 2 [start], on a recent 1.19 build. Looks fine to me.
However, I notice in your screenshot there is a unit selected. Are you doing something in prestart? I suspect there's something different about your S1 and S2.
However, I notice in your screenshot there is a unit selected. Are you doing something in prestart? I suspect there's something different about your S1 and S2.
- Yesterday, 10:24 pm
- Forum: WML Workshop
- Topic: An error in inspect
- Replies: 0
- Views: 46
An error in inspect
I have no idea what to make of this. If I click on the unit and scroll down I don't see an issue with [variables], but if I click on [statuses][0] I get an error I don't understand and the scenario closes.
- Yesterday, 4:06 pm
- Forum: Lua Labs
- Topic: [resolution] problems
- Replies: 14
- Views: 303
Re: [resolution] problems
I don't see a problem in a pretty recent 1.19, or going back to 1.16.10.
"Green rectangle displays ALL over the screen" displays only on the gamemap, like the second image in your first post.
"Green rectangle displays ALL over the screen" displays only on the gamemap, like the second image in your first post.
- Yesterday, 3:13 pm
- Forum: Lua Labs
- Topic: [resolution] problems
- Replies: 14
- Views: 303
Re: [resolution] problems
https://github.com/wesnoth/wesnoth/comm ... 3bce38d7c0
I'm currently building right around that commit, so if you want to post some simple (as simple as possible) code that demonstrates the problem I can test it.
I'm currently building right around that commit, so if you want to post some simple (as simple as possible) code that demonstrates the problem I can test it.
- Yesterday, 3:08 pm
- Forum: Users’ Forum
- Topic: Legend of the Invincibles
- Replies: 8
- Views: 737
Re: Legend of the Invincibles
The changes to the elves did require some changes to loti (the enchantress line were already quite popular and way to powerful IMO), but also there was a poll on which units players made use of and the results are being used.
- Yesterday, 2:47 pm
- Forum: Lua Labs
- Topic: [resolution] problems
- Replies: 14
- Views: 303
Re: [resolution] problems
Just ran into this while looking at something completely unrelated. Sounds like it's worth testing: commit 2ad0a2f29784b149035ee86e00f8d63bce38d7c0 Author: Tommy <> Date: Sat Jul 16 01:22:59 2022 +1200 Prevent the game from displaying until story screen has finished Should fix #6867 and #3421.
- May 17th, 2024, 6:41 pm
- Forum: Lua Labs
- Topic: [solved] units on the recall list
- Replies: 12
- Views: 349
Re: units on the recall list
What I wonder is should there be a difference in .valid between the two? I was looking for the answer to the in the above quoted documentation, but didn't see/understand it. __cfg just returns WML. It doesn't know that it's a unit anymore, it's just an arbitrary untyped chunk of data formatted acco...
- May 17th, 2024, 5:31 pm
- Forum: WML Workshop
- Topic: new campaign's questions and ideas
- Replies: 19
- Views: 579
Re: new campaign's questions and ideas
I think it was determined that xp is granted after attack end.lhybrideur wrote: ↑May 17th, 2024, 5:05 pm You could store xp in a variable in an attack event (start of the attack) and compare it to the xp in the attack_end even.
Then you reduce the xp by the difference and gives it to the leader.
- May 17th, 2024, 2:54 pm
- Forum: Lua Labs
- Topic: [solved] units on the recall list
- Replies: 12
- Views: 349
Re: units on the recall list
That sounds like the top of that page really needs a comment to that effect, but I do not know how to word it.Ravana wrote: ↑May 17th, 2024, 2:42 pm None of https://wiki.wesnoth.org/LuaAPI/wml work on userdata (unit).
However, several of those functions such as wml.literal and wml.parsed mention userdata as input.
- May 17th, 2024, 1:41 pm
- Forum: Lua Labs
- Topic: [solved] units on the recall list
- Replies: 12
- Views: 349
Re: units on the recall list
I'm reasonably sure that I need to serialize at some point, and AFAIK there's no list of exactly what is available from just unit vs unit.__cfg (what do you call that anway?). It's kind of become a habit since the performance hit, which I've never been able to notice, is nothing compared to the amou...
- May 17th, 2024, 2:05 am
- Forum: Lua Labs
- Topic: [solved] units on the recall list
- Replies: 12
- Views: 349
Re: units on the recall list
Code: Select all
local unit = wesnoth.units.find({ id = unit_id})[1].__cfg
local unit2 = wesnoth.units.find({ id = unit_id})[1]
unit.valid == nil
unit2.valid == map|recall
- May 17th, 2024, 1:59 am
- Forum: Lua Labs
- Topic: [solved] units on the recall list
- Replies: 12
- Views: 349
Re: units on the recall list
This seems to work, but now I'm nervous about it breaking in the future. As the valid documentation explained, you want if unit.valid == 'recall' . Right, but I'm getting nil for both units on the recall and on the map, and while the doc explains when I would see that, it doesn't make any sense to ...
- May 17th, 2024, 12:55 am
- Forum: Lua Labs
- Topic: [solved] units on the recall list
- Replies: 12
- Views: 349
Re: units on the recall list
So, both units on the map and on the recall return nil. I looked into unit.valid: A unit can be either visible on the map (#wesnoth.get_units, #wesnoth.put_unit), or on a recall list (#wesnoth.get_recall_units, #wesnoth.put_recall_unit), or private to the Lua code (#wesnoth.create_unit, #wesnoth.cop...
- May 17th, 2024, 12:34 am
- Forum: Lua Labs
- Topic: [solved] units on the recall list
- Replies: 12
- Views: 349
[solved] units on the recall list
It looks like wesnoth.units.get(id) will only find units on the map, correct? If this is the intended behaviour I'll add a comment to the wiki. So I switched to using wesnoth.units.find because I want to look at map and recall. Now when I'm done messing with the unit and I want to "put it back&...
- May 16th, 2024, 4:02 pm
- Forum: Scenario & Campaign Development
- Topic: Compatibility of previous add-ons with the current version
- Replies: 6
- Views: 281
Re: Compatibility of previous add-ons with the current version
Assuming this campaign has been abandoned, and I have no idea how to determine that, you might find a lot of good info here:
viewtopic.php?t=55180
You did notice that it is MP, so you won't find it under Campaigns, right?
viewtopic.php?t=55180
You did notice that it is MP, so you won't find it under Campaigns, right?