Complex cave alias terrain -- layer & clip problems

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
joshudson
Posts: 501
Joined: January 17th, 2006, 8:04 pm
Contact:

Complex cave alias terrain -- layer & clip problems

Post by joshudson »

Well I'm seriously over my head

I've got this terrain composed of a base image that's clipped to its hex and the overlay image that I designed to interlock as if clipping were off.

However,

1) It's supposed to appear below cavewall and above units.

2) The self-interlocking overlay is being clipped to its hex

Code: Select all

[terrain_type]
symbol_image=cave/path
id=caveshadow
name= _ "Cave Shadow"
string=Ur^ZS
editor_group=SoW
[/terrain_type]

[terrain_graphics]
     map="
, *
* , *
, 1
* , *
, *"

        [tile]
                pos=1
                type=Ur^ZS
                [image]
                        layer=-50
                        name=floore
                        base=90,146
                [/image]
                [image]
                        layer=0
                        name=../effects/shadow60
                        base=90,146
                [/image]
                probability=100
        [/tile]
[/terrain_graphics]
I'm completely lost.
Attachments
overlay image
overlay image
shadow60.png (260 Bytes) Viewed 2001 times
base image -- intersects with normal cave just fine
base image -- intersects with normal cave just fine
floore.png (8.26 KiB) Viewed 2001 times
CHKDSK has repaired bad sectors in CHKDSK.EXE
User avatar
doofus-01
Art Director
Posts: 4131
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: Complex cave alias terrain -- layer & clip problems

Post by doofus-01 »

I can't say I really follow, screen-shots might be nice.

I once had a problem with layering. I haven't gotten back to it, but Alarantalara's post might help:

http://forum.wesnoth.org/viewtopic.php?p=426998#p426998
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
joshudson
Posts: 501
Joined: January 17th, 2006, 8:04 pm
Contact:

Re: Complex cave alias terrain -- layer & clip problems

Post by joshudson »

Snapshot
Attachments
snapshot1.png
CHKDSK has repaired bad sectors in CHKDSK.EXE
User avatar
Eleazar
Retired Terrain Art Director
Posts: 2481
Joined: July 16th, 2004, 1:47 am
Location: US Midwest
Contact:

Re: Complex cave alias terrain -- layer & clip problems

Post by Eleazar »

Save yourself the trouble, and just make your overlay normal hex-shaped.

Layers are tricky at the best of times. It's likely that adding in custom terrain complicates the issue. But i can't help you with custom terrains. custom terrains.
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
joshudson
Posts: 501
Joined: January 17th, 2006, 8:04 pm
Contact:

Re: Complex cave alias terrain -- layer & clip problems

Post by joshudson »

Already tried that way. If I get the layering wrong the result is bad enough to be worth removing.
CHKDSK has repaired bad sectors in CHKDSK.EXE
User avatar
Alarantalara
Art Contributor
Posts: 787
Joined: April 23rd, 2010, 8:17 pm
Location: Canada

Re: Complex cave alias terrain -- layer & clip problems

Post by Alarantalara »

1) It's supposed to appear below cavewall and above units.

This is impossible: units are drawn above the cave wall when the wall is north of them. A shadow above the unit has to be above cave walls to the north by definition. You can get it to be below the cave walls to the south, south-east and south-west.

2) The self-interlocking overlay is being clipped to its hex

This occurs because you have the image tag for for overlay within the tile tag. Move it outside that tag into the main terrain_graphics tag and it will be clipped to the larger area you defined instead of the tile. You will need to add center=x,y argument to put your overlay in the right place however.
joshudson
Posts: 501
Joined: January 17th, 2006, 8:04 pm
Contact:

Re: Complex cave alias terrain -- layer & clip problems

Post by joshudson »

Thanks. That brought me a bit closer.

I may decide I can get away with fudging it a bit by applying a similar overlay to the cavewall.

If I use black at 50% transparent nobody will notice.
CHKDSK has repaired bad sectors in CHKDSK.EXE
Post Reply