A Macro I need which doesn't work
I have a macro which is great for mountain ranges and cliffs. I really need it for Dun Fingolfin, otherwise there is an absolute mountain (pun unintended) to do.
Can someone take a look at this please? It used to work, but not now. I did have a problem several years ago with it. And lo! Sir Remy Monsen came to my rescue on a white charger - Alas, Alack, I can't find the thread now.
It should produce a menu on the screen, which you either accept the defaults or enter your own.
MACRO MTNS
ECOFF
SELSAVE
LWIDTH 0;LSTYLE solid;FSTYLE solid
GOLAYER TMPMOUNTAINS
GOLAYER TMPPATH
GOLAYER MOUNTAINS
SHEET MOUNTAINS
ASKBOX DEFAULT VALUES
Step 5
Steep side length 5
Smooth side length 10
Color 0
Line width 0;
IFERR Choose
GO NoChoose
:Choose
GV RV 5
GV RV ^DEnter step value (5)
GV SL 5
GV SL ^DEnter steep side length (5)
GV SS 10
GV SS ^DEnter smooth side length (10)
GN CL 0
GN CL ^DEnter color: (0)
GV LW 0
GV LW ^DEnter line width: (0)
GO Selection
:NoChoose
GV RV 5
GV SL 5
GV SS 10
GN CL 0
Gv LW 0
:Selection
GE FL ^DSelect smooth line
IFERR MacroDone
COLOR CL
SELBY1
CHANGEL FL TMPMOUNTAINS
GV RANDOM 1234
LWIDTH LW
GLEN LV FL
GN LN LV/RV
GV PSTEP 100/LN
GV PRCV PSTEP
GP P0 % 0 FL
:DrawSide
GV LFC (1-(PRCV-50)*(PRCV-50)*0.8/2500)
IFN 100-PRCV-PSTEP/2 DrawBackBone
GP P1 % PRCV FL
GP P2 % PRCV+(PSTEP/100) FL
GBRNG BR P1 P2
GSIN RD1 RANDOM
GV RANDOM RANDOM+200
GSIN RD2 RANDOM
GV RANDOM RANDOM+200
GP P2 ref P1 <BR+90*(1+0.1*RD1),(SL*(LFC+0.1*RD2))
FPATH P1 P2;
GSIN RD1 RANDOM
GV RANDOM RANDOM+200
GSIN RD2 RANDOM
GV RANDOM RANDOM+200
GP P2 ref P1 <BR-90*(1+0.1*RD1),(SS*(LFC+0.1*RD2))
FPATH P1 P2;
GV PRCV PRCV+PSTEP
GO DrawSide
:DrawBackBone
GV PRCV PSTEP
:Loop
IFN 100-PRCV-PSTEP/2 EndLoop
GP P1 % PRCV FL
FPATH P0 P1;
GP P0 P1
GV PRCV PRCV+PSTEP
GO Loop
:EndLoop
FPATH P1 % 100 FL;
GOLAYER TMPMOUNTAINS
HIDE MOUNTAINS
ERA FL
SHOWA
GOLAYER MOUNTAINS
:MacroDone
SELREST
COLOR 0
ECON
ENDM
Can someone take a look at this please? It used to work, but not now. I did have a problem several years ago with it. And lo! Sir Remy Monsen came to my rescue on a white charger - Alas, Alack, I can't find the thread now.
It should produce a menu on the screen, which you either accept the defaults or enter your own.
MACRO MTNS
ECOFF
SELSAVE
LWIDTH 0;LSTYLE solid;FSTYLE solid
GOLAYER TMPMOUNTAINS
GOLAYER TMPPATH
GOLAYER MOUNTAINS
SHEET MOUNTAINS
ASKBOX DEFAULT VALUES
Step 5
Steep side length 5
Smooth side length 10
Color 0
Line width 0;
IFERR Choose
GO NoChoose
:Choose
GV RV 5
GV RV ^DEnter step value (5)
GV SL 5
GV SL ^DEnter steep side length (5)
GV SS 10
GV SS ^DEnter smooth side length (10)
GN CL 0
GN CL ^DEnter color: (0)
GV LW 0
GV LW ^DEnter line width: (0)
GO Selection
:NoChoose
GV RV 5
GV SL 5
GV SS 10
GN CL 0
Gv LW 0
:Selection
GE FL ^DSelect smooth line
IFERR MacroDone
COLOR CL
SELBY1
CHANGEL FL TMPMOUNTAINS
GV RANDOM 1234
LWIDTH LW
GLEN LV FL
GN LN LV/RV
GV PSTEP 100/LN
GV PRCV PSTEP
GP P0 % 0 FL
:DrawSide
GV LFC (1-(PRCV-50)*(PRCV-50)*0.8/2500)
IFN 100-PRCV-PSTEP/2 DrawBackBone
GP P1 % PRCV FL
GP P2 % PRCV+(PSTEP/100) FL
GBRNG BR P1 P2
GSIN RD1 RANDOM
GV RANDOM RANDOM+200
GSIN RD2 RANDOM
GV RANDOM RANDOM+200
GP P2 ref P1 <BR+90*(1+0.1*RD1),(SL*(LFC+0.1*RD2))
FPATH P1 P2;
GSIN RD1 RANDOM
GV RANDOM RANDOM+200
GSIN RD2 RANDOM
GV RANDOM RANDOM+200
GP P2 ref P1 <BR-90*(1+0.1*RD1),(SS*(LFC+0.1*RD2))
FPATH P1 P2;
GV PRCV PRCV+PSTEP
GO DrawSide
:DrawBackBone
GV PRCV PSTEP
:Loop
IFN 100-PRCV-PSTEP/2 EndLoop
GP P1 % PRCV FL
FPATH P0 P1;
GP P0 P1
GV PRCV PRCV+PSTEP
GO Loop
:EndLoop
FPATH P1 % 100 FL;
GOLAYER TMPMOUNTAINS
HIDE MOUNTAINS
ERA FL
SHOWA
GOLAYER MOUNTAINS
:MacroDone
SELREST
COLOR 0
ECON
ENDM
Comments
http://forum.profantasy.com/comments.php?DiscussionID=7867