Source Code Statistics

Threads that no longer serve a purpose. Read-only.
User avatar
whist
Team Member
634 | 557
Legendary Popularity Badge
Has a thread with over 250.000 views
Legendary Love Badge
Earned over 500 cookies
Legendary Contribution Badge
Median XL Team Member
I'm putting this here for whoever it might interest. I won't be updating this daily. This will probably get updated whenever I post screenshots in the screenshot thread.

Image

Resumed change log:

The following change log is a shortened and resumed list of all changes that's been done to the code. Some may have been forgotten, or intentionally omitted as they would be too difficult to explain. It is also to note that some of the listed changes might have actually required many various changes to the code in order to be achieved. This change log is purely meant to give a general idea of what's been done.

Limitations
  • States are no longer limited to 255 records and were expanded to a possibility of at least 32,767 records
  • Unique & set items are no longer limited to 4095 records and were expanded to a possibility of at least 32,767 records
  • Characters .d2s save file size limit is no longer limited to 8192 bytes and was expanded to a possibility of 24,576 bytes (theoretically unreachable)
  • Levels are no longer limited to 136 records, and were expanded to a possibility of 255 records (soon to be expanded up to 1024)
  • Item desc code rewritten from scratch, getting rid of it's numerous buffer overflows (items that crash the game when they have too much text)
  • The client will now display real values for life, mana & stamina when they go over 32,767
  • Many things involving strings had their buffer increased, getting rid of 256 characters limits
  • Object code expanded, allowing us to create new objects and add new preset objects (up to 32,767 objects)
  • Removed the 256x256px per frame limit on DC6 images
  • Red portals were enabled to travel across different acts

Workarounds for still-present limitations
  • Reworked how mystic orbs work, allowing us to add as many mystic orb types as we wish, wasting only one stat for all of them (instead of one stat per orb, which really did take lots of stats)
  • Added a new item desc func, which allows us to create as many "desc only stats" as needed, using only one single stat (instead of one per desc lines)

