 _    _                         _       _   
| |  | |                       (_)    _| |_ 
| |  | | __ _ _   _ ____   ___  _ _ _|_   _|__  
| |/\| |/ _' | | | |  _ \ / _ \| | '_ \| |/ __|
|      | (_) | |_| | (_) | (_) | | | | | |__  |
 \_/\_/ \__,_|\__, |  __/ \___/|_|_| |_|_|___/  
               __/ | |                      
              |___/|_|                      
 _____  _____ __  __           _ 
|  __ \/ __  |  \/  |         | |
| |  | \/ / /| \  / | ___   __| |
| |  | | / / | |\/| |/ _ \ / _  |
| |__| |/ /__| |  | | (_) | (_) |
|_____//_____|_|  |_|\___/ \____|
 ____  _             _       
|  _ \| |           (_)      
| (_) | |_   _  __ _ _ _ __  
|  __/| | | | |/ _` | | `_ \ 
| |   | | |_| | (_) | | | | |
|_|   |_|\__,_|\__, |_|_| |_|
                __/ |        
               |___/         

Version 1.31 - 28/4/5

This plugin is made for the D2Mod system, so you will need to have it installed in your Diablo II directory, or in your mod folder.

What does this plugin do?	

v1.3 - New waypt/waypointing options: Hidden, ExitOnly, OnlyFrom, OnlyTo, Key Items, Item reqs. waypoints can be set for difficulties and setup differently for each difficulty. New Icons and SOUNDS! I've gotten the character to say stuff like "I need a Key" or "Impossible" or "I can't use this yet". Just so your player doesn't get too frustrated that he can't use the waypoint.

v1.2 - One-way waypointing, you can enable a waypoint that goes to any level in the game, but with no way of coming back. If you choose a level with a waypoint for one-way, that waypoint cannot be entered (hence the term one-way).

v1.1 - Anti-Rush Measures, you can have Level or Stat Reqs to prevent people from saving the waypoints, or prevent them from using altogether. Cost functions for entrance and exit to make players bring money on hand to pay for waypointing.

v1.0 - Enables up to 112 Waypoints. There are 2 modes of separation for waypoints now, the original 5 tabs at the top of the menu and 2 arrow buttons at the bottom.

>>-<_D2Mod Installation_>-<<
1) Insert this line into the [D2Mod] section of D2Mod.ini:

	Waypoints=Waypoints.dll

if you do not have this line already, add it as well

	NewTxt=NewTxt.dll

2) Put Waypoints.dll in the same directory as the D2Mod ini file (either Diablo II directory or mod directory). Likewise if you do not have NewTxt.dll, place it in the same directory.

3) Put the Waypoints.txt in your excel folder.

4) Put the waygateicons.dc6 in the \data\global\ui\menu folder.

>>-<_Usage_>-<<

There are 5 files in this plugin.
Waypoints.dll
Readme-Waypoints1.3.txt
Waypoints.txt
NewTxt.dll
waygateicons.dc6

The concept is simple. There are 5 Pages and 5 Tabs. While they are initially meant to be 1 page/5 tabs for an act, you can set it to 1 tab/5 pages for an act. Or you can disable all quest checks and arrange them in any way you like.

Left/Right arrows cycle though 'Pages', the Tab buttons select 'Tabs', both of which you can set in the Waypoints.txt file.

The tabs and positions are completely configurable, so you can put your Waypoints in any row on any tab without any adverse effects.

>>-- Waypoints.txt --<<

There are now 85(!!!) Columns in Waypoints.txt. All the Keys, Fees and Limits have difficulty settings so there are 3 times the columns for that

*LevelName        - Just a column for you to name the level, not loaded
*Act              - This is not loaded either, so you can put the act# for reference
LevelID           - The LevelID of this level
WayptID           - The Waypoint ID. Must match Levels.txt
Page              - Page number : 1-5
Tab               - Tab number : 1-5
Row               - Row number : 1-9
Header            - String Key from the files to display at the top of the page. (new stuff see below)

-- Difficulty settings --
Normal            -\ 
Nightmare         - > Difficulty selectors, you can enable or disable Waypts in the difficulties
Hell              -/ 

-- Waypoint Variables --
Hidden            - If Waypt is not active, it will not show up in the Menu.
ReqDisable        - if you do not meet any of the reqs, and this is set=1, Waypt cannot be used.
OneWay            - ExitOnly(-1), Normal(0) and EntranceOnly(1).

