Search found 1282 matches

by white_haired_uncle
Yesterday, 7:41 pm
Forum: Scenario & Campaign Development
Topic: Strange Legacy - 1.16 RPG World (Markets Upgrade)
Replies: 1359
Views: 401031

Re: Strange Legacy - 1.16 RPG World (Markets Upgrade)

10. In Capital City, some equipment said "More Population required!" No one told me how to increase population. I don't know about CC, but usually If you look at things the will buy/sell, there will be one with very few in stock, and if you sell them some the stock will go up but then if ...
by white_haired_uncle
Yesterday, 4:43 pm
Forum: Lua Labs
Topic: [resolution] problems
Replies: 16
Views: 381

Re: [resolution] problems

Oh, is this the campaign where you are messing with (experimental) global variables, screwing with save/load, etc? If so, it seems obvious enough, my code works because I don't do that stuff. You've probably done something that breaks gamemap_size or whatever between S1 or turn 1 or whatever, and so...
by white_haired_uncle
Yesterday, 4:50 am
Forum: Lua Labs
Topic: [resolution] problems
Replies: 16
Views: 381

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.
by white_haired_uncle
May 18th, 2024, 10:24 pm
Forum: WML Workshop
Topic: An error in inspect
Replies: 2
Views: 137

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.
argan_inspect.png
argan_with_error.png
by white_haired_uncle
May 18th, 2024, 4:06 pm
Forum: Lua Labs
Topic: [resolution] problems
Replies: 16
Views: 381

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.
by white_haired_uncle
May 18th, 2024, 3:13 pm
Forum: Lua Labs
Topic: [resolution] problems
Replies: 16
Views: 381

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.
by white_haired_uncle
May 18th, 2024, 3:08 pm
Forum: Users’ Forum
Topic: Legend of the Invincibles
Replies: 8
Views: 753

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.
by white_haired_uncle
May 18th, 2024, 2:47 pm
Forum: Lua Labs
Topic: [resolution] problems
Replies: 16
Views: 381

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.
by white_haired_uncle
May 17th, 2024, 6:41 pm
Forum: Lua Labs
Topic: [solved] units on the recall list
Replies: 12
Views: 369

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...
by white_haired_uncle
May 17th, 2024, 5:31 pm
Forum: WML Workshop
Topic: new campaign's questions and ideas
Replies: 22
Views: 644

Re: new campaign's questions and ideas

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.
I think it was determined that xp is granted after attack end.
by white_haired_uncle
May 17th, 2024, 2:54 pm
Forum: Lua Labs
Topic: [solved] units on the recall list
Replies: 12
Views: 369

Re: units on the recall list

Ravana wrote: May 17th, 2024, 2:42 pm None of https://wiki.wesnoth.org/LuaAPI/wml work on userdata (unit).
That sounds like the top of that page really needs a comment to that effect, but I do not know how to word it.

However, several of those functions such as wml.literal and wml.parsed mention userdata as input.
by white_haired_uncle
May 17th, 2024, 1:41 pm
Forum: Lua Labs
Topic: [solved] units on the recall list
Replies: 12
Views: 369

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...
by white_haired_uncle
May 17th, 2024, 2:05 am
Forum: Lua Labs
Topic: [solved] units on the recall list
Replies: 12
Views: 369

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
by white_haired_uncle
May 17th, 2024, 1:59 am
Forum: Lua Labs
Topic: [solved] units on the recall list
Replies: 12
Views: 369

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 ...
by white_haired_uncle
May 17th, 2024, 12:55 am
Forum: Lua Labs
Topic: [solved] units on the recall list
Replies: 12
Views: 369

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...