MetalStorm Progress Archive

Information and updates for all other projects by Black Omen Productions (besides Shadow Empires): Namely Codename: MetalStorm, Anti-Balance, Ultimate Fixer and all versions of XyRAX

Moderators: Nefarius, Joel, Doombreed-x, Vendanna

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

MetalStorm Progress Archive

Post by Nefarius » Wed Sep 17, 2008 12:36 am

I've added this topic to archive the older parts, before the text limit for posts eats them.

BUILD 80721

21st July, 2008 (ca. 6000 lines of code revised, tons added)
- Revised Items2.cpp, added ItemCore.cpp with many vanilla core functions replaced and revised all other remaining item code.

19th July, 2008 (ca. 1000 lines of code revised, some added)
- Finished revising items.cpp (total ca. 4300 lines, done over last few weeks, finished today)
- Expanded dual wield code, any class can now dual wield if we so chose.

17th July, 2008 (ca. 1500 lines of code added)
- Replaced all of D2s item property desc code (ie the desc stuff from isc.txt).

16th July, 2008 (ca. 400 lines of code revised, more added)
- Revised code for elixirs, they are now fully data driven

15th July, 2008 (ca. 1000 lines of code added, 1500 lines revised)
- Replaced all the client/server communication regarding item stat updates, the original code was, to say it nicely, utter crap, this will later be merged with the custom oil packets made earlier to clean the code some more.
- Replaced autostack code
- Finished revising all old ai code, with text parsing and everything :)

11th July, 2008 (ca. 3000 lines of code revised)
- Revised the majority of the formerly written ai code, adding a myriad of further improvements. Theres still about 1K lines left here, so you know what the next updates probably will be :P

7th July, 2008 (ca 200 lines of code added)
- Replaced self-resurrect code with new code, works properly and bug free for all monsters now.

6th July, 2008 (ca 1000 lines of code added, additions from today and yesterday, didn't bother to add most of it here)
- vanilla D2 item name code has changed, now item names are more descriptive in general.
- More improvements to D1 spell scrolls
- Starting weapon is automatically personalized, displayed in gold.

5th July, 2008 (some 1500+ lines of code revised + changes)
- Spell scrolls now work like they did in D1, that is, you get a targeting cursor, and it casts the spell on whatever thing you click on.
- Improved targeting code for spell scrolls
- Revised all the code handling item colors, the current state of the code (v3) is final. Changes to how colors are taken from socket fillers, it uses the first socket filler that has a color, not the first overall, so having a rune first, then a gem, would get the color of the gem, not the color of the rune.
- More misc item code has been revised.
- Changes to requirement handling: beginner items (the ones you start the game with), will have no level or stat requirements (flag 0x20000 is read by the new req handlers).

4th July, 2008 (around 1200 lines of code added)
- More new stats code has been implemented
- Replaced the vanilla D2 price evaluation, one of the last major gameplay related pieces of code left, and also one of the most inefficient.

30th June, 2008 (around 1500 lines of code added, more revised)
- Implemented defense, damage, durability and quantity override stats that allow setting the base values of an item, totally overriding the contents of items.txt (this requires more work to do properly then it may sound like, especially for stats like base damage that isn't saved)
- Replaced the vanilla property assignment functions for min and max dmg, as well as dmg%, they suffered from bugs and useless calls (cmon bluzzard, you don't call something 5 times in a row just to discard the return 5 times...) *see note
- Expanded the properties function table, making room for as many property functions as we will ever need
- Implemented Charisma and Reputation into the code (though they both don't have an effect yet).

* heres a run down on what the brilliant people have done:

Code: Select all

record = getRecord(item.id)
code = record.code
id = getIdFromCode(code)
record = GetRecord(id)
This was done 5 times in a row and the return was discarded five times. As a note, record and the second record will always be the same, they simply cannot be different. getIdFromCode actually interates over an array of item codes finding the one matching the code passed to the function, ie not a very cpu friendly routine. So we have 5x loops here when none at all was necessary...

29th June, 2008 (round 200-300 lines added, around 500 lines of code revised)
- Added several new stats, again due to unique revision
- Speaking of which, today me and Vendanna tackled the one handed swords ;)
- Cleaned up the remaining code of TreasureClass.cpp, now every single line of TC code used by the game is entirely new :), among others this re-enables borked organ drops and grade upgrading (from normal -> except -> elite, even though this system isn't used, I coded it anyway ;)).

28th June, 2008 (around 1000 lines of code added)
- Revised bleeding functions (ca. 100-200 lines)
- Vendanna and myself redesigned the classic D2 unique axes.
- Several new stats, among others 'Resistance vs. MonClass' added (resistance vs. all attacks by undead/demon etc) and a bunch of other stuff.
- Replaced the entire TC evalution used by vanilla, the resulting code is both faster and more compact. Re-implementation of broken 'extras' will follow soon (cg, ce, cr, cm, cu, cs modifiers and two missing TCEX columns).

24th June, 2008 (around 100 lines of code added)
- Had some issues with borked up installs for VC6 that needes system restore to fix (reinstalls didn't help), thankfully nothing was lost (we keep incremental backups of stuff + emergency backup :))
- Replaced the inefficient nodrop evaluation with something running about 5 times as fast.

22nd June, 2008 (revised around 1200 lines of code)
- Replaced all the archaic code in chat.cpp with new, much improved and flexible code (ie the CLUAConsole stuff).

20th June, 2008 (revised around 1500 lines of code, least a few 100rds added)
- Revised entire Speed.cpp, with greatly improved special getstat variants for getting speed stats and other boosted stuff.

19th June, 2008 (a lot of code, added, likely >1500 lines, revised about 1000 lines of code)
- Finished revision of stats.cpp (update #2)
- Replaced a large variety of D2 functions, ranging from alignment validation to minion list iterators. All in all, the majority of calls to all of these funcs were from inside MetalStorm, so replacing them should be seen as a performance improvement (less intermodular calls).
- Revised the code for more event stats (hit blinds target etc)

17th June, 2008 (bit of revision, more later today when im back)
- Revised code for Open Wounds and Crushing Blow.
- Revised code for Freeze Target, Petrify Target, Clone Target, Instant Kill (changed to Disintegrate Lower Undead), and more item modifiers, adding many special overlays and effects to them.
- Added smoke to the burn damage overlay (now monsters and players under the effect of burn damage have billowing smoke ascending from them to the sky --- z-axis movement)

16th June, 2008 (nearly 2500 lines of code added)
- BloodBoil code implemented
- Apocalypse mechanics finalized
- Thorns code has been revised
- Expanded the 'shatter' states, which before this were hardcoded to only state_shatter and state_uberminion (well not hardcoded, but it just always caused the shatter effect ;)).
- The _ENTIRE_ item evalution and modifier selection code has been replaced (roughly 2K lines of code), this means every last bit of code governing the generation of all item qualities (inc. magic, rare, set, unique, crafted, tampered, superior, normal and lowquality) is now customizeable.
- Item level requirements code has been replaced, disarming a potential stack overflow bomb that it contains in vanilla.
- As a result of the item generation change, things like what quality can have staffmods and automagic are now softcoded.

14th June, 2008 (more then 1000 lines of code added)
- Replaced item generation routines for normal, superior and low quality items (the later aren't used, but I did it anyway for the sake of completeness :P)
- Written a new affix evaluation routine that is way more efficient then the vanilla one.

12th June, 2008 (revision of damage.cpp, around 1500 lines of code added)
- Added new item event (EVENT_BLOCK).
- Added new skill function for ChillTouch spell.
- Expanded the SrvDo, SrvSt, CltDo, CltSt and StateActive func tables to have room for 32K functions each.
- Revised the remaning parts of Damage.cpp
- Fixed pseudo-bugs (that also exist in vanilla), regarding poison states. In vanilla if you re-apply poison to a monster that is already poisoned the state ownership isn't changed, if the previous poison was set by another player, that player will score the kill, even if its your poison that did the final damage. This issue is now resolved.

11th June, 2008 (mostly revision and txt changes)
- Fixed a vanilla ?bug? with mercs doing more damage then intended. The code automatically assigns MONUMOD_HIREABLE to mercs, this is legacy stuff and shouldn't exist in LoD from what I can say, as it causes them to deal more damage then what is shown on the screen. (Detected this simply by overserving my damage log closely when the merc attacked), the onscreen display was 800-1500, but the actual hits dealt around 3K damage. Editing BossMods.txt to disable MONUMOD_HIREABLE vanilla server calls fixed this.
- Improvements to how critical hits are handled, in vanilla mercs were governed like other units when it comes to critical hits (as far as I remember), my code now treats them like players (taking into account mastery critical hit, deadly and critical strike), this also means their critical hits no longer boost non physical damage.
- Some more of damage.cpp revised

10th June, 2008 (around 2000 lines of code revised, some code added, not much)
- Revised 75% of damage.cpp, the remaining 25% will follow soon.
- Most of the changes are entirely performance based, for example I added a special GetStat variation taking SrcDmg into account automatically and more things like this.

8th June, 2008 (at least another 500 lines of code added, tons of code revised again)
- Revised various functions (not source file specific)
- Custom functions replacing GetStat and GetBaseStat have been implemented, they are a lot more efficient then the vanilla ones.
- Added new functions for Dragon Flight and Dragon Tail, both suffering from a myriad of bugs and useless checks. With this, all assassin kick skills are replaced with new code.
- More things I didn't bother to record.

7th June, 2008 (around 500 lines of code added, more revised)
- Spell generated items now show up with a name color specified via skills.txt par8 for items made via SrvDoFunc 166.
- Performance improvements for kick skill damage routine.
- Replaced all (bluzzard) skill functions of Psychic Hammer which contained bugs and useless checks.
- The ONLY two blizzard functions left in the damage routines contained, *gasp* a bug making kick skills recieve elemental damage from the active weapon. This code has been revoked (thus nothing called during the entire damage creation process [which is related to the process itself] is left using old code).

6th June, 2008 (around 1000 lines of code added, some more revised)
- Revised several misc functions to make them more efficient
- ObjOperate and ObjInit function tables can now be expanded infinitly
- Added SrvDoFunc, CltDoFunc and CltStFunc for dragon talon (formerly only the SrvStFunc was done), to fix >3< bugs blizzard left in it.
- Fixed bugged level theme code
- Added several new level theme functions
- Level theme picking chance is softcoded
- Object pre-operate chance is softcoded (bool in objects.txt now chance)
- Added EthSuffix (special affixes assigned to ethereal equipment onto of whatever else they have)
- Probably some more things I didn't bother to record
- Fixed memory leak caused by blizzard incorrectly freeing a node from a linked list with pObjRegion->pWayPointRoom




BUILD 80604

4th June, 2008 (added anywhere between 3000-4000 lines of code, revised a major amount of the existing code).
- Finished revision of Combat.cpp
- Replaced D2's ObjectRegion code, making it more secure and efficient
- Replaced the missile server collision (everything about it, so now its possible to have infinite SrvHit and SrvDmg funcs).
- Major utility functions such as sending packets, handling item events and many many other things are entirely new code now, which means no intermodular calls = faster.
- Improved tons of code with the goal of maximum efficiency and speed.
- Re-written the entire internal waypoint code.
- Much more I can't remember ATM...

23rd May, 2008 (added about 900 lines of code, revised a load of additional stuff)

- ptUnit structure has been expanded, allowing storage of (infinite) amounts of custom data on units. Each unit now is created with a pointer to ptMetalData which is a custom redefinable structure.
- Monsters.cpp is now completely revised
- Finished reprogramming all monster death related things
- Emptied some source files of rubbish
- Added custom code to handle D2s event queue, their original funcs are were a bit too slow to my taste (WAY too much memory access there...), especially for AI purposes which may set/delete events about a thousand times every few frames. The vanilla code still uses the old funcs, my own code uses the new ones.

21st May, 2008 (about 500 lines of code, added, another 1K revised)
- Replaced all of D2s server side player mode handling code, greatly improved functions for performance

- More utility code revised today

20th May, 2008 (about 1000 lines of code revised and improved)
- Another 20% of Monsters.cpp is done, the whole damage routine in there was re-written (among others).
- Improved stability and performance of several utility functions
- Player life regeneration function re-written
- Forgot to state this yesterday, there is a considerable redesign of how spells are assigned to monsters, setting a aura via MonStats.txt now automatically activates it when the monster spawns (no need for special AI code like in Duriels case on vanilla, why Bluzzard didn't do this from the start I have no idea, all it involves is a single additional function call :roll:)

19th May, 2008 (lots of revisions, ca. 3000 lines of code revised, partially improved, minor stuff added)
- Bosses.cpp completely revised
- Monsters.cpp 70% revised
- PlayerCount.cpp completely revised
- Other stuff in other cpp files
- Reduced number of intermodular calls further
- Improved security of some code segments

16th May, 2008 (yet more minor things, ca. 500 lines revised)
- Improved error and log handling code.
- Started porting code to new, cleaner convention, revising some functionality along the way too.

15th May, 2008 (more minor things, got some time off this morning :), ca. 200 lines of code added/changed)
- Added a new UMod filter to prevent certain umods to spawn combined with the Multishot ability.
- Minor improvements to Bosses.cpp and some other source files, speeding up or simplifying code in there (such as group size evaluation).
- Further improvements to existing code (MonDesc.cpp mainly)
- Improved commenting on several source files (for other devs)

14th May, 2008 (something really minor, bout 50 lines of code)
- No, ain't back in buisness yet, wait until the end of this month, but I had a few spare minutes and a interesting idea to implement today, and so it has been done ;). Added 5 more columns to LevelsEx.txt for 'forced spawn' enemies (enemies that are spawned always in an area, without messing up the random 25 units from levels.txt). So in vanilla sense this would mean an area called "Spider Forest" would spawn always spawn spiders + 25 random unit types.
- MetalStorm.dll now compiled with SP6 of VC6 (was never updated after swapping to new PC).

24th Mar 2008 (notice)
- Just a heads up here, development will continue as normal at the end of the this month or mid june (both me and Vendanna are very busy at present). I appologize for having written this/next week here before, can't predict how long stuff ends up taking at the moment, unfortunately.

14th Mar 2008 (testing session)
- All previous code implementations are currently being tested by the team, while I'm busy elsewhere, so new code and advances when these tests are completed and I'm back ;)

29th Feb 2008 (ca. 1000 lines of code added and at least 1000 lines of code redesigned)
- Drove some more hooks directly into the games main loop, pGame constructor and destructor, for more optimal loading and freeing of custom structures
- Redesigned the entire side quest engine to be more efficient
- Added a third side quest for testing purposes, giving the Skeleton King parallax crypt a purpose other then being test data
- Redesigned the way player spells are saved and loaded, now any spell (irregardless of whenever it is on a tree or not) can be saved on a player and re-used the next game if it wasen't obtained via items (aka from reading books and quest rewards)
- Skill tree and mini menu GUI changes will follow soon, once I decypher all their code.
- Added options to Config.ini that control game joining delay and autosave delays (vanilla value for autosave is 5 minutes, can be set to any value whatsoever now).




BUILD 80227

27th Feb 2008 (ca. 800 lines of code redesigned)
- Re-written all the former quest API that was used for the *.xxx extended file format, now the quest section is stored in the D2S.

26th Feb 2008 (ca. 1000 lines of code added)
- Re-written all save/load and networking code related to D2S format (in two days!) to support D2S files up to 20 KB in size, with new sections for custom data (etc), making secondary external save files superflous.

24th Feb 2008 (ca. 600 lines of code added)
- Using this I added a small config GUI allowing the player to change some of the MetalStorm INI settings in realtime (changes are saved). --- See screen topic
- Added a way to implement infinite (well 4 billion) new GUI panels (ofc the individual panels have to be coded).
- Replaced the MouseDown and MouseUp events for the char screen, now buttons (etc) can be moved/removed/added to it easily. Also implemented a similar multi-stat point assignment to what is in plugy, so people don't miss that feature.

23rd Feb 2008 (ca. 500 lines of code added)
- Re written all the code associated with displaying the char screen (next will follow the 'click detection' for this screen).

22nd Feb 2008 (ca. 500 lines of code added)
- More display code for stats (etc) has been re-written
- Several missile functions for z-axis aware trails and mid-air-collisions have been added (see screenshot topic)

19th Feb 2008 (ca. 500 lines of code added)
- Rewritten a ton of utility functions to reduce the number of cross module calls further
- Expanded the amount of item palette shifts from 21 to 50 allowing for a much higher item color variety then vanilla (screenfeed comming soon).

18th Feb 2008 (ca. 1000 lines of code added)
- Rewritten the handler for descdmg and descatt, stuff like shield attack damage will now be displayed accurately in the char window
- Many other display parts, mainly for items were changed, much much more to follow here

16th Feb 2008 (ca. 500 lines of code added)
- Totally re-written the functions displaying weapon damage to make them more efficient, accurate and show average damage alongside the other values. It will also show the damage of missiles if it is a missile weapon other then bow/crossbow (where the ammo type defines how much damage it does).

15th Feb 2008 (ca. 1000 lines of code added)
- New and much improved pspell functions for powerup items (without the vanilla bugs and a lot of extras)
- Entirely re-written the way the game handles pspells in general
- The code handling spell charges has been re-written from scratch
-All code associated with missile weapons (inc. hardcoded display and autoequip settings for bow and crossbow + ammo depletion code for bows and crossbows) was rewritten and everything is now data driven.

14th Feb 2008 (ca. 1500 lines of code added)
- Rewritten merc drag/drop icon to properly handle stacked potions (potions with quantity)
- Rewritten many bodyloc (etc) handlers and a lot of other item interfacing code to implement the sticky items properly (such as that after death, their stats are indeed present and active)
- Fully implemented and completed Spell Generated item code (the basis was present for a more then a year)
- A load of of smaller code changes that further contribute to the stability and efficiency at which the game runs

11th Feb 2008
- Internal test session, new development at end of test session

6th Feb 2008 (no code added, old code + text changes)
- Rewritten the way NPC inventory spawner func works (performance related changes only)
- 'MetalStorm' final Weapons.txt in progress, new weapons being added now, everything else recalculated and done from scratch




BUILD 80201

1st Feb 2008 (ca. 1000 lines of code added)
- The rest of NpcDialogs.cpp (inc. all non-quest Npc speech) is now entirely softcoded.
- Revised and expanded some other earlier Npc code for item enchantment (screenfeed to come)
- Corrected borkage in vanilla Npc speech scripts tables, most of the code for act3 and act5 NPCs was just plastered there, several Act3 gossips are unused in vanilla, some quest specific gossips were listed without this taken into account (esp. those concerning Natalya, Anya and Nihlathak [and the Ancients]).

31st Jan 2008 (ca. 200-300 lines of code added, but nearly 4000 lines revised, skill revision paused until NpcDialogs.cpp is softcoded)
- Revised Npc system and softcoded half of NpcDialogs.cpp (menu options etc, speech to follow)
- Replaced core vanilla quest code
- Stores.cpp entirely softcoded
- Improved older TC routines
- A lot of tweaks to existing code

28th Jan 2008 (ca. 1000 lines of code added)
- Started redesigning the code for Leap (which has interesting bugs in vanilla, such as that Sand Leapers deal their leap damage before they leap...)
- Parts of the stats screen code have been re-written from scratch, the rest will follow at a future point

25th Jan 2008 (ca. 1500 lines of code added)
- Rewritten skill functions for Find Item from scratch
- Rewritten bash skill functions again (they were from early 2007 and needed to adapt the new code layout)
- Rewritten hellfire oil mechanism from scratch with new packets and everything, ISC bound checking et al. (approx 1000 lines of code on this)
- Improved performance of several other functions
- More things I can't remember ATM

24th Jan 2008 (ca. 1000 lines of code added)
- rewritten a lot of D2 utility functions
- rewritten a lot of core AI functions (walk, attack etc), so now even the last bits of AI code are replaced

22nd Jan 2008 (ca. 1500 lines of code added)
- further improvements to some earlier skill code
- Completely rewriten the two remaining Paladin skill funcs (Redemption + FoH) and all associated code (inc. missile and state funcs)
- Additional D2 combat code has been replaced (now most everything of this is entirely new code, I take a guess and say 95% of the combat code is my code now)

21st Jan 2008 (ca. 500 lines of code added)
- Further improvements to conversion (see second note)
- Completely replaced functions for Conversion and Holy Freeze (see note)

* oh the sheer brilliance, Holy Freeze func (#81) was supposed to add the shatter state to the unit while it is effected by the aura, however this never had any effect because the statlist is deleted when a unit dies, which triggers the end-state callback, as a result the shatter state is removed again before it takes effect (GREAT WORK), the only reason holy-freezed units shatter is because of the melee cold damage it grants :P. The well known conversion bug (besides the fact conversion adds the chance-to-convert as ed% :roll:) is the dumbest thing I've ever seen in form of code. The end-state func will _EXIT_ if the conversion_save state exists (and it will _ASSIGN_ it when it doesn't exist), the result is that the stats are never reset.
** conversion (ofc entirely ridden of the stupid vanilla bugs) has been changed slightly, in vanilla the units stay planted where you converted them, now they'll actually follow you around if you get off screen. This is both good and bad (good because you won't lose on exp and have to walk back there waiting until they get normal again), bad because the bug is gone and when they leave the converted state they're back to full strength (which means if you convert too many, they may all return to normal around the same time, and you'll end up facing half the level).




BUILD 80120

19th Jan, 2008 (ca. 1200 lines of code added)
- Entirely replaced the code responsible for special skill related unit drawing (WW rotation, charge trail etc)
- Completely re-written skill functions for charge, fixing what appears to be the most bugged skill of all times. (see notes)

1.) - incorrect path values set on server-side, different from those on the client, which can lead to stuckage (for monsters)
2.) - When the skill fails it did different things on the client / server (for monsters)
3.) - the range used was inconsistently set to 0 or 3 which produces different results on client/server (again for monsters)
4.) - some path related calls were entirely forgotten on the client (once again for monsters)
5.) - wrong mode used for monsters (server side at least)
6.) - invalid frame count used on client and server due to badly written loop that failed to iterate the sequence properly (always returned 7, no matter what)
7.) - knockback flag set even if no hit occurred
8.) - ignored tohit calc when used by monsters (this may NOT have been a bug, but they could just as well intended to just skip the AR bonus, we will never know)
9.) - hardcodes for reanimated horde are different client/server side (on the server the function finishes charging, on the client (properly) they keep charging until they reach you, due to this they get stuck running in place)
10.) the trail effect was not softcoded, despite the fact it only required one line of code to do this (...)
11.) presumably more things I forgot about

16th Jan, 2008 (ca. 1300 lines of code added)
- Some improvements to older bash func replacement
- Replaced skill functions related to damage aurae (and yes, sanctuary works like it should now :P)
- Great improvements to Paladin stat auras
- Rewritten skill functions and associated code for Poison Explosion, Attract and Revive (see notes)
- Further replacement of utility functions
- Some D2 functions called often were replaced with local copies to speed up execution (global calls need more clocks then local calls because it calls a memory location viz. a static address)
- Source revision, some cleanup done to all the source files adding enums for things such as unit flags and other former constant values

* Revive was changed around a bit, it used to use overlayheight from monstats2.txt to determine the monster size, but this can produce weird results on some enemies, so it uses a custom function for this now. Poison Explosion code was beefed up, the range and amount of clouds will now depend on slvl.

** And with this update, the original skill code of the necro, is entirely and completely rewritten. Leaving the Paladin, Barb, Assassin and Druid skill code.

14th Jan. 2008 (ca. 500 lines of code added)
- Rewritten skill functions for confuse (see note)
- Additional improvements to the games targeting routine

* In vanilla confuse is coded in a rather bad way. The function responsible for picking targets with confuse will reset the internal ai state of the unit back to default (aka not confused) if it fails picking a target, as a result the confused monsters are only sometimes confused but generally will only have the confuse state on them (this means they will be attacked by other monsters, but they will not attack other monsters).

13th Jan. 2008 (ca. 400 lines of code added)
- More misc code improvements and d2 utility replacements
- Re-written skill functions for corpse explosion

12th Jan. 2008 (ca. 700 lines of code added)
- Misc code improvements, replaced some more D2 utility functions
- Re-written functions for raise skeleton and revoked former hardcodes therein
- Re-written functions for curses and bone skills
- Changed previous durability routine to final version
- Changed merc experience share stuff

11th Jan. 2008 (ca. 1000 lines of code added)
- Re-written old exp code, replaced with final variant, added party exp handling
- Re-written and expanded Hydra skill funcs
- Re-written skill functions for Teleport, Chain Lightning and Thunder Storm (<- fully softcoded now)

* With this update all sorc skill funcs are fully rewritten :twisted:

10th Jan. 2008 (ca. 900 lines of code added)
- New code for handling server controlled event sounds (expanding existing stuff used for example for quest specific character speech)
- Skills functions for fire wall and enchant re-written from scratch
- Re-written skill funcs for Inferno, Static Field, Blaze (+Spider Lay) (see note)
- Improvements to state handling code (in general)
- Improvements to freeze, stone curse and chill states

* Lotsa bugs, more bugs and yet more bugs after that (and a little bit of hardcoded crap too)! - Inferno has hardcoded framecounts, they are different on the client/server (leading to stuckage bugs), the default seq_input of 10 is bad, it should be 9 (this causes several of the missiles to do no damage in vanilla), incompletely coded in some places, Static Field precalculates the damage but then passes the wrong arguments to the damage evaluation, where it gets recalculated (effect: unit with 50% lightning resist would be treated as having 75%), Blaze/Spider Goo - this was definetly one of the most hardcoded things yet, spider goo even had hardcoded sounds. All softcoded now. (Side note: in vanilla, Spider Goo only works on the client when used by a player, the missiles have no effect server-side unless the skill is used by a monster).

9th Jan. 2008 (ca. 800 lines of code added)
- Re-written from scratch functions for (Player) Inferno, Charged Bolt and standard buffs (SrvDoFunc #18)
- Improvements to stat aura code
- Split Skills.cpp (ca. 6000 lines) into individual files for each vanilla class / util
- Further adjustments to combat code




BUILD 80108

8th Jan. 2008 (ca. 1500 lines of code added)
- Major improvements to combat events (see below, note 3)
- Re-written skill functions for Vengeance, Strafe and GuidedArrow/BoneSpirit
- Re-written skill functions for Lightning Strike (see note)

* These functions are completely fubar in vanilla. They add the radius as ED% to the melee attack, have hardcoded lightning damage added to the melee attack and a strange target picking routine.
** With this update, all of the Amazon skill functions have been fully re-written, without the bugs ;)
*** Fixed the long time bug that allowed the player to move/attack/cast while dodging an attack, which resulted in a "walking in place" anim, other improvements done to uninterruptable skills, last-block-frame now also applies to DEA

7th Jan. 2008 (ca. 1000 lines of code added)
- Re-written Blessed Hammer, Nova (all) skill functions from scratch (inc. removing hardcodes)
- Improved math in damage routines for additional accuracy
- Re-written Multishot (and also Teeth) skill functions from scratch (see note)
- Improvements to the missile attack rating fix (applies to everything now inc. Multishot)
- Improvements to the attack-rating based on distance for missiles

* Multishot arc-function decyphered, changed calc3 from that stupid nerf to a enhanced damage bonus, code for arc given below in case someone wants to see it (after this add space_x and space_y to target_x and target_y recursively). EDIT: The function was expanded to allow shooting a random missile (synchronized between client and server) picked from SMissileA/B/C and CMissileA/B/C. See here for an example :D
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Tue Jun 09, 2009 4:22 pm

BUILD 90203

3rd Feb (ca. 2000 lines of code revised)
- SkillTrees.cpp ( small file ) and PlayerSave.cpp ( huge file ) are revised, with this the entire revision is over!

2nd Feb (a few 100 lines of code revised)
- Dungeon.cpp is now completely revised
- Netcode.cpp is also completed

1st Feb (2000+ lines of code added/revised)
- A lot of outdoor code was added, handling waypoints, cave entrances etc. Revised some of what remained in dungeon.cpp too

29th Januray (1500+ lines of code revised / some added)
-Cleaned up ClientEffects.cpp and ported some more D2 code. ( with work from the 27th this now leaves 5 files to be revised )

27th January (500 or so lines added)
- Light settings, day night cycles are now no longer bugged as {filtered}. Time does not randomly flow backwards, the end of the cycle no longer jumps forward either, so the time now flows rather then asynchronously bouncing from side to side. Removed many hardcodes related to light settings as well.

until 25th January (anywhere between 3000 to 4000 lines of code revised + stuff added too)
- Environment effects such as rain, wind and snow are now mostly driven from new code
- ISC op-stat code has been replaced entirely
- Fixed vanilla bugs with the fade stat ( the value was supposed to control what TransTable record is used, instead it always uses 50% transparency... despite checking that the value is within range).
- Various other additions here and there I can't remember in detail right now
- The following *.cpp files are now fully revised: newtables.cpp, stringtable.cpp, charscreen.cpp, keyboardhooks.cpp and frontend.cpp, this leaves only 7 files pending for revision.

2nd January (ca. 1500 lines of code added, revised stuff also)
- Red portal data has been softcoded into RedPortal.txt ( this controls preset red portals like the cow level one, the act5 hellpit portals and so on ), entries in here are needed for the game to properly init a level before you visit it.
- preliminary code written for overground levels, but it's not active atm pending further work/research for the future.
- More graphics and sounds added for units/effects.
PS: Happy new year to everyone reading this

31st December (ca. 300 or so lines added)
- Some more AI stuff, added regrouping behavior to the pool of functions exposed to the script-pool.
- Removed hardcoded DT1 masks for filler-regions of outdoor levels
- Removed some exeptionally insecure code regarding lvlsub.txt

30th December (ca. 500 lines of code added + content additions)
- Some more quests added
- Several monsters are in their final shape now (beside stats and stuff like this that will be taken care of way way later)
- Fixed the bug'o'rama associated with the vanilla Will'O'Wisps --- I'm not talking about the gloam damage, that was fixed as early as 2006 :P --- their vanilla AI was broken, they just walked around without first using their vanishing anim (instead they used it randomly) and had no anim for appearing again --- all fixed now and looking properly.

29th December (ca. 2500-3000 lines of code added)
- Completely replaced all of D2s random maze generation code. ( mazes as in dungeons, not overground areas ), before this only a handful where replaced, now its without exception new code.

23rd December (ca. 1000 lines of code revised)
- More quest stuff revised and cleaned up

21st December (ca. 1000 lines of code revised)
- Revised QuestMeta.cpp and parts of Quests.cpp, quest triggers and the like are now softcoded into QuestTrigger.txt and Quests.txt (and a few upcoming files).

20th December (ca. 100 lines of code revised)
- Finished revising sounds.cpp + added SoundEvent.txt softcoding event sounds (such as special noise triggered by quests)

29th October (ca. 400 lines of code revised/added)
- A bit of work on DRLG code and dungeon.cpp softcoding act1 wilderness stuff and rewriting called D2 code.

27th October (ca. 3000 lines of code revised)
- Only 17 source files remain to be revised now
- Revised patching and import routines
- It is now possible to customize save, screenshot and log directories.

26th October (ca. 1000 lines of code revised)
- I thought I wouldn't have much time before next year, anyway had a window of opportunity this weekend.
- MetalStorm.dll core code revised
- Config code revised as well

21st October (see below)
- Ported custom launcher, no more need for game.exe (etc)


BUILD 81004

4th October (ca. 2000 lines of code revised)
- SkillsSorceress.cpp is done, and with this all skill files are revised. Next build will finish the revision of the remaining CPP files.

28th September (ca. 3500 lines of code revised)
- All skill files that remained are now revised, with the exception of SkillsSorceress.cpp which will over the course of the coming week.

27th September (ca. 2500 lines of code added, a load revised).
- Softcoded a ton of useless hardcodes related to type1 DS1 units.
- Fixed the palshift assignment routine, now it properly assigns a palshift also to champion packs (in vanilla sometimes only 1 champion recieved the palette, until you reload the area).
- Fixed legacy garbage in champion pack routines, that prevents 'new champions' from being spawned (ie you always have one 'new' champion and 1-4 regular champions, this seams to be a carryover from pre lod legacy...)
- Softcoded all of MonPlace.txt (the entire txt was just a reference to a hardcoded switch table with a load of stupid hardcodes in it).

25th September (ca. 2500 lines of code revised, some code also added)
- Intro messages now use a custom font to make them stand out more from the background.
- SkillsPaladin.cpp was fully revised
- Bug #12 to add to vanilla Charge :) (see old report thread) was revoked, charge never reset the path mode, it's what caused such bugs as the moonwalking after you got knocked back.

17th September (ca. 5000 lines of code added, a ton revised)
-SkillsAmazon.cpp was revised, a load of code added to many skill and missile related files, way too much to count.
-Many additions to the AI code, more D2 ais ported to softcoded sequences (among them council members).
-More D2 code related, handling the formerly hardcoded clientside aspects of hitclasses and a load of other things.
-Added a custom font engine to D2 that allows addition of infinite new fonts to the game and up to 100 text colors.
-Softcoded aspects of sounds.txt, now what sounds are music and speech is no longer controlled by a hardcoded range but by two new columns in sounds.txt
-Softcoded Npc voice banks. (typo fixed)
-More stuff I can't possibly remember.

