From 1b01b9725c321e192caf34ed7ac2cb71f104ae7b Mon Sep 17 00:00:00 2001 From: Iris Morelle Date: Sat, 22 Aug 2020 03:13:13 -0400 Subject: [PATCH] New Dark Hive transition rules for 1.16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Long story short, after octalot's proposed fix I decided to have a closer loook at the Mycelium/Deprecated Mushroom Grove terrain graphics rules in Wesnoth master right now, and it turns out that the Mycelium base graphics are drawn in a Surprising™ fashion: {NEW:BASE Tb,*^Uf* forest/mushroom-base LAYER=-319} Which means that in order to actually get our transitions into Mycelium/MG, we need to draw on a higher layer than Mycelium's. So in 1.16 we need two different rules for each Dark Hive variation: one to avoid drawing transitions in the wrong layer (which will set the transition flag early) and another to force a different layer for those terrains specifically. How this will play out when both rules come into effect within the same vicinity is unbeknownst to me at this time. I don't think there are any situations where we'll see Mycelium neighbouring one of the terrains blacklisted by the base rule, however, at least not in IftU and AtS. Closes #11. CC: project-ethea/Invasion_from_the_Unknown#73 CC: project-ethea/After_the_Storm#83 --- changelog.md | 6 ++++++ terrain-graphics/_final.cfg | 37 +++++++++++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 3b2c72b..335cff6 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,12 @@ Version 20200816+dev: * Made `AMLA_BUG_4419_WORKAROUND` a no-op on 1.15.4 and later since mainline #4419 is solved there. +* Terrains: + * Implemented a new Dark Hive transition logic to avoid issues with the + deprecated Mushroom Grove `^Uf*` terrain as well as the new Mycelium `T*` + base terrain proper when running add-ons on Wesnoth 1.15.2 and later + (issue #11, see also IftU #73 and AtS #83). + Version 20200816: ----------------- diff --git a/terrain-graphics/_final.cfg b/terrain-graphics/_final.cfg index 501b4dd..0fad038 100644 --- a/terrain-graphics/_final.cfg +++ b/terrain-graphics/_final.cfg @@ -76,10 +76,39 @@ # Dark hive transitions {NEW:BEACH (Yhr,Yhl,Yhs) W* flat/shore} -# Don't replace certain defined transitions for id est road, sand, mountains... -{TRANSITION_RESTRICTED_L Yhr (!,Yhr,Uh,H*,M*,Q*,Xo*,Urb,Rr,Rp,Ds) -499 (dark-hive/floor) } -{TRANSITION_RESTRICTED_L Yhl (!,Yhl,Uh,H*,M*,Q*,Xo*,Urb,Rr,Rp,Ds) -499 (dark-hive/lair) } -{TRANSITION_RESTRICTED_L Yhs (!,Yhs,Uh,H*,M*,Q*,Xo*,Urb,Rr,Rp,Ds) -499 (dark-hive/surface)} + +# Don't replace transitions from specific "dominant" terrains such as rockbound +# cave, sand, road, mountains, hills, etc. +# +# NOTE: (Naia #11, IftU #73, AtS #83) +# +# The deprecated Mushroom Grove gains compulsory Mycelium base graphics in +# 1.16 with weird layering in order to enforce the Mycelium + Mushroom Grove +# combination on almost all base terrains for no discernible reason. Wesnoth +# devs, everyone! + +#ifver WESNOTH_VERSION < 1.15.2 +# No special rules for Mushroom Grove in 1.14 since it's not a stubborn +# broken-by-design overlay in that version. +{TRANSITION_RESTRICTED_L Yhr (!,Yhr,Uh,H*,M*,Q*,Xo*,Urb,Rr,Rp,Ds) -499 (dark-hive/floor) } +{TRANSITION_RESTRICTED_L Yhl (!,Yhl,Uh,H*,M*,Q*,Xo*,Urb,Rr,Rp,Ds) -499 (dark-hive/lair) } +{TRANSITION_RESTRICTED_L Yhs (!,Yhs,Uh,H*,M*,Q*,Xo*,Urb,Rr,Rp,Ds) -499 (dark-hive/surface)} +#else +# This makes it first so no transitions are drawn into Mycelium/Deprecated +# Mushroom Grove. +{TRANSITION_RESTRICTED_L Yhr (!,Yhr,Uh,H*,M*,Q*,Xo*,Urb,Rr,Rp,Ds,T*,*^Uf*) -499 (dark-hive/floor) } +{TRANSITION_RESTRICTED_L Yhl (!,Yhl,Uh,H*,M*,Q*,Xo*,Urb,Rr,Rp,Ds,T*,*^Uf*) -499 (dark-hive/lair) } +{TRANSITION_RESTRICTED_L Yhs (!,Yhs,Uh,H*,M*,Q*,Xo*,Urb,Rr,Rp,Ds,T*,*^Uf*) -499 (dark-hive/surface)} +# Now we make a special case for Mycelium/Deprecated Mushroom Grove (which is +# drawn at layer -319 as of 1.15.4) and force our transitions over it. +{TRANSITION_RESTRICTED_L Yhr (T*,*^Uf*) -318 (dark-hive/floor) } +{TRANSITION_RESTRICTED_L Yhl (T*,*^Uf*) -318 (dark-hive/lair) } +{TRANSITION_RESTRICTED_L Yhs (T*,*^Uf*) -318 (dark-hive/surface)} +# Note that we don't need to interfere with the new Mushroom Grove overlays +# (^T*) because they don't force base graphics and transitions down our +# throats. +#endif + # HACK: Wesnoth 1.6 RC 1. Define a custom Re transition, as # the default mainline one is drawn below Yhs and looks awful. {TRANSITION_RESTRICTED_LF Yhr (Re,Rb,Rd) -331 transition3 (dark-hive/floor) }