Skip to content

Commit

Permalink
New Dark Hive transition rules for 1.16
Browse files Browse the repository at this point in the history
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
  • Loading branch information
irydacea committed Aug 22, 2020
1 parent 0f110bc commit 1b01b97
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
-----------------
Expand Down
37 changes: 33 additions & 4 deletions terrain-graphics/_final.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down

0 comments on commit 1b01b97

Please sign in to comment.