-- Waypoint Movement Restrictions --
OnlyFrom1-5       - accepted values (WayptID or -1/255)
If no OnlyFrom Waypts are set, -1 or 255 should be in the first column. Without it, WayptID 0 (Rogue Encampment) will be the only one that can come here.

OnlyTo1-5         - accepted values (WayptID or -1/255)
If no OnlyTo Waypts are set, -1 or 255 should be in the first column, or you can only go to the Rogue Encampment :P

-- KeyItems --
KeyItem           - itemcode
KeyItemEquipped   - The KeyItem must be equipped or put in the belt
KeyItemCarried    - The KeyItem must be in the inventory (set both if you just want the player to have the item on him)
AlwaysNeedKeyItem - If this is 1, if the player does not have the KeyItem, this waypt will not be active. It will check everytime
DestroyKeyItem    - It will destroy the KeyItem once you come to or leave from this waypt. Note that scrolls are not taken from tomes.

-- Usage fees --
EntranceFee       - Amount of gold required to go to this waypoint
ExitFee           - Amount of gold required to use this waypoint (to exit this area)

-- Usage Limits --
PenaltyStat/Val   - If it is gold/goldstash, they will use gold in hand, and will limit you based on whether you have enough money to use the portal. All other stats will reduce to a min of 1 or a max of maxstat (in case some people put a -ve value to increase a stat instead of decreasing)

LevelReq          - Level required to activate the waypoint
Stat1-Stat3       - Stats to check for requirements to activate the waypoint
Val1-Val3         - Values to check

ItemReq           - itemcode
KeyItemEquipped   - The ReqyItem must be equipped or put in the belt
KeyItemCarried    - The ReqItem must be in the inventory (set both if you just want the player to have the item on him)
DestroyKeyItem    - It will destroy the ReqItem once you come to or leave from this waypt. Note that scrolls are not taken from tomes.

*eol        - the usual. Put a 0.

>>-<_Headers_>-<< **v1.3**
OnlyTo Waypts can have specific headers (since you can only go to a max of 5 locations - inter act is possible) so you can give an OnlyTo Waypt your own specific header.
The generic header for a page/tab is chosen from the first non-blank Header entry that does not belong to an OnlyTo Waypt.
If the cell is blank, instead of showing "An Evil Force", it will simply not show any header.


>>-<_Explanation of the waypoint types_>-<< **v1.3**

These are in order of priority. ie Keys will always take priority (with the sole exception of OnlyTo, which will only allow you to go to your specified places)

KeyItems - You can remotely activate waypoints using KeyItems. This means that if you set that the OneWay waypt to the Moo Moo Farm requires a Key (say Wirt's Leg) the waypoint will be locked until you have Wirt's Leg on you. Locked waypts cannot be activated, but once you show the Key to any waypt, the locked waypt will be activated. KeyItems can also be used as an override to get to waypts that are OnlyFrom or OneWay(ExitOnly)

OneWay - an improvement from v1.2, now you can have it one-way in either direction, so you could warp out from the River of Flame, but not in. So you would need to walk through the River of Flame each time. This would be an example of ExitOnly (OneWay=-1). EntranceOnly has been merged here as well (OneWay=1) and will still allow you to go to the Moo Moo Farm like v1.2

OnlyFrom - OnlyFrom will determine the waypts that can access a certain waypt. Say Catacombs Level 2 is OnlyFrom Cold Plains and Stony Field. Thus you cannot go to the Catacombs from any other waypoint except these two.

OnlyTo - this is a special configuration in itself. Because OnlyTo waypts only allow you to go to certain places, it removes all options in the waypoint menu and places only your specified waypoints there.

Hidden - if a waypt is not active (or disabled because of any of the above special configurations) this waypt will not show up in the menu if you choose to Hide it.


>>-<_Explanation of Usage Fees and Limits_>-<<

Usage Fees are very straightforward. To go from Waypt A to Waypt B, the toll that the character must have **ON HAND** =
	Exit Fee of Waypt A + the Entrance Fee of Waypt B + Gold Penalty (if any)
If the character does not have enough money to pay the toll, the warp will not have any effect. You could set different prices for different places. Or perhaps going back to town costs money, or vice versa.

Limits may seem a little tricky at first, but here's the breakdown:

ItemReqs (v1.3) work like any other requirement, it is either fulfilled or not fulfilled.

If you have no Reqs set (Level or Stat), or if the character clears all Reqs, then:
    If Waypt is not activated yet, activate it
    If Waypt is activated, waypoint menu opens up

If the character cannot clear any of the reqs, then:
    Waypt will NOT be activated, but depending on your options the player may still use it.

1) If DisableWP = 1, Waypt will not display the menu.