10-11th September (ca. 1500 lines of code added)
- missiles.cpp has been fully revised and new things added
- more code, including the entire aura ticking was rewritten
- spawning of superuniques was replaced (it had like 20 individual patches in it before :P)

8th September (ca 700 lines of code added)
- expanded and rewritten automap.cpp

4th Septermber (no code, design break ;))
- We are currently in the process of designing more actual content before the revision continues, especially with regard to units, lore and plot. Among others the entire player layout has been completed now and only needs to be "put into effect". Some new units and items may be introduced on tidbit posts throughout september.

24th August, 2008 (ca. 200 lines of code added)
- change the way gem grades are selected, instead of being TC based this now uses the same logic item qualities do (that is, the upgrading also uses the same formula for evaluation). This allowed the (re)-implementation of the "chance of finding better gems" stat.

20th August, 2008 (ca. 3000 lines of code added)
- Replaced a whole ton of code regarding item quantity and ammo usage that was skipped earlier in the dev.
- Continued slightly on the skill work, replacing a few addition skill funcs here and there, but far more after the revision.
- Revised a bit of the old missile code.

19th August, 2008 (ca. 1000 lines of code added)
- Replaced parts of the bin image compilation with more secure code
- Added inter-process mutex synchronisation, to prevent issues when having two windows open at the same time while running in -txt mode (if both happen to write the same bin image at the same time bad stuff is bound to happen, as the game isn't designed for this).


17th August, 2008 (ca. 600 lines of code added)
- The Ai is now capable of using items like potions and scrolls :), it even has a hover message saying what it just did.

12th August, 2008 (ca. 2000 lines of code revised)
- Revised all object related code that remained (objects.cpp, objspawn.cpp)
- Revised level drain code.


10th August, 2008 (ca. 1000 lines of code added)
- Added two new txt files for softcoding casket spawns and traps.

9th August, 2008 (ca. 500 lines of code added)
- Boots, gloves and torso items now also give their color to the proper bodylocs.
- Improved weaponSel code in D2Game.dll, now use the weapon assigned to the skill (ie, left skill uses left weapon etc), in vanilla the second weapon was only used by skills like double swing and ww, making dual wield pretty useless.

8th August, 2008 (ca. 1000 lines of code added)
- Finished replacing the code in D2Client that handles the gfx selection for units. This solves a lot of problems vanilla has, especially regarding shapeshifting, which was only halfway coded...

5th August, 2008 (ca. 1000 lines of code added)
- Fixed two memory leaks in D2s cof handling code
- Replaced a lot of the COF file related code
- Tons of other gfx code was replaced and optimized

4th August, 2008 (some code added, more later)
- The composit picking was changed, the Torso item only effects the shoulders + torso now, boots effect legs and gloves effect arms.

3rd August, 2008 (ca. 500 lines revised, 500 added)
- Revised and replaced the remaning exp related code
- Replaced all code related to merc stats.

2nd August, 2008 (ca. 2000 lines of code added/revised)
-Replaced all D2 calls that remained in bosses.cpp related to spawning minion groups.
-Replaced vanilla funcs for putting items in bodylocs/belt.
-Changed how Diablo II creates its window, the window now has controls (close, minimize), title text can be set (etc)
-Replaced the WndProc with a new one.
-Added new option to ini and config menu, you can now prevent d2 from minimizing (properly, ie it keeps focus always).
-Replaced all of shrines.cpp
-Added several new shrines, among them the diablo1 and hellfire shrines: Mysterious, Spiritual, Glowing, Stone and Mandicant's

