Toto je staršia verzia dokumentu!
Link na Wikipediu: Dokuwiki
A lot can be changed and tweaked in Diablo 2 – however, lots of modding sites went down in the last couple of years, so it is getting increasingly harder to gain some info on how to do it – especially when running under Wine(skin) on Mac OS X.
In this article I will be slowly gathering my own experiences and manuals for modding and tweaking Diablo II 1.13d. This is and will remain a work‑in‑progress.
This is probably obvious, but get Diablo II with expansion (Lord of Destruction). Without it you will miss most of the game content and many programs must be configured differently for basic game (or do not work at all).
Blizzard released native Diablo II for Mac. However, since files in this version are different from the PC version, majority of mods simply won't work. I therefore prefer to use PC version of Diablo II running under Wine(skin).
Therefore everything after patch 1.13d are just tweaks for new operation systems – see version history. This is important to know since some editors and modding programs will not work when Diablo II data (like items, skills, monsters) are changed. Any program that works with Diablo II 1.13c will work with all later versions.
Installation is easy and non‑problematic, do not expect anything fancy. I prefer using Wineskin, since that way I can isolate different Windows games and programs.
In the rest of this article, I will assume you are using Diablo 2 LoD 1.13d running under Wineskin.
These are the basic mods I always use. They are both based on the idea that playing vanilla Diablo II in single player is actually much harder and less fun than multiplayer. They are therefore aimed to make single‑player more enjoyable, but not necessarily easy.
What does it do?
What does it do?
ExpRatio
decrease starting from level 70)
Note that the ‑direct ‑txt
command is a 2 command function:
‑txt
command tells the game to generate the binary files in the excel folder on start up.‑direct
tells the game to load the “data” folder first and only then the .mpq files.
So if you are starting a mod for the first time with only txt files in the excel folder and no bins, use the ‑direct ‑txt
and start a new character. This will generate the bins for the first time.
After the bin files are generated, you only need to use the ‑direct
command. The ‑direct
command loads the data folder only and doesn't need to re‑generate the bins, if they are already there.
The point here is that the ‑direct
command is all you need the load the data folder, the ‑txt
command is not needed all the time, only for the first‑time generation of bin files.
Also note that to reload these txt/bin files, you do not need to exit game – they are generated and loaded when you load the game from the character screen.
To do this, you need to prepend special colour codes (or their escape sequences, if the TBL editor you use allows it) to names of all gems in /mod/data/local/LNG/ENG/string.tbl
file (which itself is by default packed inside Patch_D2.mpq
file).
You need to add Jewels and Charms to the list of items allowed to be generated by gamble routine in /mod/data/global/excel/Gamble.txt
. To do this, append these lines to the end of file:
Small Charm cm1 Large Charm cm2 Grand Charm cm3 Jewel jew
Some important notes:
/mod/data/global/excel/Misc.txt
(column code
). They are also references from TreasureClassEx.txt
file (columns ItemX
).
This is controlled by columns GambleUber
and GambleUltra
in /mod/data/global/excel/DifficultyLevels.txt
. The probability for an Exceptional/Elite item to be generated is calculated with the following formula (see How are Exceptional/Elite items generated?):
exceptionalProbability = max{0%, (ilvl – qlvlV) * 0.9% + 1%}
eliteProbability = max{0%, (ilvl ? qlvlE) * 0.33% + 1%}
ilvl = clvl (‑5 to +4)
and qlvl = quality ‑ lvl
of base item to be generated (e.g. 33 for Demonhide gloves)
The constants (0.9% and 0.33%, respectively), are defined (as 90
and 33
) in the file. My suggested setup is this:
Name […] GambleRare GambleSet GambleUnique GambleUber GambleUltra Normal […] 100000 15000 15000 50 50 Nightmare […] 100000 15000 15000 200 200 Hell […] 100000 15000 15000 800 800
So no magic‑only items (we are gambling, we want something real!), only unique items with 15% probability (in file written as portion of 100000, so 15000), set items with 15% probability (again 15000 in file) and rare items (the rest, i.e. 70% – in file written as 100000 to catch the rest). I have set the probability of getting Exceptional/Elite item to 0.5%/2%/8% (for Normal/Nightmare/Hell, respectively) per one item level (ilvl
) above quality level (qlvl
).
If you are gambling for exceptional or elite versions of unique/set circlets, remember that only Coronets (and not Circlets!) can be upgraded in gambling window into Tiaras or Diadems. See The complete overview guide to Gambling in Diablo 2 and PoD.
The problem is that Enjoy‑SP replaces The Cow King with The Cow Chieftain (looks like The Smith in Barracks), which prevents the game from recognizing that this monster is actually the Cow King which could drop Cow King's Leathers set items. To fix this:
/mod/data/global/excel/MonPreset.txt
replace this line: 1 The Old Cow King
with this line:
1 The Cow King
/mod/data/global/excel/TreasureClassEx.txt
replace these lines: Cow King 7 850 983 983 1024 0 Act 1 Uitem C 1 Act 1 Melee B 2 0 Cow King (N) 7 850 983 983 1024 0 Act 1 (H) Uitem C 1 Act 1 (N) Melee B 2 0 Cow King (H) 7 850 983 983 1024 0 Act 1 (H) Uitem C 1 Act 1 (H) Melee B 2 0
with these lines:
Cow King 7 850 983 983 1024 0 Act 5 Equip C 15 Act 5 Good 3 Cowset 1 0 Cow King (N) 7 850 983 983 1024 0 Act 5 (N) Equip C 15 Act 5 (N) Good 3 Cowset 2 0 Cow King (H) 7 850 983 983 1024 0 Act 5 (H) Equip C 45 Act 5 (H) Good 15 Cowset 3 r33 1 0
This will restore the original Cow King (which is needed for Diablo II code to allow the drop of Cow King's Leathers) and and the same time keep the enhanced Cow King's drops from Enjoy‑SP.
Note that this won't assure that the Cow King will actually drop anything from his set, it only gives him a chance to do so. However, in Enjoy‑SP/Plugy (don't know if also in original game – probably not), you might open the portal to The Secret Cow Level several times – you just have to Save and Exit game between your runs. To do so, repeatedly go to Tristram through The Stony Field teleport to obtain Wirt's Leg and open the portal (Horadric Cube → Tome of Town Portal + Wirt's Leg → opens portal to The Secret Cow Level).
Disable unwanted shrines:
/mod/data/global/excel/Shrines.txt
set required level so high that they will never appear (200+)Make monster shrine reusable after some time (so that you can generate more uniques, yay!)
reset time in minutes
to e.g. 1 (the column is in minutes)My version: only spawn monster, experience and gem shrines, disable other shrines
effectclass
column values so that the only enabled shrine with effectclass
4 is Warping Shrine
and the only enabled shrines with effectclass
1 are Shrine of Enirhs
, Experience Boost
and Gem Upgrade
Shrine of Enirhs
is out, but it can still be rolled by game, and if so, the game will instead spawn Gem Upgrade
shrine.Good sources for info:
Game texts are stored inside *.tbl
files, which themselves are packed in three different source *.mpq
files:
string.tbl
is in d2data.mpq
and contains texts for original Diablo 2 release;expansionstring.tbl
is in d2exp.mpq
and contains texts from Lord of Destruction expansion;patchstring.tbl
is in patch_d2.mpq
and contains the texts from the current patch.Game “loads” its texts in this order, so the latter will override the earlier files – e.g. if the particular text from original Diablo II gets redefined in the expansion, and later again by a patch, game will use the text from patch (pretty clever).
msiexec /i wine‑mono‑4.5.6.msi
, and (3) if there are errors like this, ignore them.
As Enjoy‑SP increases drops from all bosses and unique monsters, running for them is now more important and much more fun.
There are three basic types of monsters in Diablo II (see monster basics here or here):
With a Mini‑Boss class introduced by Enjoy‑SP, there are now 4 kinds of unique monsters (ordered by drop rates from best to least interesting):
This is the complete list of Cube Recipes, taking into account both original Diablo II recipes, and recipes changed or introduced by Enjoy‑SP mod:
Exceptional: pV = max{0%, (ilvl – qlvlV) * 0.9% + 1%} Elite: pE = max{0%, (ilvl – qlvlE) * 0.33% + 1%}
90
and 33
) in /mod/data/global/excel/DifficultyLevels.txt
under GambleUber
and GambleUltra
columns, respectively.Apple has this ugly habit that it does not offer you to download previous versions of its software after newer versions came out. But now with serious Safari 14 problems on Mojave, it might make sense to only upgrade Safari to its latest 13th version.
If you are stuck with Mojave, avoid installing Security Update 2020‑004, Security Update 2020‑005 and Safari 14. These three in combination are causing critical performance issues on Mojave.
Instead, only install Mojave Security Update 2020‑003:
https://support.apple.com/kb/DL2042?locale=en_US
and update Safari to 13.1.2, which is (for now) the last functioning version.
Safari 13.1.2 for High Sierra:
http://swcdn.apple.com/content/downloads/33/34/061-96797-A_PBSVGZX5CC/dt6bdxuqhtv0ck6n0ukx62xry7p6svl9bp/Safari13.1.2HighSierraAuto.pkg
Safari 13.1.2 for Mojave:
http://swcdn.apple.com/content/downloads/38/62/061-98246-A_DETHLIXKPC/njpb63acy0z0rgpdpewxts5rfjlkhtdvcy/Safari13.1.2MojaveAuto.pkg
Safari 13.0 for High Sierra:
http://swcdn.apple.com/content/downloads/56/40/041-98188-A_CVBU5AMWDQ/rca641qzdrg6jscdip42rrsa9860ajps10/Safari13.0HighSierra.pkg
Safari 13.0 for Mojave:
http://swcdn.apple.com/content/downloads/21/46/041-98185-A_T4U6Z3I0PX/tcq0z3b6tmc1xfmz68wfsuhf9dapt5v1u4/Safari13.0MojaveAuto.pkg
Safari 14.0 for Mojave:
http://swcdn.apple.com/content/downloads/20/07/001-50026-A_8ANV58XVC7/nvqtw8plal39y2598inzzco2ekccgrrkx8/Safari14.0MojaveAuto.pkg
Safari 14.0 for Catalina:
http://swcdn.apple.com/content/downloads/00/48/001-50020-A_14M4NE130Q/q4lojf164rqsmp57dawdtgs25ut2d1j44m/Safari14.0CatalinaAuto.pkg
Google sheets do not offer any straightforward way to convert from Unix Timestamp (that is, the number of seconds that passed since 1 January 1970) to local date and vice versa. If you are web admin, this is something you will sooner or later need when passing data between Google sheets and server SQL database.
Unix Timestamp is the number of seconds that passed since 1 January 1970, which marks the start of Unix epoch.
The “magic constant” in formulae below is 86400
, which is the number of seconds in single day (24*60*60).
The second one is DATE(1970,1,1)
, which generates the starting day of Unix epoch. This is the reference date which has the timestamp 0. All dates before this date will have negative timestamp, while dates after it a positive one.
First, the general formula is this:
timestamp = (localDateTime - unixEpochDate - timezoneShift)*daySeconds
In the case of 4 September 2020 9:54:25am GMT+2 (Slovakia during summer time), this translates into the following formula in Google sheets:
timestamp = ( localDateTime - unixEpochDate - timezoneShift ) * daySeconds ↓ ↓ ↓ ↓ timestamp = ( (DATE(2020,09,04)+time(09,54,25)) - DATE(1970,01,01) - time(02,00,00) ) * 86400
Note that you need to subtract a positive GMT shift (so GMT+05:30 becomes ‑ time(05,30,00)
) and, vice versa, add a negative timezone shift (so GMT‑4 becomes + time(04,00,00)
).
When you have a cell with date string which you need to convert into timestamp, you can reference the cell directly, so the final formula will be:
= ( <cellRef> - DATE(1970,01,01) - time(02,00,00) ) * 86400 = ( $J10 - DATE(1970,01,01) - time(02,00,00) ) * 86400
If you ever encounter Google Sheets refusing to accept and convert your date string with a weird Error DATEVALUE parameter '04/09/2020' cannot be parsed to date/time
, try doing this:
Plain text
(in Format → Number →
menu)United Kingdom
(in File → Spreadsheet settings
menu)Date
This is an exact reverse of the previous procedure, so the general formula is this:
localDateTime = (timestamp / daySeconds) + unixEpochDate + timezoneShift
So in the case of 1599206065 timestamp in GMT+2 (Slovakia during summer time), this will become in Google sheets:
localDateTime = (timestamp / daySeconds) + unixEpochDate + timezoneShift ↓ ↓ ↓ ↓ localDateTime = (1599206065 / 86400) + DATE(1970,01,01) + time(02,00,00)
Note that the timezone‑manipulation in here is the opposite of the previous formula, so you need to add a positive GMT shift (so GMT+05:30 becomes + time(05,30,00)
) and, vice versa, subtract a negative timezone shift (so GMT‑4 becomes ‑ time(04,00,00)
).
Again, with cell reference containing the timestamp that needs to be converted, the final formula will be:
= (<cellRef> / 86400) + DATE(1970,01,01) + time(02,00,00) = ($J10 / 86400) + DATE(1970,01,01) + time(02,00,00)
And that's it!