Skip to content

Merge in features for v1.7d#8

Open
slayergod13 wants to merge 148 commits intounderbent:masterfrom
slayergod13:master
Open

Merge in features for v1.7d#8
slayergod13 wants to merge 148 commits intounderbent:masterfrom
slayergod13:master

Conversation

@slayergod13
Copy link

See the release notes on reddit

More technical notes though:

  • Shifted the usage of Stormlib directly into BH instead of in the injector. This allows the client to access the tables more easily and makes the code more portable and support other injectors. This was accomplished by shifting all of the core logic into another thread on injection. Since threads spawned inside the loader lock do not start until the loader lock is released this does not cause issues when the Stormlib is loaded.
  • A threadpool class was added for queueing up tasks that may be longer running to execute asynchronously.
  • Maphack doodads can be recycled across frames ('max ghosts' in the BH.cfg) this reduces the framerate impact of lots of doodads being rendered on screen
  • Item filter no longer uses exceptions as control flow, this results in slightly improved speed for this feature.
  • Auto inject feature and cpu overusage patches merged in from Clucksoft.

- Can now read lines of arbitrary length
- Fixed a bug where lines with a single '/' would be truncated instead of waiting for a double slash "//"

StashExport
- New Module Capable of exporting the current characters inventory in JSON or custom formats using mustache templates
- Templates can be specified in the BH.cfg using mustache syntax: https://mustache.github.io/mustache.5.html
     - Subset of mustache implemented:
          - Literals
               - Support for SOME escape characters added (\r\n\t)
          - Variables
          - Partials
              - Added ability to isolate the child scope to prevent infinite recursion in partials (the context would no longer have access to its parent context)
              - {{>partial}} {{>>isolated-partial}}
          - Sections
               - Inverse
               - Conditional (for truthy values)
               - Iterator (for arrays)
               - And some new additions:
                    - Comparisons:
                         - String Equality: {{#key=value}}
                         - String Inequality: {{#key!value}}
                         - Float Greater: {{#key>value}}
                         - Float Less: {{#key<value}}
                         - String In Set: {{#key$value1|value2|value3}}
                         - String Not In Set: {{#key^value1|value2|value3}}
- Added several data structures to support the StashExport module
     - JSONObject - Used to contain the item data in a generic fashion, also makes the templating MUCH easier
     - TableReader/Table - Used to read the txt/tbl files in the data directory, these files are used for parsing the item stats
     - MustacheTempalte - Used for templating text

D2Structs
- Adjusted some structures to better state the purpose of some previously "unknown" or unspecified bytes

ScreenInfo
- Added display for current/added/rate of gain for experience
     - BH Toggle: "Experience Meter"
Removed unnecessary data files
…de the loader lock.

The injection process is now two-fold:
1) Inject the dll as normal
2) Inject a function call to the new BH::Initialize method

This has 2 benefits:
1) The injected dll can now safely load dlls of its own
2) This appears to have led to a mild performance increase
BH.Injector now loads BH.dll to create the temporary mpq exports.

BH will load the mpq data in another thread so that the gameplay is not affected while it is loading.
Started shifting the maphack display calculation to a background thread
Needed to make destructor virtual and fix the collection cleanup.
Further refactored the Injector to no longer require loading any other dlls.
…nous ghosting

Playing around with call signature of game loop to try to fix a crash when loading act 5
Can now select between export templates
Can now set default export template
Added comparison support for json objects
… property, useful for gems and runes.

Fixed a bug with json writer formatting where it was not escaping properly
The "stash" directory will be created if it does not exist
Stash export willnow print the path to the exported file
un"fix"'d the gameloop thing, as it proved to be unnecessary
shifted the export type dropdown a bit
add configuration item for max ghosts
planqi and others added 30 commits June 13, 2017 12:41
- Add extra setup layer, in case of uncooperative compiler.
- Remove unused pointer with a silly name.
- Injector *should* detect game version and use an offset based on the game version.
- Add 1.13d pointers for patches.
- 1.13d pointers in D2Ptrs.h are not added yet.
- Correct naming issue with ChatInputBox.
- Caused by not declaring static offsets.
- Remove redundant poiter declaration and fixing another.
Add 1.13d compatability; fix ItemMover to work with any res
Skill tabs and class skills are now supported with GOODSK and GOODTBSK.
The good values are set in the configuration file.

Combined stats can be done with a + like STR+DEX+FRES>49.
Currently supported values are STR, DEX, LIFE, MANA, FRES, LRES, CRES,
PRES.

Several keys changed, now FRES, CRES, LRES, PRES for poison.
ALL_RES and ELE_RES have been removed and are supported with the
combined stat system.
GOOD_SKILL and GOOD_TBSK are now supported withe the GOODSK and GOODTBSK
system in the configuration file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants