impassable overlay removing Plank Bridge
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.
impassable overlay removing Plank Bridge
In the map editor, I made a Regular Chasm on hex (1,5) and placed a Plank Bridge in the same hex. I wanted to make the Plank Bridge impassable, so I applied an Impassable Overlay. My problem is this: When I placed the overlay, the bridge vanished, leaving nothing but the chasm.
When I played the scenario, yep, no Plank Bridge.
Is this normal behavior? Like, I have to pick one: Plank Bridge or Overlay. I can't have both.
If so, is there a workaround?
When I played the scenario, yep, no Plank Bridge.
Is this normal behavior? Like, I have to pick one: Plank Bridge or Overlay. I can't have both.
If so, is there a workaround?
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
- Lord-Knightmare
- Discord Moderator
- Posts: 2359
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: impassable overlay removing Plank Bridge
This is normal. The plank bridge itself is an overlay. You can even place bridges over grassland/chasm/lava (not sure why anyone would do woodenbridge over lava though).Helmet wrote: ↑December 2nd, 2020, 2:44 pm In the map editor, I made a Regular Chasm on hex (1,5) and placed a Plank Bridge in the same hex. I wanted to make the Plank Bridge impassable, so I applied an Impassable Overlay. My problem is this: When I placed the overlay, the bridge vanished, leaving nothing but the chasm.
When I played the scenario, yep, no Plank Bridge.
Is this normal behavior? Like, I have to pick one: Plank Bridge or Overlay. I can't have both.
If so, is there a workaround?
The workaround is making your own new terrain type with impassable and the bridge.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: impassable overlay removing Plank Bridge
Oh, okay. Thanks for the info.Lord-Knightmare wrote: ↑December 2nd, 2020, 3:08 pm This is normal. The plank bridge itself is an overlay. You can even place bridges over grassland/chasm/lava (not sure why anyone would do woodenbridge over lava though).
The workaround is making your own new terrain type with impassable and the bridge.
That hex is the "arrival hex." If one of the player's units is positioned there and then a new unit arrives, the arriving unit gets displaced into the cavern wall. Which is a bummer. I wish there was something simpler than a new terrain type, though.
I guess I could make an event, so that if a unit moves to hex (1,5), he says "Oh, no! I'm losing my balance! I'm falling! Aaaaa!"...and then I
[kill]
the unit. But that would be mean.Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: impassable overlay removing Plank Bridge
Does
[whichever WML tag is making these units arrive]
have a check_passability
attribute?Re: impassable overlay removing Plank Bridge
I checked the Wiki, and I think the answer is no. Unless I missed it.
It's nothing fancy. On turn 3, a unit appears on the plank bridge and says something, then continues into the cave.
Code: Select all
[event]
name=turn 3
[unit]
side=1
...
x=1
y=5
[/unit]
[message]
speaker=Bittil
message="Hello?"
[/message]
Last edited by Helmet on December 2nd, 2020, 4:54 pm, edited 1 time in total.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: impassable overlay removing Plank Bridge
I tried to make the custom terrain. The code almost works. In the map editor, I see the plank bridge as my cursor, and I can add it to my map, but it leaves gaps.Lord-Knightmare wrote: ↑December 2nd, 2020, 3:08 pm The workaround is making your own new terrain type with impassable and the bridge.
The Regular Chasm is not under my plank bridge. How do I include it?
Code: Select all
# An impassable plank bridge
[terrain_type]
symbol_image=impassable_bridge-se # the image which appears on the map itself
editor_image=impassable_bridge-se # the image displayed in the menu of terrain choices
editor_name= _ "Impassable Bridge"
editor_group=TPoE
id=impassable_bridge
string=^Ejz
aliasof=_bas
editor_group=TPoE
[/terrain_type]
{OVERLAY *^Ejz (impassable_bridge-se)}
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
- Lord-Knightmare
- Discord Moderator
- Posts: 2359
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: impassable overlay removing Plank Bridge
I think your problem is with TerrainWML and the TerrainGraphics. They are not my forte so I cannot be of much assistance.
I think you have to include aThe Regular Chasm is not under my plank bridge. How do I include it?
default_base=Qxu
inside the [terrain_type][/terrain_type]
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: impassable overlay removing Plank Bridge
Thank you! As it turns out, that was the part I couldn't figure out -- and it wasn't in the code examples I was referencing.Lord-Knightmare wrote: ↑December 2nd, 2020, 5:20 pm I think you have to include adefault_base=Qxu
inside the[terrain_type][/terrain_type]
The custom terrain works now. The bridge is impassable.
I had to make a custom sprite, but that was no biggy.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: impassable overlay removing Plank Bridge
Looked into it too, but all solutions have some quirks …
Made a symbol image which you could use though.
Another option is to block the terrain by putting a petrified unit onto the hex, or teleporting units which step onto it.
Made a symbol image which you could use though.
Another option is to block the terrain by putting a petrified unit onto the hex, or teleporting units which step onto it.
- Attachments
-
- impassable-bridge-se-nw-tile.png (7.9 KiB) Viewed 765 times
Try out the dark board theme.
Re: impassable overlay removing Plank Bridge
I added it. It looks good, thanks.
Clever! That's one of the fun thing about WML: Finding solutions allow you to be creative. Another possibility would be to make the advancing unit step back to its previous hex. But then that raises another question: What if another unit was already there?
Anyhow, I had tried to make a unit back-up a hex, but couldn't get the code to work. I knew $x2 and $y2 were the previous hex, so I thought it would be easy. But nope.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: impassable overlay removing Plank Bridge
It actually is easy. For an enter hex event x2,y2 would be the adjacent hex which can be full. For a moveto event it can be farther away, but it's empty.
Uses the macro from here
Code: Select all
[event]
name=moveto
first_time_only=no
[filter]
x,y=1,5
[/filter]
{TELEPORT_TILE 1 5 $x2 $y2}
[/event]
Try out the dark board theme.
Re: impassable overlay removing Plank Bridge
Oh! Thanks. I didn't think of teleporting. That does look easy. Thanks for answering that question.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: impassable overlay removing Plank Bridge
I forgot the
[unit]
tag, for which that attribute is inconsistently named. Please try placement=map
with passable=yes
.Re: impassable overlay removing Plank Bridge
Cool! I tested it; it works like a charm. The unit will land on a nearby available hex.
The Wiki says: "placement: How the unit should be placed: can be one value or a comma-separated list of values."
Does that mean I could make a short list of x,y locations, and the unit will test them, in order, to find an available hex? That's what I thought, but it doesn't seem to work.
Here's my code. The unit could not occupy (1,5) because another unit was there, so I wanted the unit to try (7,7) next, which was unoccupied. But it didn't work. The unit went to a hex near (1,5) instead.
Code: Select all
x=1,7
y=5,7
placement=map
passable=yes
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: impassable overlay removing Plank Bridge
The comma-separated bit means it can do a fallback like this
placement=map,leader
. I haven't tested that, so probably worth noting that it's only used in LoW and there's no unit-test checking that it hasn't become buggy...