;--------------------------------------------------------------------------------------;
;                                                                                      ;
;                               "PlugY, The Survival Kit"                              ;
;                                                                                      ;
;                                  by Yohann Nicolas                                   ;
;                                                                                      ;
;                                    version 3.02                                      ;
;                                                                                      ;
;--------------------------------------------------------------------------------------;

******** WARNING ********
- This plug-in is for LOD 1.10 ONLY.
- This plug-in is NOT for closed Battle.net.
- All files can change since previous version so don't use previous files.
- Dlls from field DllToLoad aren't loaded anymore when ActivePlugin=0.
- Don't forget to read the part named "COMMENTS OF THE CONFIGURATION FILE".


******** ALL FEATURES ********
- Infinity storage space in the stash (up to 4,294,967,296 personals pages!)
- Shared storage space in the stash (up to 4,294,967,296 shared pages too!)
- Local World Event for singleplayer and multiplayer off-realm !
- Unassign assigned skills points.
- Unassign assigned stats points.
- Change the number of Skills and Stats points winning when player level up.
- Launch any number of Diablo II game on the same computers.
- Grow up the stash to 10x10 squares.
- Change the save path directory.
- Change the version text print in the main menu.
- Localized in English, French, German.


v3.02 changes :
- Fixed : Change the number stats points winning when player level up.
- Fixed : When the shared stash is disabled, you can load a game with your character.
- Fixed : You can change parameters of World Event without activate skill per level up.


v3.01 changes :
- Change the number of Stats points winning when player level up.
- Fixed bugs which give extra points when skills points are unassigned.
- Add parameters for the WorldEvent in configuration file.
- By default, World Event only SHOW "X SOJ Sold" in hell difficulty.


v3.00 changes :
- Local World Event for singleplayer and multiplayer off-realm !
- Unassign assigned skills points.
- New background for the stash.
- Can change the filename of the shared savefile.
- Shared stash page number display are in red now.


v2.05 changes :
- major fix : bug which cause D2 don't start are finally removed.


v2.04 changes :
- Unassign stats points, skills on level up are disabled when you connect to realm (like stash).
- Open a error message box instead of crash when PlugY.dll isn't find by D2.
- Fix some bugs in installation method.
- Fix bug display of buttons.
- Fix win95/98/Me saving.


v2.03b changes :
- Show PlugY version only in main screen.

v2.03 changes :
- Major fix : Correct and secure the saving procedure.
- No more crash of the host game when a character is unable to enter the game.
- Unassign stats points button greyed when base stat is above 255 fixed. 
- Change version printing on main screen (change color & PlugY version in right corner)
- Character without PlugY can join game host with PlugY enabled.


v2.02 changes :
- PlugY don't use anymore D2win.dll to launch PlugY.
- PlugY include a patcher/unpatcher for edit D2gfx.dll to launch PlugY.
- PlugY can be launch by D2Mod system of SVR.
- The infinity storage sytem is automatically disable on a realm game.
- Fix index button bugs.


v2.01 changes :
- Fix skill per level up bug
- Fix bug display of text in the main menu


v2.00 changes :
- Localized in German.
- Change the number of Skills points winning when player level up.
- Launch any number of Diablo II game on the same computers.
- You can unassign Stats points.
- Add 2 buttons for jump to index page.
- Print the current stash instead of Gold max. (Gold max value is a current Gold field popup)
- Complety re-done the configuration file.
- Configuration file can be put in mpq (like others PlugY images files)
- Little increasing compatibility with mods.
- Remove the TCP/IP crash.
- Remove page number bug when you switch betwenn character.
- Remove set item's bug display.
- Remove the bug of carry1
- Add others little improvement... :)


