ISXEQ2 now comes with a system for utilizing the lavishnav pathing system. This allows for users to create region files (maps) for zones and then utilize scripts for movement within those mapped zones.
I. Creating Zone Files
To create a zone file, you will run the script "EQ2NavCreator". This script is included with ISXEQ2. The syntax is as follows:
For most uses, you will want to have the mapper create the file for you automatically as you move around, and you'll want it to assume that you're always traveling along a path in which you did not have to climb, jump, etc over any obstacles. To do that, you would enter this in the console:
Once the script is running, you'll see a lot of options on the screen. The only important one really is "F2", which allows you to add a custom point (where you're standing) with a Name that you specify. So, if you want to create a spot called "Home", you would hit F2 and then enter "Home" in the dialog box.
After you have run all over the zone and have created all of the custom points you wish to create, then hit F11. That will save the file and exit the script. The file is kept in /Scripts/EQ2Navigator/zones. Any time you want to edit your file, just start the script up as you did before and it will automatically load it and you can start right where you left off. It will not overwrite or change anything, only add to it. (Note: A zone file can have as much data as you wish within it.)
There are a couple of advanced options that you should be aware of. By default, the script will load up and save to XML files. If you wish to load an LSO file (which is usually just the zone file with no extension, a binary form, in other words), then you would use "run EQ2NavCreator -auto -ptop -lso". If you want to SAVE to LSO form, then you would simply toggle the save mode by keying "ALT-F3". LSO files load up and work JUST as well as xml files in all cases, it's just that they are significantly smaller as they are compressed binary files.
Also, the script works with a region type of "Spheres" by default. I'm not going to get into the differences with region types, as that is rather advanced; however, you can change it by keying "CTRL-F3" while running the mapping script.
Finally, it is important to realize that creating a map file is, by definition, an advanced action with ISXEQ2/InnerSpace, and will take some trial and error and time for you to master. However, it really isn't as hard as you'd think. One thing that you will have to keep in mind is that collision detection and point/region connection is not perfect, so in more complex areas (ie, tight dungeons) it might require some manual editing of the map xml file.
II. Utilizing the Navigation System
Once you have a map file created, adding movement to your scripts is VERY simple. Here are a few sample scripts that illustrate how you would deal with various situations.
NOTE: I will eventually figure out a smart way for the navigation system to automatically determine if there are LSO or XML formats of map files..but, for now, you'll need to indicate it in the script. These examples are for XML map files; however, to use LSO you'd simply change the line that reads "Nav:UseLSO[FALSE]" to "Nav:UseLSO[TRUE]"
#1 - Moving to an X Y Z location
Note the 0.5 in this script. I have found that this is the perfect wait time for the navigation system. You can experiment with this value if you wish; however, I think you will find that "wait 1" or "waitframe" is too slow.
#2 - Moving to a named point given as an argument
#3 -- Moving within very tight quarters
Use one of the scripts above; however, before you issue the "MoveTo" method, put these lines:
You can tweak those values, of course. For information on what they do, see the top of EQ2Nav_Lib.iss
---
Advanced users can browse through "EQ2Nav_Lib.iss" and "EQ2NavMapper_Lib.iss" to see what else is possible; however, this gives everyone a good foundation for testing and using the EQ2Navigation system.
I. Creating Zone Files
To create a zone file, you will run the script "EQ2NavCreator". This script is included with ISXEQ2. The syntax is as follows:
Code:
Syntax:> run EQ2NavCreator [flags]
Flags: -auto (Points are added automatically as you move through space)
-PtoP (Point-to-Point Mode: The Mapper assumes that every point you create is connectable with the last point created.
Collision checks, etc. are then done for all other connections.
-nocollision (No collision checks at all are made when connecting points.)
-lso (Indicates to the script that it should load the current list from an LSO file. By default, it will use an
xml file if one exists. This flag will also set the script to save as LSO (which can be toggled.)
Code:
> run EQ2NavCreator -auto -PtoP
After you have run all over the zone and have created all of the custom points you wish to create, then hit F11. That will save the file and exit the script. The file is kept in /Scripts/EQ2Navigator/zones. Any time you want to edit your file, just start the script up as you did before and it will automatically load it and you can start right where you left off. It will not overwrite or change anything, only add to it. (Note: A zone file can have as much data as you wish within it.)
There are a couple of advanced options that you should be aware of. By default, the script will load up and save to XML files. If you wish to load an LSO file (which is usually just the zone file with no extension, a binary form, in other words), then you would use "run EQ2NavCreator -auto -ptop -lso". If you want to SAVE to LSO form, then you would simply toggle the save mode by keying "ALT-F3". LSO files load up and work JUST as well as xml files in all cases, it's just that they are significantly smaller as they are compressed binary files.
Also, the script works with a region type of "Spheres" by default. I'm not going to get into the differences with region types, as that is rather advanced; however, you can change it by keying "CTRL-F3" while running the mapping script.
Finally, it is important to realize that creating a map file is, by definition, an advanced action with ISXEQ2/InnerSpace, and will take some trial and error and time for you to master. However, it really isn't as hard as you'd think. One thing that you will have to keep in mind is that collision detection and point/region connection is not perfect, so in more complex areas (ie, tight dungeons) it might require some manual editing of the map xml file.
II. Utilizing the Navigation System
Once you have a map file created, adding movement to your scripts is VERY simple. Here are a few sample scripts that illustrate how you would deal with various situations.
NOTE: I will eventually figure out a smart way for the navigation system to automatically determine if there are LSO or XML formats of map files..but, for now, you'll need to indicate it in the script. These examples are for XML map files; however, to use LSO you'd simply change the line that reads "Nav:UseLSO[FALSE]" to "Nav:UseLSO[TRUE]"
#1 - Moving to an X Y Z location
Code:
#include ${LavishScript.HomeDirectory}/Scripts/EQ2Navigation/EQ2Nav_Lib.iss
function main(string Arg1)
{
declarevariable Nav EQ2Nav script
Nav:UseLSO[FALSE]
Nav:LoadMap
Nav:MoveToLoc[8.66,-6.48,14.74]
do
{
Nav:Pulse
wait 0.5
}
while ${ISXEQ2(exists)} && ${Nav.Moving}
}
#2 - Moving to a named point given as an argument
Code:
#include ${LavishScript.HomeDirectory}/Scripts/EQ2Navigation/EQ2Nav_Lib.iss
function main(string Arg1)
{
declarevariable Nav EQ2Nav script
Nav:UseLSO[FALSE]
Nav:LoadMap
Nav:MoveToRegion[${Arg1}]
do
{
Nav:Pulse
wait 0.5
}
while ${ISXEQ2(exists)} && ${Nav.Moving}
}
Use one of the scripts above; however, before you issue the "MoveTo" method, put these lines:
Code:
Nav.gPrecision:Set[1]
Nav.DestinationPrecision:Set[3]
Nav.SmartDestinationDetection:Set[FALSE]
---
Advanced users can browse through "EQ2Nav_Lib.iss" and "EQ2NavMapper_Lib.iss" to see what else is possible; however, this gives everyone a good foundation for testing and using the EQ2Navigation system.