unique item filter

Threads that no longer serve a purpose. Read-only.
ticktick
Sasquatch
64 | 9
not much has changed in msvc between 2012 and 2015 so it will probably just work with VS express edition.

yup works fine w/ VS 2015 Community Edition Update 3. Just make an empty project, add all the files, and change the output type from exe to dll.
User avatar
krys
Rust Claw
81 | 11
Common Popularity Badge
Has a thread with over 10.000 views
@ticktick: I did exactly that, only with VS Express 2012, but when I inject produced dll it doesn't work :/
User avatar
void
Shadowgate Totem
1776 | 98
Common Posting Badge
Posted over 1.000 messages
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
krys wrote:@ticktick: I did exactly that, only with VS Express 2012, but when I inject produced dll it doesn't work :/

how many kb size is that dll?

apparently when i complile it on g++ with compiler warning turned off, changed syntax in the scripts, compiling only *.cpp, it produces a dll with 24kb size, while the original is smaller, and of course, that dll doesnt work

gieb virtual studio 201x makefile
User avatar
krys
Rust Claw
81 | 11
Common Popularity Badge
Has a thread with over 10.000 views
I tried it again and this time it worked (dll has 14kB)

dunno if this will help you:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{F7C4F787-F9F2-4C2B-ABA5-4ABD567E98FE}</ProjectGuid>
    <RootNamespace>D2DropFilter</RootNamespace>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v110</PlatformToolset>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v110</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <TargetExt>.dll</TargetExt>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <TargetExt>.dll</TargetExt>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>Disabled</Optimization>
      <SDLCheck>true</SDLCheck>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClInclude Include="D2Constants.h" />
    <ClInclude Include="D2DataTables.h" />
    <ClInclude Include="D2DropFilter.h" />
    <ClInclude Include="D2PacketDef.h" />
    <ClInclude Include="D2Patch.h" />
    <ClInclude Include="D2PatchStubs.h" />
    <ClInclude Include="D2Ptrs.h" />
    <ClInclude Include="D2Structs.h" />
    <ClInclude Include="D2Vars.h" />
    <ClInclude Include="DLLmain.h" />
    <ClInclude Include="TemplateIncludes.h" />
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="D2DropFilter.cpp" />
    <ClCompile Include="D2PatchStubs.cpp" />
    <ClCompile Include="DLLmain.cpp" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>


simple patch to show rare amulets,rings and jewels (download dll)

Code: Select all

//RARE RING & AMU & JEWEL
   if ((pItem->pItemData->dwQuality == 0x06) && (dwCode == CODE32('rin ') || dwCode == CODE32('amu ') || dwCode == CODE32('jew '))) {
      return TRUE;
   }
 
Edited by krys 8 years.
Akak_
Pit Knight
109 | 0
gj! ty vm for it, keep up the great work, too bad i was so lasy to do it by myself
imho no1d mind if ud add some shrines whitelisted as well (tho not sure if its possible)

p.s. wow, void, good logic:) i like that way very much btw, brilliant!!
Edited by Akak_ 8 years.
User avatar
void
Shadowgate Totem
1776 | 98
Common Posting Badge
Posted over 1.000 messages
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
@krys nope, not helping. appreciate the effort tho :D
not only cant i find simple enough information about how to compile as dll (probably doing it wrong) but there is also errors with the ptr files preprocessor commands, and frankly i dont understand how (## makes any sense at all...

either way since this ladder a lot of stuff is useful to find id make it pick differently

Code: Select all

//what not to pick FALSE

TRUE //everything else

so it shows everything (no need to define what that is) except what you dont want to see, even if it just disables gold and tp drops it helps
User avatar
void
Shadowgate Totem
1776 | 98
Common Posting Badge
Posted over 1.000 messages
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
i just dont get it. i changed the file around which is hopefully true to what its supposed to do, no errors at all, and still... compiling it still gives a dll thats much larger than the release, opening it using resource hacker doesnt show any menu (release dll does have one), and obviously it doesnt work. no idea what to do about it. would be nice to have d2template and drop filter for other compilers but apparently "no"
User avatar
void
Shadowgate Totem
1776 | 98
Common Posting Badge
Posted over 1.000 messages
Great Popularity Badge
Has a thread with over 50.000 views
Common Love Badge
Earned over 20 cookies
Common Guide Badge
Created a complete character guide
anyone can make this into at&t assembly?
it can compile with intel, but its problematic

Code: Select all

      cmp dword ptr [esi], 0x04
      jnz EXIT

      mov ecx, esi
      call DROPFILTER_Main
      cmp eax, 0x00000000
      je EXIT

      jmp [D2CLIENT_6FB09087]

      EXIT:
      jmp [D2CLIENT_6FB09419]
ticktick
Sasquatch
64 | 9
i was going to post a link to what i forked on gitlab w/ a working settings file but https://twitter.com/gitlabstatus ...
"We accidentally deleted production data and might have to restore from backup."

edit:

https://1drv.ms/u/s!As6d2sUj3-ltj2in2u9-qgZ_w-Oh
it requires windows 8+ and msxml6. If you have windows 10 it will probably just work.
source and compiled dll is in there. I only did some minor testing.
a sample configuration file is in bin.zip and must be located next to the dll. It is case sensitive. all numbers are assumed hex. includes and excludes are first looked up in the dictionary, if nothing matches, then they are assumed to be a hex number.
you can include & exclude items by quality (set, unique, etc.) and by code (specific item).
If you only have Includes, it will filter out everything that doesn't match an include.
If you only have excludes, it will filter out everything that matches an exclude.
If you have both includes and excludes, it will filter out everything that doesn't match an include or does match an include but also matches an exclude.
You can edit the config file while playing and it will re-parse it whenever changes are saved. If parsing fails it will just continue with the previous settings.
I offer no warranties, yadda yadda yadda. use at your own risk.

I can answer questions tomorrow after work.

someone else make a good config file.
DeaTh
Cog
206 | 16
void wrote:anyone can make this into at&t assembly?
it can compile with intel, but its problematic

try this answer on SO.
For naked attribute I use this:

Code: Select all

#ifdef __GNUC__
#define ATTRIBUTE_NAKED __attribute__((naked))
#else
#define ATTRIBUTE_NAKED __declspec(naked)
#endif

ATTRIBUTE_NAKED void __stdcall PATCH_DropFilter() {
...


I started to rewrite the code for gcc, but now a lot of work.

PS unpacked old median txt files if someone need.