Map facility to allow builders to add "Fog of War" (FOW) to their maps or make maps unavailable altogether without using placeable objects. Builders can also make slight code adjustments to add their own maps instead of using the exisiting map.
A replacement minimap.xml is available for those who want the original size mini-map. Simply replace the current minimap.xml file in the hak with this one.
UPDATE v1.02: Removed and tidied some of the debug code and feedback. Added a few checks for invalid areas. Corrected a few typos in the PDF manual.
Earlier v1.01c: Fixes a bug when used in "Passive" mapping mode. NB: This fix also requires a line of code to be added to the Area OnExit. (v1.01c: PDF Updated.) NB: Both the areamap.xml & minimap.xml files *were changed* inside the hak with this version compared to the original separate versions, so be sure to use the new hak instead of the old version.
BUILDER INFORMATION
=================
1) The update rate is currently set at 0.5 seconds, which is fast enough for most areas of medium to large in size. If, however, you intend to use FoW on even very small areas, then you will need to decrease the time between updates so there is no lag in the FoW being updated. Builders may want to experiment with this value to determine the best results to performance. Personally, I do NOT recommend using FoW maps on such small areas and advise using the "No FoW Waypoint" that disables it for an area in such cases.
2) Strict Interior/Exterior observing: The code also makes adjustments depending on whether the area is an exterior or interior and checks this with the GetIsAreaInterior function. If you have set this differently to the tiles expected, then results will be out.
3) If the FOWMAPINCOMBAT variable is left in its default state of 0, then mapping must be restarted by opening the map after combat. This includes "Passive Mode" mapping. To avoid this for Passive Mode, be sure to set FOWMAPINCOMBAT to 1, but recognise that this may affect performance if a combat is CPU intensive.
Active & Passive Mapping System (v1.02). This file contains:-
1) The demo module from which the scripts can be exported.
2) The hak which contains 11 images and 2 altered XML scripts.
3) A PDF manual with details about the utility and its functions.
I must have missed your comment, so I will respond to it now: Thanks for your kind words and vote. In case you were not aware, I keep a blog and I have mentioned map pins before. I have a system that I hope works reasonably well, but it will not be seen until the module is released. Read more about it in my blog. (I tried copying the links, but they won't post here when I try to post it.)
Many Thanks,
Lance.
"Awesome Lance! Should be in an official patch as its something that's been missing since NWN2 was released.
For an encore, could you remake map pins too - I really miss those!
Am implementing it in my current project right now.
Cly." _________________________ World of Althéa Blog: Link
Posted by alupinu at 2012-05-09 23:21:04 Voted 10.00 on 05/09/12
Well this will certainly come in handy, great job Lance. _________________________ Murder in Dunlop Fanglewood
My Class is Rogue ... "You look surprised to see me. If you'd been paying attention, you might still be alive."
I hope you manage to come up with some good uses with this code. I have made one or two minor alterations since its upload, but cannot recall what changes these were. However, the latest code will be available in my own module upon release. Check out the blog link.
Many thanks again!
Lance. _________________________ World of Althéa Blog: Link
Posted by PJ156 at 2011-07-17 07:10:54 Voted 10.00 on 07/17/11
Cant Fault this LB, Thank you for your time.
PJ
Posted by JasonNH at 2011-07-16 13:51:05 Voted 10.00 on 07/16/11
We waited a long time for this and it's a great asset to the community. Thanks Lance.
Posted by MasterChanger at 2011-07-16 13:00:07 Voted 10.00 on 07/16/11
Very well done, Lance. You're going in very interesting directions with you work. :)
Thanks for your vote for this and the hench patch. :)
I gave the PDF as a guide, but there are still a couple of points I would like to have added, but never got around to it. i.e. Reminding about adding the On Exit in the build notes and giving more info on the map availability function. However, it should give enough info to help builders. :)
Lance. _________________________ World of Althéa Blog: Link
Posted by M. Rieder at 2011-04-02 18:14:12 Voted 10.00 on 04/02/11
Again lance, outstanding work. May I also add that your PDF tutorial is excellent as well. _________________________ The Wizard's Apprentice - A single player adventure for spellcasters guaranteed to rumple your robes and warp your wand!
Posted by Clyordes at 2011-03-30 13:04:03 Voted 10.00 on 03/30/11
Awesome Lance! Should be in an official patch as its something that's been missing since NWN2 was released.
For an encore, could you remake map pins too - I really miss those!
Am implementing it in my current project right now.
Cly. _________________________ "Cor- a Beholder, Just think of the XP!"; Dave the Barbarian in the Demonweb pits, long ago.
'Search for the Temple of the Golden Spire' - An AD&D scenario for beginning characters converted to NWN2, here: Link
'Against the Cult of the Reptile God' - A classic AD&D adventure converted to NWN2: Link
The Lichway - An evening's dungeon delve from White Dwarf: Link
Posted by batmanis64 at 2011-03-14 16:16:02 Voted 10.00 on 02/05/11
Thanks Lance, I followed your directions and it works flawlessly now. You have better "customer support" than most software companies!
I downloaded this mod to take a look at the mapping system for you, but have to say that I am very impressed with this module already. :) Furthermore, you include many gaming mechanics/aspects that I enjoy and have included in my own. So, you may like my own module when it finally comes along. ;)
Anyway, from what I can see, you do have the latest script files v1.02 (but with an older XML file), but, in theory, the newer XML file will not affect you as you are running in "Passive" mode. However, the newer XML file will stop running an update every 0.25 seconds, which should help with overall performance. Basically, I moved the checking from a GUI update to a script update.
However, returning to your problem, even "Passive" mode will stop mapping *if* the player enters a combat and the FOWMAPINCOMBAT is set at 0, which it is by default. If this is set to zero, then a player must restart "Passive" mapping by opening the map at least once after combat. If, however, you set the FOWMAPINCOMBAT variable to 1, then mapping will continue to be checked, even during combat and beyond, thereby negating the need for the player to manually start any mapping again.
I will test this out myself in a short while, but all that should need doing is:-
A) Update your areamap.xml to the latest.
B) SetGlobalInt("FOWMAPINCOMBAT", 1); in your bak_moduleload script.
Do let me know if this solves your issue.
Lance. _________________________ World of Althéa Blog: Link
I just checked your areamap.xml (from Betrayal at Krondor) and you are using an older version, which suggests you may have a number of other older files/code in use.
You do need to download and use the latest version and replace the older xml files with the newer ones.
Let me know how you get along.
(I will also post this in your own Vault entry.)
Lance. _________________________ World of Althéa Blog: Link
The FoW Mapping System works with a few variables that make the mapping "active" or "passive" according to how you have it set up, especially with respect to combat as well.
First, I need to know what version you have set up? Be sure you have the latest version and note point 3 in the information above, in that the FOWMAPINCOMBAT variable must be set to 1 even if you are using Passive Mode mapping.
Also, make sure you have the OnExit script on all areas as well.
If these bits of advise don't fix your problem, then contact me directly on the email address provided in the manual that comes with the download and I will help you to make sure you have it set up correctly.
Is you rmod available for donload. I could download and check it directly for you.
Lance. _________________________ World of Althéa Blog: Link
Posted by batmanis64 at 2011-03-12 08:06:46 Voted 10.00 on 02/05/11
Hi Lance, here's a comment from someone playing my module with your fog of war system:
"The fog of war is nice but the mapping seems to take a vacation after the first fight unless you save and reload."
@Shaughn: Not having to rely on doors anymore! My own thoughts exactly.
Lance. _________________________ World of Althéa Blog: Link
Posted by shaughn at 2011-02-12 14:13:16 Voted 10.00 on 02/12/11
This is a great system and it offers a lot of flexibility between the passive/active, feat recognition, map unavailable and waypoints to clear the fog.
This will add a whole new dimension to exploring those dark dungeons. No longer will builders have to rely on a bunch of doors to block access to the full map.
Thank you for this Lance.
Posted by Dethia at 2011-02-12 08:34:22 Voted 10.00 on 02/12/11
Great work and thanks for adding the passive mapping function that allows mapping old-school style and non hardcore RP style ;P
Posted by MokahTGS at 2011-02-10 14:30:22 Voted 10.00 on 02/10/11
Ok, gotta say this is one of the coolest additions to NWN2 in a long time. I'm going to add this to Jabberwocky (and probably everything else I do), and really think it will add to the exploration of the OM areas and dungeons.
I LOVE the fact that you now have passive and active as a builder choice as well as scripting hooks mapping based on player feats. Cartography feats! Yay!
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone