An XP of the RIV macro

Hi !

I've just developped an XP version of my RIV macro posted there:

Macro tutorials

The XP version draws polygons and yields better junctions. You can control the width and color at the first and last points, with a linear gradient in between.

To use, extract the attached DLL in the CC3 main folder and type XRIV in the command line.

Hope it works for everybody... Still new at XP writing :)

JdR

Comments

  • edited August 2010
    Hi, while I like this macro I get a MSVCR100D.dll is missing error. Deleting it removes the error though.

    edit: I also get an "Error 00000007E loading XP module: XPRIV.dll." (didn't see it at first as it was behind other windows.)
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    edited August 2010
    The dll causes these errors for me on CC3 startup (and of course, the command doesn't work.):

    ---------------------------
    FCW32: fcw32.exe - Unable To Locate Component
    ---------------------------
    This application has failed to start because MSVCR100D.dll was not found. Re-installing the application may fix this problem.
    ---------------------------

    ---------------------------
    CC2
    ---------------------------
    Error 00000007E loading XP module:
    XPRIV.dll
    ---------------------------

    Based on an earlier discussion on the developer mailing list, I am wondering if this is because you have made a debug build instead of a release build when you compiled it. Only people with Visual Studio installed are going to have the debug dll's installed on their computer.
  • Sorry...

    Wasn't aware of this... As I said, I'm quite new to this...
    Attached is a Release version.
    Hope it works.
  • edited August 2010
    Sorry, still the same errors.

    edit: Not the same error, fixed. :)
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Thanks. Working nicely now. I built a nice crazy-colored river in the middle of my dungeon (I was to lazy to start a new map using an overland template :))

    Notice that a user will need to download the Visual C++ 2010 redistibutable from Microsoft to run this though. (Some users might have this installed already) [This package does not include the debug libraries, so your recompilation to the release version was also needed]
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    edited August 2010
    Posted By: LeonalSorry, still the same errors.
    No, you should get a problem with "MSVCR100.dll" now, instead of "MSVCR100D.dll" earlier. This is resolvable by downloading the run time linked in my post above. (While the first error was not, without installing Visual Studio itself))
  • Posted By: MonsenNotice that a user will need to download theVisual C++ 2010 redistibutablefrom Microsoft to run this though.
    Sorry about that... Any idea how an XP can be created without this drawback ?
  • Ah, my bad ^^;

    Just tried it on my Golarion (Pathfinder) map and it worked great. :)

    Well done!
  • Posted By: MonsenI built a nice crazy-colored river in the middle of my dungeon
    Posted By: LeonalJust tried it on my Golarion (Pathfinder) map and it worked great. :)
    Glad you could and did use it :)
    You probably have to use a blur effect to smoothen color transitions...
    I'm eager to have a look at those maps, though...
  • Sure, I'll see if I can upload something tomorrow as it's getting late. (UTC+9)

    In the meantime I'll have to ask how you get the width when making a branching point. I tried using LIST as written in your tutorial, but all I get is 0 for width. (about 2/3 towards the end on a river going from width 3 to 0).
    Thanks again. :)
  • Posted By: LeonalIn the meantime I'll have to ask how you get the width when making a branching point.
    Hmm... It's an info that disappears in the process... To get a perfect match of the parts, the XP does not draw lines with variable width but polygons so LIST does not give you the local width but the width of the polygon line which is indeed 0 :(.
    At each point you click to build the river, the width is computed linearly: curwidth=initial width + (final width-initial width)*Node number/(Total Node Number).
    Inside the poly, the width is again linearly computed.
    So in your case, I think it's ok to *evaluate* that at 2/3 the width would have decreased by 2/3 so it's near to 1.
    Another way is to zoom and use the DISTANCE command (of F8). Cumbersome, I know...

    You can still get the color with LIST though...
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Posted By: Joachim de RavenbelSorry about that... Any idea how an XP can be created without this drawback ?
    It depends on the compilation options (i.e. which libraries you link it against) of the project. I haven't used Visual Studio 2010 myself, but it should be able to target earlier runtimes (Although I read another report claiming it couldn't). Check the project properties, you should be able to control it from there. If you can manage to link it against an earlier version of msvcr.dll, people should have that library by default.
    I need to install VS 2010 and dig a little around to be able to give you any specifics though.
    It would be nice if you could compile against the VS 2008 runtimes, because those libraries are installed as part of Update 8 to CC3, so all CC3 users should have those.

    Also, targeting earlier runtimes limits what new features you can use (although an XP shouldn't really need the newest cutting edge features from MS)
  • edited December 2012
    Posted By: MonsenI need to install VS 2010 and dig a little around to be able to give you any specifics though.
    Don't trouble yourself with that for me, but thanks nonetheless.
    I got VS2008 and produced the attached DLL with it.

    Edited 2012/12/08
    The fractal depth of 10 caused a crash. This has been corrected.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Excellent. Now it works out of the box with CC3 (Assuming update 8 or later is installed). I ran it on my clean-install test machine witch contains no other software that might unintentionally provide dependencies.
  • YYYYYYEEEEEEEEEEESSSSSSSSSSSSSS!

    Ooops. Sorry for shouting...

    Thanks Monsen for taking the time to test and clarifying those important points.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    No problem. I'm just happy to be of assistance.

    Nice work, btw. It is good to see more people writing XP's. There is no better way to add more power to an already powerful application.
  • edited August 2010
    Tried with a bit different color ranges, and stronger or weaker fractalization. Added a blur of 1 and a glow (inside, color #78, strength 0, radius 4).

    Got to try various combinations before I find something I think fit, but this tool is a great help. Thanks :)

    edit: hope you don't mind me putting it in this thread. ^^
  • Posted By: Leonalhope you don't mind me putting it in this thread
    Not at all, that way it shows what the tool does. I like the way colors blend together.
    The river bottom rigth looks almost smooth... How did you get it ? High fractal strength or lots of points ?

    Thanks for showing !
  • :)
    I think I had a fractal depth of 2 and a strength of 10-20 for the bottom right one. It's also done twice from each lake so they meet in the middle, with a total of 10-15 points or so.
    The ones on the left are with the standard of 5/30 and upper right of 1/0.
Sign In or Register to comment.