31st July, 2008 (ca. 1000 lines of code added)
- Some npcs now offer to remove unequippable cursed items for a fee, the npc menu will show a list of unremoveable items you have equipped, and you can pick the one you want to remove. (doesn't work on quest based items). The item is destroyed in the process (ie it is dispelled, so you will be left with a normal item of the same base type).

29th July, 2008 (2200 lines of code revised)
-NpcDialogs.cpp is now also entirely revised

26th July, 2008 (>1500 lines of code added)
- Replaced all the server side npc menu handling code, (everything from gambling to personalize etc).

24th July, 2008 (ca. 900 lines revised, 300 or so added)
- Revised stores.cpp and changed the way npc inventories work (it now works like MonSeq.txt), this frees 115 columns in w/a/m for custom usage.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Wed Oct 21, 2009 12:35 pm

BUILD 90731

31st July, 2009 (at least 50K lines of code have been worked on)

Dev stuff
- Setup an internal wiki for project documentation.

Cool stuff
- Implemented Fist of Ares functionally identical to what we believe it used to do in the D2 alpha. It can turn any missile weapon attack into a multishot attack, while any may be wrong here (we have flags controlling what can and can't be effected), the spell is functional for both players and monsters (and ofc tested in MP with debuggers on both ends etc).

Code
- Implemented epic feats system where anything from specific stat or spell boni to quests can be linked to individual class levels.
- Removed code that formerly disabled the druid sprite internally ( based on an older concept ).
- Changed how rune drops are handled, they now use a ratio system that can be influenced by the player.
- Cleaned up some of the older item desc code expanding it and removing the last hardcodes.
- Replaced code of wells ( this wasen't done before for whatever reason... ).
- Unified code that can heal units ( ie wells, npcs etc ), now flag driven.
- Removed several redundant stats that were disabled earlier in the dev.
- Finalized the script engine, how it is full fledged with a dynamic cache and so on.
- Improved the efficiency of some of the older new txts ( collapsed a ton of stupid bools into a bitmask ).
- Exposed more functionality to the scripts.
- Revised the entire affix evaluation process (see topic).
- Replaced a ton of remaining vanilla item specific code.
- Added a stat to control item transparency level, so some affixes can now make the item look different.
- Started digging into some path code and replacing things.
- Expanded the code so far written for outdoor areas, now only the 'level specifics' are left.
- Added a new jesters stat variant, though it works diff. from the D1 version.
- Entire unit init code on the client-side was replaced removing a sheer endless amount of hardcodes and bugs.
- The entire missile init code ( much more extensive then the other units ) was replaced both client and server side.
- Entire server side event timer code has been replaced.
- The client-side FrameStepper for all units but players was completely replaced.
- Additional sfx code was replaced, including the last event driven unit sfx.
- Magic find can again be effected by diminishing returns, it's just softcoded into qualities.txt ( this will most likely never be used though ).
- Improved the player mode restriction code now that the event bug is gone :D
- Replaced the majority of the server side pet code, ditto for client, this is a prerequisit for possible multiple hirelings in the future.
- The 'spray' missile ( ie curse radii etc ) has been optimized and is more softcoded now.
- New skill code for Raven, Kick, Hurricane, Armageddon, Mind Blast, Shock Field, several funcs that aren't used in vanilla, maggot hatch, maggot lay, all monster inferno spells, unsummon, vine summons, firestorm, tornado, twister
- The entire animation class and unit mode control was replaced and rewritten from scratch to remove the single biggest bug that plagued vanilla since v1.10 (see CE topic). It is now also loads and loads more efficient.
- Re-implemented the level reduction for conversion (etc), but it no longer messes up the unit stats and properly resets them to the old life and level, even updates the client with the new level!
- Server and client missile movement controller was replaced.
- Reactivated diminishing returns on speed stats.
- Reactivated the quill rat multishot, just that its now softcoded into monstats3.txt instead of being tied to the base id + ai.
- Improved the way the game seed is generated.

My Own Mess
- Fixed some flag garbage with the spell target eval that remained there from an earlier test.
- Some more flag mess in some code dated back to 2006, fixed now.
- Auto-requip of ammo now works properly again, in fact it's even improved now :P
- Some new triggers used a frame delta value, which was due to new research proven to be inaccurate, they now store the counter on the unit itself.

Vanilla Bugs Fixed (only unknown/interesting things listed)
- DAE will no longer kick in when you are performing an attack ( you do not get hit, it just doesn't change the mode ), stopping missiles from being fired backwards client-side.
- Arcane Tower and Desert Turret missiles are no longer desynced client-side (well actually the server-side code was wrong but whatever :P).
- Fixed an ancient and stupid bug with the courtyard/outer cloister doors, they didn't handle their open/close anim properly client-side, which made you able to walk thru them when they are closed etc.
- And another one from the category ancient and stupid, the inferno range for monsters never worked properly, making it start further away rather then traveling further, this is noteable vs. diablo on hell which will never hit you with his lightning if you are within melee range. The inferno spells now properly calculate the range.
- Similar, imp inferno is no longer bugged :P ( this wasen't well known, but they practically did a heap load of things wrong in this func, calling incorrect path functions and more ).
- All mode timer based bugs have been resolved by extirpating the cause.
- Unique items that generate in the gamble window no longer clog the spawn bitmask unless you actually buy the item. (*1)
- In vanilla the missile piercing was not accurate except for yourself and monsters, other players in MP were assumed to have 100% pierce (unless they had 0), I fixed this by keeping clients up to date with the value of the stat.
- Fixed a critical bug on the client that could mess up the game session completely, if the client could not link an async unit (critter etc), it tried to delete the unit occupying the same guid on the synced list.
- Flickering missiles will no longer try to flicker in low-quality mode ( the missiles dont even have light radius in this mode ffs... ).
- Fixed the 'shifting corpse' bug (corpses rotating randomly at strange moments), it was actually much more critical then one would assume and a real performance killer, what happens is that the game frees the preloaded gfx when it checks if it is already loaded!, needless to say it no longer does this.
- The player no longer potentially (it wouldn't happen always, but they alloc a list and may exit the func w/o assigning it) leaks a statlist every time he initiates run and walk.
- Armageddon no longer tells the client to launch missiles that it doesn't launch server side ( if the missile is >= 100 subtiles from the player it will not be spawned server side ).

*1 theres actually code to flush items that get deleted otherwise from this bitmask IIRC, just gamble didn't do this, effectively further reducing the chances of getting uniques, since anything you didn't buy since game start cannot be bought in that session again.

9th June, 2009 (around ~30000 lines added/modified)

Content
- Armor.txt in preparation.
- Last touches being done to weapons.txt.
- MagicPrefix.txt is nearing completion.
- Design info for spells etc is now concentrated and will be worked up.

Code
- Altered how RemHit states are handled.
- Changed code for sending / recieving custom packets.
- Core skill code was replaced ( code handling SrvDo, SrvSt, CltDo and CltSt ).
- Changed the point at which custom clientside frame callback takes place.
- All the drawing code for units ( except shadows ) has been replaced, adding support for a ton of stuff that was direly missed in vanilla and fixing a bunch of bugs, the entire thing is faster now too.
- Many remaining skill functions have been replaced, such as Rabies, a true bugfest.
- Fixed bugs with throwing mastery not being used by double throw properly ( vanilla bug ).
- Added pick locks skill ( you even get small exp reward for cracking locks with it ).
- Added further improvements to the Ai and how it reacts to 'bad targets' (such as players with thorns etc).
- The random GH strokes from poison are now factored with the % of life left.
- Fixed some vanilla bugs related to quantity ( give yourself a javelin and depleat it until only 1 is left, throw that one, you'll notice it deletes the item before anything is thrown! ), the problem exists also with bows and was fixed there too, although here missiles were created.
- Made some spells not castable while walking, to prevent the slide problem ( this is a halfassed fix until I find the real cause for this ancient glitch ).
- Capped final critical hit chance to 5-95% for players, like chance to hit and similar ones.
- Replaced event funcs for mana-kill, heal-kill and demon-heal I didn't bother with before.
- Some former boolean stats are now using states.
- Rewrote the targeting and clicking code on the client from scratch.
- Added some macros to convert text to tokens, to speed up work and other code cleanup.
- Some more misc GUI funcs were replaced.
- Melee skills using the A1 anim for playets now randomly alternate between A1 and A2 like normal attack.
- The huge MonMode handler in d2client.dll, home to a plethora of hardcodes is now finally replaced in its entirety. Vanilla actually set path variables for knockback with life percentages near the start of this function...
- SplEndDeath now properly picks between minion1 and minion2 ( the original vanilla one, we made the column do more then one thing ). This is now properly synced with the client.
- Init code for all server units was replaced
- Improved how missiles store their palettes, changed how random colorshifts work and a load of more work in this department.
- Replaced missile funcs for bone spirit and holy bolt, both having a share of bugs. Holy Bolt didn't hit properly clientside if you changed the skill before the missile hits, bone spirit and GA code was inheritly broken. ( see below ).
- Added funcs to code base to trigger earthquakes at will.
- Reactivates the LocalBlood column in the .txt files.
- Improved the Impregnate ability of the putrid defilers code wise.
- Fixed vanilla bugs with siege beast stomp that never dealt damage due to checking for a missile it wouldn't use anyway!
- All of d2s distance-calc funcs are now replicated in the code base, so no need to use D2Common calls for this anymore.
- Improved code to pick a monster from the monster chain based on dlvl, that is not prone to the d2 bug that occurs with infinite or broken chains.
- Added missile functions that first fly and hit targets and then return to the player recharging him/her.

Own fixes / changes
- Lower vampires now just suck blood instead of having level drain.
- Self-Resurrect will now wait until the DT anim ends if the timer set in the .txt is too short.
- Even when skill MonUMod is not init properly the unit will use the proper anim for it now.
- Sand leapers are now knocked back again by all attacks ( uses seperate column, not bSandLeaper now ).
- Downgraded unique or set ( ie rare/magic ) items again get x3 and x2 dur which I disabled before, now re-enabled.

About Bonespirit and GA

In vanilla the retarget frame is broken because they compare it with different values on client/server, which causes
the missiles to quickly become desynced. On one end they check ( base_range - range_left ) % retarget, on the other they check vs. ( range_left ) % retarget. In addition to this, the fact it uses LoS which was never mentioned in the patch readme seams to be a bug after all, the cause of this is that v1.10 has globally added the LoS flag by default to all target seekers that do not have their own aura filter, which applied to these missiles. The old fix to this was removed now that the code is totally rewritten.

9th May, 2009 (around 15000 lines added/modified)
- Code that handled loading and caching composit cel files was replaced with a more efficient altenative.
- Fixed some problems with gambling caused by ilvl > 99.
- The code that sent and recieved monster data has been replaced with a more efficient variant that ontop needs to send less data.
- Replaced the code that serialized the stat section of the D2S, with this change stats are now essentially unlimited and can be expanded up to 4 billion ids (65K base stats with 65K layers each), though we are not currently using this ability since we're far from running into any limit here yet.
- Drow items where implemented that disintegrate when exposed to sunlight, these items will be discussed in detail later.
- Replaced the code that creates the player unit (both new and previously created chars) with a bunch of modifications to how the save game header is used.
- Replaced hClient constructor and hooked the destructor to free additional data appended to this struct.
- Fixed some stupid vanilla bugs related to skill hotkeys, which caused skill ids > 4095 to glitch when applied to hotkeys.
- The game no longer attempts to save hotkeys assigned to charged skills between sessions, this never worked properly anyway and caused other internal problems. The hotkeys stay in use during the session however.
- Players now store a creation time that will be used in the future to display the # of days played (note: the original D2S files had this field, but it was always 0).
- Started replacing cubemain code, not much yet though.
- Replaced the function that assigns item properties, so that new txt files can define their own ePropType ( the # of prop fields per file were hardcoded due to this before ).
- Changed how trinket gems work, they now spawn with random stats ( up to 6 affixes, but usually 4 ), these gems are used with obelisks to buff yourself and your allies with the stats of the gem when inserted into an obelisk.
- Final code for the quality above unique has been added and a new txt file was added to handle this.
- All code related to set items and rune words was replaced but not changed (just made more secure and efficient so far).
- It is now possible to start in levels other then towns (etc) - see This topic from some time ago.
- Unit selection code on the client was entirely replaced fixing problems related to unit bounding box calcs that exist in vanilla in some parts of the function, also made it more efficient. Units with the invisible state are now also unselectable.
- Replaced several smaller GUI functions in d2client.dll, fixed some interface bugs like the hostility icon showing when the cube is open when you're hostile, but wont show for the inv/stash screen, now it doesn't show for either of these.
- Some more skill functions replaced, I forgot to deal with blade shield before, which was officially bugged beyond belief and now works as intended.
- Replaced server side code that controls NPC welcome and welcome back voice clips.
- Each skill now has it's own private timer ( this wasen't as hard to implement ) using a bitarray for quick checking if the skill can be cast again.
- Fixed a few silly bugs of my own.

24th April, 2009 (around 4000 lines)
- Implemented remaining obelisk code
- Removed some inefficient garbage from the PalShift loader, which resulted in the whole palshift load/unload code being replaced
- Replaced all code related to states on the client that handles their properties, sounds, overlays (etc) and triggers init and end effects.
- Changed all network code in regard relation to states uncapping the number of states.
- States are no longer limited to 16 stats on the client (blizzard only sent the first 16 stats on the statlist), this limitation even applied to monprop.
- LUA Interfacer added by Joel and is currently being expanded with higher degree of function exposure.


21st April, 2009 (around 3000 lines)
- Fixed some cryptic display glitches that were left from the desc conversion.
- The entire save/load process for items has been replaced with new code, this means the .d2i (JM) format is now changeable. The new routines are also a lot faster then the old.
- New obelisk stuff is now entirely layed out, only has to be implemented sometime in the future
- Replaced code handling skill delays
- Code handling shape shifting is replaced, this includes the skill funcs for the druid.
- Druid spirit skill funcs replaced
- Implamented animated inventory gfx

*** D2I Changes ***

Ears now save their item code (the way they handled ears before was very bad depending on a flag that could be assigned freely to anything...). Ears can also display the max clvl used by the mod properly.

Organs store monster ids up to 32767 (vanilla limit 1023)
Item level uncapped, now uses a whole byte instead of 7 bits, with no internal cap (ie max ilvl is again 255 now).

Up to 8191 prefix/suffix/autoaffix vs. 2047 in vanilla, up to 512 rare prefix/suffix vs. 255 in vanilla

Unique and set Ids uncapped to 32767, instead of 4095 in vanilla.

Quantity uncapped to 65535 vs. 511 in vanilla (pre lod it was a full DWORD though).

Added two new qualities (the former quality >unique is now treated as a real quality)





21st Mar, 2009 (around 4000+ lines)
* the chance to hit monsters shown in the char screen now takes into account their blocking too.
* fixed a serious bug instroduced by v1.10 that allowed cheating, items that needed extra str/dex to wear but gave a bonus themselves didn't get unequipped if you no longer had enough str to wield them (because the player kept their bonus), this is fixed now.
* restored some alpha d2 functionality to id scrolls (they now make the id-ready sound).
* replaced the code drawing inventory items for future changes to it
* the alpha d2 obelisks have been re-implemented, in vanilla d2 the only thing that prevents them from working is one missing check in d2client.dll. what they originally did was give you +vit/enr/str/dex/life/mana/skillpts depending on what gem you inserted, the new ones will do something else.
* code sending the server controlled overlays was rewritten
* skill funcs for leap attack, whirlwind, double swing, frenzy, are replaced, as well as the rest of leap.
* fixed a stupid vanilla bug where the target picking funcs on the client didn't exclude critters.
* code that controls the sound emitted by tiles when you walk on them was replaced.
* shields now can lose durability when you block an attack with them
* restructured all the project headers

16th Mar, 2009 (around 5000 lines)
- Fixed a severe memory leak in D2Client.dll related to music
- Adjustments to TreasureClass.cpp and Characters2.cpp
- Implemented sellable junk items and added special desc code for them (their price is visible in the item desc, so you get an idea this stuff is meant to be sold and/or traded to certain npcs in exchange for services, or transformed to something else, you get the idea).
- Rewritten all of D2s event sound code, this is server-triggered SFX, formerly I already expanded this but still called the old routine, now stuff like quest event music and character voice samples are under our control fully.
- Activated a little known feature of D2 for locale other then #7 and #6 (subtitles for ingame speech) --- can be toggled on and off now for all language builds.
- A load of client unit code was replaced
- SrvDo, SrvSt and CltSt funcs for Leap are relaced, CltDo will be in next session, among others the leap funcs can now deal AoE damage when landing, not only KB etc, all monsters can now properly use leap.
- Replaced the code that evaluates how many directions a unit sprite has.
- Replaced the cleanup routine for STATE_SKILL_MOVE on the client (handles cleanup after charge, ww, leap and leap attack).
- Added several new txt files that govern some internal stuff (subtitles etc).
- Softcoded merc voices to Mercs.txt
- Softcoded player dodge sound to PlrSound.txt ( instead of it being the same voice for each player... )
- Fixed invalid AiTargetType for Vultures, this caused them to do their 'air-walk' in vanilla.
- Added function to get stringkey from index, for dumping data tables featuring strings to txt files quicker.

14th Mar, 2009 (several 100 lines)
- Replaced skill code for Barbarian buff-warcrys (BO et al.), Taunt and Berserk. Among others BO works like an aura now in terms of how the state reacts to players who already are buffed. (in english: your lvl 50 BO will not get replaced by naabalots lvl 1 BO).

10th Mar, 2009 (lines not accounted for, minor)
- Tweaked a few things as to implement the animal-class a la D1 ( which had animals, demons and undead, not just demons and undead ) and added the proper stats vs. them ( defense, tohit and damage ).
- Some more final monsters done.

8th Mar, 2009 (ca. 1500 lines added)
- The remaining skilltree and skillmenu code is done, this means the core of the spell system is now in place and functional.

6th Mar, 2009 (ca. 1500 lines added)
- Rewritten all the code governing the look of skill trees on the client, except for the function drawing the icons, this follows the next session.

5th Mar, 2009 (lines not accounted for)
- D2s Item desc code was totally rewritten, the entire desc construction is alot more efficient and *gasp* secure now (ie you dont get buffer overflows D2 is so notorious for when you scroll over items with too much text). Copying a 4096 wchar buffer into a 1024 wchar one is not a good idea.... There were also a lot of bugs in this code in vanilla such as set item descs being constructed incorrectly and lacking things like boot damage, quantity displays. Among the extra changes implemented:

1.) toggleable ability to list stats for socket fillers and all their aspects as seperate parts in the itemdesc (see screenfeed topic)
2.) can show item code in item name
3.) can show ilvl and sockets in item name
4.) Set items that you own but do not have equipped show up in yellow, not green, in the set item list.


16th Feb, 2009
- Set up a SVN server for MetalStorm and associated projects

15th Feb, 2009 ( some code, not that much )
- First monsters with final stats and abilities added
- Tweaking around with hitclass code, now every attack that does not induce hit recovery counts as softhit and updates the client, this setting is tweakable for normal vanilla-ish behavior, just felt this is more natural ( like this any hit that connects and deals elemental damage will show its overlay and play its sound ).
- Hitclass is now cleared after the sfx/overlay is handled, unlike vanilla which keeps storing it causing all kinds of stupid behavior ( in vanilla the splEndDeath unit will replay its hitclass when it revives etc ).
- The gethit sound on players ( the moan ) does not play 100% of the time, but based on how much life you have left.

14th Feb, 2009 (ca. 400 lines of code added + txt/dcc work)
-Beholders and Mind Flayers were added alongside their abilities and counter measures.
-More stuff once I get back home

13th Feb, 2009 (ca. 3000 lines of code added)
- Loads of stuff, nothing to noteable though (bug fixes and hardcode removal), d2client.dll seams to have a load of unknown bugs in store and is filled to the top with often useless hardcodes.
- The unit transforms code + clientside monster init were entirely rewritten removing a plethora of hardcodes. Some of which were quite problematic because other places in the dll were modified by Blizzard to load these settings from the txt in v1.10, so the result is inconsistency, nice! An example of this are boss palshifts via the utrans columns, the main palshift handler will read the values from the txt, the one inlined in the transform func still has the hardcoded diff+baseid switch it had before v1.10.
- Another memory leak, even more severe then the last one was fixed, the skilllist pointer was overwritten w/o freeing it first when a unit got transformed, this means the list itself + all associated pSkill instances will never be freed.
- More bugs! After the above, they assign the unit skills but do not assign the mode from the txt, this results in undefined behavior later.
- I've also replaced a bit more sound code, solving yep, some more bugs.
- And as if this wasen't enough, I also replaced the clientside missile collision handler, which contained a pointless hardcode for the spidergoo missile (#146).
EDIT: Quick addition, made it so skills like teeth and multishot no longer play the travelsound for each missile but only for the first one ( this was always getting on my nerves in vanilla :P )


11th Feb, 2009 (ca. 1500 lines of code added)
- A ton of clientside monster related code (with the crucial hardcodes :P) was replaced among these silly stuff like mummy1 baseid was always set to spawn with direction=7, don't ask me why), I also fixed a pretty severe memory leak with D2Client.dll and how it handles GFX (the destructor never frees hGfx->hGfxData) // they call this hParticle IIRC but its not related to those, but rather to z-offset of things like vultures and lobbed missiles.

10th Feb, 2009 (ca. 500 lines of code added)
- Core vanilla code related to overlays was replaced, among others we can now control what overlays 'stack' and which don't ( things like bone armor and fist of heavens overlay will not reset animwise when they are re-applied, this behavior is now softcoded )

9th Feb, 2009 ( ca. 2000 lines of code added)
- A plethora of vanilla sound related code was replaced, featuring such nice stuff like redundant loops, bugs, unstable code ( would access any NULL ptr you would feed it ) and much more nasty stuff. Among others the ObjSound and PlrSound tables are now softcoded a la MonSound.
- The game can now play 1024 sound files simultaneously, compared to formerly 200.

5th Feb, 2009 (ca. 800 lines of code added)
- Replaced some D2 code responsible for caching composits
- Smaller stuff today, monsters can now drop whatever was assigned to them via MonEquip.txt alongside their TC. This will apply largely to potions, they likely wont be part of normal monster TCs, they are among the items monsters can use themselves (as discussed elsewhere). This means that killing a mage before he uses his scrolls allows you to pick up those he didn't utilize yet.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Fri Mar 26, 2010 12:18 pm

4th March
- This is a brief notice here, theres just 4 units left to go before this build is completed and regular update schedule can continue!

7th February
- Finished working on a new palette editor that can alter colors within the D2 color space without needing photoshop etc. http://img17.imageshack.us/img17/9977/image25h.png this will be used in the upcomming time (after the code update is finished) to create palettes for all the new units we added.

4th December
- There is a literally huge update coming soon, in the last couple of weeks I've worked on the final version of the ai subsystem, fully embeding the scripting support and generally making it more modular, many of the behaviors that were on the list for implementation have been added, theres countless improvements to unit intelligence now (this core now roughly amounts for 5000 new lines of code, so far! as I ain't done yet), there will be a detailed post about some of the general changes that were done when everything is done with ;).
- As Vendanna posted two days ago, also semi-final stats for the majority of basic units (these stats wont be tweaked anymore unless something requires rebalancing).
- Some more monster skill code was replaced (Resurrect, there now is a difference between Resurrect and Resurrect2 - the former heals up to 50-85% of the target life, the other fully heals).
- Fixed another missile attack rating bug, present in and caused by porting over faulty, vanilla logic *see below

* As you might remember, when I originally rewrote the combat system I found a bug that made the game give ranged monsters x5 (or was it x2, not sure atm) the listed attack rating, this stupid thing was apparently an attempt to fix another problem, namely, missiles that require attack rating to hit and fired by monsters are inheritly bugged, when a missile is created the game copies over damage related things from the missile owner unit, while I made this copy over the attack rating bonus for skills, I didn't back then realize that also monsters suffered from a similar, yet less apparent issue. Now to the bug itself, when a monster fires a missile and this missile hits you while it's mode is not an attack mode, the missile hit has 0 attack rating, because monster AR is bound to their mode, so each of their attacks can have different AR values, and the missile calls the regular attack/defender routine, which grabs AR from the owner... I've solved this simply by making it save AR values for monsters on the missile (like I did for skill ar%)


2nd December
- Continue the development on the plot side, the work on sidequests has increased. A lot of AI and stats related changes to some units is in progress. (Fallens, Shamans, Ghosts, etc...)

7th November
- The code of ALL PLAYER SKILLS is now officially replaced with new code. The last ones on the list were some assassin skills that got overlooked (the progressive funcs for her charge ups), Feral Rage + Maul (same code, vanilla clone of frenzy), Fury (vanilla clone of zeal), Hunger and Volcano.

4th November
- Replaced the missile movement and collision checker (the func calling the handlers for Move and Hit funcs), this stuff was badly desynced between client and server and is now working like it probably should have, also server side missiles will now pierce thru monster killed by the same missile to emulate the 1-frame-difference behavior from the client (at the time the client does the missile check the unit has already been marked dead).

3rd November
- Replaced some more AI and path finding code that was being called from D2 rather then native code.
- Tons of development on the lore and plot side.

2nd November
- Fixed a bug related to bonewalls and boneprisons that has crept in while replacing the pet code.
- Replaced the last of vanillas unit drawing routines, the one handling shadows, it now follows the same logic as the normal drawing routines and is faster then in vanilla.

1st November
- Fixed yet more problems related to knockback that seam to also exist in vanilla but there is no simple way to verify it, I checked the vanilla code rather quickly earlier and it seams to suffer from the same issue though, it's just extremely unlikely to occur (see *1).
- Some more path code has been replaced.
- Quest and plot development efforts are intensified.

*1 - It seams one of the path finding optimizations in v1.10+ was to make units check for room boundaries less frequently by parsing along whenever any of the path nodes lays outside of the current room, normally this approach works just fine, however if the following criteria are met the unit will remain in the improper room. For this to happen the unit must be knocked exactly into a room corner intersection (top-left, bottom-left, top-right, bottom-right), if at that moment you stop attacking it, it will remain in the invalid room until the next path is created (which is only achievable if the AI code isn't called at all). The unit must further not have time to return to NU (this will 'fix' the path bit) so it's most easy to achieve this using low damage charge. I checked a similar situation in vanilla and it can theoretically also occur there, although due to the active unit AI (and static units like nests not being prone to knockback...) it will look like a lag based hickup.

22nd October, 2009
- Spell scrolls can now be used with all type of mice, issue discovered by Vendanna a while back and fixed yesterday, people who use the same code should remove the check vs. the 0x8 click mask.
- Changed how Impale and Smite effect durability, Impale in vanilla and also in my replicated skill code effected you before the attack even occurred, it now kicks only when it hits and has dealt damage, so no attack goes to waste, Smite now reduces shield durability when hitting instead of having no effect.
- Added the color dyes as actual items to the game, they work just like oils

21st October, 2009
- Fixed some sync issues and bugs related to knockback
- AnimRate for knockback is no longer identical with GH, the value is overwriten by entries CharStats2 and MonStats3 now.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Mon Aug 23, 2010 4:32 pm

BUILD 100326

26th March (>85000 lines of code changed/added, probably about 25-40K were added)

Txt changes
- Final version of the following units are implemented: skeleton ( melee, archer, mages, king ), zombie ( f & m ), bighead, foulcrow ( and nest ), fallen ( melee, shaman ), brutes, sandraiders, wraiths, drow ( cleric, melee, warrior, archer ), baboons, goatmen ( melee, archer ), clawviper, pantherwomen ( melee ), swarm, scarab, mummy, unraveler, mosquito ( ane nest ), willowisp, arach, thornhulk, ghoulmage, batdemon, fetish ( undead, melee, shaman, range ), blunderbore, zealot, cantor, roguescouts, fingermage, doomknight, oblivionknight, abyssknight, evilholes, councilmembers, reanimatehorde, snowyeti, minion, suicideminion, harpies, sirens, overseer, frozenhorror, minotaurs, putriddefilers, behemoths, winged skeletons, hidden, blackknights, fleshthings, stormdemons, gloatingeyes, firebats ( and hellbats ), hoarkdemons ( and spawns ), fire worms, hellboars, guardians, shredded, horned demons, scavengers, magmademons, overlord, gargoyle, stingers, vampiric mists, lashworms, drakes, tombrats, succubi, arachnons, black widows, vampires ( f & m ), acid spitters, advocates, satyrlords, gravediggers, beholders and mindflayers ( select to see ), each has unique behaviour, abilities and subspecies.

Project changes
- We have migrated the project entirely to VC 2008, which will let us harness SSE2 instructions and some other improved intrinsic code and optimizations.
- Added a ton of new utility functions for many tasks, these will be exposed to the scripting engine in a subsequent build.
- Unified all damage related data into tables, nothing remains lingering inside the actual code anymore.
- Removed useless duplicate code from many locations.
- Certain mission-critical code is now force-synced automatically, this ensures certain missiles show on on the client for example (important missiles like beholder rays etc), even if the client is too far away for the monster to be loaded, but the missile can still reach the client.
- Unified skill damage and attack rating checks.
- I added a debug feature that allows us to have two or more game copies >running actively and visibly< at the same time, good for multiplayer debug.
- Replaced code handling monster resurrect modes.
- The game keeps track of the last mode change frame.
- Implemented custom multilink fields for txts ( a field that can link to entries from more then one other txt ).
- Unified code related to monregion.

Changed txts
- Bossmods.txt ( expanded ), difflevels.txt ( much expanded, merged with difficultylevels.txt ), AiParam.txt ( redesigned ), AiFuncs.txt ( redesigned, documentation improved alot ), monstats3.txt ( tremandously expanded ), states.txt ( expanded with more then 10 new global state masks + the curemasks ).

Performance changes
- Accelerated code related the CelFile direction finding.
- Improved busy, uninterruptable and locked state checks ( new statemask added )
- Speed up the unit update routine on the client, removing a ton of redundant blank calls.
- Removed some redundant calls that were still made into D2Game.dll that have been replaced with new functions.
- PRNG and txt lookups are now inlined where possible ( part of the better code opts in VC 2008 ).

Replaced code
- Every single line of damage related code in vanilla has been replaced, tUnitDamage is thus now an extendable structure, this was used to add several new damage types and fully implement [they are now globally available in the txts via 'acid' and 'dark' codes] acid and negative energy ( the other new types are wind ['wind' in the txt] and thorns damage, and maybe a few more to follow soon ).
- Replaced the last bit of vanilla progressive skill code ( the packet handler for the skill message ).
- Replaced missile functions for fire patches ( meteor and immolation ), curse pulse controller, damage pulses, regular movement, lighting trail javelin, fire wall, frozen orb, frozen orb bolt, tornado, armageddon, meteor, molten boulder, fireball, throwing potions, exploding javelin, panther potion, glacial spike, firehead, freezing arrow, healing vortex, hurricane, all missile damage functions, finger mage,
- Added many additional missile functions, some of which were ( I guess ) already discussed in other posts, or at least mentioned, like return-to-caster one.
- Some missile funcs previously replaced have been revamped slightly, like holybolt.
- Spike trap code was replaced.
- Replaced code governing ctc skills, before this still called D2Game.
- Many monster skill functions where converted and mant new ones added, listing them all here would be pointless, there are now just under 15 skill functions in total left in vanilla code, half of which are not even used!
- Replaced the core skill handler on the server and client, as well as all the targeting code.
- Replaced the entire monmode handler on the server, now this beast is done with on both ends.
- Many of the remaining item event funcs were replaced ( such as the cold armors and reanimate ).

Gameplay changes
- A fatigue system has been implemented that can trigger when you fall below 1 stamina and lasts for a several seconds depending on how much base vitality the unit has before regeneration will restart.
- Certain states can now prevent you from running ( walking works as before ).
- Level drain now effects monsters and hirelings too ( it is saved on hirelings the same way as for players, and can be reverted via Restoration magic ).
- Monsters that spawn with equipment in their inventory or equiv slots can now drop ( some ) of these items when killed, no need for TC.
- Improved the code handlign organ drops.
- Redesigned how missile collisions work, there are now more types of collision filters ( collide only with allies, with allies+enemies, only with enemies etc ), each missile can also store it's own aurafilter so they don't have to rely on skills anymore for this.
- Certain potions will now give higher boni depending on the level of the unit drinking it, this works like /lvl stats ( it is in 8ths ).
- Changed how spell scroll suffixes are picked.
- Redesigned missile deflection slightly.
- Implemented a curemask system where states can be removed based on a mask and not individually, thus softcoding all the curing and dispel spells cure lists, every bit in the mask is interchangable.
- Unit gender is now inherited from shapeshifts, certain spells like Entice and Charm use this.
- Implemented the disease condition ( think about rabies, but effecting only living creatures and not dealing poison damage ), this condition jumps to nearby units.
- Negative energy now drains mana and reduces the length of active magical effects ( ticked every couple of frames )
- Acid now repeatedly deteriorates durability ( this also ticks every few frames and does a dur check on equipped armor )
- Spike traps now trigger also for enemies that stand on them, adding a bit of strategy ;)
- Iron Maiden, ATD, Thorns, Blood Mana and Malice now deal 'thorns' damage, this is a damagetype that can be resisted seperately from other damage types, resistances to this damage were put on a bunch of monsters, making the spells less abusive.
- Added the ethereal plane ( see discussion topic )
- Certain monsters can temporarily drain spell levels.
- Elemental affinity system added, this allows a monster ( or player ) to be linked to an element, this is an unbreakable total immunity against this element with added absorption ( note: not many units use this, or will use this ).
- Monsters can now use properties that were formerly limited to players if UsePlayerStats is enabled.
- Almost every melee attack can now dispatch chargeups.
- Psychic spells ( psychic hammer, mindflay, mindblast etc ) can now be resisted via intelligence and protection from psionics.
- Monsters get most of their attack rating, defense and damage from their dex and str now ( which is being assigned to them ).
- Added 'call upon x' style prayer spells for clerics.
- Amplify Damage and Weaken now globally increase or decrease damage, instead of being limited to physical damage ( and thus biasing the game ).
- Added the flash spell from D1, just a modified version thats less archaic.
- Effects like openwounds can be associated with any element now that is defined in the skill, thus the effect is reduced by the appropriate resistance ( mostly for magical Harm style spells ).
- Spells adding certain resistances will automatically cure some conditions.
- Added charm style spells, a special post will be devoted to these later.
- Some missiles deal different damage depending on their color ( see 'force sync' above ;) )
- It isn't possible for the GH anim to trigger too quickly after another mode was set, this gives the client a few frames to catch up.
- Change how ai targeting works in general, this is now AGAIN more efficient and smart then before :D
- Some monsters can ignore invisibility and LoS ( mindflayers etc )
- Changed how hide in shadows effects LoS, instead of working like the +/- target los stat, it overrides the target LoS.
- The AI is now more picky as to what it can target with buffs, tons and tons of new unit search routines added and more.
- And of course, more then 10000 lines of new AI behavior code.
- AI evaluation for what type of attacker the target is ( melee, mage etc ) is now alot smarter then before, taking into account many more criteria such as stats etc.
- When a unit is in a berserk rage, such as from taunt or whiplash they will the game will pretend that they have a 'AICMD_ATTACK' command attached until the effect wears off, making them much much more aggressive then you can probably imagine :D.
- Many living monsters will keep away from targets that they consider harmful, and instead stick to ranged attacks if they have any.
- Monster resistances now work like their other stats, they are listed in monlvl.txt and are used based on mlvl and a %, monsters will never have more then 65/75/85% resistance to a given element unless they are effected by a spell or are a boss.
- Reimplemented the diminishing returns on regular speed stats, but other stats can bypass it.
- Added some new umods for units ( not bosses this time ), including Shield Change, Plague Touch, Rage ( this is a reimplemented version of the classic D1 Yeti rage that was deleted in lod for unknown reasons, this is basically frenzy across all their attacks ).
- The boss stonecurse umod was slightly changed and made easier to alter.
- Redesigned how monequip works, the equip now is their actual equip like before, but they can also recieve a link to a rubbish.txt inventory, which is for their misc items like spell scrolls and potions.
- Demon, undead and beasts bit are now shapeshift and state inherited, this means that revives now count as undead for all intents and purposes for example.
- Changed in general how alignment and alignment based selection works a bit.
- Melee monsters no longer get a critical hit on their elemental damage.
- Reverted how spell damage is calculated based on slvl.
- The old pvp penality that was removed is back, sortof, a much better version that is ( see #1 )
- Changed leech stats a little bit.
- Remhit states now vanish also when you are starting to perform an attack, no matter if you hit or not.
- Changed how life, mana and stamina regen work some more, players now have basic life regen from base vit among others.
- Redesigned bloodboil making it more balanced and controllable.
- Most item events were changed around a bit, making them more customizeable and stuff like this.
- Many combat aspects are now based on the speed of the unit, being slowed down too much will make them have less of an effect or simply not work ( a 1 second per hour dodge isn't going to work IRL either ).

#1 pet/hire/player vs. player = 15%
pet/hire/player vs. hire = 25%
pet/hire/player vs. pet = 20%
boss vs. hire = 120% ( instead of that {filtered} retarded +400%, seriously what were they thinking? )
boss vs. pet = 125%
pet vs. boss = 20%
hire vs. boss = value from difficultylevels.txt


Eyecandy (and earcandy too :P)
- Added particle systems for states and missiles ( in a later update this will be attached via particles.txt )
- New 3d gfx for items added ( courtesy of Asp )
- Added a missile function for custom complex death effects.
- Increased the number of color shifts in the PL2 from 128 to 256.
- Increased the number of font colors ( though not many are used right now ), font colors are independant from D3D/DD/GDI mode now.
- Fully softcoded shatter effects from states.
- The server can now trigger, any sound on demand, rather then only predefined events.
- Added two more modes for mirror image display, one where the images are drawn in a row depending on the angle the unit faces, the other puts them around the unit in a circle ( also angle dependant ), the original crappy square one isn't used anymore.
- Overlays can now, like missiles, inherit the palette of their owner, thus a unit with red missiles gets a red casting overlay automatically if so desired.
- Added predraw option for monster sprites.
- Hoark style spawning now creates blood as well ( for hoarkdemons etc ).
- Blaze style effects are now completely softcoded and do not need a skill.
- Added more death effects, such as a z-smoke burst.

Critical fixes
- Fixed a memory corruption that could occur when a missile is deleted.
- Fixed a bug where state timers were not incremented for synced monsters on the client, bugging up inferno spells ( they pass the critter list here by accident, see *3 )

Vanilla bug fixes
- Tons and tons of fixed related to mode handling and changing, this should be most of them now ( see below for more, *1 )
- Monsters are now effected properly by the interrupt flag from skills.txt
- Whirlwind restored the wrong path collision mask ( this had little impact on the game, but it was not ment to give the player a monster collision and vice versa )
- Mercs now save their current hp value, instead of being automatically healed upon gamestart ( due to another bug... *2 )
- Life % displayed for mercs is now finally accurate.
- Monsters can be effected by battle orders without breaking the clientside display. ( see *4 )
- Fixed a bug where molten boulder did not explode server side despite the fact it did on the client.
- Fixed a bug where firehead may have healed dead units, if it hit a target after the caster is slain ( pointless, but worth a fix anyhow ).
- Fixed a bug with healing vortex spells colliding with units that weren't targeted by it.
- Fixed a bug related to the damage dealt by the Amazon lightning javelin ( missile dmg func bug ).
- Revamped the way missiles are updated on the client, this solves almost all known desync with missiles in MP.
- Collisions on the client are now properly checked, in accordance with the server code, this means that collide-with-missile events will no longer trigger under different conditions on both ends.
- Fixed ReturnFire behavior on missiles ( at least I changed it to what would've made sense, but wasen't done in vanilla, since it causes a ton of problems in the game its fair to regard this as a bug ).
- Fixed a bug where a player could get stuck ontop of an open grave.
- Fixed a bug that prevented monsters from being effected by +light radius from equipment and the like.
- Fixed a bug that allowed invisible monsters to be highlighted.
- Fixed a bug related to spell icons and monster desc when both were visible at the same time.
- Charge trails now can effect selected monsters.
- Fixed that horrible crappy excuse for a hover message system.
- Kick skill damage is calculated properly for monsters.
- Fixed the bugs that made andariels spray come out not as it should, with uneven spacing, also softcoded it while at that :P
- Fixed problems with DiabRun when afflicted with speed altering stuff.
- Hell meteor is no longer a hardcoded mess ( since it did list the missiles in the txt I see this as a bug ).
- Skills with RESULTFLAG_HIT set will now always hit, instead of having this hardcoded in some skills.
- Fixed a bug related to gfx preloading if a unit spawns in DT mode ( mode 0 ) considered invalid if the previous mode was also 0.
- Fixed moar bugs with knockback. ( see *5 )
- NU mode requests now properly change the mode on the client.
- Fixed wrong collision mask used by eSpawnCol code.
- Fixed moar bugs related to missile attack rating and damage when used by monsters.
- Fixed a bug caused by how item events were dispatched, that made some things trigger on dead units.
- Fixed a logic bug I copied from vanilla where Impale reduced durability at STFn instead of after hitting.

Other bugs
- Bleeding isn't triggered anymore from softhits and poison/acid/disease seizures.
- Fixed a problem with compound damage stat display ( I didn't mark the new types as part of the list ).
- Fixed a problem with roost modes that didn't use S1 or S2 anims ( I added a new SplGetModeChart entry for roosting monsters )
- Monsters are now effected by the opalescent modifier of states.
- Fixed a bug caused by fixing a vanilla bug related to merc hp display.
- Monsters spawned by skills now no longer have a init stall of 1.
- Resurrect properly restores a units inherited state ( this is half-half a vanilla bug, since it didn't properly restore all the unit properties there either ).
- Fixed a bug with DAE in a wereform ( this could happen in vanilla if a amazon shapeshifts to a were creature ).
- Fixed some of my own hp related crapola ( used 0x6400 instead of 0x8000 in one place ).

Halfassed stuff
- Busy units can no longer be frozen solid, stunned or petrified ( the desync caused by this will be addressed properly in a future update )

*1.) Spells that repeat after being used once ( Inferno, Zeal, Charge, Whirlwind etc ) will no longer fail to rewind properly sometimes leading to desync ( this is a different bug then the mode handler one! ). Sequence animations used by players no longer suffer from a slight desync ( somewhat related to the previous point ), monster sequences don't pointlessly repeat one frame at the end of the anim ( best visible in vanilla with the skeleton's resurrect anim ). Some other sync problems, especially with Blade Fury were fixed too. Mode events are now deleted if a unit is frozen or petrified to prevent possible bugs.

*2 Vanilla calls the levelup routine for mercs at gamestart, which gives them full healing, this has the side effect that it sends the levelup packet to the client before the client has properly entered the game...

*3 This doesn't mean it effected buffs, since those are being updated by the server, this refers to 'nosend' states that are set by the client skill funcs.

*4 Any spell that adds +% maxhp or +maxhp to a monster will bug up the display because the client expects monsters to have x/0x8000 life ( it just uses this for % display of the bar after all! ), the only monsters where this worked properly before were mercs, since they use their actual hp% on the client.

*5 Knockback, as stated elsewhere already, was using the wrong branching applying the sandleaper behavior to regular monsters, this was fixed and the fork is now softcoded, additionally knockback now deletes active unit events, preventing the AI from triggering mid knockback, lastly the game no longer enters GH twice ( this was a 'workaround' they apparently added to fix the sync problem, which needless to say, never worked as any bnet player will likely testify ), instead the unit enters NU mode.


30th April (~8500 lines of code added)
- Replaced all code handling attdesc, dmgdesc and skilldesc, among others this means everything now uses more accurate displays and is in-line with what the server side does, too many bugs to count were in this code.
- Changed how Lightning Strike and Charged Strike functions work into their final form ( in the vanilla-implementation, they'll release the missiles eitherway, you can easily test this in a SP game, it doesn't matter if you hit the target, or whenever the target is in melee range at all! ), these skills are now synced like chargeups and will launch their effects only when a hit occurs (and thus the unit is in melee range).
- Changed kick damage to it's final form, it is now effected by STAT_ITEM_NORMALDAMAGE as well as critical hits.
- Changed vengeance function to randomly roll freeze when near maximum if it displays the cold overlay ( about every 3rd hit )


24th April ( ~25000 lines of code added mostly )
- Replaced all the SUnitInactive code ( the core of the unit manager pretty much ), fixing a bunch of bugs related to monster reactivation (see 1 ), I've also removed a sh!tload of unneeded hardcodes from there.
- Reduced the # of checks needed for almost every txt lookup from 2 to 1 ( this is huge if you multiply it with all of the lookups all over the place! ).
- S1 files support spawning preset items, however the code for this is broken in vanilla and the items would be created without proper init, this has been changed.
- All remaining preset unit code has been replaced, including the ObjPlace table ( the "hardcoded objects" ), the game will no longer do a plethora of idiotic checks every time a preset unit is spawned because they couldn't edit the copy/pasted tristram map for the uber levels ( yes, they check each and every entry in the map whenever anything spawns via a DS1! )
- Changed the dungeon level formula ( see 2 )
- The entire monster creation routine is now replaced, this fixes some more bugs related to eSpawnCol where incorrect collision filters are used, neutral or allied units are now automatically placed in a target list when they are spawned ( controlled via monstats3 ).
- Replaced the entire code governing MonRegion and the entire populate loop ( which handles populating rooms and the like ), for mon region, the game will low load faster because the selection loop is done properly and doesn't rely on rand() to return a valid result (...), rather the lists are preshuffled, RangedSpawn that in vanilla could randomly fail now properly always selects up to n ranged attackers ( n being the value of RangedSpawn, its no longer a bool ) ( see note 3 )
- Greatly improved game seed randomization
- Boss Ai overlays will now seek a target themselves if the unit's ai doesn't require a target.
- Improved how the randomly picked superuniques are spawned inside levels, the same applies to extra units ( they have their own case and counter in the populator loop now )
- Fixed some wrong flags used in monster spawning in old code, due to proper insight into how it works now, after replacing it.
- Spells and aurae assigned to champion, unique and super unique monsters now have a better formula to determine their level.
- Slighty changed the mana regeneration formula ( see note #4 )
- Dual wielding attacks can now properly flow into each other like normal attacks do ( semi-vanilla bug )
- Replaced all the skill usage-requirements code, which was home to a bunch of bugs in vanilla ( among others, this is one reason why STAT_THROWABLE didn't work properly anymore ), WeapSel4 ( offweapon ) can now check for required items also in slots other then the arms ( ie torso, boots you name it ), added several new types of Restrict ( see *5 )
- Fixed a bug that in vanilla would allow infinite skill charges.
- Unified code for holyshield into a single place and made it possible to add similar spells more easily.
- Missiles can now retrieve their special aura filter from missiles.txt ( new column ) without the missile func needing to explicitly query it, this is used by default now if it exists.
- Removed some very lame code ( ie {filtered} #4 ), instead of setting two flags in the damage pulse they spawn a submissile and force explode it *sigh*.
- Force-synced chain lightning, it should now be almost failsafe.
- Fixed quantity display for Left Hand Throw ( our bug )
- Fixed logic for Left Hand Throw and Double Throw ( their bugs, that we copied before :P ) - these spells now will always select the proper weapon, in vanilla sometimes it will assign the wrong damage to the missiles ( ie from the other weapon ).
- Casket units are now created with the mode from monstats3 rather then NU again ( bugfix )
- Removed all code governing skill levels in vanilla, since the question came up in CE recently IIRC, the check got inlined everywhere, its best to look access to Experience.txt in d2common.dll to find all locations ( in v1.11b there are at least 7 inlines, especially inside the formula parser, which seam to be copy/pastes instead of VC automatically inlining ). The maximum internal slvl is now 128 again like it was pre v1.10.
- Certain stats that formerly required a parameter now recieve it automatically when assigned by a spell ( for example a skill assigning +% damage conversion will do so for it's listed element now).
- Replaced all code handling passive states, they will update properly now every time UpdatePassive is called, rather then only when the slvl changes, also fixed a bug where passive states where not properly cleaned up and synced.
- Changed how the sanctuary aura works ( more details on spells in some larger future post I suppose ).
- Fixed bugs ( that can occur also in vanilla ) where state #0 could get deleted, despite it not being a valid state, which causes glitches with monster damage if it happens.
- Removed what I hope were the last hardcodes that didn't use "stuff" from ItemStatCost.txt ( some charged skill handler still used the hardcoded value... )
- Fixed a logic problem caried over from vanilla related to missiles.
- Added a new special spell item event that uses bodyarmor defense as DR rate.

*1 - It could potential duplicate MonUMods in certain circumstances if they were added to the unit during the initialization routine, furthermore it can be exploited in such a way that prevents units from spawning if their original position is occupied and the new positions all lay inside a 'no-spawn' region ( around a warp for example ), if a monster in act3 has more then one quest event assigned, and the first event is not the golden bird quest, then the golden bird will never drop from that unit because they only check the first node.

*2 - dlvl is now an average of the listed dungeon level and the maximum character level in the game, this makes the level progression more organic then before.

*3 - The game can actually still spawn roguescouts if MonWander is enabled, the chance however is nigh impossible ( 1 in 32768 ) and then it will do a subsequent roll ( there can only be up to 3 per level ). The routine was found by Mentor in v1.10, I relocated it in v1.11b ( this is at the begin of the populate loop ).

*4 - The formula is now ( ( ( ( base_intelligence ) * mana_per_point ) / 8 ) * 256 / 1500 ) * base_percent / 100 ( a good observer will notice 1500 equals 1 minute in frames )

*5 - 3 = can't be used while aurastate is present, 4 = can't be used while buffed, 5 = can't be used while cursed, 6 = can only be used while buffed, 7 = can only be used while cursed, 8 = can only be used inside dungeons, 9 = can only be used outside dungeons, 10 = can only be used inside towns.


8th April ( ~5000 lines of code worked on )

- Replaced every last line of code handling MonUMods except for UMOD_QUESTCOMPLETE stuff because we won't be using that hardcoded crapola anyway, this led to finding a new, +fixing some more bugs and also considerable performance boosts because the Vanilla handlers aren't queried anymore every time a unit enters/leaves a mode. ( see bugs below ).
- Theres been more stuff done, but it will makes its way into a bigger draft later.

*There are a bunch of bugs caused by the game invoking legacy handlers in vanilla for trap damage and hirelings, which change the damage they deal to the wrong values, the hireling one was changed before. The main bug fix is the cancerous mess related to bonewall's party ai, which can even cause some memory corruption in vanilla if used incorrectly.


3rd April

- Fixed some bugs related to the end-of-motion event that in vanilla can lead to immortal monsters (keywords charge+knockback+reviving unit), the event handler set the mode to NU, even if the unit was flagged dead before.
- More new missile functions and particle stuff added
- First boss AI scripts in the work
- Recompiled ZLib and LibPNG with VC9 with better optimizations (also fixes a crash that could occur due to different CRT's being used).
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Sat May 21, 2011 4:58 am

BUILD 100823

23rd August, 2010 ( 50000 lines of code added/changed )

General things:

- Changed some old ( read ca. 2005 )garbage in the naming convention, all pointers are now either prefixed with p and h ( those left with ptr *shudder* and pt )
- More D2 structs were fully deciphered and added to the headers ( with findings by Mentor, Necrolis and myself )
- Renamed some functions to shorter and more "to the point" names
- Added additional build options ( such as the ability to enable seed overrides and skip checksum checks ) - Dev only
- Several functions have been subjected to extensive unit testing, more will follow in the future.
- Countless new utility functions were added to the codebase.
- Reimplemented an identical memset intrinsic which was no longer present in VC9.


Softcoded stuff:

- Added a slightly modified version of Paul Siramy's custom Font16.
- Elemental arrows now have a name color reflecting their element.
- Redesigned some of the sample quests to final content ( they were fully revamped ).
- Suffixes and Prefixes are now complete, only still some require naming.
- Numerous monsters have been finished and the first levels are now in their final state.
- The tile set for the red crypt was reworked.


Improvements:

- Skills targeting units will now precalculate the angle toward the target automatically, like skills targeting a position, when used by players.
- Quest engine was enhanced and rebuilt with tons of additional events and 8 additional bits to store quest states.
- Softcoded the chances for thaumaturgic shrines, sparkly chests and monequip qualities into Qualities.txt.
- Custom dupe and only-one scanning code was improved, it now scans all possible items including corpses and has also been rewritten ( that is, it is now a lot faster then before ).
- Changed how default qualities for items are evaluated ( it is simplified and more to the point now ).
- Unique items that already exists in that game ( ie somebody owns them or they dropped ) are now excluded from the pool, thus the game will always drop a unique item if there is one left to drop.
- Reverted some now redundant changes in the item Save/Load.
- Improved some of the debug chat commands as well as adding some new commands.
- Skill unit messages can now send an extra sync byte ( this is used to make boss mods such as LE have actual synced randomness to them )
- Long ai times are now slightly randomized to make things even less predictable.
- Certain streaming missiles like inferno now don't always display their hitclass overlay ( in vanilla this isn't a problem because the graphics don't stack there ), now they will only randomly display it.
- Fine tuned the missile sync code further.
- Deactivated monsters can now store more information then in vanilla, things are no longer mutually exclusive.
- pLightMap now stores the initial light colors so that they can be reset more efficiently later if the color changes ( due to a state etc. )
- The server now can automatically sync additional stats, including pierceidx ( the older workaround was removed ) and other_animrate ( which was never synced in vanilla -_- )
- Ais that can fiddle with objects will not target objects targeted by other ais.
- Skill levels for missiles launched without a skill are now no longer based on the monster level alone but a divisor from difficultylevels.txt is used.
- Changed some of the logic related to sparkly chests.
- Repaired vanilla's melee-trap and minion spawner units.
- Objects now keep track of the last unit that operated them.
- Reimplementing the "Flicker" column in objects.txt to work as it probably should've ( the column is ignored in vanilla ).
- Each token can now contain a Missiles.dat file for missile palette shifts.
- Added another new "burning" state for large units.
- DoE light rays and the WorldStoneEffect are now fully softcoded ( before it was just possible to assign them to areas ).
- Immobile or harmless units are no longer subject to line of sight ( Gargoyle Traps, critters etc ).
- Death effect states now display when a unit is invisible too ( this includes shattering ), this means you'll still see the fire foutain when shattering a balrog now.
- Ai cleanup code was fully automated ( when the ai enters a special state like blindness it most leave roosting modes and similar to avoid glitches, this is now fully automated ).
- Certain overlays are no longer effected by the light exposure levels ( such as the command '!' this means this will always be fully visible as long as you have LoS to the unit )
- Added control over which composit layers are effected by palette shifts.
- Softcoded the vis-validation checks ( read quest checks ) when visiting some levels.
- Improved the randomness of how boss tombs are selected and fixed a rare problem with the vanillaesque code.
- Units that can spawn in water ( but are not required to always spawn in water like frogs ) can now spawn on land as well if Levels2.txt permits it.
- Redesigned how Impale and some other abilities work ( a topic about this and similar issues will be posted soon ).
- The corpse missile the regurgitators shoot now deals damage based on the corpse they ate before.
- Added a lot of visual effects back that were removed from the game prior to release.
- The direction selected for the gargoyle trap shooting is no longer off by 1 and always in-line with the direction it fires from ( think about the glow when it fires )
- Added ray attacks, these instantly produce a line of missiles to the target and can damage and/or alter stats when they reach their destination, the missile line can also deal damage if it is set up to do so.
- Changed some things related to corpse explosion, among them is the fact the level divisor is back now.
- The stats regained when a vine beast consumes a corpse are no longer hardcoded to the unit.
- Slightly increased the speed at which vultures descend from flying.
- Numerous new routines for the ai code for further types of behaviour.
- Finally got to do some heavy improvements to AiBrain.cpp pushing a lot of the evaluations to their limit, although it isn't fully utilized by the units we have right now ( except for Baal and some of the like ), the newer bosses will make full use of it.
- The ai can now react to specific events individually such as being attacked with missiles.
- Improved and finalized the scripting engine ( among others it has a heavily optimized local variable lookup routine utilizing MRU caching ).
- Heavily improved the logic used for level population, the game will no longer spawn unique monsters and champions too close to another and ensure they are evenly distributed throughout the dungeon.
- The monster populator now doesn't test 20 times vs. random locations but will check all tiles in the room ( the former was vanilla logic ).
- Anorganic constructs can no longer be effected by poison.
- Eggs layed by sand maggots now link the spawned maggot larvae to the sand maggot as minions.
- State overlays are now assigned to temporarily invisible units ( even when they won't show, they will show when the invis duration ends ).
- Mounting is fully softcoded, each monster can have a custom mount ai if so desired.


Replacements:

- The remaining code related to red and blue portals was replaced, as well as some mandatory softcodes for certain levels.
- Completely replaced the DS1 loader removing hardcodes from it ( it had hardcodes to replace certain units in certain acts like Natalya with the placeholder ).
- Fully replaced the code vanilla used to preload unit graphics ( think lister ).
- All the code governing vanilla quest items has been replaced, including the hardcoded rewards ( potion of life etc )
- Replaced code for CorpseCycler, DeathMaul, GargoyleTrap, MaggotLay, MaggotDown, MaggotUp, MinionSpawner, ImpTeleport, BaalTentacle, BaalCorpseExp, BaalTeleport, BaalInferno, BaalColdMissile, BaalSpawn, Baal's death effect ( including the removal of hardcoded level coordinates --- seriously WTF... ), Lightning trailing function, ImpFireBall, MaggotQueenDeath, CorpseMissile,
- Fully replaced and softcoded the ObjPlace code ( "hardcoded objects" )
- Replaced the trap ais and the firewall trap code which were still in D2Game.dll with custom code.
- Softcoded the WorldStoneGate object.
- Fully replaced most of the remaining monster ais, ( all base monster ais are now replaced ) including: BaalCrab, BaalClone, BaalToStairs, BaalThrone, BaalTentacle, MaggotEgg, MaggotYoung, SandMaggot, SandMaggotQueen, FrogDemon, TrapMelee, MinionSpawner, TrapMissile (all these merged into one, including TrapNova etc), VineBeast, Regurgitators, VileMothers, VileChilds, Balrogs, PainWorms, SandLeapers, Vultures, SiegeBeasts, DemonImps, each of which had at least one bug and/or hardcode that was removed.
- More vanilla quest code was replaced because it got in my way during work on other things.
- Even more DRLG code was replaced, we have nearly no blizzard code left in Act1 except for one huge function related to LvlSub ( which is being researched actively at the moment by Mentor ).


TXT files ( added and changed ):

- AffixGroups.txt - this file allows micro management for each affix group controlling the rarity for magic/rare armor/weapon/misc items for each group as a whole ( the affix' own frequency being restricted to inside that group only as discussed in a separate topic a few month ago )
- Quests.txt - core controller for quests has been slimmed down, as most things have been migrated into...
- QuestParams.txt - ...this file here, it contains all references ( unit indexes and such ) utilized during the quest.
- QuestSpeech.txt - speech tables utilized by quests are softcodeable into this file.
- QuestRewards.txt - I don't need to explain the purpose of this.
- Chests.txt - used by ObjPlace code to pick a random chest depending on act and level.
- Levels2.txt - added more controls including the chance for the above random chests to have a sparkly chest drop ( think maggot layer chests ).
- ItemStatCost.txt - added new column to control auto syncing of stats.
- DifficultyLevels.txt - numerous new control params were added here.
- MonStats3.txt - myriad of new settings added here including the former DS1 hardcodes.
- OutDoors.txt - controls linkage of outdoor levels
- OutPlace.txt - controls special settings for some outdoor level arrangement.
- OutPreset.txt - controls preset maps added into outdoor levels.
- Dungeon.txt - controls preset maps added into maze levels.
- QuestFx.txt - all quest related death effects are entirely softcoded here.
- QuestStrings.txt - controls the quest name associated with a quest message in the npc menu.
- ItemFilter.txt - contains former quest item hardcodes related to picking them up.


Vanilla bug fixes:

- Fixed a critical flaw with the main find space function that completely ignored certain rooms and had a hardcoded scan size, it also scanned the same cells tons of times ( see screenshots that will be posted in the future ).
- Targeting is properly reset now when the player is hit, dodges, blocks or knocked back
- Additionally knockback also resets the global target state completely ( to stay safe )
- When applying a item enchancement to an item equipped in a weapon slot that item isn't moved to the cursor ( while this cannot happen in vanilla because of no such enhancements being possible, the code issue is a vanilla one, since other slots do not suffer from it )
- Fixed the scroll of resistance bug properly ( the fix in v1.10 just made it more desynced then before ^^ )
- Bugs with the pseudo-particle system vanilla had ( right: z movement ) have been fixed.
- Fixed bugs with the default lightning trail function ( the z-offset and subloops were ignored by the code ) ( see #1 )
- ImpFireBall's arc was miscalculated making it detonate before it hits the floor, this was easily fixed using the default lob code and passing the initial z param ( why didn't they do this? ), this is also synced with the server -_-
- Player light radius cannot drop below 2.
- Attached units are now properly flagged as untargetable clientside too ( only some functions explicitly ignored them before ), auto targeting skills lose sync as a result.
- Fixed some screwups inherited from vanilla related to outline drawing when a unit is targeted.
- Imps teleporting off a siege beast will now properly show their initial teleporation gfx at the siege beasts z position and not on the floor ( they had this for teleporting onto it, but not off it ... )
- Fixed several bugs that prevented the vile spawns of the vile mothers in Act 4 from spawning infront of the unit.
- Fixed a myriad of problems with Baal's corpse explosion by fully rewriting it rather then calling the necro funcs in a loop.
- Fixed some desync issues with the Gargoyle Trap's missiles ( had the same problem the fire towers also had, copy/paste anyone? )
- Fixed a bug that sometimes rendered sand maggot eggs immortal.
- Fixed a bug that caused frogs, vultures and numerous other layer shifting units to badly desync.
- Fixed a critical bug that could mess the entire game session up ( related to the above, with enough work you can make a vulture fly out of the valid level region, placing it in a NULL room where it will proceed to perform ai calls that will most likely lead to random crashes as expected data no longer exists ).
- During certain rare combinations of level layouts the dirt paths could fail to be built when they need to intersect a bridge.


Bug fixes:

- Fixed a bug related to portals opened via the skill hotkey.
- Stamina is now properly queried only for the current client ( I think this is something we inherited from vanilla, but I'm not sure )
- Reset some gamble price stuff until some left over code in D2Game.dll is dealt with.
- Death damage doesn't make the corpse unuseable unless it actually explodes anymore.
- Fixed trap nova that became broken from removing a hardcoded ages ago.
- Fixed a minor issue with StartMana.
- Numerous smaller bugs found by Paul Siramy and myself during internal tests.
- Fixed some wrong room flags inherited from vanilla.


#1 - They try to set the z offset before hGfxData even exists, likewise they set the subloops but forget to set MISS_PRESETRANGE flag in the param structure.

26th June (ca 4000 lines of code added or edited)

- All build-related hardcodes regarding act1 outdoor levels are removed, new areas can now be added and linked
- Act1 drlg code now checks properly for a bunch of commonly encountered bad conditions instead of causing exceptions, code is faster then vanilla too
- Life and Mana regeneration granted by items now shows the amount regenerated per Minute rather then per Second
- Fixed a bug with the item cache lookup ( found by Paul Siramy )
- Fixed an issue with LvlDef lookups
- Fixed a small bug related to boss awareness radius of minions
- Replaced more outdoor DRLG utility code
- Changed slightly how reduce-ac works
- Changed -% cold duration slightly ( added a cap at 75% )
- Game seed can be overwritten by the user now
- Changed formula for self repair and quantity refilling, further they now will show as 'per Minute' for values above 60 seconds
- Tons of new outdoor code was replaced
- New suffixes are progressing ( ~250 now )
- Renamed columns in the LevelEx table

20th June
* small intermediate update today
- We currently have ~400 prefixes and ~200 suffixes (the suffixes are now 50% done with)
- More work done on outdoor levels, it shouldn't be too long before act1 generation code is fully done with.
- More things to follow in a few weeks in a more detailed update (possibly with a interesting surprise too)

8th June (~10000 lines of code changed/added)
Code
- Missiles with a randomly selected color, or unit specific color, now use this color as their light radius when so specified.
- New functions for the firewallmaker missile that allows skill calcs to be used for fire duration
- Added a global lock on healing effects used by the ai (like a casting delay), this delay is lower the higher the difficulty setting is set
- Fixed numerous bugs related to mode changing and skills ( 'sliding' bugs ) *1
- Fixed a bug related to light radius coordinates ( either this was ported from vanilla or our own screwup, this was written too long ago to be sure anymore ).
- Class gender is now defined by a datafile seperate from charstats2.txt to be available at loading time too.
- Many extra skilldesc functions added in addition to the previous rewrite ( at least 10 fns ).
- Overlay light radii now support flickering light like missiles do, useful for fire overlays and such.
- Dispel Magic now requires you to hold down the shift key in order for it to be cast on yourself, to not accidentally dispel your own enchantments when you don't want to.
- Monsters with randomly selected spell overlays ( necro mages, oblivion and abyss knights ) now recieve a matching light color automatically.
- Completely new ai ( as discussed elsewhere ) for player summons and other pets, highly improved in many regards and "they don't get lost" all the time ( think about the difference between v1.00 and v1.10, and multiply this by two, you will have trouble outrunning them now, despite their walking speed no longer being 12 or 15 ;) ), this AI change alone amounts for at least 2000 lines of code.
- New icon libraries added that can all hold 32K spell icons now ( the column isn't using 1 BYTE anymore ).
- Throwing potions have been totally revamped ( see 'random tidbits' thread )
- Added support for loading a special PL2 palette for individual items to change how they look, if translvl is set to 9 and a palette is provided.
- Improved item cache lookups to now support additional filters.
- New functions for plague and poison javelin and the associated clouds.
- Added missiles that can dispatch an AoE curse upon exploding ( not related to how grimward worked )
- Fixed a memory leak related to the buffer holding unit names when a name is changed ( vanilla leak )
- Skeletons that spawn with a shield composit are now suffixed with "Captain" like in D1
- Changed assorted older code related to summons and their stats
- Skeletons spawning with the 'stuck arrows' composit will always spawn with a shield too, instead of having arrows floating near them like in vanilla.
- Changed the ai overload induced by blind target ( other such effects will follow soon ).
- Further changed the code that evaluates a monsters equipment ( the pet part, read about it in older updates )
- Fixed bugs in the logic that would use equipment for (non merc) monsters in ranged attack routines

Softcoded stuff
- Added new item color shifts and replaced the horrible BWHT palette with something much nicer ( a large screenshot thread is coming "soon", don't worry )
- Work on prefixes is now complete for the time being, the next will be suffixes which should start this week.
- Tons of changes to light settings on monsters, missiles and players, as well as overlays.

*1 in vanilla when a client st func returns FALSE ( ie, you cannot use the skill ), the game will keep you locked in the first frame of the cast anim until you let go of the button, because it initializes the animation before the result of the CSt func is known, this is now changed, except for continous skills like WW (those that require the mode to be set prior to function properly), some other related bugs have also been fixed.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Sat Dec 03, 2011 11:03 pm

BUILD 110521

21st May, 2011 (anywhere between 20-30K lines of code where changed, at least 10K lines of new code have been added)

The major focus of this build was adding audio/visual content for everything that was implemented so far (monsters, spells etc),
this means that all the content that is currently inside the project will stay like this (except for minor tweaks that will doubtlessly take place now and then), anything new added from now on will be implemented fully (that means sounds, graphics and other specs. we are out of the core development phase for the most part and are adding content now.)


Thanks

- Many thanks to IskatuMesk for providing numerous audio samples and recording boss and unit audio (speech, combat fx) for me to butcher, and other audio related assistance.


Long Term Goals
- The DCC/DC6 pixel limit has been removed - it is now possible to load files with more then 112500 decompressed bytes of data.


Tools

- OptSolver: a debugging assistant that reverses optimized divisions back to their integral values (CLI).
- ICantBelieveItsNotLARD: an extractor made for IskatuMesk, so that we could fetch audio from some FF game (CLI).
- Signer: embeds signatures into DLLs and EXEs, this will be used upon the mod PE files (CLI).
- UnitPal: a tool to easily manipulate the new units palette file (CLI).
- PalMaker: fixed a few issues with this, it may be nearing a public release (GUI).
- NephCL2: a tool to convert CL2 files to PNG with proper transparency mapping (CLI).


Critical Bugs

- Fixed a bug where the vanilla portal code was passing along the wrong type of coordinates (tiles instead of subtiles), which is what makes red portals randomly crash in certain levels (when using the vanilla code), this entire chunk of code has been replaced with new code. (found by Vendanna/Paul? I forgot.)
- Fixed a memory leak that occurred each time a unit was slain before it could execute its SDo function (the prepared missile light radius was never deleted and kept glowing on the corpse, just go kill some demon imps/fallen shamans :D)
- The chat buffer was apparently using message chunks after they had been decommited.


Bugs

- Fixed a bug related to the stat update routines always believing there are strength updates to dispatch because buffers are initialized to 0.
- Client Move Function #18 now actually uses the subloops param, it didn't before.
- Fixed a bug that would assign random light color to units that shouldn't recieve it.
- Slightly reduced the amount of loop related audio crackling, the exact cause will be rooted out in the future.
- Self-resurrect no longer plays the unit death sound if a sequence involving DT is used.
- Async audio (neutral sounds) are now functional after line #2333.
- Fixed some issues with audio volume.
- Hits on uninterruptable units properly register clientside (they are sent as softhits so nothing about the unit is changed, we still get the gfx and sound though).
- Fixed a galore of bugs with SplEndDeath1, but we completely dumped it so this is irrelevant :D
- Fixed a bug regarding the speed of S1-S4 modes (monsters).
- HitClasses were apparently not always reset and I ported this over originally.
- Blank chat messages are no longer added to the chat buffer.
- Impregnated corpses are no longer usable with spells (vanilla issue???)
- Normally I'd mention only D2 bugs here, but the CryptDemon neutral anim had the first frame from walk prepended to it, making it jitter (Sierra...)
- Fixed another vanilla bug port related to monster run speeds not being calculated properly.
- Frozen units no longer regenerate life (vanilla issue???)
- Monsters that have no neutral sfx no longer try to play it constantly.
- Firestorm no longer uses the wrong function pair.


MetalStorm Bugs

- Fixed some bugs I found in pSpell #18.
- Fixed a bug related to pet targeting (found by Vendanna)
- Fixed a bug in the footstep audio code, it now works like it should.
- The event sfx handler now automatically handles player and monster source units properly.
- The monster sfx handler now works even when no monsound record exists.
- Fixed a bug with CltDo #14 that used the wrong missile slot.
- Level drain no longer bypasses god mode. (WTF was *I* thinking?)
- Suck blood won't attempt to heal a group leader that is currently reanimating via life sharing.
- Added some missing collision cleanup code for the sake of saftey.
- Cleaned up sounds.cpp and fixed some minor issues and a bad patch.


Improvements

- The way block and run speed effect animrate has been improved.
- The item event code is now more secure, making sure it was properly launched.
- Stats scaled by pSpell #18 (in regard of ilvl and mlvl) are now definable in misc.txt.
- I reimplemented and softcoded the blood golem life sharing, this can be attached to any pet now.
- The healing potion code is now fully finished and clean.
- StamBarBlue now actually cancels stamina drain, rather then just making the stamina bar blue client-side.
- Mephisto has been completely reimplemented, even if he won't be used as mephisto.
- Hit overlays can now not only stack, but also spawn at slightly randomized x and y placements.
- Several new missile functions have been added.
- The damage-to-stamina buffering ratio is now 1/8th (rather then the insane rate it had before).
- Shatter chance for corpses has been reduced to 20%, but improved overall (ie it now actually is 20% and won't constantly get cancelled out again if the unit is hit by an ice attack).
- Monster resistance descriptions now take into account your character's resistance piercing.
- Monsters will no longer show up as resistant unless they are highly resistant to something (ie when it becomes really notable).
- Allied and humanoid creatures now utilized the same resistance logic the player does.
- Energy shield now plays the sound it was supposed to play but never did in vanilla when you absorb a hit.
- All hitclass sounds and overlays have been softcoded.
- Chances for hitclass to induce hit recovery have been softcoded.
- Sounds have been added for all used player and monster skills that had been worked on previously.
- Added a new item event that makes attacks work similar to frenzy.
- Fixed countless wrong values in sounds.txt, especially for lod monsters which were mostly a copy/paste of the same lines over and over.
- All monsters that had been worked upon have new or improved audio now.
- Changed how the Cv overrides in MonSounds.txt work, they are now actually useful.
- Visually improved the poison cloud effects.
- The Mosquitos now leave a bunch of blood and poison clouds if you kill them faster enough after they drain the player.
- Resurrected monsters now face the direction the corpse was facing, and not always NW.
- Improved the boss-gathering behaviour of monsters.
- Monster levels are now slightly random, instead of being the same for the entire dungeon.
- Instead of SplEndDeath #1 we use the new #6 now, that works in a properly synced way without the hackish nature of spawning client-only corpses of #1.
- Regurgitators now have neutral sounds (they never did in vanilla).
- The emerge sound for bone armor is now played on success only, and not when casting, bone armor parts that break now emit a sound too.
- States can now disable death damage and some special death effects.
- Many things now have ambient loops (such as units that catch fire and the like).
- Water splashes are making proper sounds now.
- The light generated by fire overlays can now flicker (like firewalls do).
- Added additional ways to query the item cache.
- Dynamically spawned allies can now be targeted with buffs by the player.
- Monsters that wield items will use hitclass sounds matching the weapon (if enabled), the Valkyrie thus uses different sfx depending on whenever she uses a spear or bow now.
- The hit recovery logic has been fully finalized.
- It is now possible to micromanage what composits recieve a palette shift (old entry?).
- Defense curse and blood mana now have sounds, they have none in vanilla.
- Improved numerous AI subroutines, such as unit counters and the like.
- Monsters such as Overseers can now call in reinforcements that arrive via red portals.
- The bolts spawned by charged strike style attacks no longer hit the monster you strike if it is too large.
- Minion Spawners now link minions to nearby packs, so their group ai functions properly, they are also issued an attack command right away.
- Frozen Horrors now shatter into a lot more ice then regular frozen enemies would.
- Death Mauler missles now play a sound when they emerge.
- Messages that show up on the screen no longer produce that annoying sound.
- Impregnate's state remove function is no longer hardcoded.
- Added Wea#Del1-4 to MonSounds.txt, to chain up to 4 delayed swing sound copies for sequences.
- The Skeleton King can now micro control how many skeletons he spawns that have a shield.
- The core spell missile function can now piggyback cast sounds on the missile, so it travels towards the target alongside the missiles own sounds (if that makes sense).
- Improved sound randomization, making it more efficient in the process too.
- Softcoded numerous special effects in a more sensible fashion.
- MonStats3 death events now use a cubemain like syntax, instead of separate param columns.
- Disintegeration no longer works on non-corporal units.
- Corpse consuming spells can now loop the eating/casting animation any # of times given in skills.txt, doing some effect each loop (such as spraying around some blood).
- Improved the behaviour of hybrid units, they will now approach/shoot in a more responsive way.
- Added some variation for sounds such as bash (very subtle ones).
- Removed death damage from several units, it was used to excessively.
- Added new palettes for a number of units and fixed some other graphical issues with their sprites.
- Dragon Tail now uses the assigned hitclass instead of ignoring it.
- Tornados no longer use the blizzard hit sound (WTF blizzard?)
- Talons of Wind now releases a hurricane as its final charge level.
- Highly optimized cel path builder, removed idiotic hardcode for WC3 chat token that would Storm.STRCMPI every single DCC/DC6 name in order to change the extension to DC6 (come on guys, whats so hard about saving the bloody image as a DCC?) each time a sprite was requested by the blitting code.
- Softcoded what overlays load DC6 instead of DCC files.
- the Cel canvas is cleaned with a 128-bit streamed operation, despite being larger this is faster then the memset used in vanilla on the smaller buffer.
- Pet targets are reset if they get teleported, making the AI behave less insane.
- Several new debug chat commands were added.
- Ai event sounds can now load male and female versions without needing to clone the ai entry.
- Suck blood can induce open wounds when it lands a critical.
- The odds for certain body locs to be tapped by durability tests is no longer identical (more hits go vs. torso/head then the boots/gloves/belt slots).
- Acid durability tests have been changed to test randomly every 10-35 frames rather then every 16 frames.
- Units now support aggro sounds, although only one unit makes use of this right now.
- Flee sound timer and delay are now softcoded into monsounds.txt.
- The sounds that don't get muted when the ESC menu is open are now softcoded.
- States can now link to an audio loop that plays while the state is active.
- Sequences can now be given a default sound in monsounds.txt via the Sequence column.
- Event sfx (non default events) play only if the unit is visible.
- Missiles aren't hidden by LoS anymore (mostly a cosmetic change, I didn't like the flickering if they moved around columns and pillars).
- Manually edited all the frames of the goatlords to remove their shadow.
- Added a proper counterpart to the firestorm movement funcs to avoid sync problems (see also under bugs).
- The hardcode for diablo's death hit and shwing sounds have been softcoded.



Code replacements

- New code for the lifetap event.
- New code for rest in peace event, it is now percentage based.
- New code for the bone armor event, fixing some minor bugs.
- New code for the cyclone armor event.
- New code for the Clay Golem's copy of slow target.
- New code for the three CTC events.
- All remaining pSpell functions have been replaced except for the TP book and the cube (these will follow in the future, the TP one contains a bug-n'-hardcode-o-rama so we expect the worst).
- Several missiles functions were replaced again.
- The hydra AI was replaced with a new, improved ai.
- Replaced the entire code related to the chat buffer.
- Replaced the WAV file validator, it is now far more efficient and streamlined.
- The active state function of sanctuary was replaced, the density is now softcoded.
- Replaced more state set and rem funcs.


Random stuff

- We've removed unused missile and overlay graphics that were previously added and not used by anything again.
- MonSeq.txt was cleaned up.
- Removed redundant missiles from missiles.txt

------------------------------------ FIN ----------------------------------------

16th Jan, 2011 -> Look at topic title for remaining unit count

5th Jan, 2011
- A small new years update, from the initially huge batch of sfx work that had to be done, now there are only 35 units left for which sounds need to be mixed, so the next larger update to this post should appear here soon-ish.

10th November, 2010
- Just a quick headsup of whats going on at the moment, we're adding audio and working on sound effects for all the things that have been finished so far content wise, this is currently about 40-50% done, a detailed report on all the changes (including numerous things that had to be changed about the code) that were involved in this will be posted when we're done.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Sun Jun 24, 2012 2:31 pm

BUILD 111203

3rd December, 2011 (anywhere between 30000-50000 lines of code had been worked on)

The primary goal of this build was to audit the single largest chunk of code in the project, being the AI functions, this alone amounted to more then 20000 lines, all of which have been verified in realtime and at source level, the source has also been cleaned up and unified and more throughly documented.

Nonetheless, additional things have been changed and numerous vanilla bugs have been fixed, as well as a bunch of bugs that have snuck in from vanilla by reusing some of the old logic.


AI system changes

Everything inside the large AIFuncs.cpp has been cleaned up and many refinements have been done, listing all of them here would be too long and probably boring, so I've restricted this to the more relevant changes. In general also the entire thing has been given one more huge performance boost.

- The whole execution context for the AIs has been changed, a lot more is now being prefetched and many checks have been moved out of realtime.
- All stalling goes through an intermediate routine now that allows the game to perform global modifications upon it (reducing, increasing etc).
- The AI item usage has been totally revamped and improved, the AI can now for example use the same item to cure both an ailment and HP if the item supports it, the scroll usage was split from potion usage and has many more options.
- Added new booleans to States.txt that control whenever the state is considered a threat when present on a target, or on the monster itself (think Thorns, Iron Maiden, Blood Boil), this is more versatile then using individual state indices.
- The escape routine will no longer try to circle the unit it tries to escape from if the range is too low, this stops the pathing engine from breaking (this is a bug in their pathfinding engine that I have not addressed yet).
- When monsters are hit by firewalls, the code sets a flag allowing the AI to respond and move out of the fire (vanilla tried to do this for mercs, but the merc would even leave your own firewalls, because it is done incorrectly, not surprisingly...)


Other revisions during this audit

- The code governing item prices has been finalized and a lot of redundancy has been removed.
- The logging system has been updated and now works properly if there are multiple game windows.
- Numerous older structures now adhere to the naming convention (these are from many years ago).
- Some left over constants inside old code have been replaced with proper enums and defines.
- Many misleadingly named functions and imports have been renamed to improve code readability.
- Experience.cpp, Shrines.cpp, Oils.cpp and Scrolls.cpp have been finalized entirely.


Improvements and changes

- Dungeon, unit and item quality code is now consistent, instead of things being done in different ways.
- Spawning gold piles now uses a single function instead of being done inline everywhere.
- Softcoded player and object inventory page Ids.
- The 'Female' flag was changed to a 'Gender' tribool, this stops constructs from being assigned a gender.
- Life in states.txt now cancels the player's natural life regen, like it already does for monsters.
- Healing potions are now effected by the three prevent heal states.
- Dungeons remember the maximum character level when they were initialized, instead of querying it in realtime (this now works similar to how /players is remembered).
- The experience reward for killing the ancients is now softcoded into DifficultyLevels.txt
- Shop levels are now controlled by DifficultyLevels.txt and not the individual levels for consistency.
- The stat costs in ISC have been finalized for currently implemented states.
- Jewels now add their complete price to items when socketed into them.
- The number of sockets influences the item's base price now.
- Per level stats now give a price depending on their value at the maximum clvl.
- The potions used by Divine and Eldritch shrine are now softcoded.
- The potions mercs can consume are now softcoded.
- The entire item stat updater was cleaned up and improved greatly.
- Numerous remaining shrine settings are now softcoded (properly).
- Softcoded the number of items dropped by thaumaturgic chests into DifficultyLevels.txt
- The way data is initialized now is more organized and consistent, there is a clear split between server, client and shared data structures (irreleveant for SP/TCP-IP, but having it clean is better then not)
- Removed a targeting hardcode that was left in D2Client.dll, now Iron Golem's special auto-targeting isn't lardcoded to the skill index anymore.
- Removed the hardcodes (and infact all the code) that was used to create Diablo's bone prison, reimplementing the entire skill (wasen't imported before).
- Every single item event function is now in MetalStorm code.
- Removed all remaining hardcodes for blood and iron golem.
- You can now save 255 pets into the D2S, with equipment.
- Player pets with an elemental affinity will no longer absurb 100 percent damage, but rather the percent indicated by the absorb stat, if it is present ontop of the flag.
- The four remaining shrines, enirhs, fire[storm], poison and exploding shrine, have all been imported into MetalStorm, thus everything relating shrines is now entirely new code (and fully audited too at that!)
- The fire shrine's nova launching now uses the proper nova routine, instead of using that messy calc producing those ugly dents and gaps.
- The oil code has been finalized, now there are type driven oil counters that are fully costumizeable (this limits the number of times an oil of a given type-group can be used, instead of limiting individual oils).
- The code for ethereal, low quality and drow items has been streamlined into one place, alongside all the other base damage overrides.
- Flavies AI is now replaced and isn't hardcoded anymore.
- Iron Golem and Telekinesis can be used properly when assigned to scrolls.
- Softcoded what AI overrides are tied to individual states into States.txt (just keep in mind to assign them with skills that support this).
- Warping pets now play the teleport sound alongside the overlay, this looks and sounds properly instead of having them just bob around like a bunch of interns.
- Levels can now be marked as permanent, they will never be deactivated, thus the AI of for example bosses can keep executing even when you're not there, preparing for your return (etc).
- Removed calls to IsBadCodePtr which is a deprecated, unreliable, and slow Win32 function (just read the MSDN entry) from the path finding routines, all it did was consume CPU...
- The distance experience penalty is implemented again, but can be easily changed now.
- Removed some redundant seed rotations that didn't contribute to randomness.


Code replacements

I've replaced numerous vanilla functions during this audit which had been called and were quick to replace, these govern some checks for charges, repair checks, the charm requirement handler (which just called the already replaced basic one + some extra checks), code to get the inventory page, code to get the magic stats list, routines for item and gold management, the client routine that spawns critters for ObjClientFn #17, the entire pspell cursor packet handler (had just one inject in it before), the remaining core merc management routines (the merc AI itself will be added in the next build, a replacement for it is already done, just untested), all the remaining unit deactivation code and the room deactivation code.


Vanilla bug fixes

- Fixed a critical bug that would allow an attacker to remotely crash the server side thread with a malformed packet, because the code didn't attempt to validate its contents prior to using said contents, if properly crafted, this can be used to overwrite arbitary locations in memory.
- Fixed a bug where Flavies AI (and all other NPC AI's unfortunately) would use the same saved AI variable for multiple purposes, which clashed and produced breakage.
- The game no longer calls the rack iterator when trying to drop gold from the belt (why in the name of the seven buckets of hell...), this iterated over all item record whenever you drop any gold from the belt...
- Fixed a logic bug we've previously imported from vanilla where the price of charges was added to the item price twice (!!), it gets added among the stats addition and in a separate routine for charges, this is probably why they're always so expensive...
- Another one of these, socket fillers no longer influence the repair price, only the buy and sell prices (probably not a bug, but it was stupid nonetheless).
- Fixed several vanilla carryovers in the palette assignment code, nothing major though.
- I fixed several bugs related to AI delay which had been imported along the vanilla logic, to understand how these bugs come into play you need to understand how AI delay works in general, basically this has nothing to do with stalling, what it actually does is that when a mode is complete (A1, A2, WL etc) it will wait for this many frames until the AI ticks again, this works fine until more advanced AIs come into play, some of them (a good example in vanilla are the ancients), will set multiple AI ticks when walking, to ensure they will retick again in several frames, instead of waiting until they reach their destination, now if you happen to interrupt such a monster just after it began walking, the <i>old</i> event you've set is still present, and that event will take preceedence over the one AI delay would set (so in essence, what was meant to make them more active ends doing the opposite). To resolve this problem the game now no longer checks if an event exists, it deletes the existing event and sets a new one whenever the mode is interrupted, furthermore the delay setting was moved to DifficultyLevels.txt as AISpeed.
- After half a decade, the last remainder of the door bug is FINALLY fixed, when doors spawn, and preoperate, they now invoke OBJECT_UpdateDoor, so that their status is updated properly instead of just the mode changing on one end...
- Fixed a bug that made ShiftSel ignored by the game ever since the end of classic... Now Diablo's bone prison is finally highlighted in the way it was intended and worked in classic D2.
- Fixed a bug that made telekinesis ignore objects/items even if you directly target them if used in conjunction with SearchEnemyNear.
- Fixed wrong txt data fro Diablo's Bone Prison (audio) and the Countess's mist missiles (wrong missile settings).
- Fixed a bug where druid pets created via CTC skills had the damage for level 1 summons, even if they were level 9001.
- Fixed a bug that made Iron Golem consume mana at the start of the game if you had one saved in the D2S (what in the fvck?)
- Fixed a bug that prevented more then 4 UMods from being transmitted via one of the update packets.
- Fixed a bug that made monsters upgraded via the Monster Shrine not recieve a new palette.
- The gem shrine can no longer be manipulated by pushing an item to the forefront of the inventory list (sure you can drop everything to the floor, but this was just silly...)
- Fixed a bug where the fire shrine could render monsters with less then 1 life ( ie below 256 ).
- The fire shrine now instantly updates the displayed hitpoints of monsters and players.
- The exploding and poison potion shrine no longer drops potions at the player's coordinates (looks very weird with telekinesis).
- Softhit HP updates will no longer send 0 percent to the client, the problem with this is that they use it to send more then one value, the client needs to be able to know if the contents are blank or contain HP data...
- The game no longer assumes it is the year 1995 and you have 200 MHZ worth of CPU power, it will thus no longer run in constant bruteforce mode using 50% cpu, as a result, the cpu usage has dropped to 1.5% (0-3%) average. You can configure this by toggling InGameSleep setting in the INI. This also fixes the second cycle sink in D2Win.dll.
- Fixed a myriad of bugs in the Taunt AI override, this thing was broken beyond belief, I just wish I had replaced the AI override (not the skill code) sooner, so what's wrong with it? Well:

1.) The target was overwritten in the wrong way, making the chance of it working properly extremely low.
2.) If it did work, it assumed the monster had mode A1, independent of any txt checks or whenever its melee or ranged...
3.) The state never expires yet... (see below)
4.) If the AI override fails it resets the AI to normal, but doesn't remove the taunt state!
5.) And lets not forget the old fix I did in the skill, where it was searching for targets around your position, instead of around where you click (considering its a targeted skill that would've made sense...)

- Removed redundant hardcodes from the parts of the monster deactivation code that remainded in vanilla. Not really a bug, but then again, this looked like ancient beta workaround crap they added to make necro skeletons work way back when, all it does today is waste CPU...
- Monsters can now cast a skill versus themselves without the game changing their facing direction, this made all of them face towards direction 0 before... (Note: in vanilla, they 'fixed' this by making them target the player, so they always face that way), the skills just don't use it as a target.
- Fixed two logic imports from vanilla, both with Leap, firstly, the path speed was set after calculating the arc, rather then prior for monsters which made their arcs not calculate properly and they would land sharply sometimes (the Sand Leapers in vanilla demonstrate this wonderfully). The arc calculation itself was bugged, it was meant to scale depending on your distance, however after a certain point the formula always throws out negative values, dropping from around 2000 to 500 in a single step, this has been fixed and leap scales smoothly for all distances.
- Fixed a 1-in-a-million bug where multiple Demon Imps could mount the same siegebeast, the skill didn't check whenever the targeted mount already has something mounted on it, just whenever the mount is a valid mount in general. Yet another vanilla import bites the dust!
- Fixed the price calculation for unique and set items which was still using the vanilla logic before (being a simple multiplication).
- And yet one more of em vanilla imports, the saved AI parameters were reset after being restored in some cases, they are now not reset if they're marked as permanent in MonStats3.txt.


MetalStorm bug fixes

- The AIParams linker no longer fetches values as __int16, it properly fetches them as __int32 now.
- Fixed an incorrect hook detected during a patch unit test.
- Fixed a bug resulting from fixing a bug with hireling HP display.
- Fixed a problem with bonus item creation that didn't call the normal repair routine.
- Fixed a bug with healing potion duration stacking when used by hirelings.
- Fixed incorrect display for the state toggle chat command.
- Fixed a problem with set item stats update detected during unit test.
- Fixed a bug with boss palshift syncing.
- Summons didn't recieve the UNITFLAG_SUMMONED flag, this has been resolved.
- Telekinesis won't spew out "Impossible" anymore despite picking items up, the D2Game func that wasen't yet replaced fully has an unreliable return value.
- Fixed problems in several AI block functions that had incorrect parameters / settings.
- Fixed an utility function that didn't scan the node for the player #8 if one would exist in the game.
- Fixed a missing check in one of the attack speed routines.
- Added a missing function call to the Sand Leaper's post-leap knockback.
- Fixed a line-of-sight bug if you used the highest positive signed integer value as a radius (ie 0x7FFFFFFF).
- Fixed a bug with hurricane that ignored the aura range field.
- Added missing AI cleanup code to Vampires leaving their mist shape.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Thu Jan 02, 2014 4:00 am

BUILD 120624
24th June, 2012

This internal build had two goals set in mind, first we believe the system is now mature enough to flesh out the designs of our content, as such we've spent several month writing design documents in regards to the skill system, skills, stats, formulae, npcs, shrines and other things, these are a combination of things thus far implemented and new things to come in the future, this goes handinhand with the work on the plot several builds ago.

But there was a second goal, this was initiated after the proceedings mentioned above had been completed, namely removing some more relic vanilla code that simply bogged down our system (because we have to support the old and new way of doing things inside the same code base), this has led to some major cleanup in regard of missiles, skills, quests and especially the AI, the quests changes primarily being driven by formerly hardcoded AI tie-ins.

Things added to MetalStorm
- Moved the game effects hardcoded table into MetalStorm, it governs effects such as the Cairn Stones (etc).
- As will be outlined in the point below, all AIs but the expansion pets (those will be targeted by the next build) have been replaced entirely and integerated into our system, some notes to special things and bugs will be given below where applicable.
- Replaced the entire hireling AI to go with the other generally already softcoded hireling settings.
- Replaced the BoneWall AI and moved its duration into a calc field rather then being read directly from param2 of the skill.
- Replaced Nihlathak's boss AI, this thing was largely a hardcode encumbered copy/paste of other LoD AIs, in the process we have redesigned him entirely, giving him new skills, an entirely new behavior, they didn't even bother to record any audio for the dude aside from the wretched taunts (they even have background static)... You know what that spells out, Lazy!
- Moved Nihlathak's death effect from the gamefx function table (where it doesn't belong, this is for stuff like the cairn stones, interns gonna intern...) to the previously softcoded questfx.txt which governs all other quest related death fx.
- Replaced and fully softcoded Shenk's death fx, hell these muppets decided to put in nice ASSERTs all over the place, like ASSERT(missiles.txt->range == 25), why didn't they just override the range? Ya know the system allows it.
- Replaced the trapped soul AI and fixed several bugs with their AI code, as well as many incorrect settings in the txt files, the two tokens didn't work the same way, but they used the same settings and code, the second trappedsoul doesn't have the dormant NU animation, and is rather active all the time, yet they made it flip flop between modes that didn't work as intended for the unit...
- Replaced the MephistoSpirit (An Evil Force) AI, they now properly die instead of lingering in NU eternally, they have also been given new audio, they didn't have any audio in vanilla...
- Replaced the tentacle beast and tentacle AIs fixing their notorious sync problems along the way, they no longer get extra melee range inside the melee range routine, getting rid of the setting in MonStats3.txt, it makes no difference from just changing it in MonStats2.txt.
- Replaced the Generic Spawner AI (Evil Demon Hut) alongside with its myriad of hardcodes, I can confirm that indeed the GenericSpawn flag controls what this thing can spawn, but the hardcodes make it nearly useless.
- Fully replaced the Wussie AI (the barbarian PoWs in Act V) and in the process reimplemented their entire quest from scratch, fixing considerable logic problems with it (See further below for more details).
- Replaced Kaelan's AI and fixed numerous bugs with how he responds to the quest state, he also doesn't stall for 120 frames a pop anymore (we delay his 'blurb' audio via NpcAlerts.txt's delay column)
- Replaced the Barbarian Combatant AI, this was the single dumbest AI in vanilla, it simply rolled random values until it succeeded in landing on a walkable spot... They now work like my recruitable Act I allies.
- Replaced the Barricade Tower AI and removed all the hardcodes associated with it.
- Replaced the Baal Taunt AI and wrote new code for all of its abilities.
- Replaced the Quill Bear AI and added new sounds for the unit, they never had sounds before.
- Replaced Blood Raven's AI, giving her some new skills along the way and an improved escape routine, she can now summon both skeletons and zombies rather then only the later.
- The Zombies and Skeletons summoned by blood raven now have a new UMod that overrides their AI, allowing blood raven to issue them commands and override their target with her own.
- Replaced the Summoner's AI, fixing some bugs along the way (he was never using his intended escape behavior, they didn't exit the function after calling the escape func, which cancelled out the event again...), he now can summon golems in a similar fashion to Baal's linked clone (one at a time, and linked, if the summoner dies, so does his golem), he has been given some other additional skills too.
- Replaced Andariel's AI and fixed her poison missile, it never visually looped properly due to wrong missile settings.
- Replaced Diablo's AI, fixing numerous bugs, especially with his broken running attack (which never worked properly, not even in v1.00), he was supposed to maul the player, but instead he just walked on his spot in melee range...
- Replaced Duriel's AI and fixed numerous bugs with his damage, his skills didn't use damage from the correct damage columns in MonStats.txt, his charge attack has been reactivated and his AI code no longer overrides the aura level (why are there skill columns in the txt file? oh!)
- Replaced the AI override code for the Countess and the Terror state.
- All behavior overrides are now softcoded into Behavior.txt and AIPar.txt, this means adding new AI states is now trivial and can be done without recompiles.
- Replaced the following AIs beside those mentioned separate: Ancient, AncientStatue (unused), Catapult, CatapultSpotter, DarkWanderer, Trap-RightArrow, Trap-RightLeft, Wussie, NpcStationary, Npc, NpwOutOfTown, Turret, InvisorSpawner (unused), SevenTombs (unused), Izual, Smith (this AI gives the unit extra walking velocity the lower its life % is), Griswold, ElementalBeast (unused).
- Replaced hardcoded quest tie-ins for the following AIs: Nihlathak, Ancient, DarkWanderer, Kaelan, NpcStationary, Npc, NpcOutOfTown, Izual.
- Added an advanced line of sight search function to the AI to actively search for positions from which they can shoot the player, makes hiding behind obstacles that much more difficult versus the AIs that use it.
- Rewrote all the catapult missile functions from scratch, fixing several bugs and removing numerous hardcodes (once more they decided to check the softcoded id inside the txt file, but proceed to use a hardcoded id when calling the create missile func...)
- Added Catapults.txt for the sole purpose of softcoding the attachment missiles that show up over catapults.
- Added new impact sounds for stone hits, and impact sounds for wood and glass hits (the later two didn't exist at all in vanilla).
- Overlay light radii now gracefully fade out instead of being removed abruptly unless KillLight is set to TRUE for it in overlays.txt.
- Overlays can now start on a random frame, this makes such massive looping effects like Inner Sight appear more interesting, rather then all units pulsing on the same overlay frame...
- Fully softcoded the probability overrides for certain DS1 preset units from spawning (LightningSpire, FireTower, the non-NPC vendors in Lut Gohlein and the Floor Spike traps are all hardcoded to sometimes not spawn in vanilla, tied to their line# and not the preset#).
- Added NpcAlerts.txt which controls special things to execute then the '!' blurb shows for the NPC, this now allows multiple intro wavs (like Kaelan's 'Halt!') to be tied to quest states. I've changed the message sent to the client to harbor the Id rather then the unit type, the handler didn't have code for non monsters anyway, and the message is never sent for any other unit.
- Fully softcoded the hardcoded door tile table, this is now controlled by Doors.txt + Levels2.txt, allowing for example catacomb levels to be cloned properly (maintaining automatic doors), why didn't they just link this to the lvltype?
- Softcoded various parameters formerly embedded into the Npc AI, such as Larzuk's chance to use his muscle pump animation and Fara's hammer toss loop (the later never worked in vanilla, she was meant to loop this animation, but the way the code is written makes this pretty much never work so she just tosses it once).
- Added a DefaultSkill column to MonStats3.txt that controls what skills monsters can use under Blind, Taunt and Terror states when cornered, this makes these states work properly with ranged attackers, instead of making them attack using A1 (which often didn't work or even glitched up the unit in vanilla).
- Fully replaced the Vine Attack skill, getting rid of several hardcodes along the way.
- Removed hardcodes for skill #294 and missile #468 from the vine movement active state.
- Fully replaced the skill and missile functions of Diablo's flame wave attack.
- Added a subtle lighting effect to Diablo's death animation and all of his skills, making them properly illuminate in dark areas.
- All of vanilla's active state functions have been replaced now, they've been turned into fully separate functions now (rather then being clientside skilldo functions), this allows them to be much more versatile because they receive the state id alongside the skill id when called (the primary reason they used to be so hardcode encumbered in vanilla, hacks all the way down the bucket...)
- Blessed Hammer can now receive damage % boni from any state that increases or decreases the player's damage, rather then being hardcoded to concentration.
- Added the debug logging back to the txt linker which they removed in v1.11x (such as reporting duplicated or missing indices), mine is more accurate in the errors it reports out of the box.
- Added some new audio for the Stormlord's lighting bolt, that is properly layered, rather then using the normal lightning sounds.
- Added several SkillDamageMode and SkillDamageSkill columns to MonStats3.txt, these now govern what mode the skills that utilize these columns the damage is fetched from, rather then assuming they should all use S1.
- Added Att1Seq and Att2Seq columns to MonSound.txt to control some sequence related audio more properly, the audio settings for various enemy versions of Jab have been changed to use these new settings, all versions of jab are now marked as uninterruptable in skills.txt too.
- Revised the Jab code again, the original was from 2008, the player version of the skill does 3/4th weapon damage on the 2nd strike and 1/2 weapon damage on the 3rd strike, rather then using damage % (which would've only effected physical damage), some changes were done to monster versions too, beside the aforementioned audio fixes.
- Finished txt entries for more of the old skills, even if this is only intermediate before the final stuff takes their place, this was done so that Prayer, Defiance, Blessed Aim, Thorns, Might, Bash and Stun can be used by hirelings without glitches due to old vanilla settings, also finished entries for Poison Dagger, Concentrate, Berserk and Sacrifice.
- Concentrate now makes you uninterruptable when used, like it did prior to LoD, all other Barbarian melee skills now have the option to make you uninterruptable via a txt entry on the fly.
- Added far more control over attack overlays to MonStats3.txt, although only few units actually make use of it, Izual's settings that used to be hardcoded in vanilla never worked! Good they didn't, the overlay looks horrible, it is an incorrectly angled variant of his built in blue overlay (which is part of his cel files).
- Made it possible to use the summoner's unused casting and death overlays, although we're not using them at the moment, they've been move to the overlays folder (we're not using them because they have terrible gamma, his entire sprite was rendered with wrong gamma).
- Improved the targeting behavior of melee summons and hirelings slightly, they will stick to their targets more thoroughly now.
- MonProp.txt entries are now synced with the client, this means that anything in there will show up client side accurately and automatically.

Miscellaneous Diablo II Changes
- I've fixed some typos in vanilla's rare affix ingame names.
- Changed the illogical fact the wussies counted as rescued the moment you released them, instead of the moment they reach their town portal.
- The Iron Wolves didn't use all of their graphic components, I've enabled all of them beside the wand.
- The Iron Wolves never used their melee attack when cornered and their skills failed, despite them having such an attack, I've enabled this.
- The ancients didn't have proper audio settings matching their weapons and used the normal barbarian sounds, which use wrong priority (etc) for monster sfx.
- The tentacle beasts didn't use all of their sounds, likewise the missile now gets extra damage per slvl.
- Added new spawning sounds for the evil demon huts, because they had no audio for this, this is a recurring theme.
- Added missing 'gsd' to compcode.txt, allows the barbarian combatants to use all their components properly.
- The Quill Bears didn't have a palette corresponding to the regular quill rats, I've made a new matching palette for them.
- Added Izual's missing swing sound, he no longer silently waves around his sword (he did have a grunt though).
- Hephasto didn't use the palette entry and aunts that he was supposed to use.
- The Smith's death sound is way too long, it lasts long after he is actually dead, it also lacked audio for his body hitting the floor.
- Griswold was using the same audio sync settings Zombies did, this made his audio badly desynced, I've fixed this.
- Removed the weird purple pixels from the Decrepify graphic, it should've been blue entirely is my guess.
- The summoner was rendered with the wrong gamma, I've made a gamma corrected palette for him to use.
- The Act V barbarian hirelings didn't have any audio of their own, they used other unit audio, they have proper audio now.
- Cleaned up all out dated skill descriptions text, some of them had wrong info since the release of LoD!

Changes done to MetalStorm API
- The chat params parser can now handle quoted text, this means the debug routines work with Id's that have spaces in them.
- FINDUNIT_CORPSE now returns corpses of special monsters (champions, uniques) unless the query initiates from a resurrect skill, this means corpse explosions cast by the enemy AI can now target those corpses for example.
- IgnoreLOS in MonStats3.txt now works like the name implies, rather then controlling whenever that monster ignores invisibility.
- Client Frame and Client Mode UMOD events only dispatch now when METALFLAG_CLT_UMOD is present on the unit, since only two units in the game uses the events this should save yet some more cpu down the pipe.
- Did some changes to how AIs that pick and remember skills do so, deprecating some parameters in DifficultyLevels.txt in the process (SkillOdds).
- Changed the naming of many D2Common functions, mostly related to path and direction to be accurate as to what they do.
- UMOD_KILLSELF and UMOD_SELFRESURRECT are now mutually exclusive in effect, the former always taking preceedence, monsters destroyed by a boss' death pulse (think Andariel) can no longer self resurrect now (they could in vanilla).
- Removed unneeded calls to path rotation locking from the client monmode handler, they weren't needed anymore.
- Made the client calcs of all inferno skill functions have the same purpose instead of some being at different # before, this allows the same code to be used for all of them.
- Removed some redundant checks from AI routines that didn't do anything meaningful, just generate slightly more code.
- AIBLOCK_PetIdle() now removes the inferno state when it is present, this was needed when I added the Iron Wolf hireling AI.
- Made four redundant columns in MonStats3.txt kick the bucket.
- All monster movement now uses the same pathing type act bosses use in vanilla, it appears to be less prone to pathing errors (not researched in depth).
- Done further refinements to the AI timers, making them output a bit less code.
- Fire -> Burn damage conversion on SDamageFunc #25 now uses 256ths precision rather then 100ths precision for better accuracy.
- SDamageFunc #3 and #26 now allow audio to be controlled separate from visuals (rather then using softhit for both).
- Added new debug command #zerohp to set the users life to 0 (without killing you), useful for testing healing skills and items.
- The Bash minimum damage clamp has been changed in function, it is also calculated sooner allowing for more influence by resistances.
- Instant death rolls associated with melee attacks (impale) now set the 'death' flag on success, rather then silently killing the unit (mostly a audiovisual change to get the hit to register).
- I've split the large monstats3 missile skillfunc into multiple dedicated versions, rather then using a lardy bitmask to control everything, less code being executed is always better.
- More cleanup, removed all the code that inconsistently used the game frame as unsigned, while that would've been desireable, their own code is inconsistent and the original variable was signed.
- Improved some missile and skill utility functions, moving many of them to context safe templates that can be used transparently on client and server, generating the proper code for each context.
- The hirelings now call MONSTERS_UpdateLifeRegen instead of using their own hp regen calc which ignored monstats.txt, this was a vanilla import.

MetalStorm Bug Fixes
- NBOSSEVENT_GETHIT now doesn't fire for uninterruptable units, because they aren't actually hit by the attack in traditional sense which can cause unwanted behavior.
- Fixed incorrect txt settings for various Act II and III non-NPC towners, they can spawn properly again.
- Fixed missing SetQuest entry for Council Members in SuperUniques.txt, their death will now update the quest again.
- Fixed bugs in the implementation of Cain's A1Q4 menu lockout function.
- Fixed all incoherent use of target units in server controlled audio events.
- #kill command now respects the killability setting of the unit.
- #skill command no longer shows misleading messages if something goes wrong, the messages actually explain what happened now.
- Rune names can have more then 4 letters again, should really use a string for this though.
- Fixed a lookup issue with some rare affix names (might have been a vanilla problem too, not sure anymore).
- Fixed a bug in the AI flags compiler that omitted some update flags.
- DoesMonHaveUMOD now doesn't scan all slots, but stops at the last filled one.
- Ray of Enfeeblement was set to use a sequence for casting, but had no playerseq associated with it, wut.
- Fixed various incorrect txt settings for missiles and skills during cleanup.
- Non natively learned skills can no longer get drained to slvl 0, they'll cap out at slvl 1 now.
- When non natively learned skills are drained their slvl now properly shows in red in the skills menu.
- State Shatter Func #4 now properly ignores the monster's size, contrary to #3 (they used the same code switch before).
- Nests and other units that die as a result of their AI code will no longer drop items if they aren't killed by the player.

Diablo II Bugs
- Some of their AIs deleted the unit within the AI code, the calling code had no means to know this, which can easily lead to undefined behavior and probably does in some cases.
- Fixed incorrect shadow settings for the ancient and ancient statue cof files, their alpha blended components are set to cast shadows in vanilla, ugh...
- Fixed the broken catapult cold missile that was entirely hardcoded before, and didn't work as intended, the ice doesn't pile up on the same x and y coords anymore.
- Fixed wrong settings for the firespike catapult missiles.
- Fixed the seriously hosed COF files of the catapult's death animation (token 64 and 65, ua is a placeholder and not actually used by the game), they have composite layers meant to blend set to be opaque and cast a shadow, wow...
- Fixed the out of order missile attachment on catapults, they called the functions to set and launch the missile in the wrong places, making the missile change randomly. The hidden flag is now properly removed when the missile moves the 1st time.
- Fixed the drawing code not respecting UNITFLAGEX_HIDDEN when the unit is attached, this was a hack of theirs to get the catapult missiles to work I guess.
- Fixed the broken COF files and audio settings for the trapped souls.
- Fixed missing server modechart entry for MONMODE_S3 of the trapped souls, making their AI hang if they ever deactivated.
- Fixed bugs with the trapped soul AI that made them lose track of their activation state.
- Fixed the broken COF files for the Mephisto Spirits (their cel files have 8 dirs, but the cofs and txt say 16...)
- Fixed numerous incorrect settings for the Mephisto Spirits in the txt side of things.
- Fixed wrong blending mode set for the blood ripple effect of the tentacle beasts.
- Fixed a bug where the rescued Wussie's didn't play all their intended audio, they never played their cheering audio when rescued in vanilla...
- Fixed the out of sync status for Kaelan's Halt! audio clip, they "fixed" this by making him stall 120 frames and searching the entire game for the palace blocker object to check its mode... Instead of say, sending 1 more byte to the client... Interns gonna intern hard...
- Fixed a bug that made the game only flag the 1st rescued Wussie as an AI target, moreso, the wussies only became legal targets once they have been released from the pen, too bad the txt file marks them as untargetable and the AI counts them as rescued the moment you break the pen door.
- Fixed the missing audio of the pen door breaking, the object had sounds, the monster they replaced it with didn't, brilliant!
- As mentioned before, I've fixed bugs with Kaelan's response to the quest state.
- Jerhyn, Tyrael1 and Izualghost no longer assume players inside other bloody acts are near them if the worldspace coords happen to overlap... /facepalm
- Fixed myriads unchecked returns in the NpcOutOfTown and Npc AIs which could lead to the AIs bricking if something goes wrong...
- Fixed a bug where Cain didn't walk to his target position after leaving his rescue portal, because the game never sets those coords in the quest struct, he just stays where the portal places him (but the AI keeps trying to move to 0/0 regardless :D)
- Fara was supposed to rewind her hamme throw animation indef. until she fails to roll, this never worked because the code reset it after the next event was queued already...
- Fixed a bug where corpses of unflatdeath monsters could be destroyed by shattering, without removing the collision (they fixed it by making all those units immune to freeze/chill...)
- Howl now properly sets a state cleanup routine, instead of having the AI check the state via a hardcoded Id (was it too hard to look at the Terror skill's code to see how that works?)
- Fixed the broken lightning component for the Baal Taunt, it was meant to fire lightning to various directions, but due to them using the stationary missile's x and y coord as a seed, they all fired in the same dir...
- Fixed a bug where corpses flagged as unuseable with a state could be used again after they are deactivated and reactivated, because the state would be gone by then...
- Fixed incorrect D2QuestEventType import for Smith and Hephasto, this is why they spawn as Mind Maw the Slasher in vanilla.
- The vine attack client SkillSt func no longer sets the SKILLEND bit, meaning you can use it in conjunction with a client SkillDo func.
- Fixed a bug that caused the vine attack creep being desynced between client and server.
- Fixed the retarded logic of scanning the whole game for a missile index near the vine beast to make it fade out, instead of say, storing the missile index in the skill's local data, not to mention this could easily glitch up in MP when multiple druids summon a vine near each other... "Made for multiplayer" my ass.
- Fixed the incorrect calc usage by the vine beast creep, they used ccalc 2 for both delay and distance, while the txt lists this as 2 and 3 respectively!
- As mentioned before, the summoner had a bug where his escape behavior never triggered properly...
- Fixed the hosed COF files for Act V barbarians, tokens 0A and 0F, the former has an invalid offset for GH2HS, the later doesn't have a trigger frame for A2. They "fixed" the offsets by removing the GH anim from monstats2.txt Lazy...
- As previously mentioned, I've fixed Duriel's skill damage to use the proper columns.
- The Jab attack of Act II guards only had 2 trigger frames, but 3 visible strokes...
- Fixed an important logic problem where the AI init routine would clear parameters if they got restored during reactivation, I've changed the order in which the reactivator sets the AI and restores the params.
- The Iron Golem didn't always use the item it was given, making that item wasted. The golem is now always able to use his items.
- Inferno settings for Balrogs, Baal and other units in monstats2.txt are wrong and didn't work like they thought they do. Only Diablo's skill was used properly, because frankly it uses very different code.

Tools
- Created a small tool to debug and create nova lookup tables, although it'll be of little use now because we've moved to just using the FPU, far better results.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Sat Feb 01, 2014 3:14 am

BUILD 140102
2nd January, 2014

Most of 2013 we've worked on the story and lore, and have later decided to take a break until the end of the year. However, there were quite a few code changes that amassed prior to our departure into that terrain. These things are mostly from the end of 2012. Future updates will be made once enough have agglomorated.

- (MILESTONE) All vanilla Diablo II and LoD AIs have been replaced, there is not a single instruction of the old AI code left.
- (MILESTONE) The entire outdoor level generation process has been replaced, every last bit is using new code, everything is softcoded.
- (MTST) We're using the proper 2x4 great maul graphic now, seing how the one in the game got scaled to 2x3 (prior to LOD it was cropped to 2x3).
- (MTST) The CMNCof files can now be reactivated on demand, there will be an option to compile them out of the txt files later on.
- (MTST) AnimData.D2 was split into three files (PlrAnim.D2, MonAnim.D2 and ObjAnim.D2) which allows the same token to exists in more then one place without glitches.
- (MTST) Improved the hash algorithm used by AnimData.D2, it now has proper distribution rather then clogging half the buckets and leaving the reset empty...
- (MTST) AnimData.D2 is now compiled when you run the game with -txt if there is an AnimData.txt in the source folder.
- (MTST) The game now calculates the proper running anim rate for classic monsters with RN (their monstats loader has a hardcode in it).
- (MTST) Improved how AnimData records are looked up considerably, only their poor excuse for a hash algorithm remains.
- (MTST) Cleaned up all of Speed.cpp to get rid of all the archaic code that was still in that file.
- (MTST) Turned ObjSound.txt -> AltMode1-2 into bitmasks, instead of singular integers.
- (MTST) A bunch of replaced and new object operate and init functions have been added (fires, torches, braziers).
- (MTST) Moved Objects.txt loader into MetalStorm.dll, moving the control over the previously enabled flickering back into this file (the column was not compiledbefore).
- (MTST) Added #SpawnObject debug command, we had one ages ago but it got removed at some point.
- (MTST) Replaced various skill handling funcs from D2Common, removing a bunch of hardcodes along the way.
- (MTST) Replaced all object client functions with new code (except their legacy + debug ones, these are gone now).
- (MTST) The two skill assigner functions now enforce the maximum slvl limit properly.
- (MTST) Fully replaced the shadow master AI and merged Blizzard's AI type and our new use type into one field.
- (MTST) Mercs can now use all the skill types the shadow master could use and vice versa.
- (MTST) Numerous minor tweaks to functions, none of these are that relevant, it is all very internal stuff.
- (MTST) Replaced numerous D2Common functions beside the entire skill API mentioned previously.
- (MTST) I ensured that the AI always fetched native skills and not charges and such from gear.
- (MTST) the AI bonus column in skills.txt is now a percentage in 128 that works independant from how the base prob is calculated.
- (MTST) Skill delays are selectively supported for pets now if PetSkillDelay is set to 1 in MonStats3.txt.
- (MTST) Player equipment requirements now apply to the Shadow Master and Warrior too, hirelings are excluded however.
- (MTST) Fully replaced the Shadow Master and Shadow Warrior AIs.
- (MTST) Removed the cap on collide types from the missiles.txt loader, this is properly governed by the missile routines.
- (MTST) Removed redundant hardcoded monster modes from the assassin sentry AI function.
- (MTST) Changed the blending from 1/2 transparency to 1/4 transparency for the fire sentry token.
- (MTST) Replaced the blade creeper, assassin sentry and death sentry AIs.
- (MTST) The skill shrine now adds the 'allskills' stat and doesn't rely on an obscure state hardcode.
- (MTST) Removed the slvl bonus based on monster level for the time being.
- (MTST) Changed the skill level penalty from level drain to progress in a non linear fashion.
- (MTST) Added LvlPrest2.bin (new columns spliced out of LvlPrest.txt) to softcode some DRLG stuff.
- (MTST) Flavie's placement has been softcoded into Levels2.txt as a result from the above.
- (MTST) It is now possible to add rivers to more DS1 files properly, the automatic river object placement was softcoded.
- (MTST) Replaced the Raven, Solar Creeper, Carrion Vine and Poison Creeper AIs.
- (MTST) The Solar Creeper and Carrion Vine can now heal the player based on a % of the corpse's life (option).
- (MTST) The amount of creep the vines place on corpses is now based on the size of the corpse (option).
- (MTST) Replaced the Spirit and Dire Wolf AIs, removing the line hardcode from it.
- (MTST) Change from the vanilla variant of the melee attacher dispatcher func, it now returns if the attack got dispatched successfully.
- (MTST) Greatly changed how the Dire Wolves work, we didn't feel like having 3 of these skills that consume corpses.
- (MTST) I removed the ability of ravens, bears and wolves to open doors, this really made no sense whatsoever (ravens especially).
- (MTST) Made the bear use all of its audio, it only used some of the files but they're all ok...
- (MTST) Changed the terrible animrate of the druid wolf token (WF), seriously, 72/256 for an 8 frame RN?
- (MTST) Fixed, probably copy/pasted, animrate of 6/16 on the oak sage overlay.
- (MTST) Replaced the AI of the druid spirits and generally finished their settings up, they have been somewhat changed in function.
- (MTST) Added a complementary system to properly handle DAMRED, DAMBLUE, ATTRED (and so on) for auras that give different stats inside and out of battle.
- (MTST) Eliminated some unnecessary duplicated structures from the DRLG headers.
- (MTST) Replaced some more core D2COMMON utility routines that get called all over.
- (MTST) Softcoded the behavior of the inner hell fissures (object #399).
- (MTST) Improved the distance calculation routines, they should be a bit faster now.
- (MTST) Replaced the built in abs() intrinsic with a faster version (consistently faster in tests, when used in sequence on all possible integer values the built in one takes 16K ms, this one takes 15K ms)
- (MTST) Softcoded the blood moat bridge, it was using hardcoded params before, despite all the fields in the txt...
- (MTST) Added even better memset and memcpy replacements that automatically unroll small buffer operations.
- (MTST) Softcoded the hellforge drops into Hellforge.txt, no idea to what end we will use this later.
- (MTST) Fully softcoded the hellforge missile functions, none of their submissiles or params were softcoded before...
- (MTST) Softcoded the 3 seal bosses, they are now assigned to the area via Levels2.txt.
- (MTST) The druid token had an animrate of 208/256 for casting, all other classes have 256/256...
- (MTST) Fully rewrote Maze.cpp which controls all the vanilla maze generation, removing all remaining hardcodes and producing some new txt files in the process.
- (MTST) Replaced the complex border transforms / rules-DS1 applier functions.
- (MTST) Removed LOG_GetCaller() in favor of the proper _AddressOfReturnAddress() intrinsic, seing how we'll never go back to VC6.
- (MTST) Fully revised the 2008-2009 Outdoor.CPP file, beside the act specific code we have replaced about 4/5th of the pipeline used for level generation.
- (MTST) DRLGPresetUnit is no longer allocated all over the place, they're all created via PRESETS_CreatePresetUnit now.
- (MTST) There are no longer level generation and substitution hardcodes tied to the act or level index, they're all tied to the level's type now.
- (MTST) The setting to always generate new maps now works properly again, it was never mirrored by the replaced save/load code.
- (MTST) Removed hardcodes from the preset level creation routine.
- (MTST) Optimized the way preset levels are tied to lvlprest entries, direct links rather then lame search loops are the key...
- (MTST) The entire call tree leading to and expanding from the level generation is replaced up to the DRLG initializer.
- (MTST) Every random enemy spawn now properly respects warp distance.
- (BUG) Fixed a handle leak inside a module searching func.
- (BUG) Fixed a bug in the main shape shift handler in regard of shadow masters (A1 should've been S1).
- (BUG) Added missing monster check to SKILLS_EvalStartMana func.
- (BUG) Removed a lot of redundant garbage from the blade sentinel skill function, this was all imported from vanilla before.
- (BUG) Fixed a potential memory hazard in the smite server func.
- (BUG) Fixed a bug in one of the distance calculation funcs that was incorrecty imported before.
- (BUG) Fixed a bug with the hellforge spirit movement.
- (BUG) Fixed a long standing issue with the knockback anim rate and path speed (this was imported from vanilla).
- (BUG) Fixed a bug in the maze theme selection function.
- (BUG) Fixed an incorrect data size in one of the DRLG structures which led to undefined behavior. (it is read as 8 bit everywhere but a single place!)
- (BUG) Fixed a bug with the waypoint linker that set one of the flags incorrectly.
- (BUG) Fixed a bug with the courtyard not always spawning relative to the dark wood map.
- (BUG) Fixed a bug in one of the outdoor preset placers.
- (BUG) Fixed a bug with the start town override.
- (D2BUG) BIN files should now always be flushed to disk prior to loading.
- (D2BUG) Fixed incorrect animation data for TO token.
- (D2BUG) Fixed the terrible code of the Drinker, Turner and Gesturer objects which did not work fully as intended due to a handful of bugs.
- (D2BUG) Fixed the insecure object client func #9 (clientsmoke) which deleted the object mid execution, while this was signalized by a return value, the calling code never checked it.
- (D2BUG) Fixed a bug that preloaded the wrong sprites when the ancient's altar spawns, thus the big ancient CEL files weren't in the cache before they spawned.
- (D2BUG) Fixed a bug that allowed the game to set the base slvl to invalid (negative) values.
- (D2BUG) Fixed some more bugs that could make passive skill stats go haywire and make the game lose the entire stats list for that state.
- (D2BUG) Fixed a rare crash bug in the skill level fixup function (only called if levels go haywire).
- (D2BUG) Fixed a bug where the shadow master used the wrong slvl for itself when an assassin has the skill both via charges and natively.
- (D2BUG) Fixed a bug that made the shadow master factor the target's resistance into the casting probability for non-offensive skills.
- (D2BUG) Fixed various minor logic issues with the shadow master's probability code.
- (D2BUG) Fixed a potential crash bug when the shadow master fetches too many skills from the owner.
- (D2BUG) Fixed invalid frame data for shadow master charge up sequence.
- (D2BUG) Fixed invalid frame data for shadow master blade fury sequence.
- (D2BUG) Fixed invalid distance evaluation used by the shadow master AI for missiles.
- (D2BUG) Fixed a bug that could render the blade sentinel immobile, the skill clamps the target distance now.
- (D2BUG) Fixed a bug that assigned some attack rating boni multiple times to the blade sentinel.
- (D2BUG) Fixed a bug that may render the blade creeper unable to deal damage entirely.
- (D2BUG) Fixed a bug where wake of fire would incorrectly place all missiles on the same subtile if targeting a unit overlapping with the trap.
- (D2BUG) Fixed the wrong data for the various assassin traps in MonStats2.txt
- (D2BUG) Fixed a potential bug with the skill tree display related to a packet not being filtered correctly.
- (D2BUG) The damage of sentry traps was not effected by elemental mastery stats, despite the display showing it as being effected.
- (D2BUG) Death Sentry was meant to have overlays when casting corpse explosion but all the traps have NoOverlay set in the txts...
- (D2BUG) Fixed invalid audio settings for Inferno Sentry's inferno skill (really blizzard, putting the travel sound in the hit sound field?)
- (D2BUG) Ravens no longer enter into NU mode after finishing WL, allowing them to glide smoothly...
- (D2BUG) Ravens aren't meant to be attackable and have abysmal stats, yet they were marked as killable...
- (D2BUG) Speed is reset properly for monsters that move in and out of modes if they end their previous mode in a special way.
- (D2BUG) Fixed a bug with how the druid vine damage creep missile collided with units server side.
- (D2BUG) Fixed a sync bug with how the solar creeper and carrion vine missiles hide corpses.
- (D2BUG) Replaced the terribly bugged teleport behavior inlined into the wolf AI with the proper way to do things, like other pets.
- (D2BUG) Fixed incorrect txt settings in regard of direction count for spirit and dire wolves.
- (D2BUG) The game properly sets the frame for init modes other then NU (such as when creating pets).
- (D2BUG) Fixed incorrect audio settings for the Druid wolves which made the sounds only rarely trigger (other then attack).
- (D2BUG) Fixed tons of incorrect audio settings for the Druid Bear sounds...
- (D2BUG) The skill level of the vanilla Fenris Rage and Bear Smite is always 1.
- (D2BUG) The druid spirits all had incorrect data for their modes in MonStats2.txt
- (D2BUG) Fixed incorrect audio settings for the death sounds of the druid spirits.
- (D2BUG) Fixed a bug that prevented the game from storing the coordinates of certain special tiles (found by Mentor ages ago).
- (D2BUG) Server side objects timer #1 didn't change their mode to ON properly.
- (D2BUG) Fixed a bug that may render the act 4 fissure objects from never pulsing fire if they animate too slowly.
- (D2BUG) Fixed a minor bug with the blood moat bridge in the durance of hate.
- (D2BUG) Fixed an off by one error in the code spawning the gold piles of Wirt's Body.
- (D2BUG) The sewer stairs now properly play their drain anim and sound, rather then suddenly going from filled with water to dry.
- (D2BUG) Fixed the floor sliding bug that the sand leapers sometimes suffered from.
- (D2BUG) The second level of the claw viper temple is no longer generated as a random maze despite being a preset map.
- (D2BUG) Fixed a bug that made D2 read LvlSub.txt beyond the last index in Act V.
- (D2BUG) Fixed a major bug in the outdoor DRLG code that will overwrite arbitary memory if triggered.
- (D2BUG) Fixed a bug where Act IV can be built incorrectly, one of the globals isn't synced.
- (D2BUG) Fixed a memory leak that occurs during the Act III jungle generation process.
- (D2BUG) Invisibility states will no longer re-enable shadows on monsters that have none.
- (D2LAZY) Added missing audio for the wake of fire, terrible idea to have that be all silent...
- (D2LAZY) Removed redundant legacy data from some update packets that was never read by the client but queried by the server...
- (TOOLS) CelConv 2.0: Allows sprite creation above 256x256, with CIELAB based color correction to cut out third party paletting steps.
- (TOOLS) AnimDataSplit: Splits animdata.d2 into three files according to a user supplied ruleset.
- (TOOLS) AnimDataHash: Simple benchmark to determine hash distribution for animdata.d2 entries.
- (TOOLS) PalMaker 3.2: Loads source GIF files now to speed up the work flow since we've deprecated DCC.

CelConv 2.0:
- Allows creation of sprites larger then 256x256.
- Uses CIELAB for color conversion for maximum accuracy.
- Can load sprites from GIF files or a series of PCX files.
- Optimizes the source material so that the absolute minimum number of pixels are encoded to cel.
- Can split sprites using automatic heuristics to create multicomponent tokens.
- Generates necessary COF files on the fly.

Druid Spirits:
Oak Sage - gives defense during battle, recovers life outside battle
Heart of Wolverine - increases damage and attack rating in battle, recovers stamina outside battle
Spirit of Barbs - gives thorns during battle, recovers mana outside battle
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Fri Feb 28, 2014 5:14 pm

BUILD 140201
1st February, 2014

(MTST) Ethereal items now also spawn with full quantity. I don't remember if vanilla did this, I know it does it for durability.
(MTST) Fully replaced D2SetUnitStat, D2SetStatListStat, D2AddUnitStat, D2AddStatListStat and everything they call with optimized versions. Functionality was verified with a set of massive unit tests.
(MTST) Various old (read vanilla) property adders for skills, monster types and states now check whenever their params are valid.
(MTST) Added a custom descfunc for the indestructible property, it only prints the string if the item isn't already indestructible without the property (except for gems/runes/jewels which retain the old display behavior).
(MTST) ItemStatCost.txt is now loaded by MetalStorm.DLL rather than D2Common.DLL, the code that determines how stats relate to one another has received a massive optimization pass; that was hands down one of the most disgusting loops I've seen.
(MTST) The remainder of the stat accruer which handles the way stat OPs behave has been fully replaced.
(MTST) Replaced all the remaining property adder functions (ie: the function indices from Properties.txt).
(MTST) I've replaced the property param string parser, it can now lookup indices for things other than skills, monster types and states.
(MTST) ISC operators 11 and 13 have been expanded to ensure their results are always within legal range when dealing with primary stats.
(MTST) Added a new ISC operator that sets a stat's value to it's own value; for example a potion can set your strength to 999 temporarily, instead of merely adding/subtracting values.
(MTST) Increased the number of usable stats from 510 to 1022, we've began running out of space in ISC; of course everything is saveable too.
(MTST) All cube recipe ingredients must be identified before the recipe is allowed to work.
(MTST) Crude, Drow and Ethereal qualities/flags can now properly stack on items without causing havoc with the item's primary stats.
(MTST) Removed some incoherence we've introduced from the original game by accident, weapon damage is now assigned in a consistent fashion across the board.
(MTST) Moved various item related constants from the code to the newly added ItemConstants.txt.
(MTST) Revised a large chunk of Items.cpp as part of an ongoing code clean up and revision process.
(MTST) Increased the maximum number of usable item sockets from 6 to 8. (Actually it's 7 in vanilla because it uses 3 bits, now it's technically 15)
(MTST) To go with the above, the socket drawing routine had to be expanded, so it was moved into MetalStorm.DLL and made far more efficient and secure too.
(MTST) Replaced the entire TXT parsing backend that was still lingering in Fog.DLL, making it more secure and providing better error diagnostics.
(MTST) The code now ensures all rows in a TXT file (except the 'Expansion' row) have the same number of columns prior to in-depth parsing.
(MTST) Everything other than externally parsed fields is properly range checked as to never write beyond the end of the BIN image. (Only of internal relevance.)
(MTST) Columns missing from a TXT file are once again (I don't remember if 1.10 actually did that) logged.
(MTST) Numeric values are tested for validity and overflows. If fields contain data that isn't numeric they're defaulted to 0.
(MTST) Tag, identifier, string key and externally parsed fields are checked for truncation, an error is logged if they exceed their allocated space.
(MTST) WORD and BYTE sized values are capped to their legal ranges prior to writing them to the BIN image.
(MTST) If an index doesn't fit into it's allocated space we raise a fatal error message, index truncation can cause all kinds of odd problems.
(MTST) The default value for tag fields (think item codes) has been changed from the previous 0 to four spaces. (Which is what the game code actually checks for...)
(MTST) Reimplemented the quest checks for the cow level portal for the sake of completeness now that new cube events can be added on the fly.
(MTST) Drow items are no longer a distinct quality, but rather an item flag like ethereal. The sunlight disintegration behavior can be applied to every item now.
(MTST) Softcoded which items produce the horadric cube glow when created by the game (actually when placed in the cube, but that's a can of worms in and on itself).
(MTST) With that in mind, the cube glow is now triggered by means of a packet; and not when items are merely placed in the cube.
(MTST) Replaced all the code related to CubeMain.txt, cube recipes and their outputs.
(MTST) Greatly optimized the CubeMain.txt input and output parser.
(MTST) The 'useitem' operator no longer changes the prefix and suffix of tampered items. This was intentional, but it goes counter the logic of the operator.
(MTST) Removed incoherent code that executed only for 'usetype,reg' which changed the specified quality and item index on its own.
(MTST) Improved various functions and data structures, these are internal tweaks.
(MTST) The game doesn't send redundant stat update packets while generating cube outputs, the entire item gets sent later so there's just no point.
(MTST) The input parser had some special code for tampered items, but most of it got removed by VC when they compiled the game. I've eliminated what was left of it.
(BUG) Stat params are globally treated as unsigned short (WORD) type now. It's more a matter of precaution than an actual bug.
(BUG) Fixed a bug with the stats update vector, it's a different structure from the regular stat vectors.
(BUG) Fixed an incorrect member/column association in one of the TXT structs.
(BUG) Fixed an incorrect check in the skill selector for the Act V catapults.
(BUG) Corrected some mistakes in the item generator, some flags weren't tested before.
(BUG) Fixed an incorrect return value for one of the daytime routines.
(D2BUG) The item level requirement stat isn't marked as item specific in ISC.txt, this can cause odd behavior on socket fillers. [see note 2]
(D2BUG) D2AddStatListStat doesn't check whenever the value being added is 0, in certain cases it will add a vector entry just to delete it again afterward as a result.
(D2BUG) During ItemStatCost.txt compilation, the game doesn't set all unused opinfo stat indices to -1, this can cause odd behaviour during accruement in some cases.
(D2BUG) The MinAccr/ValShift bug has been fixed entirely, by redirecting all remaining calls to vanilla's get stat routines to our own versions.
(D2BUG) Fixed a bug with how OPs 1 and 13 behave when their affected stats are also affected by stats using other OPs.
(D2BUG) MonProp.txt's param columns are now properly parsed; that means skill names and the like work there correctly now.
(D2BUG) Using procedural skill levels for CTC properties in MonProp.txt now works correctly, the game no longer tries to extract an item level from a monster unit.
(D2BUG) When dealing with runewords; using a negative or blank slvl for CTC no longer erroneously uses the ilvl of the last rune (which is not saved, and thus always 1) to calculate slvl.
(D2BUG) The property assigner for CTC skills is no longer capable of producing corrupted items, everything is range checked now.
(D2BUG) I've fixed a bug with the way CTC props were getting encoded, the code there did not reflect the way the item event works. [see note 1]
(D2BUG) Fixed numerous bugs related to the min and max damage property routines that can manifest if negative values are used for set boni or runewords.
(D2BUG) STAT_ITEM_MAXDURABILITYPERCENT can no longer create items with more minimum than maximum durability.
(D2BUG) Poison count is now added to items for poison length, rather than damage. It's a length divisor after all, not a damage divisor.
(D2BUG) Fixed the long standing issue that caused ethereal modifications to be applied twice to defense and durability under some conditions.
(D2BUG) Blizzard's TXT parsing code didn't exclude the 'EXPANSION' tag from ObjGroups.txt because it was spelled fully in caps.
(D2BUG) The ItemCodes (actually ItemCalcs) table gets properly reset at the end of a game session, instead of leaking and growing until 0x7FFFFFFF.
(D2BUG) The check order for item and item type codes in cube inputs was different than for outputs, this can lead to odd results where the same code will mean something else.
(D2BUG) Fixed a bug that could lead to memory corruption during CubeMain.bin compilation, the prefix and suffix arrays were not capped.
(D2BUG) Fixed a segfault that occurred when an output has 'sock' specified without a quantity; the cube output code actually handles that by giving it random sockets.
(D2BUG) If you specified a specific set item as a recipe's output it won't be affected by any other operators such as 'sock' and so on; they return FALSE from the parser function at random.
(D2BUG) Blizzard wanted the recipe level to be set to the unique or set item's qlvl if it's specified as an output; due to two separate bugs this didn't work.
(D2BUG) Despite checking whenever the item is stackable, the input parser fails to get it's quantity properly, this makes the 'qty' operator not work as intended for them.
(D2BUG) The 'param' field is now properly parsed; it was supposed to be able to hold stat names but the parser for it was never invoked due to using the wrong field type.
(D2BUG) Modifier params in CubeMain.txt are now parsed like in other txt files; that is, they can contain skill names and the like.
(D2BUG) The primary input is tested against all three output fields, instead of erroneously assuming it matches all three after testing the first.
(D2BUG) Cube OPs dealing with value shifted stats like hitpoints behave correctly now.
(D2BUG) The 'reg' operator behaves as expected now and downgrades the item to it's normal version.
(D2BUG) The last arrow or bolt in a quiver will now properly produce a missile client side.
(D2BUG) Using an item type as a cube output together with a quality will no longer pick items that can't be of that quality.
(D2BUG) Cube recipes that fail in unexpected ways no longer leave input items lingering in ITEMMODE_OPERATING.
(D2BUG) Fixed a fringe case that made cube recipes leak entire item units. It's related to having portals and item outputs in the same recipe.
(D2BUG) The cube will no longer spit out hand axes if it doesn't understand the input, the recipe will simply not work.
(D2BUG) Using the bizzare combination of 'useitem,mod' works correctly now, not that there's much reason to use it.
(D2BUG) Fixed a potential buffer overflow with recipes that output 'useitem,rem' trice. The socket filler buffer is now range checked.
(D2BUG) The 'rep' modifier doesn't refill quantity properly when paired with 'qty'; instead of adding the requested quantity, it'll set it to the param's value.
(D2BUG) Fixed a fringe case where the cube may produce socketed items that have no sockets.
(D2BUG) Fixed a bug with how scroll and book charges were handled that allowed players to cheat by using charges from the stash.


1.) Blizzard softcoded the number of bits to use for the level of an encoded charged skill (the infamous 'stuff' column), the format of this is shared by the CTC prop; all but one place that deal with CTCs use the proper, softcoded values; yet, the property assigner keeps the hardcoded version, this means that changing 'stuff' will prevent the game from ever creating proper CTC params.

2.) If the stat is present on a socket filler, it will affect both the socket filler's own level, and the level of the item it is socketed into. That is, if you have a jewel that adds +5 to level requirement, and it has a level requirement of 10, it now requires clvl 15, upon inserting it into an item, that item also recieves +5 to it's lvl req, independant of the jewel.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Sun Apr 06, 2014 11:25 am

BUILD 140228
28th February, 2014

(MTST) Extensions to existing data tables are internally renamed and suffixed with AUX rather than a number.
(MTST) Their NPC.txt and MonStats2.txt files are renamed to Prices.txt and MonGfx.txt to more correctly reference what they do.
(MTST) Our NPCData.txt is renamed to NPCs.txt in contrast to this because it deals with NPCs, not their shop prices.
(MTST) Added a new property adder function for STAT_ITEM_EXTRA_STACK that ensures the item's current quantity is correct.
(MTST) Added a new property adder function for STAT_MAXDURABILITY, With this, all primary item stats are covered.
(MTST) The damage grade of throwing potions and similar items isn't calculated in realtime anymore, it's saved to the item.
(MTST) Replaced even more stat-API functions with highly optimized versions, this should cover most of what there was to cover.
(MTST) The association between item types that can kill certain monsters permanently and those monsters (think vampires and stakes) is now properly softcoded and extensible.
(MTST) Temporary items created by spells such as Magic Shield and Magic Armor are now using a separate, new item quality.
(MTST) BonusItems.txt is deprecated in favor of ArcaneItems.txt because the former TXT file was only used for skill generated equipment before.
(MTST) Pruning delays are now item type specific and softcoded into ItemTypes.txt (alongside the quality based delays in Qualities.txt from before).
(MTST) Extended pPlayerData in order to store information that fits there better than into hClient.
(MTST) Extended the packet responsible for player creation and replaced the send and recv functions involved.
(MTST) Extended pGame to house server side data that was previously kept in numerous other places.
(MTST) Replaced the function responsible for removing the contents of the horadric cube when the cube is dropped, one more step toward bags of holding.
(MTST) Replaced the function that sorts the contents of the belt when an item is removed from it.
(MTST) Replaced all main equipment/itemmode routines that were left in D2Game.dll and fixed too many bugs to count (see below). Seriously, this stuff belongs on DailyWTF...
(MTST) Tomes now respect the autostack setting from ItemTypes.txt.
(MTST) Heavily optimized the way the game searches for stackable items when doing automatic stacking for a item that was picked up.
(BUG) Fixed an incorrect branch in the skill requirements function.
(BUG) Fixed an incorrect branch in the client unit initialization function.
(D2BUG) The compact flag wasn't set on items server side post generation, it's only set once the item has been deserialized for the first time.
(D2BUG) Fixed a fringe case where automatic requipping of weapons wouldn't work if the player's weapon happened to be the first item created.
(D2BUG) Some of the inventory handler bugs that I assumed were own mishaps before actually stems from vanilla, who would've thunk?
(D2BUG) Placing charms in the inventory will not send update messages anymore if the function is instructed not to send such.
(D2BUG) Certain inventory handlers took the storepage as a parameter but inconsistently assumed it was always STOREPAGE_INVENTORY without checking the value.
(D2BUG) When picking up identified charms from the floor, their stats are correctly linked to the player (they call ITEMS_CanActivateCharm before setting the storepage).
(D2BUG) Removing scrolls and books from the stash no longer removes their charges from the player's total.
(D2BUG) Removing charms from the inventory no longer sends update messages if the function was instructed not the send such (inline wrappers are a tricky beast).
(D2BUG) The vendor trade screen is now excluded from the inventory item exchange function, that function wasn't designed with it in mind.
(D2BUG) Exchanging books and scrolls with other items in inventory pages beside STOREPAGE_INVENTORY no longer corrupts the player's charges count.
(D2BUG) When exchanging charms, the game now always updates the players stats, rather than doing it only sometimes.
(D2BUG) Functions that delete items now ensure that the item won't dispatch any other commands, fixes (all) item ghosting.
(D2BUG) When placing items in a bodyloc with the main handler fails the game no longer erroneously returns TRUE.
(D2BUG) Items moved directly to a bodyloc now properly trigger a full stat update (ie: clicking on items that lie on the floor).
(D2BUG) Whenever or not quest events were triggered for possessed items when joining a game with them was inconsistent depending on how the item was stored.
(D2BUG) Whenever the number of slots in the belt is updated or not depends on the bodyloc being changed now, not the item type (non belts will remove potions, and are assumed to have 1 row only, instead of merely hiding the other slots and not dropping their previous contents).
(D2BUG) Bodyloc routines were inconsistent in the sense that some always reloaded the item's stats clientside and others did it only when it was socketed with something.
(D2BUG) Certain equipment related player sound bytes were played for every nearby character to hear, rather than only for that player (like others of their kind are).
(D2BUG) Exchanging inventory items up updates all clients in the game correctly, this should fix some of the numerous 'naked' bugs.
(D2BUG) When exchanging the opposite item with another (ie: put an item into an empty bodyloc while the other is occupied with something incompatible) now correctly removes ITEMFLAG_DISABLED (ie: no more odd red-background items in the inventory).
(D2BUG) Exchanging weapons can no longer trigger the belt potion removal if the weapon happens to be linked to ITYPE_BELT, as unlikely as that is (one of the two weapon specific exchange function had that call there, presumably from copypasta they did).
(D2BUG) If exchanging items fails, the game no longer assumes everything is OK and returns true, it reacts to that critical error properly (after all, it deleted whatever item the player tried to exchange!)
(D2BUG) The dual exchange function now correctly ensures it is operating on an arm bodyloc before trying to do anything.
(D2BUG) -//- won't remove one of the two items to exchange before trying to see if it can remove the other; it checks if you meet the requirements with both items set to OFF before.
(D2BUG) -//- now saves the previous primary weapon ID like other exchange functions do, this thing's rivaling charge by now in bug density.
(D2BUG) -//- no longer considers failure to be success, it reacts to the critical error of being unable to equip (and thus deleting) the item correctly.
(D2BUG) -//- now correctly updates the player's stats for all clients in the game, this should fix some more of those 'naked' bugs.
(D2BUG) Automatically moving items from the inventory to a bodyloc now checks if the item can be equipped beforehand, instead of throwing errors later after a charm was equipped (now granted this can't trigger, but it's still dumb to check after the fact).
(D2BUG) Putting items in the belt no longer calls charm related functions (they really didn't seem to care what those inline wrappers did).
(D2BUG) Deleting items from the inventory or belt while there's something on the cursor will no longer delete the item on the cursor client side (unless it happens to be an active pspell item that was consumed).
(D2BUG) Dropping items from the cursor into a room no longer assumes that SITEM_PlaceItemInsideRoom always succeeds, the return is now checked and responded to accordingly.
(D2BUG) Exchanging items in the belt no longer calls the expensive global stat updater, nothing in the belt emits active stats.
(D2BUG) The belt sorting function didn't check whenever placing the items into their new slot succeeded and just assumed it'll always work.
(D2BUG) When automatically equipping items (by clicking on an identified item on the floor, when a bodyloc is empty), rings are equipped even when the opposite ring bodyloc contains a non-ring item.
(D2BUG) Carrying more than 255 charges of town portal or identify will no longer roll over the clientside charges counter for those skills (if you fill your inventory with full tomes you have 400 server side, 144 client side).
(D2BUG) When removing a book skill from the buttons, it is now also removed from the button cache in the player data structure.
(D2BUG) Exchanging a book or scroll for another of the same type will no longer remove their skills from the buttons if present there.
(D2BUG) The wrapper that uses scroll and book charges when the TP/ID skill is used directly (ie, you use it from the skill button) used items from the stash/cube if it encountered them sooner than a copy from the main inventory page.
(D2BUG) Fixed a bug that allowed personalized and beginner items to be stacked with other items, effectively losing their unique properties.
(D2BUG) Fixed a bug that allowed items that didn't have identical stats to be stacked with one another, Blizzard only checks versus damage explicitly - walking the stat arrays is less expensive than calling getstat a dozen times. Fixes ample bugs with staffmods and automagic on throwing weapons.
(D2BUG) Picking up empty tomes will no longer delete them if you already have a tome in the inventory, after all tomes don't get deleted if you use all their charges either.
(D2BUG) When resuming from a previous node, the autostack handler no longer scans that node as if it's the next item in the list (but rather continues from it).
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Thu May 01, 2014 11:40 am

BUILD 140406
6th April, 2014

(MTST) Numerous item management functions that were exclusive to players before should work properly with monsters too now. (see note 1).
(MTST) Rewrote the item pickup checker once more, this time it takes into account carryone also for socket contents like the item loading validator already does (see note 2).
(MTST) Replaced the function responsible for attaching items to the cursor (if you click on a item inside a room while the inventory is open)
(MTST) Replaced the functions responsible for stacking items in the inventory and made them more universally usable.
(MTST) Moved the dynamically allocated unique item dropability mask back into pGame (the original I replaced years ago was in there, but it only has room for 4096 unique items after which it will write beyond the array boundary, corrupting pGame).
(MTST) You're no longer able to use the belt slots of a broken belt. This one never made much sense to me.
(MTST) Replaced all statlist searcher funcs with custom versions, this completes another chapter with the stats subsystem replacement.
(MTST) Turned some frequently used and small stat related former-D2Common functions into inline variants doing the same tasks without call overhead.
(MTST) Replaced all the top level routines that invoke the pspell handler, getting rid of their innate incoherence when it gets to quantity management.
(MTST) Removed tons of unneeded hardcodes and other redundancy from the vanilla cursor pspell handler (this is independant from the code used for our spell scrolls).
(MTST) Removed the last remaining merc item usage related hardcodes from d2client.dll, with this everything relevant about merc item usage is governed by MetalStorm.dll.
(MTST) Whenever and item is cursed (and thus impossible to unequip) or not is now governed by an item flag and not a stat, less overhead when checking.
(MTST) Cursed items are not equipped automatically if a player accidentally clicks on an identified cursed item while walking around.
(MTST) Added a set of merged state flags (STATEFLAG_UNCONTROLLABLE and STATEFLAG_CANTCHANGEMODE) so that the state mask has to be queried only once for certain common checks.
(MTST) Removed redundant legacy scmds from various pspell related functions, the client code they correspond with never did anything - effectively they only waste bandwidth.
(MTST) Quest items that can be consumed are now governed by a new pspell instead of littering the inventory item consumption code.
(MTST) The last item searcher, the one used by ammo reloading and gem shrines among others has been replaced, it suffered from the same bugs fixed previously in the auto stack routine.
(MTST) Cleaned up the source some more deleting a load of redundant structures, as well as itemtypes.txt which went from ~170 item types to 110. The old file stems from our ancient v 1.10 build.
(MTST) The blunt weapons bonus damage vs. undead is now softcoded into itemtypes.txt (and can be changed depending on item type to any desired stat).
(MTST) Staves and wands don't spawn with damage vs. undead anymore, sure they're blunt weapons (because they're linked to the rod itemtype for affix reasons), but otherwise this made no sense.
(MTST) Changed the automatic button skill update behavior back to how it used to work (sans the bugs of course), the more gear aware approach we used before was rather irritating at times.
(MTST) All item generation functions take their param structure as a reference and not a pointer now that nothing from D2 calls these directly anymore (Blizzard passes the structure as a pointer because of a hack in the cube recipe handler).
(MTST) Staff mod skill bonuses are now governed by staffmods.txt and qualities.txt, this fully softcodes them and eliminates the ample problems with the old code forcing certain tier layouts (see note 4).
(MTST) Added a new flag to the item generation function that prevents staffmods from spawning on the item (this stops these mods from spawning on beginner equipment without resorting to their stupid hack that involved deleting all the item magic stats).
(MTST) Strings returned from string table functions are now qualified as const without exception, should stop any potential mishaps on our end cold.
(MTST) Replaced the loader for CharStats.bin with a custom function (the file is almost entirely deprecated in favor of CharStats.aux, it will be removed entirely in the future).
(MTST) Changed the starting equipment generation process somewhat, CharStatsAUX now contains cubemain like formula fields that control what items a character gets.
(MTST) Added another generator flag to suppress automagic generation for items if we want them to generate entirely without innate modifiers (aside of type innates).
(MTST) Restored the old durability and quantity replenishment formula, fixing the bugs the original code had.
(MTST) Durability and quantity replenishment no longer caps the minimum number of frames for ticks after the 1st one to 5 seconds.
(MTST) Considerably improved the performance fo a durability clean up routine that previously walked all of your equipment just to find the right and left weapon (blizzard...).
(MTST) Moved the durability evaluation into the general combat dispatcher function instead of it being done inline in a myriad places.
(MTST) The combat params structure now has a member that stores the missile responsible for a collision, this allows us to forgo numerous stupid hacks.
(MTST) STAT_ITEM_SHOTSCONSUMEMOREAMMO has been changed to not require that much quantity to exists for weapons to use used, it is only applied to quantity reduction step.
(MTST) For balancing reasons STAT_ITEM_SHOTSCONSUMEMOREAMMO isn't applied to skills such as strafe and multishot anymore (they already use up ammo for each shot).
(MTST) Description strings for certain properties that had item type specific text before have been softcoded (into itemtypes.txt).
(MTST) The quantity indicator text on skill icons is now using green, rather than blue color, making it a lot easier to read.
(D2) Using the potion of life now also restores the player to full health (how can this be called potion of life if it doesn't even heal you???).
(BUG) Fixed a bug in a function related to culling obsolete pets.
(BUG) Fixed an incorrect parameter related to shrines that cast spells.
(BUG) Cleaned up some incoherence from the player save/load code, it's pending total revision in the future.
(BUG) Added missing call to ITEMS_IsPersonalizeable to the starting equipment generator when it adds the playername to the main item.
(BUG) Charisma was not capped correctly in an assigner function (that wasn't called, but it's a bug no less).
(BUG) Fixed an incorrectly reversed check in one of the stat functions.
(BUG) Corrected issues with double swing, double throw, left hand throw, left hand swing and dragon claw (these were most likely vanilla bugs, but I haven't checked).
(D2BUG) Gold piles picked up while the inventory is open are no longer added to the room culling queue twice (this is harmless, but redundant all the same, the node attached to the list wastes some memory too).
(D2BUG) The inventory stacking handlers for items and scroll and book combos was missing necessary saftey checks.
(D2BUG) The quality specific item index (ie: unique item, set item, superior item record associated with an item instance) is now always initialized to -1 and not 0 (this was only done for unique items that had no base record before).
(D2BUG) When stacking tomes in the inventory, the tome being decreased will not be deleted anymore if its charges reach zero (this is now in accordance with other code that governs book charges).
(D2BUG) The game no longer inconsistently tests versus the book and scroll item types once using explicit (read only the base type matters) and at other times using nesting tests. Books given another primary item type will 'mostly work' in vanilla but break in critical places.
(D2BUG) If charms are allowed to break, they properly remove their stats from the unit using them now once broken.
(D2BUG) When an item breaks, the game now updates the skill buttons accordingly if the present skill can't be used without an item.
(D2BUG) D2Common.10952 will no longer return random statlists when told to query for a mask and state that're both zero.
(D2BUG) The property assigner at it's very core used an unsafe function to get the statlist, and this has the result that cube recipes that add stats to items that have runewords will add them to the runeword statlist (and not the item's base magic props list), if a recipe later removes the runeword stats it'll also delete everything else off of the item.
(D2BUG) When a player hotkeys a tome or scroll skill and then uses the hotkey after all charges of the skill are depleated, the skill will no longer be added to the buttons.
(D2BUG) The last skill charge for any given skill can now be used properly, they were deleting the skill before the skill was even cast.
(D2BUG) Charges added to items by their socket fillers now work correctly, instead of being bugged beyond belief.
(D2BUG) Using up the last charge no longer deletes the skill, but rather marks it as unusable - this means that pets you summoned with it won't all die the moment you use that last charge.
(D2BUG) Empty book or scroll skills are now removed from the left button too, instead of it being hardcoded to the right button only (the older replacement code already did this, but we didn't replace all the code governing it at that time).
(D2BUG) When you use an ID book or scroll charge incorrectly the game's error management didn't reduce the skill charges despite reducing the item's quantity.
(D2BUG) Added missing saftey checks to the cursor item effect handler that could've allowed people to cheat if exploited.
(D2BUG) The game now tests whenever a merc can use a potion only when you actually have a merc to give the potion to (before it tested this if you used the hotkey regardless of having a living merc or not, but then proceeded to use the item on yourself - effectively applying merc restrictions to the player).
(D2BUG) Fixed what amounts to perhaps the single worst memory leak in the game. The client allocated a statlist every time you did anything whatsoever with an item, but didn't assign it to the item effectively making it leak forever, that's 60 bytes x any time you did anything with any item.
(D2BUG) ITEMFLAG_CURSOR is now set reliably client side, there were branches in the cursor setting function that didn't set it - which leads to inconsistent behavior because it is always set server side.
(D2BUG) The ammo and weapon reload routine didn't excluding unidentified items before trying to equil them and failing (see note 3).
(D2BUG) The item breaking function didn't check if the item was already broken, effectively sending all kinds of updates to the client that didn't need to be sent.
(D2BUG) STAT_ITEM_THROWABLE now works correctly, that is - skills that require ITEMTYPE_THROWING_WEAPON will consider items with this stat suitable.
(D2BUG) STAT_ITEM_THROWABLE is now queried only for items that are actually weapons to begin with, this fixes some more issues with it.
(D2BUG) Fixed a bug with the logic behind automatic item re-equipping (the reequip boolean in itemtypes.txt) it should work far more reliably now.
(D2BUG) Fixed a bug with the automatic button skill update function, it didn't back up the current skills in all branches before tyring to restore them.
(D2BUG) When loading a player that's wielding a throwing potion, the game no longer erroneously sends the wrong button skills to the client (you have whatever button skill was saved into the D2S client side, but server side it may be changed to SKILL_THROW/SKILL_LEFT_HAND_THROW if it's not a skill compatible with throwing potions).
(D2BUG) Barbarian skills never worked correctly with staffmods, the original algorithm assumed skills come in 6 tiers, with 5 skills per tier (but the barbarian has 6 skills in tier 1, 7 in tier 2, and 4 in tiers 3-5, barbarian helmets never spawn with the correct staffmods for their ilvl as a result).
(D2BUG) They wanted to ensure staff mods only spawn on the correct weapon types for skills that require weapons, however they only checked the first item type listed in skills.txt, this will not work correctly with any skill that has more than one possible type and/or excluded types.
(D2BUG) Related to the above, assuming amazon staffmods are enabled for bows or crossbows, penetrate and critical strike will never spawn on missile weapons because the 2nd itype field is not read in vanilla's staffmod assigner.
(D2BUG) The staff mod function suffered from multiple off by 1 errors that lowered the chances for skills being added to the item, this has been fixed.
(D2BUG) Instead of trying to assign skills 6 times at random, the staff mod routine now aggregates possible skills and always assigns the selected amount if they're available; the old sloppy code thus no longer cheats people out of decent drops.
(D2BUG) Staff mod skills now correctly stack with skill bonuses that may be present on the item already, instead of overwriting them.
(D2BUG) When making players start with missile quivers the game sets the quantity to 250 if it's equipped and 100 if not, the game however only checks for ITEMTYPE_ARROWS and not ITEMTYPE_MISSILE (thus this never worked correctly with bolts).
(D2BUG) Starting skill bonuses are not assigned to items that're incompatible with the skill anymore.
(D2BUG) Blizzard's way to "clamping" the replenishment timer for items resulted in the events always triggering 1 frame too late (and wasn't reliable to begin with).
(D2BUG) The game no longer assigns durability or quantity replenishment timers to items that won't work with them.
(D2BUG) Durability and quantity replenishment was meant to be able to restore broken items, but the code invoking those functions explicitly excludes them (while the function that gets called checks for broken items too, and tries to restore them...) because the restore function would set the item's durability to max (ours is parameterized and only does that when requested).
(D2BUG) When adding durability and quantity replenishment by means of a cube recipe modifier the timers were not initialized (they only activate once durability is lowered or quantity is used up).
(D2BUG) After a long time, the bug that prevented items from breaking (even if their current durability hits 0) when you attack without pausing (ie, you keep the button pressed) has been fixed correctly now, without interrupting the current attack.
(D2BUG) The game didn't call the durability and quantity clean-up routine if your attack was interrupted just after your weapon has broken, leaving you with an item that has 0 durability but can be used normally.
(D2BUG) Fixed a bug where leaving the game mid attack, before the durability and quantity updates could be done, you could join the next game with an item that had 0 durability but wasn't broken (etc).

1.) Vanilla only tests the unit versus NULL, but architecturally speaking the functions are designed solely with players in mind (doing things like attaching player specific audio messages and the like) - I've reworked their design so that monsters can be safely used with those functions without undesired/unpredictable behavior.

2.) Previously this routine only checked whenever you carry such items inside your bodylocs, inventory, stash, cube, belt and any corpses (the corpse check is only done if it's a quest item). It did not take into account items on mecenaries and those socketed into other items, this means that while you could mark a unique jewel as carryone, it has no effect once it's been socketed into anything.

3.) This wouldn't be a problem if they didn't stop searching for a replacement after the first "suitable" item (that is, if it finds an unidentified item before it finds an identified item it won't reload anything, this code was evidently not changed from the classic days where throwing weapons could only be crude/normal/superior items).

4.) It's now possible to have probabilities and such for staff mods, their skill level bonuses and the like differ between item qualities, the new code other replicates the way vanilla's totally hardcoded routine worked seamlessly (sans the bugs, of course) - just that all the hardcoded crap was moved to those two txt files.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Tue Jun 03, 2014 2:40 am

BUILD 140501
1st May, 2014

(MTST) Replaced and optimized further components of the stats API, only the stat list assigner and remove functions remain to be replaced now.
(MTST) Replaced the code that loads Prices.txt (the former NPC.txt), pending potential future expansion of the txt file.
(MTST) Monster bodypart prices now depend on the monster they originated from (the price bonus per monster level is softcoded into MonStats.aux).
(MTST) Monster bodyparts now save the monster level of the monster that dropped them, in the same way player bodyparts (=ears) already do.
(MTST) The code now identifies player ears by item type like everything else and not by the presence of the ITEMFLAG_BODYPART flag (why be so inconsistent?).
(MTST) Quivers are identified by a check for ITEMTYPE_MISSILE in the price code and not by whenever the item has a necessary weapon type associated with it (again, why be so inconsistent?).
(MTST) Spell scrolls now save their skill level instead of calculating it in realtime.
(MTST) Spell scroll skill levels scale between 1 and 10, instead of 1 and the maximum level of the skill.
(MTST) Rewrote the spell scroll skill assigner function, it now reflects the current way to do things, it also calculates the level that gets saved into the scroll now.
(MTST) The formula we've used for throwing weapon projectile levels is now also used for spell scrolls, it has been slightly refined in the process.
(MTST) The level requirement of spell scrolls is now affected by the skill level of the skill they'll cast.
(MTST) Removed some unnecessary maximum skill level checks, there's really only one place that needs to enforce the cap for it to have the effect we want.
(MTST) The level of monster bodyparts and spell scrolls is taken into account by the stackability checker, potentially we'll allow organs to stack in the future (need to redesign transmogrify code for this).
(MTST) Added overflow proof multiplication, addition and subtraction wrappers for instances where rollovers are likely (such as during gamble price calculation).
(MTST) The percentage function is now overflow proof, more accurate and 5 times faster than it was before.
(MTST) Revised Price.cpp and revisited the original game's price calculations, analyzing them from scratch to import all the formula for D2 fallback mode.
(MTST) Staff mods are now saved to the item's base stat list, and not to the magic modifier list. Fixing an ages old bug with the price code I'll explain further below.
(MTST) The skill tier used by the recharge cost is now read from Skills.txt's new Page column and not deducted by dividing level requirement by 6.
(MTST) Softcoded the price reduction for ethereal and cursed items into ItemConstants.txt, softcoded the price reduction for class specific items into ItemTypes.txt (for all 3 price types).
(MTST) Reintroduced the old gamble formula for fallback mode, just that it's overflow proof now like the rest of the price calculations.
(MTST) Added Reputation.txt to control the effects of reputation steps on the prices in a non formula based fashion that's easier to change.
(MTST) Changed how charisma affects NPC prices and extended Prices.txt to contain the vendor's virtual charisma score (per difficulty) to test against and some new flags.
(MTST) Removed redundant code from Chat.cpp and Debug.cpp, echoing messages to the screen now uses a uniform approach.
(MTST) Removed some more unnecessary cruft from Items2.cpp and ItemGen.cpp.
(MTST) Deleted elixirs.cpp and oils.cpp, the code that was previously in there has been revised and moved to pspells.cpp.
(MTST) Oils can now add damage bonuses and sockets to items correctly. Previously we had no intent to support this for oils so there was no code to account for it.
(MTST) Oils will trigger the durability and quantity replenishment timers if those mods are present before or were added to the item by the oil.
(MTST) Dyes now check whenever the item they're being applied to has a valid transform table, so they don't go to waste on items that won't change visually.
(MTST) Added ITEMTYPESAUXFLAG_IS_ENHANCEABLE to determine whenever an item type can be affected by dyes or oils in general.
(MTST) The custom infrastructure that was in place to force the client to reload item stats when affected by an oil has been removed, it's no longer necessary thanks to the overhauled inventory management code.
(MTST) Merged several functions that duplicated functionality across sitem.cpp and properties.cpp.
(MTST) Cleaned up much of the attribute management API in Players1.cpp.
(MTST) Removed scrolls.cpp, transferring the code to pspells.cpp - unlike the other two I've not revised this yet.
(MTST) Replaced the D2Game functions responsible for picking up gold piles and sharing gole with party members, as well as a bunch of other previously untapped gold management routines.
(MTST) Whenever an item has staffmods or not is now designated by ITEMFLAG_STAFFMOD, this is independent from the StaffMods column in itemtypes.txt, allowing that to be changed without corrupting items (assuming the new staffmod system is in use).
(MTST) Non-magical throwing weapons with staffmods, automagic, oil or cube recipe effects on them won't get deleted if you've used up their quantity. This also applies to personalized non-magical throwing weapons.
(D2) I've reset the stash gold formula to it's classic incarnation, this means the maximum carrying capacity grows in linear fashion and doesn't jump from 200K to 800K past clvl 30.
(BUG) Fixed an incorrect item flag assignment in the item copying routine.
(BUG) The welcome message is now sent with a 2 frame delay, the refined chat functions test for SESSION_STATE_READY before broadcasting a message, but the session won't be ready until the next frame in that particular case.
(BUG) More of a design issue, but Teeth skill functions don't access the currently active skill anymore unless they really need to (for Multiple Shot only), this allows Teeth to be used via CTC again.
(D2BUG) Items that have ITEMFLAG_BEGINNER set are no longer sold for 1 gold server side if they spawn inside the gamble window.
(D2BUG) Monster bodyparts previously used the monster level from MonStats.txt when evaluating their price, this was based on the current difficulty level instead of the one they dropped in (which means the same item sells for more in higher difficulty levels).
(D2BUG) NPCs in acts 4 and 5 were supposed to sell their wares for lower prices once you've killed Baal, unfortunately the quest that they have listed in NPC.txt doesn't exist (mask index for Eve of Destruction is 40, not 41).
(D2BUG) An old bug I may've talked about in the past, which has now been fixed correctly. Staff mods were factored into the item's price twice, this happens because the game has no way to determine if a skill was added by means of staff mods or by say a unique prop. To make matters worse, they check for PLAYERCLASS_NONE, but the TXT linker sets the field to -1, so this gets called also for items that do not have staffmods.
(D2BUG) The recharge costs were added to the item's price *after* the NPC repair price adjustment was done, this is why they're so astronomically high.
(D2BUG) Because unique and set items don't get costs for their stats added, they also don't recieve extra costs from anything socketed into them (except for the base price of the socket filler).
(D2BUG) The game erroneously divided stat prices by the item's maximum quantity twice instead of once, this is why in the expansion throwing weapons are worth almost no gold.
(D2BUG) The price multipliers in SetItems and UniqueItems txt are incorrect, these values have a precision of 1024, thus they end up adding 3/1024 and 5/1024 to the price in vanilla.
(D2BUG) The staff mod price function checked against PLAYERCLASS_NONE (=7) explicitly, but the class id in ItemTypes.txt will be -1 when linked to an invalid/no class. Effectively the function executed on every item in the game.
(D2BUG) Recursively adding cube recipes that increase or lower stats to an item will no longer produce items that exceed the ISC bounds for that session (server side only, lasts until the item is serialized/deserialized).
(D2BUG) The game increments poison count per poison damage mod added to the item, but the stat isn't saved by the game. The stat is now saved correctly.
(D2BUG) Fixed a bugs with D2Common.10476 and D2Common.11103 which I did not notice when writing my own versions initially, these functions shouldn't guess which stats array to use and rather work like D2Common.10857 and D2Common.10356.
(D2BUG) Fixed two minor bugs with the routine that drops gold from the belt (this function was imported a long time ago, but I recently revised it, finding two issues in the original game code I probably didn't mention before).
(D2BUG) When sharing gold, the remainder of the initial division is no longer lost and is rather added to the player who originally clicked the pile.
(D2BUG) Blizzard capped the value of gold piles to 2,000,000,000 in a faint hope that it'll prevent rollovers in the pickup routine, instead of ya know, fixing the rollover bug in the pickup routine. The bug is fixed and the cap removed.
(D2BUG) Desite the server side cap being 2,000,000,000 the client ends up copying a 10 char string into a 9 wchar buffer, basically truncating the displayed number.
(D2BUG) We're no longer deleting the old gold pile and spawning a new one, instead we just place the original pile back in the room when a player can't pick up the gold, this fixes the gold juggling glitch (gold keeps getting pushed further SW).
(D2BUG) The game was supposed to stop piles dropped by a player to be shared with party members if someone picks them up, unfortunately the code involved was flakey and only sometimes worked correctly (if the original player left the game or you dropped the surplus gold again the pile became shareable).

For general reference, here are the internal price formulae, when 1024 and 4096 are listed, the former is used for repair/sell and the latter for buy prices (buy=the NPC buys from you, not vice versa):

Recharge cost: (((10000 * (slvl + tier * 2)) * skill.mult / 1024 + skill.add) * (max - min) / max
Staffmod cost: (price * skill.mult / [1024, 4096] + skill.add) * ((slvl * 2) - 1)
Encode Type 1-3: (price * slvl) * skill.mult / [1024, 4096] + skill.add
Encode Type 4: (price * AVG(min, max)) * stat.mult / 1024 + stat.add
Other stats: (price * value) * stat.mult / 1024 + stat.add


New charisma x price formula.

price * (1024 - MIN((PC * 1.5 * 128) / (PC + NPC), 128)) / 1024


Vanilla gamble formula (broken down into steps).

qlvl1 = base.qlvl
qlvl2 = MAX(0, (ilvl - exec.qlvl) * 100 / 2 + 1)
qlvl3 = MAX(0, (ilvl - elit.qlvl) * 100 / 4 + 1)

cost1 = MAX(AVG(minstack, maxstack), 1) * base.cost
cost2 = exec.cost * qlvl2
cost3 = elit.cost * qlvl3

temp1 = ((10000 - qlvl3 - qlvl2) * cost1 + cost2 + cost3) / 10000
temp2 = (MAX(ilvl, 5) + MAX(0, qlvl1 - 45) - (qlvl1 / 2)) * 250 / 3
temp3 = (MAX(ilvl, 5) * 2 + 1) / 3 + 20

price = (temp1 + temp2) * temp3 / 15



percent function performance (same set of randomized data passed to all 4 versions x 100 million calls per test)

D2 version: 2000-4000 mss [speed depends heavily on data, the function is also terribly inaccurate as we all know]
MTST c FPU version: 3000 mss - last version is from 2009 [not overflow proof, but works up to values in the 500 mill range]
MTST c int version: 3000 mss - 2014 [overflow proof, but slow because it needs to divide, left in codebase for portability reasons]
MTST asm version: 600 mss - 2014 [overflow proof, uses carry flag to detect rollover]
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Wed Jul 02, 2014 5:19 pm

BUILD 140603
3rd June, 2014

(MTST) Merged the various secondary probability systems (sparkling chests, certain shrines, gambling, monster equipment etc) strewn across the code into one unified function that can be easily extended.
(MTST) As a result which qualities among the regular qualities (crude, normal, superior, magic, rare, set, unique and legendary) are available to each of the affected sources is now fully softcoded.
(MTST) Rewrote the gamble function, restoring the previous exceptional and elite upgrade formula, sans the downgrade bug it suffers from in vanilla.
(MTST) It's now optionally possible to compile Prices.cpp with the classic Diablo 2 gamble cost formula (see below).
(MTST) Merged Shops.txt and NPCs.txt, there was no reason to keep the two separate anymore as most functions that used Shops.txt also looked up NPCs.txt.
(MTST) Added DATATYPE_REF_1BYTE_ID, the bin compiler had LONG and SHORT sized Id datatypes but none for CHAR length (this is different from DATATYPE_REF_STRING because it stores the ID in the bin, and not its name).
(MTST) Major overhaul of the (previously still hacky) NPC system. Everything governing NPC speech is now moved to Speech.txt. The code was redesigned from scratch, eliminating the traces of the original D2 clientside NPC system and its utter inefficiency.
(MTST) Removed a redundant duplicated header from the project.
(MTST) Softcoded the welcome back and automatic intro mask indices to NPCs.txt.
(MTST) Extended the player roster structure to store a unicode version of the player name, this gets rid of realtime conversions that were all over the code before.
(MTST) The identify function can now dispatch item updates immediately, this allows us to get rid of a lot of blizzard hackery in the NPC menu code (which they needed because the menu was recreated before the items were updated clientside).
(MTST) The NPC subsystem has been rewritten entirely, the traces of Blizzard's old system this was still based upon are eradicated in favor of much more workable code.
(MTST) NPCs can now have multiple imbue windows, travel options and such without these conflicting.
(MTST) Every NPC option can be subject to a cost and quest filtering now as the entire transaction backend has been rewritten with its new data driven nature in mind.
(MTST) Skills originating from scrolls now use the same targeting verification other casting utilizes.
(MTST) Cursed items can now be sold to vendors unless they're in a state that forbids them from being removed.
(MTST) Merged the ancient (perhaps first txt we added back in v1.10?) WClass.txt with ItemTypes.txt.
(MTST) Whenever item types or qualities are automatically deleted when sold to NPCs is now softcoded into ItemTypes.txt and Qualities.txt.
(MTST) Greatly improved the code responsible for selecting items for weapon racks and armor stands.
(MTST) The treasure groups used by racks and the filtering involved is softcoded into TreasureGroups.txt, RackType.txt's code linkage is removed in favor of it.
(MTST) The internal representation of the item tables now stores the item's index and not just the code, allows certain stuff to be done better.
(MTST) Cube recipes that output things such as "weap,sock" or "weap,eth" or "weap,eli" will always output the desired result, they're now using the rewritten item searcher instead of the previous logic.
(D2) Rings and amulets are once again always included in the gamble window, whenever we will do something similar in the mod too isn't decided yet.
(D2) The gamble price for rings was reset to 48000, which is the value it had before the expansion.
(D2) The number of items per gamble window has been reset to the previous value of 14 for fallback mode.
(D2) Added correct quest filters to numerous gossip messages that were useable at times when they didn't match the game's state.
(D2) Imbue now retains the item's staffmods (if it has such), so if you find a normal item with really good skill bonuses, the imbued version won't lose them.
(BUG) When a unique item doesn't fit into the gamble window its index wasn't removed from the spawning mask before.
(BUG) Fixed several minor bugs with the clientside NPC system.
(BUG) Added a gossip that was missing from Warriv's gossip table (for act 1).
(D2BUG) Fixed an off by 1 error in the gamble ilvl calculation, it should probably be +5 to -5, but the game ends up doing +4 to -5 instead. While they documented this correctly as +4 on the CS ages ago, I treat it as one of countless RNG related off by 1 errors I fixed over the years.
(D2BUG) When spawning elite items in the gamble window directly, the game won't attempt to "upgrade" them to exceptional anymore.
(D2BUG) If you add an item to armor or weapons txt between two game sessions (without terminating the process) the amulet and ring indices for the gamble window will point to the wrong items if you previously opened the gamble window (the globals where they prefetch this aren't initialized).
(D2BUG) The gamble inventory is now reset correctly and its contents deleted when you stop talking to an NPC, the previous fix (which I think we never mentioned) was a workaround for the actual problem.
(D2BUG) It is now possible to link against string index 0, without the game thinking this is an error.
(D2BUG) Jerhyn was supposed to not use the gossip message of "things are getting worse by the hour" after you've entered the arcane sanctuary, unfortunately they default to message # 2, which is the same bloody message.
(D2BUG) NPCs will sometimes walk around while you speak to them, I've extirpated the cause of this.
(D2BUG) The game now correctly restocks NPCs in harrogath when a player leaves the game while being there in multiplayer.
(D2BUG) Halbu, Jamella and Tyrael can now use their 'welcome back' messages when you return to act 4 from act 5.
(D2BUG) The event that marks the cain quest as failed when you leave act 1 without rescuing him is only fired when you visit the act 2 town.
(D2BUG) NPC greetings are correctly reset when you use a waypoint to change from one town to another.
(D2BUG) Creating Khalim's will now correctly sets state 11 of the quest server side.
(D2BUG) The quest item deleter can no longer lead to item ghosting.
(D2BUG) The quest item deleter no longer leaks bodyloc items permanently when "deleting" them.
(D2BUG) The quest item deleter correctly removes the stats of inventory items before deleting them.
(D2BUG) The quest item deleter now correctly supports items that're located inside the belt.
(D2BUG) 'travel to Harrogath' no longer erroneously sets the welcome back messages for act 2, copypasta much.
(D2BUG) Cain will not identify items inside the horadric cube if the horadric cube is in the stash anymore (after all, he doesn't ID items inside the stash).
(D2BUG) Fixed something horribly abuseable about the code governing one of the NPC quest rewards.
(D2BUG) The rare 'welcome back' messages NPCs use when you visit an earlier act again for the first time will no longer get cancelled by opening submenus.
(D2BUG) NPC greetings now originate from the NPC, and not the player unit.
(D2BUG) Greater/Super healing and mana potions will no longer get deleted when sold to NPCs that don't normally sell them on NM and hell (an old, previously undocumented fix).
(D2BUG) Selling stackable items that aren't repairable will no longer set their quantity to max. Make no mistake, this behavior is not intentional.
(D2BUG) Selling active charms will correctly disable their stats now, they just deleted the item without necessary cleanup steps before.
(D2BUG) Fixed a severe buy related to selling equipped bodyloc items to NPCs.
(D2BUG) Fixed an instance of use-after-free in D2Client resulting from a bug fix to how NPCs delete inventory items.
(D2BUG) Now that I reintroduced the old rack rarity calculation I can address one of the bugs in the original code: They use the ilvl as if it's a level ID to get the act and subtract that from rarity, needless to say. Even by the end of hell act 5 you're still in "act 3" as far as this code was concerned.

Before the expansion forced those huge prices onto classic players, the game was using a much simpler gamble formula which I've extracted from v1.06 and added to the code base:

Code: Select all

cost = (cost * 5 + 600) * 5
if (item == armor)
	cost *= 2
cost = MIN(cost, 800000)
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Wed Mar 18, 2015 8:54 pm

BUILD 140702
2nd July, 2014

(MTST) Finalized the NPC system based on the large overhaul done during the previous build.
(MTST) ITEMS_TestQuality now takes into account that compactsave items can never be anything but normal quality.
(MTST) Fully redesigned the way standard NPC trade inventories are populated for fallback mode.
(MTST) PermStore item quantity isn't random anymore, it'll always be set to maximum quantity (missiles, as in vanilla) or maximum spawn quantity (everything else).
(MTST) The aptly named Rubbish.txt has been split into Stock.txt and MonConsumeables.txt which simplified the loading process.
(MTST) NPC stock construction has been accelerated considerably, this is also a result of splitting the txt file.
(MTST) For fallback mode, merchants will once again stop selling normal items past clvl 20, items that can't spawn as qualities other than normal will continue spawning however.
(MTST) More internal cleanup, PLAYERS.H is split into PLAYERS.H, CPLAYER.H and SPLAYER.H, should speed up recompilation time if something is changed in either header.
(MTST) When you recharge or restack items at an NPC the game is no longer biased toward items you've just picked up, instead it seeks the item that will cost the least to restack to maximum.
(MTST) Not sure if this was a bug, but multibuy now works with all stackable items, not only those that autostack (autostack only controls whenever it autostacks with items you already have).
(MTST) Replaced the entire NPC buy/sell code, while removing a ridiculously myopic hardcode related to quivers from the purchasing function.
(MTST) Server side NPC data lookups don't require a loop anymore, they're now symmetrical with NPCs.txt indices.
(MTST) Removed a lot of redundant legacy cruft from various server side NPC functions.
(MTST) Removed STORES.CPP and STORES.H, the contents of which have been moved to SNPC.CPP and NPCS.CPP.
(MTST) Replaced numerous NPC related server functions that did nothing beside calling already replaced code.
(MTST) Revised the majority of server side NPC functions that've previously been replaced.
(MTST) The quick lookup options bitmask associated with NPC records now uses the same semantics as the more expensive option index lookup. Should contribute to code readability.
(MTST) A1Q4 private data now stores tristram-cain's unit ID so we can get rid of one more hardcode in the NPC interaction code.
(MTST) NPC and menu functions respond more gracefully to units that have no menu data.
(MTST) Removed some redundant record lookup functions from the code base.
(MTST) Replaced the code that is responsible for selecting the default storepage shown for shops, fixing a bug in the process.
(MTST) Removed the artificial delay before the game shows the name of storepages in a merchant's shop. We open the menu once the client has the NPC's item list, the delay thus serves no purpose anymore.
(D2) Charsi, Gheed, Fara, Drognan, Hratli, Ormus, Elzix, Asheara, Halbu, Jamella, Anya and Malah had their inventories corrected, enabling certain magic items that couldn't spawn before due too Blizzard's ample txt errors.
(D2) Akara, Lysander, Alkor and Jamella can sell throwing potions again (also added some to Malah for consistency).
(D2) The default storepages for the various merchants now make more sense, instead of being lazy and defaulting to misc for almost everyone.
(BUG) Corrected a bugged patch.
(BUG) Automatic repair for gambled items will work correctly now.
(BUG) Added a missing call to the belt pspell invocation function.
(D2BUG) The hell upgrade column will no longer downgrade items that've been previously upgraded to exceptional and elite (branching error) like on nightmare difficulty.
(D2BUG) NPC inventory upgrades now respect the spawnable column and the item's qlvl (instead of hardcoding qlvl to 25).
(D2BUG) NPC inventory upgrades will no longer "upgrade" elite items to exceptional if given to an NPC directly (yeah, the same nonsense I fixed with gambling also applies here).
(D2BUG) The permstore pool is now sanitized upon creation, this eliminates duplicated codes such as hp4, mpe, hp5 and mp5 on nightmare and hell difficulty.
(D2BUG) The lag that occurs when opening Jamella's inventory has been fixed.
(D2BUG) The gamble upgrade code now respects the spawnable column.
(D2BUG) Removed some dangerously naive code that could be exploited to remotely delete arbitrary items from the game.
(D2BUG) Multibuy is now correctly disabled for the gamble screen and items that don't support it.
(D2BUG) The routines that delete items from gamble and trade inventories now check whenever the removal of the item succeeds (they ignored the return value before which makes detecting certain bugs almost impossible).
(D2BUG) The functions (pickup and buying) that're responsible for stacking books and scrolls used inconsistent checks to locate suitable books.
(D2BUG) Enabling multibuy for books would corrupt the charges count of the player multibuying the book, that specific branch of the code was completely oblivious to books existing.
(D2BUG) Multibuy charges you different amounts depending on whenever you restack an item, to when you otherwise buy the same amount of quantity, this has been fixed (see note 1).
(D2BUG) Multibuy will no longer fail if you don't have enough gold to purchase the base item, the cost check is only done once the correct cost for the to be purchased quantity has been evaluated.
(D2BUG) The game no longer leaks a copy of the purchased item permanently into ram when you run out of gold during potion multibuying.
(D2BUG) D2QUEST_EVENT_NPC_STOP is now only dispatched for players who were actually interacting with the NPC.

# note 1 - When you multibuy (shift + buy) an item from an NPC, the price should be the cost for 1 quantity of that item x # of instances bought, unfortunately this only happens when you restack an item (such as when you multibuy a key and already have a key), if you don't already have an instance of that stackable item the cost is equal to the base item's full cost x quantity (so if the key has 3 quantity when you buy it the cost is now three times higher than it should be).
  • Charsi: ring mail, chain boots, belt, chain gloves.
  • Gheed: throwing knife, throwing axe, short spear.
  • Fara: split mail, tower shield, trident, throwing axe, pilum.
  • Elzix: short bow, light crossbow, javelin, pilum, throwing axe, throwing knife.
  • Drognan: scythe.
  • Hratli: field plate, gothic plate, full plate mail, gothic shield, giant axe, war scythe.
  • Ormus: wand, short staff, spiked shield.
  • Asheara: balanced axe, balanced knife.
  • Halbu: light gauntlets, gauntlets.
  • Jamella: great helm, field plate, gothic plate, full plate mail, tower shield, gothic shield, light gauntlets, heavy belt, light plated boots, short battle bow, long battle bow.
  • Anya: tower shield.
  • Malah: scepter.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Sun May 29, 2016 9:59 pm

BUILD 150318
18th Mar, 2015

(MTST) Added a rarity column to MonConsumeables.txt, giving us some more control over consumeables distribution.
(MTST) Improved the code that adds consumeables to monster inventories, removing actions I now know are redundant.
(MTST) The rarity calculation used by weapon racks and armor stands is now more gradual, taking into account the difference between ilvl and qlvl.
(MTST) Improved the performance of SPET_SetMax and SPET_RemoveNode somewhat by eliminating unnecessary code.
(MTST) The base max value from PetType.txt is now used as a global minimum pet count instead of being used only when there're no skills available for that pet type.
(MTST) Removed an unnecessary hardcode for PET_TYPE_SINGLE, there's no reason to have hardcodes for something that isn't even used by the game.
(MTST) Blizzard tried to "optimize" max pet calculation for when you equip/remove an item affecting a pet skill, this results in the game traversing the player's skill list up to 16 times rather than just once. It further prevents pet types from working correctly if linked to more than 16 skills.
(MTST) SPET_GetMercenaryInfo no longer searches all pet lists for the mercenary entry, it searches only the mercenary list.
(MTST) Greatly increased the speed of the pet group managing code (the code that removes pets from incompatible groups - think Druid wolves and bears).
(MTST) Pets.cpp has been split into CPet.cpp and SPet.cpp (the header has fared the same way).
(MTST) The game is no longer limited to just 256 hireling groups, it is now possible to create 32767 individual groups.
(MTST) Hireling.txt and MercType.txt are both deprecated and combined into HirelingStats.txt (all the older softcodes for equipment, sounds, ai and the like are migrated to that file).
(MTST) The base monster class of a hireling is now linked to HirelingStats.txt by name instead of using line numbers like Hireling.txt does.
(MTST) Hireling description strings are properly linked to the string table, instead of being proxied to a hardcoded table in D2Common restricted to 9 entries (what the {filtered}?).
(MTST) HirelingStats.txt gives hirelings 8 rather than 6 associated skills slots, modes are now linked from their token instead of number too.
(MTST) The hireling difficulty level is following the same pattern as every other file (0 to 2) instead of being from 1 to 3.
(MTST) HirelingStats.txt can optionally be subjected to rigorous data verification after loading that ensures all lines in a specific group share compatible settings (only available if compiled with the test enabled).
(MTST) We associate the hireling name range directly with the parameters to of the hire menu option so that we don't need to search all of HirelingStats.txt in realtime.
(MTST) Hireling experience and cost (revive and hire costs) are now calculated using overrun proof math functions.
(MTST) Hireling skill levels are not hardcoded to a maximum of 32, instead they use the maximum level from Skills.txt (if applicable).
(MTST) The last place that was using hireling experience as a signed integer has been replaced, allowing hirelings to have a maximum of 4294967295 instead of 2147483647 experience.
(MTST) The string displayed when a mercenary levels up is now softcoded and can be set to something different for individual tiers.
(MTST) The game correctly responds to the scenario where level changes decrease a hireling's skill levels (skills that drop to zero are removed from the unit).
(MTST) Added debug chat command to change hireling level at will (to any value the hireling could legitimately have).
(MTST) For consistency, all places that expect hClient will ASSERT if it is NULL, instead of silently bailing in a few instances.
(MTST) We update hireling equipment when any of their primary stats (level, strength or dexterity) is changed.
(MTST) Hireling stats are broadcast to clients alongside the monster creation message, so they will always be up to date and accurate on everyone's end.
(MTST) Pets will now always teleport to you, this has been accomplished by adding one last warp call to the room deactivation code.
(MTST) Added a new error message type that can be used inside inline functions without obfuscating the true location.
(MTST) Greatly increased the speed of the function that disables pet nodes when a pet is killed (in combat, not by summoning another pet or unsummoning it).
(MTST) Added missing saftey checks to hireling save file loading, the expansion code never bothered to test the magic number before operating on the buffer.
(MTST) Hireling save data is now flagged as containing a hireling instead of having to rely on guesswork with seed/name/experience.
(MTST) Added superior support for level drain to the hireling save formats and redesigned functions.
(MTST) When loading the hireling from the D2S, we save some traffic by not sending stat updates until everything (including items) is done.
(MTST) Hireling group IDs are now treated as a 32-Bit integer everywhere, instead of being 16-Bit in a few places and 32-Bit in others.
(MTST) Hireling names now function as singletons within a game session, if a player joins with a certain hireling name that name is unavailable while that player is in the game (it becomes available again once they leave). Blizzard originally intended to do this but due to bugs their code never worked.
(MTST) It is now possible for multiple NPCs to offer (different) hirelings in the same act.
(MTST) Added a chat command to create a hireling with a desired type and name (at any legal level) on the fly.
(MTST) Removed a load of redundant code and one unnecessary state hardcode from hireling resurrection.
(MTST) When using consumeables the correct player sounds are now played when the item can't be used due to unmet requirements.
(MTST) When trying to put an item into the wrong hireling bodyloc, the game no longer misleadingly plays the "I can't use that" hireling sound, instead it play's the player's "Impossible" sound.
(MTST) In vanilla using a town portal scroll inside town will first play the scroll usage sound and then complain that it can't be used in town, the former sound is not played anymore.
(MTST) You can now give Wirt's Leg to hirelings despite it being a quest item (for consistency with almost all other quest item checks, which specifically treat the leg like a normal item).
(MTST) Replaced the function that loads UniqueItems.txt while cleaning up the unique item selector.
(MTST) Created a new txt file to replace QualityItems.txt (HighQualityItems.txt) that works in a less archaic manner than the original (the original file and logic behind it can still be enabled using a define).
(MTST) The combat log is no longer using the same code as chat messages, instead it is now it's own UI with dedicated functions. Messages are now also color coded depending on who dealt or took the damage.
(MTST) Reintroduced ItemRatio.txt to the game, with a twist the correct ratio table is now no longer searched for in realtime cutting out an unnecessary loop from the item generation process.
(MTST) ItemRatio.txt now has one entry for each type per difficulty, they originally intended to do this but the function getting the record ignores the parameter.
(BUG) Fixed a bug that prevented two BIN files from loading correctly without the '-txt' switch because their verification relied on linker tables that won't contain data without the switch.
(BUG) Fixed a potential bug in SMERC_SendStatUpdateMessages, we sent the base hitpoints value instead of the accrued amount.
(BUG) Fixed an incorrect flag test in SITEM_UpdateEquipment that snuck in many years ago (ca. 2009 probably).
(BUG) Fixed a potentially unsafe wrapper function.
(D2) Mercenary names in the hireling menu are now sorted alphabetically.
(D2) When Blizzard added Jarulf to the Act 3 mercenary pool they substituted the name Lharhad for it using an elaborate hack (every name lookup checks vs. a hardcode of the old string), they're now both available.
(D2) Due to an oversight act II mercenaries were allowed to equip javelins, while I am certain this wasn't intentional the vanilla code itself works the way it should (it tests against ITEMTYPE_SPEAR and ITEMTYPE_POLEARM), throwing weapons are now excluded from their equipment.
(D2) Hireling levels are no longer scaled to the full player level and instead stay within the range eligible for the act and difficulty, this stops the practice of hiring cheaper mercenaries with better stats by going to normal difficulty with a high level character.
(D2) Hirelings can reach your current level, instead of always being one level below your current level.
(D2) When you dismiss a hireling that has equipment, those items are now moved to your inventory and bodylocs (or the floor if you have no room) instead of being lost.
(D2) The names of the hirelings received as quest rewards should be a bit more random now (instead of being biased toward the top entries in the name list).
(D2) For whatever reason the game was using the same voice for all three male hirelings, despite there being audio for each of them. We changed this.
(D2BUG) The code now consistently ignores PET_TYPE_NONE instead of treating it as valid in some functions and as an error value in others.
(D2BUG) SPET_UpdateSkills and SPET_UpdateSkill could set inconsistent maximum pet counts for the same skill in some cases.
(D2BUG) The game now correctly deallocates pet nodes from the PET_TYPE_NONE list (this list can contain nodes if something other than a bonewall is given that type).
(D2BUG) Fixed two major bugs with a mercenary related client function (it tested the class instead of the pet type against PET_TYPE_MERCENARY and didn't care about what player the mercenary node is removed from).
(D2BUG) Fixed a potential crash in CUNIT_MakeAttackable (the original didn't test units against NULL before tampering with them).
(D2BUG) The stats displayed in the hireling roster menu (the one you select whom to hire from) were not calculated based on the correct record for the given level, they could thus differ from the stats your hireling actually got.
(D2BUG) Having more than 12 eligible hireling groups associated with an NPC in the same difficulty level may crash the game because of missing array bound checks.
(D2BUG) The maximum hireling level is now derived from the player's class, instead of always using PLAYERCLASS_AMAZON.
(D2BUG) Unarmed hirelings and those using one-handed weapons didn't use their listed base damage unless another (non-weapon) piece of equipment added a bonus to maximum damage (see notes).
(D2BUG) When leveling up hireling hitpoints are not replenished correctly, the code uses the base value of maxhp instead of using the current value (this means that they will not recover bonuses from battle orders, oak sage or their equipment)
(D2BUG) It was possible to pick up the golden bird again after completing the quest (it doesn't let you get another potion of life OR get a new one if you lost yours without drinking it, so this is useless).
(D2BUG) A function that was supposed to close the hireling screen if the hireling dies was passing UI_TOGGLE instead of UI_CLOSE, which could re-open the UI if it was already closed (should it be called in a different context).
(D2BUG) The stats found in Hireling.txt are contaminated by plenty off-by-1 rounding errors, this was corrected when importing them into HirelingStats.txt.
(D2BUG) SMERC_SetLevel can no longer set hirelings above their legal maximum level (just a precaution).
(D2BUG) Hireling equipment was not properly updated when the hireling gained a level, this can cause cryptic problems with per level stats and similar stuff.
(D2BUG) Hireling skill assignments and skill levels were extremely bugged on the client, the issues are too numerous to detail here so check the appendix.
(D2BUG) Hireling stats were only broadcast on creation and level up, this meant that players joining the game without you already being on screen would not get the correct stats for your hireling.
(D2BUG) SMERC_Initialize no longer assigns and broadcasts invalid hireling types to already existing hirelings being loaded from the D2S.
(D2BUG) SMERC_Create would crash if the seller field linked to a hireling record didn't point to a valid NPC, this was fixed (allowing NPC-less hirelings in modded games).
(D2BUG) The way SMERC_Load and SMERC_AddExperience evaluated the hireling level was incongruous, which can and will lead to corrupt hireling levels if Hireling.txt contains different experience multipliers for individual tiers assigned to a group.
(D2BUG) Fixed a bug that allowed players to hire hirelings that weren't actually in the NPC's current roster.
(D2BUG) Fixed a bug that would lock the player in the hire dialog perpetually in case Hireling.txt is malformed.
(D2BUG) When players join with a hireling the game tries to mark that hireling as hired and remove it from the NPC's roster, the roster doesn't exist until someone has talked to that NPC however. It is now created at game start, other code is also changed to accomondate for this restored functionality.
(D2BUG) Blizzard wanted Qual-Kehk to offer two types of barbarian units (a dual-wielding one, and a two-handed one), there are many bugs in the hireling code that prevented this type from ever being made available properly (which is presumably why they left it out of the game).
(D2BUG) The game will no longer crash if a hireling name pool contains over 69 names (in fact there is no longer a limit to the size of the name pool - this even ends up saving memory in fallback games).
(D2BUG) Fixed a serious memory corruption bug related to hireling resurrection. It would allow any player to corrupt the host's memory or crash the it at will. Disgusting.
(D2BUG) STATE_FREEZE wasn't removed correctly in the hireling resurrection code, the statlist associated with it leaked (though the timer would clean it up later).
(D2BUG) When you resurrect a hireling the game previous tried to teleport ALL your pets to your location, instead of just the hireling.
(D2BUG) Setting warp to FALSE for PET_TYPE_HIRELING would prevent hireling resurrection from working correctly, this has been fixed.
(D2BUG) Items are correctly reactivated when you revive your hireling, this will be especially notable with equipment granting auras.
(D2BUG) Fixed a bug that would render shattered hirelings invisible if you resurrect them in the same session where they shattered (they tried to 'fix' this by removing the invisible flag serverside, where it has no effect...).
(D2BUG) If a hireling dies in the same room it is resurrected in it won't be spawned for clients joining between its death and resurrection (this can't happen in vanilla, but it's still a bug).
(D2BUG) The game will no longer drop items to the ground if you drag them to the hireling icon if the hireling can't use them for some reason.
(D2BUG) Blizzard didn't want you to give items to hirelings that are too far away, but they don't check this for belt-hotkey-healing, it is only ever tested serverside for inventory and icon based operations. It is now enforced consistently.
(D2BUG) Fixed a bug that would allow classic D2 players to heal hirelings if they spoofed a single clientside check.
(D2BUG) Fixed a bug with the way hireling stats were updated when you exchanged one of their items with another and they didn't meet the requirements for the new item anymore.
(D2BUG) SMERC_SetLevel won't send the 'I feel much stronger now' message when loading a merc from the D2S (it only gets dropped because the client has not fully 'joined' the game at that point). [OLD FIX]
(D2BUG) CNET_RCV_SetMonsterStat tried to update equipment when STAT_LEVEL is changed, but they do this BEFORE the stat value is changed so it has no effect beside burning clocks. [OLD FIX]
(D2BUG) Hirelings aren't allowed to use quest items, but that check was previously executed in a very sloppy manner that would've led to anomalous behavior if hirelings were allowed to use a quest item type.
(D2BUG) Rarity in uniqueitems.txt was compiled as a 16 bit integer but read as a 32 bit integer, it is now compiled as the latter for consistency.
(D2BUG) The check for maximum unique items in the table loader was off by 1.
(D2BUG) The table loader for QualityItems.txt didn't bother to test if there are too many records in the table. If there're more than 10 records in it the generator code will trigger a stack overrun.
(D2BUG) Fixed an off by 1 error in a quality evaluation function that made results slightly inaccurate when ilvl and qlvl are identical.
(D2BUG) The game didn't test if itemratio divisors were 0 before dividing with them, it now tests this when loading the data table.

Hireling damage bug: This is caused by the game trying to remain compatible with legacy behavior for classic (although it's technically bugged there too), in legacy games hirelings recieve their damage from UMOD_HIREABLE which sets the value of STAT_MAXDAMAGE and STAT_MINDAMAGE equal to STAT_SECONDARY_MAXDAMAGE - 1 and STAT_SECONDARY_MINDAMAGE - 1, unfortunately the game tests the conditions leading up to this incorrectly and will bail if the initial value of STAT_MAXDAMAGE isn't above 0. Hireling base damage is assigned using STAT_SECONDARY_MAXDAMAGE/MINDAMAGE and not the basic damage stats, weapon damage isn't factored into your total damage (their damagerelated stats are disabled outside of combat), as a result the only way for this code to execute is when your hireling gets basic damage from a non-weapon item/skill. Rogues are excluded from the involved functions with a hardcode because their damage is calculated elsewhere.

Hireling skill bug: Hireling skills were not assigned correctly clientside, first of all the game doesn't send the hireling type to the client, it instead tries to deduct it from the seed and name. This is done for the current difficulty level instead of the one the hireling was originally hired on, which results in the initial skills either being wrong (Act 2 NM mercs) or not assigned/assigned at the wrong levels (depending on the amount of slvl bonus per level they receive). Further, the game never updates the levels if the hireling gains levels later on. This among others causes the notorious hireling flashing bug where they go invisible after using a skill, it also fixes bugs where the number of charged bolts shot by act 3 lightning sorcerers is desynced between client/server.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: MetalStorm Progress Archive

Post by Nefarius » Tue Jun 28, 2016 7:09 am

MetalStorm 160529
Development had to be delayed until early 2016 due to a system migration (and then delayed again until April due to gpu RMA nonsense).
(CORE) We now detect whenever patches are out of range by pre-evaluating every patch list passed to the patcher.
(MTST) The global damage modifications done by Weaken and Amplify Damage were turned into an event function.
(MTST) Mana, Life and Stamina steal are now separate from Mana, Life and Stamina Drain damage.
(MTST) The damage reduction in PvP is now actually 1/6 and not 17 percent and is no longer applied to Mana and Life Steal.
(MTST) DamageRate in Missiles.txt was changed to a regular base 100 percentage, nothing made use of the fact it was base 1024 before (all the values equal 4, 8 and 20 percent).
(MTST) More of the last remaining low-level core code left in D2Game.DLL has been replaced.
(MTST) The main damage application calculations now use the new overrun proof math functions allowing damage up to 0x7FFFFFFF to work without a hitch.
(MTST) Monster element affinity and ethereality are now stats making it very easy to add to units through skills.
(MTST) Ethereal monsters will deal physical as physical damage again (but will not trigger effects such as thorns that are normally associated with it).
(MTST) Partially unrolled the STATS_TestStateMask loop up to test up to 10 dwords per iteration (which accounts for all new and old states without having to loop).
(MTST) It is now possible to attach as many server-controlled overlays to a unit per frame as desired instead of only a single one (at no real extra cost).
(MTST) We now use CryptGenRandom to seed the game instead of QueryPerformanceCounter.
(MTST) All of SUnitExperience.cpp and SUnitLevelDrain.cpp have been revised and cleaned up, the experience calculation now uses the 2014 overrun proof math functions.
(MTST) The level difference experience scalars have been moved into ExperiencePercent.txt and were changed back into base 100 percentages (there's no point for them to be in base 256 --- it only causes rounding errors).
(MTST) The party and hireling experience share calculations were restored to their 1.09 implementation which eliminates the rounding errors they were prone to.
(MTST) Experience is not capped to 8388607 per kill anymore (in a vanilla game this means Baal will give the correct amount of experience when a 8 player party kills him in Hell difficulty).
(MTST) The level and seed of monster units are persistent between activations now (no need for hackery to get them to roll the same equipment or modifiers anymore).
(MTST) The highest level in game and effective dungeon levels are stored in pGame now (instead of using arbitrary globals for them).
(MTST) Replaced the Experience.txt loader and the experience searcher.
(MTST) Replaced the loader of DifficultyLevels.txt.
(MTST) Added several new debug chat commands.
(MTST) The stamina drain from all equipped armors is now accrued into a separate stat to speed up the stamina drain code (no point to walk over all equipped items there when this works so much better and cleaner).
(MTST) The grouping behavior for "Enhanced Damage" was removed from the code, it is now done through a desc group in ItemStatCost.txt.
(MTST) Replaced the entire backend code for convertible items (and added baseline tests to enable the legacy convert cursor even though we won't be using it --- which is fully coded in D2Client).
(MTST) Instead of showing Smite and Kick damage for every character class this is now controlled by two fields in CharStats2.txt.
(MTST) CSTR_ToColor can now colorize strings exceeding 1024 characters in length instead of truncating them (for what little it's worth anyway, we add the color op-codes directly).
(MTST) All preprocessor defines that control compile-time inclusion and exclusion of features were turned from #ifdef to #if boolean checks so that they can always be included in the options header and only their value has to be toggled.
(MTST) Added a new debug command that lets you add any modifier included in Properties.txt to the item held on the cursor (using the same parsing code that the values in the data tables use). It's faster to test things this way than to use cube recipes.
(MTST) Replaced some more top level item related code now that all the lower level functions are history.
(MTST) Several buy/sell interface functions were rewritten to turn a few older patches into complete function replacements.
(MTST) The original STAT_ITEM_DAMAGETARGETAC modifier has been restored (although with fixes for the bugs that originally prompted me to remove the modifier --- which was already disabled in LoD by virtue of the affixes not spawning anymore), it can now be used alongside STAT_MS_ITEM_REDUCETARGETAC_HTH and STAT_MS_ITEM_REDUCETARGETAC_MISSILE.
(MTST) STAT_ITEM_HALFFREEZEDURATION has been restored, it can now be used alongside STAT_MS_ITEM_FREEZELENGTHRESIST.
(MTST) STAT_ITEM_NORMALDAMAGE and STAT_ITEM_KICKDAMAGE are now applied at the end of the damage routine, not subject to src damage.
(MTST) CItemDesc.cpp has been completely revised, marking a very big step in bringing the item code up to snuff with the newer elements of the code base. This leaves D2I.cpp as the last remaining large item related file to be cleaned up.
(MTST) The descval and groupval columns in ItemStatCost.txt are now respected by most description types (except for those that employ a single format string for their description).
(MTST) Monster type modifier descriptions don't always include ':' before the monster type name. Stuff like this should be governed by the string and not the code.
(MTST) It is now possible to control whenever +skill and +oskill description strings show the value as a prefix or suffix (and 'to' is added to the string only in the former case).
(MTST) CITEM_GetModString is now globally invoked allowing any modifier description to be overwritten by an item specific version (so for example 'Fires Explosive Arrows or Bolts' shows up as 'Fires Explosive Arrows' on a bow now).
(MTST) ItemStatCost desc functions that don't print a '+' sign also apply this to the '-' sign now (they display an absolute value, using the pos/neg desc strings to differentiate positive from negative values)
(MTST) Time and average values are now shown with higher precision when possible and desired.
(MTST) The automatic 'indestructible' line that gets added to destrucible items that have 0 maximum durability now abides the display settings and order for STAT_ITEM_INDESTRUCTIBLE in ItemStatCost.txt.
(MTST) Class based life and mana potion multipliers are now also in effect when hirelings and monsters use a potion if they have a simulated player class.
(MTST) Gem and rune stats are now longer displayed if the gem or rune is unidentified (this is a prelude to making gem stats random again like they were in 1.00-1.06).
(MTST) It's no longer possible to convert convertible items if they're unidentified.
(MTST) Monsters can now be selectively affected by client-only stats such as +light radius if fcallback is set to TRUE in MonStats3.txt.
(MTST) Gems can once again have persistent random stats like they did between 1.00 to 1.06. These stats are not saved but are rather rolled from the same seed when the modifiers are assigned to the gem.
(MTST) Reputation update messages use their own SMessage now instead of sending a standard chat message.
(MTST) The level set by the -act switch was moved from SPlayer.cpp into Acts.txt.
(MTST) The experience sharing distance is now calculated from the player to whom the kill is attributed, not the distance from the monster that was killed.
(MTST) SItemCreate.cpp has been fully revised, all legacy leftovers and miscellaneous older test clutter has been removed.
(MTST) Gold is no longer listed as a stackable item, this cuts out quite a bit of work the game has to do in the background when spawning gold piles (gold isn't an inventory item anymore and that's the only thing this pertained to -- edit should be safe to do in vanilla too).
(MTST) We now test for invalid item upgrade information (ie regular, exceptional and elite upgrade codes and their association with each other) at load time and write any errors to the log.
(MTST) Weapon and armor checks are now performed in the same order in all functions as a precaution in case an item is linked against both types by accident.
(MTST) Durability is now only saved for items that actually have durability (items that're indestructible by default like Phase Blades save up to two bytes worth of D2S space this way).
(MTST) Books, Scrolls, Oils, Dyes and Elixirs no longer use the same number of bits to save their effect indices, this should conserve a little bit of D2S space.
(MTST) Replaced the loader for Sets.txt and SetItems.txt in order to softcode the Cow King Set / Hellbovine relationship.
(MTST) Some refinements were done to the magic modifier selection routine, first the original magic level scaling formula has been reinstated and second it is now possible to select affixes using a preset group (like automagic, but for prefixes and suffixes too), this eliminates the need for a group ratio table.
(MTST) The maximum item level the cube can produce is now derived from the current player's character class instead of using the value of PLAYERCLASS_AMAZON or a hardcoded 99. [160428 - I removed the limit entirely because it just gets in the way, the generator caps levels when needed anyway]
(MTST) Added a replacement for the D2Lang implementation of sprintf, this version is both faster and safer (it also doesn't require a dummy parameter to be passed for %%).
(MTST) We now always raise an error message if the pItemData pointer fetched from an item is NULL.
(MTST) Most of Debug.cpp has been removed because these functions, when still used, have long since been superseded by superior code.
(MTST) Gamble.txt and its loader have been replaced, the new file gives control over preset items (rings, amulets) and allows entries to be disabled without having to remove them.
(MTST) Items with invalid runewords are no longer deleted, instead the runeword modifiers are removed and the item is downgraded. If the runeword becomes valid subsequently it is upgraded to a runeword again.
(MTST) Replaced the Runes.txt loader and expanded Runes.txt to allow runewords with up to 8 runes (to accomondate for the expanded socket limit).
(MTST) Personalized items now only display the first line of text in gold (so a rare item would display it's base item in yellow color), this was done to be consistent with the behavior of runeword names.
(MTST) Runeworded items preserve the item's original name(s) on a separate lines for all qualities now (so the display works properly with rare items for example, showing the runeword name, the rare item name and the base item name on three lines).
(MTST) Re-implemented and expanded the debug code that was present in the original item name function.
(MTST) The item name function no longer uses ITEMS_IsA to test for item types that require explicit linkage to be consistent with other code governing these types.
(MTST) STAT_QUESTITEMDIFFICULTY is now checked in a consistent manner in all places that reference the stat.
(MTST) Restored the old monster hitpoints, damage and experience bonus calculations for extra players (with a bug fix that addresses a problem in the original routines).
(MTST) Chat commands that take a single parameter now use CHAT_PRV_GetParamsFromMessage like other commands do.
(MTST) All casts from D2StatList to D2StatListEx were changed to static_cast for consistency.
(MTST) It is now possible to assign skills on a per item basis to starting equipment. It is also possible to disable starting items without removing them from the txt file now.
(MTST) The code governing the dropping of items added through monster equipment has been redesigned and refined considerably.
(MTST) Equipment given to pets through the skill is now rolled using the caster's unit seed instead of the monster for consistency with other skill randomization.
(MTST) The maximum number of consumeable items a monster can receive depends on the size of the monster's simulated belt now (controlled through MonStats3.txt).
(MTST) Previously MonEquip.txt did not allow much in term of discriminating what player items get copied to a creature (think Shadow Master and Shadow Warrior body armor and helmets), this behavior has been expanded considerably and is now safe without having to worry about summons receiving incompatible equipment (it is designed to function correctly with dual-wielding in mind too).
(MTST) Several columns were removed from MonStats3.txt, Armor.txt, Weapons.txt and Misk.txt thanks to the new and improved MonEquip.txt rendering their existence obsolete.
(MTST) Blizzard's MonEquip.txt was limited to 32766 useable entries because of the way it was linked against MonStats.txt, the revised version of the file supports 32767 unique groups that each can be attached to as many monsters as desired.
(MTST) The formerly hardcoded equipment and the associated upgrade functionality of the ancients has been transferred to MonEquip.txt.
(MTST) The extended Valkyrie now gets a bow when you're using a melee weapon yourself, if you use a throwing or missile weapon she gets a spear instead. Previously we had this the other way around.
(MTST) A new debug command that can dump the unit and item seeds of all items found in the player's inventory structure to a text file has been added.
(MTST) Additional security checks have been added to five functions that access the hireling roster structures directly, while technically unnecessary because the values in question are tested at load time it's better to be safe than sorry.
(MTST) A replacement for Blizzard's string ordering function has been added that doesn't suffer from the grave security and performance problems of the original, in the course of this we have reintroduced the use of order formats for item and monster names.
(MTST) Columns previously transferred to Qualities.txt from ItemRatio.txt have been transferred back to the newly reintroduced and expanded ItemRatio.txt. MF related columns have likewise been transferred to ItemRatio.txt where they make more sense.
(MTST) Three new debug commands that display statistics about ItemRatio.txt and other probability tables have been added.
(MTST) Probability level scaling no longer applies to misc items, Blizzard only did this in one quality selector but not in the other one leading to incongruous results between the two. This behavior can be toggled at compile time now.
(MTST) An index based version of ITEMS_IsMisc and a unit based version of ITEMS_IsBasic have been added, these functions allow the two quality selectors to work consistently.
(MTST) Compact items are no longer subjected to quality selection, this has been done because they don't save their quality to begin with so why waste time selecting one?
(MTST) The GetInt, GetIntExclusive, GetIntInclusive and Chance methods of the D2Seed structure have been changed into templates that perform boilerplate checks matching the integer type they are compiled against automatically.
(D2) Blizzard didn't terminate buy/sell messages with a period consistently, the deviating strings have been changed to correct this.
(D2) The capitalization in certain item description elements was inconsistent (for example 'Right click to make' vs. 'Right Click to Open'), this has been corrected.
(D2) Many inconsistencies in item modifier and their display order strings have been corrected (a summary of most of these changes is given below).
(D2) STAT_ITEM_MAGICARROW and STAT_ITEM_EXPLOSIVEARROW now display a string corresponding with arrows or bolts depending on whenever the modifier is present on a bow or crossbow (it uses a third string if the source item is not a bow or crossbow).
(D2) Barbarian hirelings now receive the same health multiplier when you give them a healing potion that a real barbarian would receive.
(D2) The description of the book of skill was changed to "Right click to learn a skill of your choice" (from "Right Click to learn skill of your choice").
(D2) The description of the potion of life was changed to "Right click to add 20 to maximum life permanently" (from "Right Click to permanently add 20 to Life").
(D2) Recalculated the base stamina for Assassins, Barbarians and Druids using the same calculation that was used for the other four classes (64 + (stamina per vitality * vitality) / 4).
(D2) Amazons, Necromancers, Sorceresses and Druids receive 5 stat points to assign at game start (this is done to fix an imbalance where the remaining 3 classes have 5 surplus points in their starting stats).
(D2) All characters begin with slightly better equipment and 500 gold.
(D2) Valkyries don't begin with a rare Spear anymore, instead they get a rare Pike. We felt this is more consistent with them getting a Lance and War Pike later.
(D2) Some minor tweaks have been done to the equipment received by Valkyrie, Shadow Master and Shadow Warrior summons.
(D2) The items given to Blood Raven and Flying Scimitars get upgraded to their exceptional and elite versions in Nightmare and Hell difficulty now.
(BUG) The 'cheat.item.create' debug command didn't check if there was an item on the player's cursor before creating a new item.
(BUG) Fixed a bug that prevented quest items from being traded in some cases.
(BUG) SITEM_Socket didn't check the return value of ITEMS_GetMaxQuestRewardSockets correctly, this was harmless but we fixed it anyway.
(BUG) SITEM_Generate no longer produces a log entry complaining that the item couldn't be generated as QUALITY_NONE when the generator is told to select a quality on its own (and thus tParams.eQuality == QUALITY_NONE).
(BUG) CUBE_ParseInputString and CUBE_ParseOutputString treated unique and set item names 4 or less characters long as errors.
(BUG) Beginner items that're otherwise compatible weren't allowed to stack.
(BUG) More of an oversight, only the name of the runeword was supposed to show up in gold (we showed both the runeword and item name in gold).
(BUT) Not really a bug, but GET_LEGAL_ITEM_LEVEL is only used inside scaling formulae now (there's no point to restrict the value like that elsewhere).
(D2BUG) If NPC's are allowed to sell ethereal items and you mouse over one of those items with the repair cursor it would print "this item cannot be repaired" as if it is an item you own instead of showing the buying price as for other items.
(D2BUG) The repair confirmation dialog was supposed to show the main item name only but instead shows the last line in the name of the item (so Rixot's Keen becomes 'Short Sword' in that dialog) because the desc buffer text is in reverse, this has been fixed.
(D2BUG) Partially repairing an item didn't see the gold in the player's stash, so while you may have enough gold to perform a partial repair it won't work unless you carry it in your belt.
(D2BUG) The delay tick count used to defer buy/sell transactions was used prior to being initialized, this had no ill effect but I fixed it anyway (it is now initialized to the current tick count when a game session is opened).
(D2BUG) Whenever or not unidentified items could be repaired was inconsistently checked across the different code governing repair, all these places correctly exclude unidentified items now.
(D2BUG) One of the above mentioned repair functions failed to exclude ethereal items from repair, this has also been corrected.
(D2BUG) Fixed a bug that allowed players to sell items to NPC's that don't offer trading as long as the NPC's menu was open (which would crash).
(D2BUG) The cost value could easily roll over during partial repair price calculation, it is now using our overrun proof math functions.
(D2BUG) Fixed a crash caused by the cursor animation function if a cursor is set to loop in reverse (instead of adding to the now negative framecount it subtracts, making it crash the cel blitter).
(D2BUG) When copying an item for an operation such as a cube recipe the game erroneously passes the item as the owner unit to the socket insertion function, it should be passed as NULL in that case.
(D2BUG) SITEM_PutItemInSocket didn't call SITEM_UpdateEquipment, this can cause problems if you socket an item with something that changes your strength or dexterity.
(D2BUG) In some cases the buffer that'd receive the shield item was not initialized to 0 in INV_GetShield potentially leading to a crash if the caller didn't check the return value (the function was replaced and added to the codebase).
(D2BUG) Shield chance to block will no longer show up in blue unless it actually receives a bonus from a modifier.
(D2BUG) Item descriptions were supposed to be drawn with the unit equipping the item in mind (the hireling or yourself in vanilla), however there're many instances where the equipper unit is ignored which results in discordant descriptions with half the values derived from the viewer and the other half from the equipper, this has been made consistent (if your hireling can use Smite damage for example you will see it listed on the shield while it is equipped by the hireling).
(D2BUG) When converting a convertable item in the stash the game tries to put it at the same coordinates but in the inventory, the resulting item is now placed in the same page as the source item (if possible).
(D2BUG) Converted items could receive invalid amounts of quantity (and they could receive it even if they're not stackable) --- this now uses the proper way to add quantity to items.
(D2BUG) Fixed a division by zero in the weapon speed display if you have -100 % IAS on a weapon with 0 base speed.
(D2BUG) The routine that groups together damage mods didn't take into account the throw damage stats --- this means that a throwing weapon without melee damage would not display its damage bonus correctly.
(D2BUG) Due to an unwise version check you couldn't use the mouse wheel unless you ran the game in Windows XP compatibility mode, this has been fixed.
(D2BUG) STAT_ITEM_DAMAGETARGETAC operated on the accrued defense of the target instead of the base defense, this can create monsters with negative base defense if they are affected by a buff while being subject to the modifier's effect (once the buff expires).
(D2BUG) STAT_ITEM_DAMAGETARGETAC was using different boilerplate checks for melee and missile hits (in melee it ignores hirelings, but in ranged combat it ignores all creatures that're aligned with the player or neutral). I settled on the former behavior to make its behavior consistent.
(D2BUG) STAT_ITEM_DAMAGETARGETAC would in some circumstances be applied even if the attack didn't hit the target at all.
(D2BUG) Fixed a bug with the way /time modifiers were displayed if their value was negative (the game erroneously prints the undecoded value instead of the decoded value in this case).
(D2BUG) The amount of seconds printed for repair durability modifiers was calculated incorrectly. While this has long since been fixed the original behavior sans the bugs was restored in the recent revision of CItemDesc.cpp.
(D2BUG) The display for STAT_ITEM_STUPIDITY and STAT_ITEM_FREEZE was broken in that it would append a space to the string even if the value isn't displayed, thus putting the text off-center (ie "Freezes Target " and "Hit Blinds Target ") if the value == 1.
(D2BUG) Parameterized modifiers are now displayed in the correct order on items instead of in reverse (so for example skills correspond with their order in Skills.txt).
(D2BUG) The 'right click to open' string on the Horadric Cube (and similar strings for other items) didn't display if the cube was in the stash despite the item being perfectly openable there, the string now shows in both the stash and inventory buysell states (but it will not show if a merchant or trade inventory [etc] is open).
(D2BUG) Three old bug fixes that were not properly documented prior to the CItemDesc.cpp revision: Set items will display kick damage and the ethereal string correctly now. Set items in the trade window (your side of it) will show in green in the name list because you still own them (instead of showing in red).
(D2BUG) The gold button in the inventory shows the "Drop Gold" tooltip if you hover over it while the imbue box is shown (despite this not being possible while imbuing), it now shows the default "Gold" label instead.
(D2BUG) Your DT animation is no longer affected by the color of your items (they actually get moved to the corpse only once you're in mode DD).
(D2BUG) The level up function used for the -act switch uses experience that's one level too high than what is needed for the requested level (hence 32 becomes 33).
(D2BUG) In the experience code the game actually gives you experience if a monster you converted dies while under conversion, this is counter to everything Blizzard stated between 2000-2016. In my newly revised experience code I took this into account and retained the behavior.
(D2BUG) The access to the ExpRatio field in Experience.txt is off by 1, so for example the ratio for level 10 is used for level 11 characters.
(D2BUG) 1.10 and onward are missing a check that results in dead players technically being able to earn experience as long as they're not in a party.
(D2BUG) Due to the experience share distance being calculated from the monster and not the kill attributee in vanilla it is possible that you don't receive experience for your own kills (think poison damage).
(D2BUG) When updating what room a unit is in the game would search the entire act for the previous room even when the previous room is NULL (which inevitably fails but wastes a lot of cycles before that).
(D2BUG) When removing distant pets (range bit in PetType.txt) the game did not take into account that the coordinate space of acts overlaps.
(D2BUG) Removing the 'warp' flag would prevent hirelings from appearing at the start of the game (caused by an incorrect function call).
(D2BUG) If a summon had innate equipment but no skill driven equipment the game would try to assign the innate equipment twice.
(D2BUG) Prior to disabling the hardcoded ancient equipment the game would crash if the following item codes didn't exist: bsd, tow, fld, hbt, tax, hgl, vou, rin and crn. This happened because Blizzard didn't check if records were NULL before trying to use them.
(D2BUG) A bunch of NPC's had an inventory structure created for them despite not actually having a trade or gamble inventory, this has been fixed.
(D2BUG) SNPC_PRV_PopulateGambleInventory was missing a security check that allowed the function to access the item list even when the selected level had no items assigned to it. We have not checked but believe this is why the game crashes if Gamble.txt is blank.
(D2BUG) Cube recipes that use the useitem keyword in conjunction with the chance columns would either always or never assign the value every time the recipe is used on that item because the item's unit seed is reset to it's default value by the useitem keyword, this has been fixed.
(D2BUG) Having -100 percent MF now properly prevents qualities affected by the stat from dropping, a lazy division by zero boilerplate check used to set the value to 0 if it was -100.
(D2BUG) The player count bonus functions return values that're off by 1 level for any count above 8 (so 9 players produce the values for 8 players, 10 players for 9 players and so on).
(D2BUG) Runewords no longer use the item's first prefix slot to store their name string, this fixes the bug that corrupted magic and rare item affix data when given a runeword.
(D2BUG) Gamble.txt did not respect the spawnable boolean from Items.txt, items that are not meant to spawnable in shops will no longer show up in the gamble inventory.
(D2BUG) The minimum size of the first level tier (level 0) of the Gamble.txt index array was hardcoded to 2 even if no items were included in the file.
(D2BUG) The magic affix selector function breaks in unexpected ways if an affix has a level of 0 or less when the item has a magic level bonus (and thus probability becomes probability * level).
(D2BUG) SetItems.txt was limited to 32766 records instead of 32767 records due to an incorrect range check in the loader.
(D2BUG) Cube recipes can specificy multiple preset prefixes and suffixes however whenever crafted or rare items use these is purely up to chance past the first one, rare and crafted items now spawn with all their preset affixes should such be present.
(D2BUG) The game didn't remove the item's previous base modifiers before transforming it to another type through a cube recipe (when using the mod keyword), if used to turn an armor into a weapon or vice versa the item would retain such things as movement and attack speed for the course of one session (server side only), this has been fixed.
(D2BUG) Initial durability and quantity rolls were off by 1 so items could never spawn with full durability or quantity (I consider this a bug because prior to the expansion all rolls in this code were off by 1, even for AC -- that's just the only one that was fixed, I guess because it was easy to spot by players).
(D2BUG) Ethereal and crude item modifications to items are not applied correctly if the item is subject to a base item transformation using the horadric cube (again with the mod keywork), this has been fixed.
(MISC) A lot of interrim testing junk has been removed from MonEquip.txt, the file has been rewritten from scratch to go alongside our finalized re-implementation of its functionality (the new file is called MonEquip2.txt).
(MISC) Version 4.0 of D2PalEdit (formerly D2PalMaker) completed, the main improvement is the ability to bake modified palettes into sprites directly should this be desired. May make available later if I'm not busy.
(MISC) SMode.cpp has been renamed to SItemMode.cpp, Cube.cpp and Hirelings.cpp were split into three files each for shared, client and server code.
(MISC) Config.h is no longer included globally to not trigger full project recompilations if a new option is added.

Code: Select all

 D2                                                      MS
*-------------------------------------------------------*-------------------------------------------------------*
| Adds X-Y damage                                       | Adds X-Y Damage                                       |
| Adds X-Y fire damage                                  | Adds X-Y Fire Damage                                  |
| Adds X-Y lightning damage                             | Adds X-Y Lightning Damage                             |
| Adds X-Y magic damage                                 | Adds X-Y Magic Damage                                 |
| Adds X-Y cold damage                                  | Adds X-Y Cold Damage                                  |
| Adds X-Y poison damage over Z seconds                 | Adds X-Y Poison Damage over %s second%c               |
| +X damage                                             | +X Damage                                             |
| +X fire damage                                        | +X Fire Damage                                        |
| +X lightning damage                                   | +X Lightning Damage                                   |
| +X magic damage                                       | +X Magic Damage                                       |
| +X cold damage                                        | +X Cold Damage                                        |
| +X poison damage over Y seconds                       | +X Poison Damage over %s second%c                     |
| +X to all Attributes                                  | +X to All Attributes                                  |
| +X Maximum Stamina                                    | +X to Stamina                                         |
| Enhanced Maximum Damage                               | +X% Enhanced Maximum Damage                           |
| Enhanced Minimum Damage                               | +X% Enhanced Minimum Damage                           |
| X% Increased Chance of Blocking                       | Chance of Blocking +X%                                |
| Regenerate Mana X%                                    | Mana Recovery +X%                                     |
| Heal Stamina Plus X%                                  | Stamina Recovery +X%                                  |
| Increase Maximum Durability X%                        | Maximum Durability +X%                                |
| Increase Maximum Life X%                              | Maximum Life +%X                                      |
| Increase Maximum Mana X%                              | Maximum Mana +%X                                      |
| Attacker Takes Damage of X                            | Attacker Takes X Damage                               |
| +X Life after each Kill                               | +X to Life after each Kill                            |
| Reduces all Vendor Prices X%                          | All Merchant Prices Reduced X%                        |
| X% Damage Taken Goes to Mana                          | X% Damage Taken Replenishes Mana                      |
| -X% Target Defense                                    | -X% to Target Defense                                 |
| Attacker Takes Lightning Damage of X                  | Attacker Takes X Lightning Damage                     |
| Freezes target +X                                     | Freezes Target +X                                     |
| +X Kick Damage                                        | Kick Damage +X                                        |
| +X Life after each Demon Kill                         | +X to Life after each Demon Kill                      |
| X% Deadly Strike                                      | X% Chance of Deadly Strike                            |
| Resist Cold X% (Based on Character Level)             | Resist Cold +X% (Based on Character Level)            |
| Resist Fire X% (Based on Character Level)             | Resist Fire +X% (Based on Character Level)            |
| Resist Lightning X% (Based on Character Level)        | Resist Lightning +X% (Based on Character Level)       |
| Resist Poison X% (Based on Character Level)           | Resist Poison +X% (Based on Character Level)          |
| Attacker Takes Damage of X (Based on Character Level) | Attacker Takes %d Damage (Based on Character Level)   |
| Heal Stamina Plus +X% (Based on Character Level)      | Stamina Recovery +X% (Based on Character Level)       |
| +X Kick Damage (Based on Character Level)             | Kick Damage +X (Based on Character Level)             |
| X% Deadly Strike (Based on Character Level)           | X% Chance of Deadly (Based on Character Level)        |
| Replenishes quantity                                  | Replenishes Quantity                                  |
| to Druid Skills                                       | to Druid Skill Levels                                 |
| to Assassin Skills                                    | to Assassin Skill Levels                              |
| Reanimate as: X                                       | Chance to Reanimate Target as X                       |
| +X% to Attack Rating versus: Y                        | +X% to Attack Rating against Y                        |
| +X% to Damage versus: Y                               | +X% Damage to Y                                       |
*-------------------------------------------------------*-------------------------------------------------------*

Code: Select all

*------------------------------------------------------------------------*
| Ancient Armor (1)    | Ornate Plate (7)      | Sacred Armor (16)       |
| Full Plate Mail (1)  | Chaos Armor (7)       | Shadow Plate (16)       |
*------------------------------------------------------------------------*
| Pike (1)             | Lance (8)             | War Pike (17)           |
| Long War Bow (1)     | Gothic Bow (8)        | Hydra Bow (17)          |
*------------------------------------------------------------------------*
| Gauntlets (2)        | War Gauntlets (10)    | Ogre Gauntlets (19)     |
| Light Gauntlets (2)  | Battle Gauntlets (10) | Crusader Gauntlets (19) |
*------------------------------------------------------------------------*
| Greaves (4)          | War Boots (11)        | Myrmidon Greaves (21)   |
*------------------------------------------------------------------------*
| Plated Belt (5)      | War Belt (12)         | Colossus Girdle (23)    |
*------------------------------------------------------------------------*
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

Return to “Mods by Nefarius”