LINK TO SAMPLE MOD CONTAINING THIS SYSTEM (if you want to test it out, start up the Assassin who already has the charm. Your maxstamina will increase by +1 per Strength, Dexterity and Energy):
{see Modworked, the version previously listed here is badly bugged and unstable in many ways: viewtopic.php?f=5&t=67078}
This is a system/concept I have been working on for a while. I began development early 2022, but kept dropping it because of repeated disappointments and crashes and re-works. What I am showing you is the first competent version. It is inspired by Kingdom of Tenai's state-stacking charm, Aftermath's skill updater and all the posts I've seen discussing a need/desire to have passives that update and use calcs. This system will work on all game versions from 1.10f on, although you may experience issues on versions before 1.13, since you will have a ridiculous number of states active at the same time.
I am aware that this entire system may be very confusing, so if any part of it does not make sense, let me know and I'll try my best to explain it better.
To install, download the installation rows and copy-paste them into your mod.
List of txt file changes and overview of installation instructions:
(1) Copy-paste these into your txt files:
31 'superoskill#' passive and 1 'superaura1' aura: skills.txt (ID 401-432)
31 'superstate#' and 1 'superaura1' state: states.txt (ID 187-217)
5 'superprop#' properties: properties.txt (ID 316-320)
1 'supercharm1' unique item: uniqueitems.txt (ID 402)
1 'nodrop small charm' item: misc.txt (ID 152), using code=m00
1 'superrecipe1' cube recipe: cubemain.txt (ID 151)
(2) Note that if your IDs do not align, then you will need to manually change the properties.txt val# cells to match the skill IDs to the superstate# skills and to the soul aura.
(3) Create the charm by combining 1 health potion and 1 mana potion.
To use this system after it is installed, open up skills.txt and go to the superoskill lines. In their passivestats, you will see a bunch of different stats. Change the values to whatever you desire. To make things easy on yourself, you may want to create additional skills that do nothing except act as references for singular stats.
---
What this system does is subtly update all skills on a timer and places virtually every single stat in the game onto a mass of passive skills. The result is efficient usage of stats and states with high levels of control over stat values.
This guide describes a system which may help, although will not completely fix, a few annoying issues in Diablo 2:
(1) Passives do not update.
(2) Stats do not update on items, except with character level or re-equipping.
(3) There is a stat limit.
(4) There is a state limit.
To alleviate these issues, we will pay with:
32 states, which will cover ~150 stats (you can use less if you want, this system requires a minimum of 2 states)
32 skills, each corresponding to one of these states
1 charm, which must be equipped at all times
31 oskills and 1 aura when equipped, which will reduce available d2s space
1 new itemtype to use for a unique small charm
1 inventory slot for the unique small charm
The character will gain +1 all skills (unavoidable, be warned that if you attempt to fix this you will either crash the game or ruin the updater)
Note that although you lose 32 states (less if you don't care about some of the weirder stats), you can delete every single non-aura passive state in the game. So while there is an upfront cost, it does not scale: you can continue adding new non-aura passive skills up to the tens of thousands, each of which will be stateless.
A brief summation of the mechanism:
(1) The ~31 passive oskill states give you most every useful stat in the game. Each stat can become flexible with the uses of calcs.
(2) The aura is needed to produce a timer, which will automatically update your skills every few frames.
(3) Skills are updated by a +skills and -skills fluctuation, which is undetectable because it balances out to +1 all skills at all times (+0 seems to be unobtainable for a motley of reasons: I came up with at least 8 different ways of achieving it and each way had some subtle reason for freezing, crashing, failing or otherwise breaking the game).
(4) The player equips a single small charm that looks like it came straight out of open bnet, which gives all the oskills and the aura in one dense package.
Some examples of what you can pull off with this system:
Unarmed Mastery: Massive damage bonus when not equipping any weapon. Swapping to a weapon will remove the bonus within a few frames.
Path of Exile-style stats: Stuff like +FRW% per Defense (could cap the bonus too), +Dmg per Dex, +Dmg% per Str, Convert Stats to other Stats, You Cannot Deal Non-Fire Damage, While at Max Health Gain +50% Velocity, +1 Life per Strength, Convert Block Chance to D/A/E while Shieldless, 50% of Physical Damage is Added as Additional Fire Damage, You Randomly Gain +50 Fire Cold or Lightning Damage, Gain +50% Velocity Every Other 4 Seconds, and so on.
Improved Attributes: Could make it so Dexterity gives additional attack rating and defense, could have Energy give +allskills or +skill dmg% every X points, could make it so non-vitality stats give life.
Lots of Complex Passives: Passive skills can now scale based on other stats, since they are now able to make use of updating calcs.
Item Restrictions: Want equipment to be hireling only? Give the item a passive skill that sets Strength and Dexterity to 0 when equipped by non-hirelings. You could also make an item require you to have a certain skill upgraded, or introduce Energy Requirements, or make an item require you to have skill points spent in only 1 tab and no other tabs.
More Stats per Skill: Some skills can append stats via aurastats. For example, Bash uses aurastats, but it is limited to only 6. With superstates, you can use an ID stat which can provide hundreds of stats at once, effectively removing the limit entirely. An example use-case would be something like an attack that gives +X-Y physical, fire, cold, magic, lightning and poison damage: this would require 12 stats (14 if using cold&poison length) which would not normally fit into one skill's aurastats.
Poison_Count: This is a stat that is almost unusable in vanilla because it will crash if you add it to an item. Now you can freely add it to items via referenced oskills.
NOTES:
Hirelings cannot use this system yet, although if anyone is interested then I should be able to make it work (probably by giving the properties via monprop.txt).
The stats given by this system cannot make use of the damagerelated column in itemstatcost, meaning that if you have a sword that gains +1% damage per Strength, it will be global +dmg% like Might (a dual-wielded sword would also gain the bonus), and will not apply only to base weapon damage.
Guide to Passive Updater and Superstates
Moderator: Nizari
Guide to Passive Updater and Superstates
Last edited by Cypress on Sat Jul 22, 2023 9:47 am, edited 1 time in total.
Re: Guide to Passive Updater and Superstates
I've played around with some of these concepts before but I didn't realize you could go that far. This is awesome work and fixes some of the issues I have been running into with my mod.
Re: Guide to Passive Updater and Superstates
Hi Unicarn, be aware that this guide is super outdated, the modern version is included in Modworked (viewtopic.php?f=5&t=67078). It also includes a few pre-made custom stats, like +% Damage as Element, +AR/AC per dex, +dmg% per str/dex/enr, Unarmed Damage Scales like Kick Damage. Also a few stateless passives that would be impossible normally, like One-handed Mastery, Dual-wielding Mastery and One 1h Item Mastery.
Thanks to excellent playtesters, a bunch of bugs in this old version were fixed. The version that was linked in this thread will cause random crashes, doesn't update hirelings, uses allskills to update passives (rather than a more subtle method), uses the 'value' stat to update passives, which breaks if the player is wearing any set items, and does not account for the allskills bonus gained from Skill Shrines.
Thanks to excellent playtesters, a bunch of bugs in this old version were fixed. The version that was linked in this thread will cause random crashes, doesn't update hirelings, uses allskills to update passives (rather than a more subtle method), uses the 'value' stat to update passives, which breaks if the player is wearing any set items, and does not account for the allskills bonus gained from Skill Shrines.