Bugs & "It's not a bug it's a feature"
  • Unique items with a rarity of 0 is no longer treated as a rarity of 1 and therefore now works like it should
  • Portals now correctly retrieves the level name, getting rid of the "no level name" bug (not really a bug, they just hardcoded every damned portals instead of doing it properly)
  • removed a bug that would crash the game if a charm had no available affixes (????)
  • Removed the "druid can't directly die while morphed" bug
  • Game no longer picks from the normal monster pool to spawn bosses in hell difficulty (astro boss pack bug)
  • Killing the cow king no longer denies access to the secret cow level (actually the function opening the portal isn't used anymore and was replaced by a custom one)
  • The game no longer uses the same value for starting mana & energy on character creation
  • Fixed a bug that randomly caused players to resurrect after death on client-side only, locking them into a "ghost" state
  • Fixed a bug that made aura and state on items not re-apply after death
  • Fixed a bug with level palettes and act palettes

Performance gains, improvements, general new features, etc.
  • Implementation of user-theming. More details here
  • Many settings that were previously read from register keys are now read from a config file (.d2c format file) and is now specific to the mod
  • Level entrance text (entering <insert level name>) no longer uses images to display (performance gain, easier to modify, less memory & filesize usage, etc)
  • Player death text no longer uses images to display (same reasons as mentioned in previous change)
  • Many useless, barely used GUI stuff was removed, such as the help screen, new stats & skills buttons, etc. (too many to list), potentially saving lot of memory usage, CPU usage, leading to potential performance gains
  • Bounty task system implemented. more details here
  • Rewrote legacy code handling data files that were using direct strings instead of strings from the tbl (levels.txt for example)
  • Removed sprite limit
  • Fixed a bug where invisible sprites actually were drawing an invisible image, wasting performance

GUI & Interface interaction
  • Game resolution increased in all three video modes, in both windowed and full-screen mode, to 1024x768
  • 95% of game's GUI code rewritten in order to fit the new resolution, add & expand features, etc
  • Stat screen GUI code fully replaced from scratch (only skill DescDam code was left untouched)
  • Bottom panel GUI code fully replaced from scratch
  • Skill tree GUI code replaced from scratch (except for the skill desc handler, didn't feel the need)
  • Party Screen GUI replaced from scratch
  • Quest Screen GUI replaced from scratch
  • Mini Panel GUI replaced from scratch & expanded
  • Skill select GUI replaced from scratch & expanded to allow unlimited rows/columns
  • Mercenary GUI replaced from scratch & expanded to display merc abilities
  • Imbue, Socketing, Personalize and Horadric GUI replaced from scratch
  • Merchant store GUI replaced from scratch, added refresh button in gamble
  • Quantity & Durability warning GUI replaced from scratch and converted into push notifications
  • New push notification system
  • Durability warnings converted into push notifications
  • Quantity warnings converted into push notifications
  • Add friend button added to party screen
  • Many GUI pages added
  • Inventory items drawing function rewritten in order to allow animated item graphics
  • Added configurable hotkey to transmute when using horadric cube
  • Magic damage now displays in orange, instead of displaying in blue (like cold damage)
  • Implementation of animated GUI elements (resource orbs for example)
  • Different resource orb for every classes (as in Diablo III)
  • Animated & bigger life & resource orbs
  • Animated home splash screen. Preview video here
  • Togglable notifications for gold transactions (pickup, drop, buy, sell)
  • Rewrote unit hovering code from scratch, to add, modify and improve various features and formatting
  • Rewrote the automap unit display code in order to expand it as we wish
  • Togglable persistent health bars over monsters
  • Boss-fight health bars
  • Togglable active buffs/debuffs display
  • Unit hover desc code fully replaced from scratch
  • Expanded ALT show all items code to really display every items + integrated configurable drop filter
  • And much more, there's really too much to list for GUI changes...

Hardcoded -> Softcoded
  • Extended the data tables loading & free'ing process, in order to add new data tables, new linkers, expand existing ones, etc.
  • Softcoded which item quality can have runewords (qualities.txt)
  • Softcoded which item quality receives automagics (qualities.txt)
  • Softcoded the chance for items to spawn as ethereal, also making it quality-specific (qualities.txt)
  • Softcoded which levels are town levels (appended to levels.txt)
  • Softoced special level effects, such as arcane stars, summit view, etc. Also expanded to add custom effects (appended to levels.txt)
  • Softcoded which stats display in the stat screen, along with their positioning, coloring, etc (statscreen.txt)
  • Softcoded the column/row positioning of skills in the skill tree, while also extending it to handle more than 3 columns and 6 rows (skilltree.txt)
  • Softcoded special monsters overlays, while also allowing to apply this to any monster, saving states and allowing us to create more graphical effects (also made it possible to use a different overlay when the monster is a boss) (monstats3.txt)
  • Softcoded special boss death effects, while also extending to to be applied on any monster of our choice, without using on-death skills which do not always work (monstats3.txt)
  • Softcoded which units appear on the automap, while extending it to allow a control over colors, whether the name appears, etc (monstats3.txt)
  • Softcoded the monster lifebar stuff, allowing us to color names without color codes, and also allowing us to choose whether to display a lifebar or not at all (monstats3.txt)
  • Softcoded cube outputs such as the secret cow level portal, allowing us to add new ones easily (new output tokens in cubemain.txt)
  • Softcoded and expanded a lot of stuff related to summons, while also combining features from other summoning functions, all into one and only skill func. (we can now do stuff such as caster summons that follow you, group summons, temporary summons, etc) (skills.txt & skills2.txt)
  • Ability to make any skill ignore spell dmg% modifier bonuses (Skills2.txt)
  • Allowed in-game reloading of some txt files (without leaving the game) [ debug feature ]

Rewritten handlers
  • Item spells handler
  • D2GS Packets handlers (server & client)
  • ItemEventFuncs handler
  • Object operate & init handlers (server only)
  • Missiles srvdofunc handler
  • Item desc funcs handler (was actually inlined into the item desc code)

Skills
  • spell timers are now skill-specific, along with the possibility to group skills into one spell timer group
  • passive stats fields now allow the use of param fields, allowing us to use layered stats properly (reanimate, etc)
  • Built-in application of summon bonus stats, saving many slots for actual stats application on summons (in other words, stuff like +x% to summoned minions damage is now handled directly in the skill function. it's also possible to exclude specific summons from this rule)
  • Rewrote the skill resource usage (for now it was left as-is, but this will allow us to eventually implement new skill usage rules/functionalities, kinda like blood mana or whatever. for example, skills using stamina, or gold, etc)
  • Implementation of one global skill srvdofunc for every summoning skills, merging every summoning skills functions into one, and also implementing new features to it
  • Added real magic spell dmg% modifier
  • New txt field that defines whether to ignore or not spell dmg% modifiers on skills
  • Oskill extra level requirement removed
  • Town portal scrolls were removed, addition of a new skill function to open a town portal

Stats, Combat, etc
  • Physical immune monsters are no longer affected by open wounds (may or may not get implemented)
  • Rewrote open wounds damage calculation
  • Over 100 ItemStatCost lines free'd from various code extending (scattered here and there in this change log)
  • Added a stat that allows runewords in an item even if it's base quality usually doesn't allow it
  • Added a stat that can make an item class specific (even if the original item wasn't), also allowing mercenary only items
  • Implemented a "attacker takes magic damage of" ItemEventFunc
  • %ctc stats now check the spell timers
  • New stat for monsters that divides incoming damage, allowing us to emulate very high life bosses
  • Fixed item_lightcolor stat

Items
  • item right-click functions (item spells) now check level requirements
  • item spell aim code extended, allowing us to use custom aim cursors for any item spell that requires aiming
  • Implementation of various new item spell types
  • Gold is automatically picked up when you walk over it
  • Implementation of item dyes (ability to color your items as you wish)
  • Runeword code rewritten from scratch to implement new functionalities, and simplify how runewords are created in files
  • Rewrote the "hold-alt" code from scratch to implement a fully configurable drop filtering functionality along with enabling it to display more items at once
  • Implemented legacy item auto-updating
  • Implemented conditionally class-specific items, along with mercenary only items
  • Items always drop identified

Multiplayer & Networking
  • Added bunch of administration related stuff directly in-game
  • Implementation of MySQL for various purposes
  • Implemented various anti-cheating stuff such as rust storm, legacy items deletion, etc (also logs caught cases)
  • PVP system fully reworked. For now only the core is done and this will not be implemented into the initial release
  • Addition & Modification of many D2GS packets (this also acts as a counter to currently existing hacks in a way, even if it was not the intent)
  • Allowed more "server-wide" events, such as the diablo clone event. Although no actual event was coded so far
  • Entirely recoded & fixed Diablo clone world event. more details here
  • Disabled realm selection to make the mod TSW exclusive (it was already done via a trick from marco but meh, mine is a little more efficient)
  • Player parties are now assigned automatically by the server (how it is assigned depends on the game type)
  • Player account is now fully transmitted to client and held in D2RosterUnitStrc
User avatar
whist
Team Member
634 | 557
Legendary Popularity Badge
Has a thread with over 250.000 views
Legendary Love Badge
Earned over 500 cookies
Legendary Contribution Badge
Median XL Team Member
Updated 2018-10-14