Possible bug in one of the base macros
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Possible bug in one of the base macros
I was using the scatter units macro to place some enemy units on the board and I noticed that one less of them appeared than was intended, however the enemy side that controls it always starts their first turn by recruiting one of that unit type despite not being able to recruit it.
What I think is somehow happening is that the range that the units could randomly spawn in includes the recall list and that it is recalling it onto the field.
I'm fairly sure this isn't intended but I thought I'd bring it up here before I report it just incase it is.
What I think is somehow happening is that the range that the units could randomly spawn in includes the recall list and that it is recalling it onto the field.
I'm fairly sure this isn't intended but I thought I'd bring it up here before I report it just incase it is.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Possible bug in one of the base macros
Sure that's a bug. A possible cause is that afaik SLFs include the map border, resulting in an attempt to do [unit] for invalid coordinates which places the unit on the recall list instead.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: Possible bug in one of the base macros
If this is the problem, then specifying a range of tiles in the filter (even if it's the whole map) would be a viable workaround.Anonymissimus wrote:Sure that's a bug. A possible cause is that afaik SLFs include the map border, resulting in an attempt to do [unit] for invalid coordinates which places the unit on the recall list instead.
You are a Dark Adept: you dimmerse yourself in the dark arts...potentially with great rewards....
-JW's personality quiz
-JW's personality quiz
Re: Possible bug in one of the base macros
Yes, the cause is that the macro uses [store_locations] without filtering out border hexes... so unless the SLF in the macro call does so, the macro might attempt to place a unit on a border hex, at which point I presume it ends up on the recall list instead.
I've committed a fix to master, but because the code is a bit iffy, I wouldn't mind if it'd get a little bit more testing before I add it to 1.12 as well. To test, you can just replace the whole utils.cfg with this version.
I've committed a fix to master, but because the code is a bit iffy, I wouldn't mind if it'd get a little bit more testing before I add it to 1.12 as well. To test, you can just replace the whole utils.cfg with this version.
Re: Possible bug in one of the base macros
Committed to 1.12 as well now.