2) If DisableWP = 0 (or blank), Player can use the portal. If PenaltyStat is 'gold' or 'goldstash', the PenaltyVal will be added to the Entrance and Exit fees. Otherwise, they will be deducted upon warping. So as to prevent overuse and death the minimum value of any stat that is reduced is 1. So even if you charge the player 100 str to use the waypt, he will never go to 0 str. 1 is the minimum.

>>-<_Special Configurations_>-<<

< Keys > **v1.3**
Using Keys can make a previously hidden waypoint appear (Use Hidden and KeyItem) and you could give them access to a whole new level that was just never there before :) Use your imagination, Moo Moo Farm is boring.

< OnlyFrom/OnlyTo > **v1.3**
You can have a group of waypoints that only work amongst themselves. Just restrict all other motion with this.

< OneWay > **v1.3**
I mentioned a little earlier an example of the River Of Flame. That is one way to do it, I'm sure there are other situations where you want the player to have to go through. It would be anti rushing or it could be because there are some things that he needs to do there, or some monsters to kill.

< Restrictions/Penalties for rushing >
To prevent characters from skipping through the game by having people open portals for them at all the waypts, you can put LevelReqs or StatReqs. This way even though they can use the portal, they can't activate it, and hence can't come back to it again.

< Fancy Tolls >
If you like the idea of it costing gold to travel around in warp style, then just put values in the Entrance and Exit Fees. Options include:
- costs for using Waypts in the wilderness (Exit Fee). So it costs to get out of sticky situations
- costs for entering towns (Entrance Fee). So when you travel back to town or to another town, you pay for it.
- costs for using a Waypt in a Special Area, like the Moo Moo Farm. Charge them for having bovine fun.

>>-<_Extra INI Customisation_>-<<

1) Swapping Arrow and Tab Usage
In v1.1, you can choose to select acts by either the tabs or the arrows. The default is to select the act by the arrows, but to use the tabs instead, put this line in a [Waypoints] section in your D2Mod.ini:

	SwapArrowsAndTabs = 1

This will allow you to select the acts via the tabs (like in Normal D2/LoD) and switch pages via the arrow buttons.

**Remember that the Pages column in the txt file refers to the Arrows and the Tabs column refers to the Tabs**

2) Custom Quests, or quest check disabling
If you want to disable the quest checks, you should add a [Waypoints] section in your D2Mod.ini and have the following entries there.
	Act2QuestID = -1
	Act3QuestID = -1
	Act4QuestID = -1
	Act5QuestID = -1
If you have custom quests ^_^ and new QuestIDs that you would like to check to advance to the next Act, replace the -1s with the corresponding QuestIDs.

>>-<_Extra Notes_>-<<

I have NO experience with adding waypoints to a map, so I guess you'll have to query in the Map Editing Forum. However, as testing purposes, I did enable a few new entry points. Blood Moor, Den of Evil, Tamoe Highland. These places did not have a waypoint, but you can warp there. It's one-way though, since there is no waypoint to come back. Still, it is very useful if you want a quick entry to a place but don't intend to let the player come back with the same ease. (The Moo Moo Farm??? It works too, btw)

v1.3 - I will stress this again, I HAVE NO EXPERIENCE WITH ADDING WAYPOINTS TO A MAP. If you're wondering why you don't have a waypoint in Catacombs Level 4 or in the Moo Moo Farm, you're asking the wrong guy. There are tons of people in the Map Editing Forum who have more experience in this area. I don't know how or why it doesn't show up, if you ask me, I'd tell you from the Object point of view that the map simply doesn't have the object loaded. Point. That's all I can guess. For the non random maps, you can easily put a waypt in from what I know, but beyond that, you'd best check with someone else.

>>-<_To Do_>-<<

Now really nothing much left to do. Just let me know if you think there are other things that are reasonable :p I think there're more options than most people would actually need. Joel assures me that everything there is usable so if you want a reference of a working, fully used Waypoints plugin, I'll point you to Shadow Empires.

-------------

Thanks for trying this plug-in out. If there are any bugs or queries, PM me in the Keep.

Cheers,
RicFaith

Acknowledgements:
Myhrginoc - Thanks for all the offsets and information. Saves me a lot of time digging aimlessly (which I did for a bit even though I had the offsets hahaha)
Kingpin - Hey man, you're acknowledged in every plugin thus far! :) Yea you're a wealth of information for me. Thanks.
Joel - for diligently testing v1.3. There's a lot to test and I really appreciate your time :D