Terrain graphics macro 1.11 update question

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
tuggyne
Posts: 76
Joined: May 22nd, 2011, 5:52 am

Terrain graphics macro 1.11 update question

Post by tuggyne » October 21st, 2013, 5:27 am

I have an (unreleased) addon with a few custom terrain types that I got to work with 1.10. 1.11, for some reason, does not seem so happy, and the error I get is "Macro/file 'TERRAIN_BASE' is missing at ~addons/CastleDefense/terrain_graphics.cfg:1 included from ~addons/CastleDefense/_main.cfg:2". But TERRAIN_BASE is still there in the core macros. What on earth am I supposed to do, manually include the terrain macro file? :augh:

So far, that's either the only error, or the only one it feels like showing me. If I get more later I guess I'll change the topic subject.

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Terrain graphics macro 1.11 update question

Post by zookeeper » October 21st, 2013, 6:24 am

Sounds weird. Post your _main.cfg and terrain_graphics.cfg?

tuggyne
Posts: 76
Joined: May 22nd, 2011, 5:52 am

Re: Terrain graphics macro 1.11 update question

Post by tuggyne » October 21st, 2013, 6:29 am

Forgot to mention I'm on 1.11.6, but I figure that should be assumed.
zookeeper wrote:Sounds weird. Post your _main.cfg and terrain_graphics.cfg?
I feel slightly vindicated in my bewilderment.

Code: Select all

{TERRAIN_BASE            Zchx                                                flat/road}
{KEEP_BASE               Zkhx                                                castle/cobbles-keep}
{TERRAIN_BASE            Zcvx                                                castle/elven/grounds}
{NEW:WALL                Zcvx       (!,C*,K*,Zc*,Zk*)                        castle/elven/castle}
{NEW:WALL                Zchx       (!,C*,K*,Zc*,Zk*)                        castle/castle}
{NEW:WALL2               Zkhx       (!,Ket,!,C*,Ke*,Zc*)  (!,C*,K*,Zc*,Zk*)  castle/keep-castle}
{NEW:WALL                Zkhx       (!,K*,Zk*)                               castle/keep}

# Castle & Encampment Base Transitions
{TRANSITION_COMPLETE_L   Ch,Chr,Cha Zc*                    -300              flat/road}

{TRANSITION_COMPLETE_LF  Zc*        Cd*                    -360     inside   flat/desert-road}
{TRANSITION_COMPLETE_L   Cd*        Zc*                    -360              flat/desert-road}

{TRANSITION_COMPLETE_LF  Zc*        !,Ket,!,Ce*,Ke*        -370     inside   flat/dirt}
{TRANSITION_COMPLETE_L   !,Ket,!,Ce*,Ke*  Zc*              -370              flat/dirt}

{TRANSITION_COMPLETE_LF  Zc*        Co*                    -380     inside   flat/dirt-dark}
{TRANSITION_COMPLETE_L   Co*        Zc*                    -380              flat/dirt-dark}

# Interior
{TERRAIN_BASE_RANDOM     Zcux                                                cave/flagstones-dark}
{TRANSITION_COMPLETE_L   Zcux       (!,Urb,Zcux)           -224              cave/flagstones-dark}

Code: Select all

{~add-ons/CastleDefense/terrain_types.cfg}
{~add-ons/CastleDefense/terrain_graphics.cfg}
#ifdef MULTIPLAYER
{~add-ons/CastleDefense/utils/towers.cfg}
{~add-ons/CastleDefense/scenarios/}
#endif

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Terrain graphics macro 1.11 update question

Post by zookeeper » October 21st, 2013, 7:05 am

All right. I have a feeling that moving those two includes inside your #ifdef might fix it, although I couldn't find any hard evidence for that.

tuggyne
Posts: 76
Joined: May 22nd, 2011, 5:52 am

Re: Terrain graphics macro 1.11 update question

Post by tuggyne » October 21st, 2013, 7:59 am

zookeeper wrote:All right. I have a feeling that moving those two includes inside your #ifdef might fix it, although I couldn't find any hard evidence for that.
It did, although I had to duplicate the lines inside a #ifdef EDITOR to make sure I could still get at them in the map editor.

Which looks really impressive, by the by.

I did notice one other problem that's puzzled me for rather longer (I think it first cropped up during the 1.9 to 1.10 transition): there's a particular area on the primary map this addon contains where the transition is messed up. But it's messed up in a truly creative way that has to be seen to be believed, and I can't figure out what could be causing that. While this isn't directly related, it is something I'd like to figure out and fix eventually.
Attachments
CastleWallTransitionGlitch.png
Bizarre transition.
CastleWallTransitionGlitch.png (33.86 KiB) Viewed 787 times

Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: Terrain graphics macro 1.11 update question

Post by Max » October 21st, 2013, 1:56 pm

this has been reported at least twice but i couldn't find the threads. i'm pretty sure some add-on misbehaves and leaks images with the same name as mainline ones.
found one thread: http://forums.wesnoth.org/viewtopic.php?f=4&t=35432

tuggyne
Posts: 76
Joined: May 22nd, 2011, 5:52 am

Re: Terrain graphics macro 1.11 update question

Post by tuggyne » October 22nd, 2013, 1:22 am

Max wrote:this has been reported at least twice but i couldn't find the threads. i'm pretty sure some add-on misbehaves and leaks images with the same name as mainline ones.
found one thread: http://forums.wesnoth.org/viewtopic.php?f=4&t=35432
Well, sure enough! It was indeed American Era. Much obliged; I had no idea where to continue after I checked the core images.

Post Reply