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

Version 1.2 - 4/5/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?	

The primary function is a Killcounter that allows you to track the number of kills for your character. This plugin will guide you through the necessary steps you will need to do to create a killcounter property that you can add to items.

This plugin can also give you special bonuses whenever you kill certain monsters, say when you kill Diablo or even a quillrat. It can also allow you to have stat bonuses when your killcounter passes a certain amount.

In v1.2, you can display stuff to screen to announce the killing of your XXXXXth monster and other stuff :)

In v1.1, you can also drop items via a TreasureClass from TreasureClassEX.

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

	KillCounter=KillCounter.dll

if you don't already have the NewTxt line, add it in:

	NewTxt=NewTxt.dll

2) Put KillCounter.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, please put it in the same directory.

3) Put KillCounter.txt in your excel folder.

4) Follow the ItemStatCost, Properties (and statsinterface) setup instructions below.

5) Read the KCtxtUsage.txt file. The usage of this plugin gets bigger each time, so check there to see if anything has changed (v1.2 has quite a few changes)

>>-<_Usage_>-<<

There are 8 files in this plugin.
KillCounter.dll
Readme-KillCounter1.1.txt
KillCounter.txt
KCtxtUsage.txt
ItemStatCost-KC.txt
Properties-KC.txt
statsinterface-KC.txt
NewTxt.dll

The ItemStatCost, Properties and statsinterface .txts contain the lines that you will need to insert into the two respective files. Note that you SHOULD NOT OVERWRITE your existing files. Instead, open the files, copy the lines, and paste them into your own files.

I've added some instructions for installing for PlugY 5. If you're installing a normal installation follow installation -A-. If you're installing for PlugY 5, follow installation -B-. Since they're rather similar, I'll denote each section with an -A- or -B- to tell you which steps to do.

Here are the step by step instructions:

---

1) ItemStatCost.txt and ItemStatCost-KC.txt

-A- & -B-
Open both files, copy the line 'killcounter' and place it in ItemStatCost in any of the unusedXXX lines. eg. you can overwrite unused190 if you prefer. Don't forget to change the ID to match the row you are overwriting.

-A-
Copy the other two lines ('dummy' and 'display_kills') and paste them at the bottom of ItemStatCost. Change their ID numbers so that they follow the sequence.

-B-
You don't need the other two lines for PlugY 5.

2) Properties.txt and Properties-KC.txt

-A-
Open both files and copy the line 'showkills' from Properties-KC.txt and paste it at the bottom of Properties.txt

-B-
You don't need this for PlugY 5 either.

3) statsinterface.txt and statsinterface-KC.txt

-A-
Well if you don't have PlugY 5, you don't have to do this step

-B-
Copy the line to the bottom of your statsinterface.txt. Follow Yohann's instructions for setting it up as you like. I've put it at the top of Page 3 so it won't conflict with any of the defaults, but please feel free to change as you wish.

4) Strings in the .tbl file

-A- & -B-
Add the following string to string.tbl or any .tbl file of your choice.

Index : sdkills
Text : "Kills" (without the "")

This will make the text show up as '### Kills' on your item.

5) Setting up the KillCounter.txt file

-A- & -B-
More stuff have been added to KCtxtUsage.txt. A few new changes, including the item dropping and stuff. Do read the file.

---

Up to here, your kill counter will work as it should. However, you cannot tell that it is working unless you make it display somewhere.

5) Setting up the display

-A- & -B- (if you want it to appear on an item)
You can make the display stat appear on items by adding the property 'showkills' (without the '') with the param 1.

So to make it appear via cube recipe, magic prefix/suffix, or uniqueitems, you would have:
mod 1 = showkills
mod 1 param = 1

You can also make it show up on a Skill by using Skilldesc.txt. This is useful if you have a skill that will deal damage based on your number of kills etc.
Select where you want to display the Kills, and use the following
descline = 7
descstra = sdkills
desccalca = stat('killcounter'.accr)
This will display '### kills' in the skill description

-B-
Lastly, if you're using PlugY, it has the option to display any stat you like on the extra character sheets. You'll have set it up already with the previous steps.

---

That's it!

>>-<_Version History_>-<<

v1.2	There's more stuff that could have gotten in, but I was pressed for time, so I'll release what works already. Major changes include:
- Bad news first. I removed the SoundName column. Some strange bug crashes everything if it's there, filled or not. So until that is figured out, no sounds for us.
- More columns to specify stuff. 1 row can handle all the bonuses for Normal to Hell difficulties
- More functionality to existing columns. Class and KilledPlayer columns allow more than 1 class to be entered. Putting "ama,sor,dru" in Class would enable that row for these classes all at once.
- Print customisable strings to screen. And I mean customisable :D

v1.1	I've renamed quite a few of the columns to make them sound more sensical. All columns related to monsters, player classes and stats accept names, so it makes it much easier to understand everything at a glance. We've got a few new SubFuncs (Undead and Demon) that check if the monster is an Undead or Demon and give you the bonus. Would be good for a Holy class. There's also TC enabled dropping, simple and really effective.

v1.0	It's really very different now... Now with a spanking new txt file input method! So instead of the complex ini file, you have a slightly less complex txt file to worry about. Ok it's not THAT complex, but there is a lot of things you can do with the KillCounter plugin. I went a little out of my way to open up a lot of new options from v0.9, hardcode/difficulty checks, chance to get bonus, recurring bonuses, yeah the list does go on. Enjoy!

v0.9	Initial offering of the Arena Killcounter. Rather difficult to use, if I may say so myself. Actually I had been struggling with this and having a terrible time debugging it. But some good tutelate from Havvoric helped me clear my bugs :)

>>-<_To Do_>-<<

MaxValue - suggested by snowknight, but it couldn't make it on time. Basically something for the user to limit the bonus of a stat

New method for doing Bonus columns
X+aY<=Z where X, Y and Z are all defined by the user.

Possible new method for doing Kill columns too. Will think a bit, but basically allow multiple things to trigger the same line, saves the user copy pasting and saves the plugin checking 300+ lines :D

Any other suggestions? If you feel there's something else that isn't working well or should be improved upon, let me know.

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

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

Cheers,
RicFaith


Acknowledgements:
Kingpin - Once again he's da man behind the offsets. He posted the info on the arena code.
SVR - First idea for killcounter, and honestly no D2Mod plugins without him either...
Havvoric - Lots of help in understanding stuff, and found out how to handle TC drops from him too :)
mrelfire - A very helpful guy who's the best guy to find bugs in my plugins, thanks for fielding the questions about PlugY for me.