Castle overlay for Keeps issue [Wesnoth 1.18.2]

The place to post your WML questions and answers.

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.
Post Reply
User avatar
WhiteWolf
Forum Moderator
Posts: 773
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Castle overlay for Keeps issue [Wesnoth 1.18.2]

Post by WhiteWolf »

Hi!
The aim I'd like to achieve is to have a castle on the map with an adjacent keep, but not to allow recruiting at that location. (Only at that location).

In previous versions of Wesnoth, I could do this by simply placing a Castle Overlay on the Keep tile. That way, the keep tile was in fact considered a castle tile, and recruitment was not possible from there.

However, I noticed that in Wesnoth version 1.18.2, this is no longer so: even though the terrain info says Castle(Castle) when hovering over the Keep, I can recruit from it.
Screenshot at 2024-08-11 13-12-08.png
Am I witnessing a wesnoth bug? Or did something change in WML, and am I supposed to do this differently now?

Thanks!
Main UMC campaigns: The Ravagers - now for 1.18, with even more bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
User avatar
Ravana
Forum Moderator
Posts: 3314
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Castle overlay for Keeps issue [Wesnoth 1.18.2]

Post by Ravana »

If it has not changed compared to 1.18.0 then it is not bug. Sounds like edge case where engine is not required to support you.
User avatar
WhiteWolf
Forum Moderator
Posts: 773
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Castle overlay for Keeps issue [Wesnoth 1.18.2]

Post by WhiteWolf »

I'm sorry?
1.18.0 was 100% bug-free, or why is it that if something hasn't changed since that version, it can't be a bug? What do you mean the 'engine is not required to support me'? At something that used to work in 1.16 and before?

OK, I guess.
Main UMC campaigns: The Ravagers - now for 1.18, with even more bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
User avatar
Ravana
Forum Moderator
Posts: 3314
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Castle overlay for Keeps issue [Wesnoth 1.18.2]

Post by Ravana »

If 1.18.0 and 1.18.2 handle this terrain differently its oos and therefore bug.

Even if it happened to work in 1.16, if it is not documented that it should work this way, it is not bug when missing from all of 1.18. Then it is just feature request. While if it worked in 1.16, and is still documented that it should work, but is missing from all of 1.18, it is bug.
User avatar
doofus-01
Art Director
Posts: 4180
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: Castle overlay for Keeps issue [Wesnoth 1.18.2]

Post by doofus-01 »

I have no idea what the underlying change was and whether it is a bug or not, but I can mention that the terrain graphics rules only look at the terrain codes, not all the other keys in a [terrain_type] tag, so you should be able to make a terrain that doesn't allow recruiting, but also doesn't need extra transition rules to be a drop-in replacement. Maybe "Kery" would work, if you aren't already using that.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
WhiteWolf
Forum Moderator
Posts: 773
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Castle overlay for Keeps issue [Wesnoth 1.18.2]

Post by WhiteWolf »

From some further testing it seems that in previous wesnoth versions, if recruit_from was set to yes on the base, but no on the overlay, the engine would use the overlay value. But now, it looks like if it's set to yes on either the base or the overlay, the engine takes it as a yes in either case.

Yeah, the solution for my edge case is to make custom terrain_type, that of course works, thanks for the tip.
Main UMC campaigns: The Ravagers - now for 1.18, with even more bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Post Reply