[terrain] + area= sanity check

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
User avatar
Spannerbag
Posts: 551
Joined: December 18th, 2016, 6:14 pm
Location: Yes

[terrain] + area= sanity check

Post by Spannerbag »

Hi,
was puzzled why some [terrain] code wasn't working.
I think I understand why but would like to check I can't do what I want before I code a work-around.

I had two [time_area]s in a scenario, let's call them TA1 and TA2.

I then wanted to change some terrain in these areas to some other terrain.

So for example if I wanted to add a mushroom farm to all green grass in these areas I could do:

Code: Select all

        [terrain]
          area=TA1,TA2
          [and]
            terrain=Gg
          [/and]
          terrain=Gg^Emf
        [/terrain]
However it didn't work.
Splitting the area= clause (based on my my very brief testing thus far) seemed to fix it.
So this worked:

Code: Select all

        [terrain]
          area=TA1
          [and]
            terrain=Gg
          [/and]
          terrain=Gg^Emf
        [/terrain]
        [terrain]
          area=TA2
          [and]
            terrain=Gg
          [/and]
          terrain=Gg^Emf
        [/terrain]
So I am guessing the engine was looking for an area named "TA1,TA2" rather than locations in both areas.
Is there a simple fix? such as area="TA1","TA2" or is this not supported?

If it isn't supported I can easily wok around by storing both locations into a single variable and using find_in= instead but if I've done something stupid please let me know!

Cheers,
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Celtic_Minstrel
Developer
Posts: 2263
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: [terrain] + area= sanity check

Post by Celtic_Minstrel »

It looks like lists in area= are indeed not supported. They probably should be, though.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Spannerbag
Posts: 551
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: [terrain] + area= sanity check

Post by Spannerbag »

Celtic_Minstrel wrote: August 7th, 2023, 2:04 am It looks like lists in area= are indeed not supported. They probably should be, though.
Thanks for the swift reply, much appreciated!

Is it worth submitting a bug report or request for a new feature?

Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Celtic_Minstrel
Developer
Posts: 2263
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: [terrain] + area= sanity check

Post by Celtic_Minstrel »

You're welcome to submit a feature request.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Spannerbag
Posts: 551
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: [terrain] + area= sanity check

Post by Spannerbag »

Celtic_Minstrel wrote: August 7th, 2023, 2:28 am You're welcome to submit a feature request.
Sorry to be dim, but what's the best way to do that?
The ideas forum? Or somewhere else?

Sadly have to dash off now, so thanks in advance!

Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Celtic_Minstrel
Developer
Posts: 2263
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: [terrain] + area= sanity check

Post by Celtic_Minstrel »

The best place to submit feature requests is on the bug tracker. I believe the Ideas forum is also a valid place, though.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Ravana
Forum Moderator
Posts: 3061
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: [terrain] + area= sanity check

Post by Ravana »

You can use [or].
User avatar
Spannerbag
Posts: 551
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: [terrain] + area= sanity check

Post by Spannerbag »

Ravana wrote: August 7th, 2023, 9:27 am You can use [or].
:doh: Thanks... somehow, hadn't thought of that...

Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Spannerbag
Posts: 551
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: [terrain] + area= sanity check

Post by Spannerbag »

Celtic_Minstrel wrote: August 7th, 2023, 5:52 am The best place to submit feature requests is on the bug tracker. I believe the Ideas forum is also a valid place, though.
Thanks, Ravana posted a useful idea, but I'll probably submit a request anyway.

Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
User avatar
Celtic_Minstrel
Developer
Posts: 2263
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: [terrain] + area= sanity check

Post by Celtic_Minstrel »

Well, the thing is, some things in filters support comma-separated lists, and some don't. I just think it would be best if everything that can, does. Sure, you can still use [or] to get the same effect, but it's a lot less compact.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Spannerbag
Posts: 551
Joined: December 18th, 2016, 6:14 pm
Location: Yes

Re: [terrain] + area= sanity check

Post by Spannerbag »

Celtic_Minstrel wrote: August 8th, 2023, 2:08 am Well, the thing is, some things in filters support comma-separated lists, and some don't. I just think it would be best if everything that can, does. Sure, you can still use [or] to get the same effect, but it's a lot less compact.
Yep, agreed.

That said, I understand people donate their time and effort so will tend to work on what interests them.
Fair enough, but as a result I appreciate that at times I'll stumble onto inconsistencies that need work-arounds.
Irritating, but rarely fatal :)

Trouble is, with a memory as poor as mine, keeping track of these is not easy! :?
(I'm forever using explicit filters where I shouldn't and vice-versa... :annoyed: ).

Cheers!
-- Spannerbag
SP Campaigns: After EI (v1.14) Leafsea Burning (v1.17, v1.16)
I suspect the universe is simpler than we think and stranger than we can know.
Also, I fear that beyond a certain point more intelligence does not necessarily benefit a species...
Post Reply