The Cartographers’ Guild is a forum created by and for map makers and aficionados, a place where every aspect of cartography can be admired, examined, learned, and discussed. Our membership consists of professional designers and artists, hobbyists, and amateurs—all are welcome to join and participate in the quest for cartographic skill and knowledge.

Although we specialize in maps of fictional realms, as commonly used in both novels and games (both tabletop and role-playing), many Guild members are also proficient in historical and contemporary maps. Likewise, we specialize in computer-assisted cartography (such as with GIMP, Adobe apps, Campaign Cartographer, Dundjinni, etc.), although many members here also have interest in maps drafted by hand.

If this is your first visit, be sure to check out the FAQ. You will have to register before you can post or view full size images in the forums.

Spiral Staircase Shading Macro Idea [CC2/CC3]

I'm SOOOO not a CC2/3 scripter...I REALLY need to put forth a bit of effort to learn it...but in the meantime, I was wondering if anyone would like to help me figure out some of the logistics of this particular script idea I have.

Its regarding the CStair macro by Ralf...its an awesome macro, and I'm using it extensively to make staircases in towers, just like it was designed...but the staircases are missing depth.

I put up a post on CC2-L but without the ability to include images its kinda hard to describe, so this post will include an image so you can see what I'm doing.

I'm using the transparency fills of CC3 (10% version) and overlapping them with the ARCS command to create a progressively darker shading overlay.

I made this particular staircase pictured (before and after shading) with the CStair macro and manually overlapped the transparency arcs. But the effect with wallshadow and all is just awesome if you ask me.

I need to take Ralfs macro and remove the fact that it creates both light and dark stair segments and make it so it just creates single shorter and shorter arcs along the ARCS stored points path.

Then I need to figure out if its even possible to create a fillstyle that is not in the current template and use it for the arcs it creates.

Will your stairs always descend counter-clockwise (ie. start from the bottom)? The original script I think only drew in one direction (a limitation of ARCS I think)...so I can deal with one direction, but two would be nice.

Do you want to draw the arc of the stairs or specify the number of steps? I think the arc would be better...basing the shading on the path of an ARCS as mentioned before

If (in the former case) the step depth does not divide evenly into the arc length of the staircase, do you want to trim the staircase (at top or bottom) or adjust the step depth (top, bottom or all)? I assume this means you will be implementing the shading into a staircase script altogether, thus redoing the CSTAIR macro altogether? if so, specifying a step depth and then adjusting all of them to fit would be ideal, but isn't required...Ralfs CSTAIR doesn't do this.

The step shadow is currently 1/3rd the step depth. Do you want to change this? What transparency level should I use for it? If you're redoing the CStair to use transparencies for the step shadow too, then 20 or 30% should be enough...1/3rd depth is fine. I think Steps should be outlined in black, but step shadows shouldn't be. The overlapping transparent overlay arcs that show depth like in my example however should always be 10%, since they overlap and get darker.

Do you want to add an optional railing on either or both sides? Would be really cool, but isn't necessary...maybe as a separate macro?

According to "Architectural Graphic Standards", staircases should have at least one landing every twelve feet. Would you like this as an option? This would probably be a rairly used option, since I and most mappers when adhering to this rule would probably rather aesthetically place such a landing as opposed to sticking to the twelve feet rule...I wouldn't bother

Note that my variable names are self explanatory and labels are prefixed to avoid conflicts. Rather than draw each step separately (and twice), I draw a common staircase background first, then put the shading and edge lines on top of it for effect. As to the optional railings (point 5), I'd prefer that they were in this macro so they could be inserted before the MSC_Step loop for depth shading and step shadows/edges can be narrowed so they don't overlap. What sheet/layer should I draw this in?

--

Dalton "who thinks code readability is important as documentation" Spence

Hope your dog issues are resolved successfully. I'm inserting some error checking in the macro, and I need a minimum acceptable step width and depth. Using "Architectural standards for starship deckplans" by Christopher Thrash as a guide, minimum stair width should be 2.5' with 2' between railings. (Should railing thickness be fixed or variable?) Step tread depth is a little trickier, but my best guess (at least until I can get to the library and check their copy of "Architectural Graphic Standards") is that anything less than 6" would be a hazard. At the moment, all errors are fatal and end the macro. What do you think?

EDIT: Here is the revised code without the minimums but with railing support. I'm breaking it into sections for comments.

:MSC_Error0
msgbox ERROR! Invalid data entered.
The previously entered data
must be greater than zero.
goto MSC_Done
:MSC_Error1
msgbox ERROR! Invalid data entered.
The previously entered
data must be greater than
or equal to zero.
goto MSC_Done
:MSC_Error2
msgbox ERROR! No space between railings.
The width of the staircase is less
than the combined width of both hand
rails leaving no space between them.
goto MSC_Done
:MSC_Error3
msgbox ERROR! Radius of staircase too small.
The distance from the center of the
staircase to the center of the first
step is less than half of the width
of the step.

According to my architecture book from college standard stairs have a rise of 7" and a run of 11". So each step is 11" deep.

That is a 32.5ï¿½ slope. The minimum depth I suggested was a safety thing, based on the 6" a ladder is supposed to be away from a wall. Also, these are most likely modern standards, not medieval ones (unless your textbook is really old :wink: ), so I think some latitude is allowed. According to my measurements (which I made a few minutes ago), the concrete steps in my apartment building are 4' wide, 7" tall and 10" deep. I imagine that medieval structures would vary from the average even more than that.

Anyway, I made some more mods to the macro and got it to work. EDIT: Added option to control the direction of the staircase.

I separated out most of the user input section into a different macro because I plan on writing more stair building macros and these variables will be common to all of them. I also incorporated the minimum value checking I talked about.

gn nStartAtTop 0
askbox Direction of Staircase.
Does the staircase ascend in a
clockwise direction (ie. the
starting point was at the top
of the stairs)?
iferr MSC_EndAtTop
gn nStartAtTop 1
:MSC_EndAtTop

EDIT: Added the above section to control the direction of the shading. Other changes are below.

Hmmm...I just tried your most recent...and assuming I pasted it in correctly...I got nothing but black steps. It drew the steps pretty well, but I ended up with a 5' wide black arc after it was done.

Well, it works for me (as you can see above). Are you sure you have all the correct bitmap fills loaded? The ones required are:

"Basic Stone 2 Bitmap" for the step surface,

"solid 10 bitmap" for the depth shading and

"solid 20 bitmap" for the step shadows.

I've made some more changes recently to add a choice between clockwise and counterclockwise shading. You might notice that the "loose spiral" stairs (Sample1a.png and Sample1c.png) above have 21 steps. With 7" risers that's a total floor-to-floor height of 12'3" (assuming one step is at floor level). I'm thinking that the "tight spiral" has the same number of steps with an additional 360° turn hidden from view, which allows for stacked stairs with 6.5' headroom and a 16 square foot landing. I may turn these images into symbols.