Re: [nbos] [FM] sorting symbols in a map
Mon Oct 22nd, 2007
On Mon, Oct 22, 2007 at 09:41:28AM -0400, Joe Frazier, Jr. wrote:
> The layering script is a good all around best practice, however, it is
> still missing a key aspect that I think is the poster's point. Say you
> are building a mountain range and put down each symbol from left to right
> and top to bottom so that those lower on the screen partially cover those
> higher on the screen. If you then need to add a different mountain or
> volcano right in the middle, you have to use move to top manually on all
> those below where you insert the new one.

Indeed. I'm rather dreading having to do that. In fact, it's one of
the (several) reasons I ditched CC2 for AutoREALM years ago, that
AutoREALM could order symbols and CC2 couldn't.

I understand that CC2Pro *could*, and expect that CC3 can, but I never
got around to buying them for the other reasons that drove me off CC in
the first place.

FWIW, FM is pretty close to the mapping software that I would write,
especially with the scripting capabilities. It's not *exactly* what I
would've written, but by and large it's close enough I can work with it
rather than feel the need to build my own (an off and on -- most off --
project I've had in mind for years).

Anyway, digressing there. Joe mentioned a case where this would be
useful. There are others (laying down a mountain range, say, with
flanking foothills -- oddly enough, *exactly* what I was doing). Yes,
they can be done by layer, or placed by hand in the right order (select
foothill, place, select mountain, place, select foothill, place, etc.).
This gets old *really* fast, even if you remember to think to do that.

So, I'd like to be able to put all my symbols on, then order after the
fact. This results in what I would've done had I planned it ahead
entirely, but is much, much faster. And if I should happen to change my
mind on something and replace symbols -- as Joe said, replacing a mountain
with a volcano... or even replace a section of forest (player map) with
a Lost City (DM map) I can do so without having to restructure huge
swathes of my map.

Anyway. Thus is the business case for it.

As for implementation, if I get time this week[1] I could take a run at
it. How does this sound as a use case?

* select symbols to be ordered (actually, could be just symbols
(submaps) or mapobjects, I haven't decided yet)
* fire macro; in macro:
* create an array containing pointers to objects
* order array by criteria (defaults to 'top to bottom, left to right'
of bottom-right corner; other options could be implemented later)
* for each object in array, call 'move to front'
* release array

If I understand how GoblinAPI works, the above *should* do what's
needed. Does this sound right? Did I miss anything?

If not, all I need to do is figure out the vbscript to do the sort...
and I haven't done vbscript in *years*. Ah well, relatively easy
problem, that.

[1] I started a new job today, and they're running my ass off. I get up
at goofy o'clock to get there early (so I can leave early to take
care of scheduled stuff at home), and need to spend *some* time with
my family, so I'm a tad knackered at the end of the day. I might
not have time before the weekend, even if this shouldn't take long
to knock off.

Keith Davies "History is made by stupid people "Clever people wouldn't even try "If you want a place in the history books "Then do something dumb before you die."
-- The Arrogant Worms
Nbossoftware mailing list

Copyright © 2003-2007, NBOS Software. All rights reserved. 'Fractal Mapper', 'ScreenMonkey', 'Character Sketcher', 'Inspiration Pad', 'Fractal World Explorer', 'Goblin API', 'AstroSynthesis' are trademarks of NBOS Software. 'Dwarven Beserker' art by V. Shane.
Member contributed resources