v1.03 changes :
- Add French readme and ini files.
- Remove bugs in D2Classic game (there no multipage, it's not a bug)
- Remove the bug when you loading character from previous version.
 (like ShadowMaster character or 1.09 or D2Classic character)
- Remove the bug line in the text when you click on delete character.
* must read : You can start any mods without moving SAVES files
     (you need to move dll files with classic script).


v1.02 changes :
- Re-change name files due to an IE bug with colon in zip file.
- Be able to change the version text print in the main menu (see ini file).


v1.01 changes : 
- Localized for french version (wait for an french readme.txt) 
- Change filename from "PlugY, The Survival Kit.ini" to "PlugY,The_Survival_Kit". 
- Add example for installation in the readme. 
- Dectection of bad installation at starting plugY. 
- Remove from the ini default file the [GENERAL]PlugYDirectory=PlugY 
(you can add it if you want but need to know what are you doing...) 
- Released in .zip file instead of .rar 


v1.00 features (can all be easily enabled or disabled) :
- You can change the save path directory.
- You can start any mods without moving saves files.
- You can grow the stash to 10x10 squares.
- Up to 4,294,967,296 pages in the stash (e.g. infinity storage space) !
  note : for LOD1.10 character only.
- Any these pages can be shared by all of your characters!


******** CONTENTS ********
10 files, 1 folder :
- PlugY_The_Survival_Kit_-_Readme.txt
- PlugY_The_Survival_Kit_-_LisezMoi.txt
- PlugY_The_Survival_Kit_-_Liesmich.txt
- PlugY_Install.bat
- PlugY_Uninstall.bat
- PlugY.ini
- PlugY.dll
- PlugYStashBtns.dc6
- PlugYTradeStash.dc6
- PlugYUnassignStatsBtns.dc6
- PlugYUnassignSkillsBtns.dc6


******** INSTALLATION ********
Speed installation :
- Unzip all files in Diablo II folder.
- Run PlugY_Install.bat (which patch D2gfx.dll for launch PlugY)

Classic installation :
- Unzip this kit to a temporary folder.
- Copy PlugY.dll and PlugY_Install.bat in your D2 installation directory.
- Copy the "PlugY" directory in your D2 installation directory or add it to your .mpq file (warning you must have PlugY*.dc6 not data...)
- Run PlugY_Install.bat (which patch D2gfx.dll for launch PlugY)
- Copy and configure PlugY.ini in the target mod directory.
- You can remove PlugY_Install.bat if you want.
- If you don't use BigStash, you can remove the "PlugYTradeStash.dc6" file.
- If you don't use Multipage Stash, you can remove "PlugYStashBtns.dc6" file.
- If you don't use StatsUnassignment, you can remove "PlugYUnassignStatsBtns.dc6" file.
- If you don't use SkillsUnassignment, you can remove "PlugYUnassignSkillsBtns.dc6" file.
- If PlugY directory is now empty, you can remove it.

Example :
You have installed Lord of Destruction here :  C:GamesDiablo II
And the mod to add this plug-in here : D:D2ModMyMod
So the classic configuration is :
   C:GamesDiablo IIPlugY.dll
   C:GamesDiablo IIPlugYStashBtns.dc6
   C:GamesDiablo IIPlugYTradeStash.dc6
   C:GamesDiablo IIPlugYUnassignStatsBtns.dc6
   C:GamesDiablo IIPlugYUnassignSkillsBtns.dc6
   D:D2ModMyModPlugY.ini


Uninstallation :
- Unzip PlugY_Uninstall.bat in D2 directory.
- Run PlugY_Uninstall.bat
- Remove all PlugY files.


******** CONFIGURATION ********

Configuration of this kit for a specified mod :
- Copy the PlugY.ini in the target mod directory (the directory where you start it, see it in the properties of the shortcut).
- In most cases, you will change the save directory in the ini file.
- Add all extra dll of the mod in PlugY.ini if any.
- Finally, activate any specific features you want such as MultiPageStash, SharedStash, etc.
- Now, you can start the target mod in the classic method (with or without "-direct -txt").

D2Mod configuration :
You can use the D2Mod (v1.02 and following) sytem for launch PlugY.
- Run PlugY_Uninstall.bat before for surely uninstall normal launch.
- Add the line "PlugY=PlugY.dll" in [D2MOD] section of D2Mod.ini.


Notes:
- If you put "PlugY.ini" file (or deactivate the PlugY by PlugY.ini) in the D2 install directory, you won't be able to play on Battle.net.
- Items in the Cube is always save on the player, if you want shared these items you must remove it from the Cube.

Warning :
- Don't edit the configuration file after you have started to play with a mod.
- In multiplayer game, verify that the server have the same configuration.
- Remember : PlugY don't work on realm.


If you have a "Generic bad file" error when you want load a new character.
This can appear when you have bad item in the shared stash file.
A possible cause is to use same save folder for different mod, in this case just change the save folder in PlugY.ini.




******** COMMENTS OF THE CONFIGURATION FILE ********

All Default value mean, if you remove the line, PlugY use this value.
The values in PlugY.ini (include in the zip) is an example of configuration, not default value.

[GENERAL]
Enabled or disabled all selected features.
Dlls from field "DllToLoad" aren't loaded anymore when ActivePlugin=0.
In following default values and between {} some examples values with descriptions :
- ActivePlugin=1	{0:Don't load any features; 1:Plugin enabled}

Create a log file "PlugY.log" in the current directory.
In following default values and between {} some examples values with descriptions :
- ActiveLogFile=0 	{0:No information is written while playing; 1:Always enabled)

Load dll of a specific mod for used PlugY in same time.
Separate each dll file name by the character pipe (|)
In following default values and between {} some examples values with descriptions :
- DllToLoad=		{(empty): load nothing; D2extra.dll|myDll.dll: Load both D2extra.dll and myDll.dll}


[SAVEPATH]
This is where all of your characters and the shared stash is saved.
You can use absolute or relative paths.
In following default values and between {} some examples values with descriptions :
- ActiveSavePathChange=0	{0:Disabled; 1:Enabled, you must set "SavePath"}
- SavePath=Save			{SaveMyMod  or D:Save Gamesdiablo IICurrent Mod}


[RUNLODS]
You can run any number of Diablo II game on one computer.
Per example, modder can test multiplayer game for their mod.
Warning : Don't start games with the same savepath when you use the Shared Stash.
		  Don't use the same character in same time.
In following default values and between {} some examples values with descriptions :
- ActiveLaunchAnyNumberOfLOD=0	{0:Disabled; 1:Enabled}


[MAIN SCREEN]
Change the version text in the main menu (first menu)(instead of "v 1.10")
Color is an integer which refer to defined D2 colors.
In following default values and between {} some examples values with descriptions :
- ActiveVersionTextChange=0 {0:Disabled; 1:Enabled}
- VersionText=v 1.10        {Mod Name:Text where maximum length is around 23 characters}
- ColorOfVersionText=0      {0:white; 1:red; 4:gold; etc.}
- ActivePrintPlugYVersion=1 {0:Disabled; 1:Enabled)
- ColorOfPlugYVersion=4     {0:white; 1:red; 4:gold; etc.}


[STASH]
Use this for shared and keep all of your items. :)
There are 2 multipage stashes :
- one Personal only seen by the Player;
- one Shared between your Players in this mod.
Use the Toggle Button to switch between stash.
Use arrow buttons on bottom the stash for switch between pages.
The multipage stashes are inactive for Diablo II Classic Character and on realm.
You can change the name of the shared filename.
In following default values and between {} some examples values with descriptions :
- ActiveMultiPageStash=0	{0:Disabled; 1:Enabled}
- NbPagesPerIndex=10		{10, Index page is :1,10,20,30,...,max}
- MaxPersonnalPages=0 		{0:Infinite number of personnal pages; 1000: Maximum of 1000 shared pages}
- ActiveSharedStash=0		{0:Disabled; 1:Enabled if ActiveMultiPageStash=1}
- MaxSharedPages=0 			{0:Infinite number of shared pages; 5000: Maximum of 5000 shared pages}
- SharedStashFilename=SharedStashSave	{xxx: The filename will be "_LOD_xxx.sss"}


Resize the stash to 10x10 squares.
Use PlugYTradeStash.dc6 to change the background image.
In following default values and between {} some examples values with descriptions :
- ActiveBigStash=0			{0:Default stash size is use; 1: Enabled, Stash use 10x10 squared}


[STATS POINTS]
Use for repair a bad stat point assignment.
Per exemple 30 points in energy for a barbarian!
On the character stat page, press selected key and click on minus button.
Select a key by setting KeyUsed (should choose 17 or 18).
In following default values and between {} some examples values with descriptions :
- ActiveStatsUnassignment=0		{0:Disabled 1:Enabled, press selected key when clicking}
- KeyUsed=18					{17:Control key selected; 18:Alt key selected}


Use the shift buton for assign/unassign all possibles points in one click.
You can define a limit value for points assign/unassign with shift.
In following default values and between {} some examples values with descriptions :
- ActiveShiftCkickLimit=0		{0:Disabled; 1:Enabled}
- LimitValueToShiftClick=5		(10:Assign or unassign stats points, 10 by 10}


[STAT ON LEVEL UP]
Change the number of Stats Points you receive when your character level up.
In following default values and between {} some examples values with descriptions :
- ActiveStatPerLevelUp=0		{0:Disabled; 1:Enabled}
- StatPerLevelUp=11				{0:no points win;  11:eleven points win}


[SKILLS POINTS]
Use for repair a bad skill point assignment.
Click on the button of skill page for unassign all assigned skills points.
note : It verify the real cost of each skill (can be greater than 1 in mod)
In following default values and between {} some examples values with descriptions :
- ActiveSkillsUnassignment=0	{0:Disabled; 1:Enabled}


[SKILL ON LEVEL UP]
Change the number of Skills Points you receive when your character level up.
In following default values and between {} some examples values with descriptions :
- ActiveSkillPerLevelUp=0		{0:Disabled; 1:Enabled}
- SkillPerLevelUp=1				{0:no point win;  3:tree points win)


[WORLD EVENT]
Active the World Event in local.
World Event only trigger in hell difficulty and only one time by game.
If the WE trigger when you aren't in game, you loose it.
From when you launch D2, the next WE will trigger between few seconds to 41:40 hours after.
Keep in mind before edit it, World Event should be triggered rarely.
In following default values and between {} some examples values with descriptions :
- ActiveWorldEvent=0			{0:Disabled; 1:Enabled}
- ShowCounterInAllDifficulty=0	{0:Show it "SOJ SOld" message only in Hell; 1:Show it all difficulties}
- OwnSOJSoldChargeFor=100		{100:When you sold a SOJ the SOJ counter are incremented by 100}
- InititalSOJSoldMin=200		{200:The SOJ counter is set at least at 20 when you launch D2}
- InititalSOJSoldMax=3000		{3000:The SOJ counter is set at most at 300 when you launch D2}
- TriggerAtEachSOJSoldMin=75	{75:Need to have at least at 75 SOJ sold between 2 World Event}
- TriggerAtEachSOJSoldMax=125	{125:Need to have at most at 125 SOJ sold between 2 World Event}
- ActiveAutoSell=1				{0:Disabled; 1:SOJ counter are automatically incremented by 1}
- TimeBeforeAutoSellMin=0		{50:Need at least at 50 seconds between 2 auto-increments}
- TimeBeforeAutoSellMin=1200	{1200:Need at most at 20 minutes (1200 seconds) between 2 auto-increments}


More features later... :)


If you have any suggestions, bugs, or see any conflicts with any mods, you can send me an email to This email address is being protected from spambots. You need JavaScript enabled to view it. with "PlugY" in the subject.

PS : Sorry for english fault ;)

******** THANKS TO ********
- Blizzard for making Diablo2 and Lord of Destruction.
- Kingpin, Afj666, Joel, SVR for their great help.
- ChaosEnergy for testing and translation in German.
- K&V for Beta testing.
- Char & Darque for corrected my poor english.
- All members of ProzenKeep chat and forums for their information and feedback.
- PhrozenKeep team for all stuff they shared for us (including mine ;)
- Dark Spot in the Corner for his stash background image.

                                         ~~~~~~~~~~~~