• 1

    posted a message on Chat-system for DiabloFans.com
    Could you tell us where in the process you are at in creating this? (That looks so grammatically wrong, but I don't care.)
    Approximately 70% complete; the client software is complete which was the most time-consuming task as I despise the language it's written in (Java). I'm working on the server at the moment.
    Posted in: Site Feedback
  • 1

    posted a message on Diablofans Gaming Networks over Hamachi!
    I do not think Eastern Sun would run on Open Battlenet anyway since it is a 1.10 mod only since it uses d2mods plugin manager. The mac version of the mod also has modified code due to the full inventory for the mercs and a few other code changes.
    Sslong as both players have the same version there will be no problems. Again, all Open Battle.net does is advertise your game (name:address) nothing else. The only case where it would not work would be if the mod stripped the Battle.net functionality.
    Posted in: Diablo II
  • 1

    posted a message on High Resoutions
    Diablo II is a raster game; it's rendered at a specific resolution, as unlike with vector graphics, cannot be dynamically scaled (atleast not elegantly)

    That being said, as all that program is doing is exposing further worldspace I would not suggest you use it on Battle.net as it's beyond simple to detect (Warden, last time I looked, does check the region of memory that program modifies... infact, it shouldn't even work with Battle.net)

    In regards to the resolution vs "size", it simply depends on the pixel density within a physical area of the display; with vector games these semantics are abstracted and thus everything will appear the same physical size up to the monitor's native resolution (the benefit ofcourse being greater detail due to the greater number of discernable points)
    Posted in: Diablo II
  • 1

    posted a message on Diablo 2 Windows 7
    The significance of 25 is that Diablo II's physics operates at a constant 25Hz; this is the premise that "breakpoints" are derived from (1frame = 40ms). That being said, unless your frame-rate drops below 25 there will be no hinderence to your gameplay.

    The 25Hz limit also applies to graphical display; the majority of animations are actually sampled at 16Hz (the exception being bosses and player characters of whom exploit the entire spectrum)

    As the game does not employ any form of interpolation for graphical display there is no rational reason to desire a frame-rate above 25 unless your monitors refresh rate is not a multiple of 25, in which case you should pass the -vsync argument to the game (as you would -w for windowed mode) to avoid tearing.
    Posted in: Diablo II
  • 1

    posted a message on Can I run Diablo 3?
    Yet another ignorant person. Can a mod close this thread?
    The issue can not be resolved because there is not enough information as of yet. And the things we do know are ignored by 90% of the people claiming that D3 will run on anything. >.>
    My assertion is based on my observations inferred from experience in developing 3D rendering software; what exactly gives you authority on this subject?
    Posted in: Diablo III General Discussion
  • 1

    posted a message on A bit of help from code experts
    You can contact me if you're in need of help with parsing .D2S files (or any other technical information regarding Diablo II for that matter)

    In regards to your specific issue, the bulk of the file is static except for the stats section and the items. The stats section is very straight-forward to parse; each entry begins with a 9-bit identifier followed by the value (of which's length can be gleamed from d2_patch.mpq/global/excel/ItemStatCost.txt)

    Below is taken from a project of mine that you may find helpful.

    /*
     * D2SDecode.cpp
     * =============
     * Version: 1.0
     * Author:  Matt.J
     *
     *
     * Description:
     *   Provides an interface for dealing with Diablo II save-files (.D2S)
     *
     *
     *********************************************************************************************************************/
    #include "D2SDecode.h"
    using namespace D2S;
    
    
    
    
    
    
    /////////////////////////////////////////////////////////////////////
    // Internal Functions
    /////////////////////////////////////////////////////////////////////
    Dword STDCALL ReadBits(Void* pStream, Dword dwOffset, Dword dwSize);
    
    
    
    
    
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    //
    // General Routines
    //
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    
    Void FASTCALL D2S::Decode(Game::Player* pPlayer, Byte* pD2S)
    {
        Dword dwOffset = 0;
        Dword dwStatId;
        Dword dwStatVal;
    
    
        // Save class.
        pPlayer->Character.wClass = ((D2SBase*) pD2S)->Class;
        pPlayer->Character.wLevel = ((D2SBase*) pD2S)->Level;
    
        // Traverse to the start of player stats.
        pD2S += sizeof(D2SBase);
        pD2S += ((D2SQuest*) pD2S)->wSize;
        pD2S += sizeof(D2SWaypoints);
        pD2S += ((D2SNPC*) pD2S)->wSize;
        pD2S += 2; // Skip 'gf'
    
        // Reset total stat count.
        pPlayer->Character.wStatsUsed = 0;
    
        // Decode stats and store in the given Player.
        while((dwStatId = ReadBits(pD2S, dwOffset, 9)) != 511)
        {
            // Read the stat value.
            dwStatVal = ReadBits(pD2S, (dwOffset += 9), SIT[dwStatId].Size);
            dwOffset += SIT[dwStatId].Size;
    
            // Adjust for Diablo II's bullshit.
            dwStatVal = (SIT[dwStatId].Div ? (dwStatVal / SIT[dwStatId].Div) : dwStatVal);
    
            // Save.
            switch(dwStatId)
            {
                case 0: pPlayer->Character.wStr = (Word) dwStatVal; break;
                case 1: pPlayer->Character.wNrg = (Word) dwStatVal; break;
                case 2: pPlayer->Character.wDex = (Word) dwStatVal; break;
                case 3: pPlayer->Character.wVit = (Word) dwStatVal; break;
                case 4: pPlayer->Character.wStats = (Word) dwStatVal; break;
                case 5: pPlayer->Character.wSkills = (Word) dwStatVal; break;
                case 6: pPlayer->Character.dwCurLife = dwStatVal; break;
                case 7: pPlayer->Character.dwMaxLife = dwStatVal; break;
                case 8: pPlayer->Character.dwCurMana = dwStatVal; break;
                case 9: pPlayer->Character.dwMaxMana = dwStatVal; break;
            }
    
            // Total stat counter.
            if(dwStatId < 4) pPlayer->Character.wStatsUsed += ((Word) dwStatVal);
        } dwOffset += 9;
    
        // Traverse to skills, stats assumed to be padded to the next byte.
        pD2S += (dwOffset / 8) + ((dwOffset % 8) ? 1 : 0);
    
        // Verify header integrity.
        if(((D2SSkills*) pD2S)->strTag[0] != 'i' || ((D2SSkills*) pD2S)->strTag[1] != 'f')
        {
            // ERROR:
            Out("[ERROR] Failed to find 'if' header.");
            return;
        }
    
        // Count total skill points used.
        pPlayer->Character.wSkillsUsed   = 0;
        pPlayer->Character.wHighestSkill = 0;
    
        for(Int i = 0; i < 30; i++) 
        {
            pPlayer->Character.wSkillsUsed += ((D2SSkills*) pD2S)->Level[i];
            pPlayer->Character.wHighestSkill = (((D2SSkills*) pD2S)->Level[i] > pPlayer->Character.wHighestSkill ? ((D2SSkills*) pD2S)->Level[i] : pPlayer->Character.wHighestSkill);
        }
    
        // Offset based on class.
        dwOffset = (BST[pPlayer->Character.wClass].Str + BST[pPlayer->Character.wClass].Dex + BST[pPlayer->Character.wClass].Vit + BST[pPlayer->Character.wClass].Nrg);
        pPlayer->Character.wStatsUsed = (Word) (pPlayer->Character.wStatsUsed > dwOffset ? (pPlayer->Character.wStatsUsed - dwOffset) : 0);
    }
    
    
    
    
    
    
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    //
    // Helper Functions
    //
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    
    NAKED Dword STDCALL ReadBits(Void* pStream, Dword dwOffset, Dword dwSize)
    {
        __asm
        {
            // PROLOGUE:
            push ebx
    
            // Calculate the bytewise offset, and remainder.
            mov eax, [esp+8]
            mov edx, [esp+12]
            mov ecx, 7
            and ecx, edx
            shr edx, 3
    
            // Read in the containing dword.
            mov ebx, [eax + edx]
    
            // Compensate for the offset.
            shr ebx, cl
    
            // Generate a mask for the significant bits of the desired sequence.
            mov ecx, [esp+16]
            mov eax, 1
            shl eax, cl
            sub eax, 1
    
            // Extract the result.
            and eax, ebx
    
            // EPILOGUE:
            pop ebx
            ret 12
        }
    
    }



    /*
     * D2SDecode.h
     * ===========
     * Version: 1.0
     * Author:  Matt.J
     *
     *
     * Description:
     *   D2SDecode module interface.
     *
     *
     *********************************************************************************************************************/
    #ifndef D2SDECODE_H
    #define D2SDECODE_H
    #include "Master.h"
    
    
    
    
    
    
    /////////////////////////////////////////////////////////////////////
    // D2SDecode Module
    /////////////////////////////////////////////////////////////////////
    
    namespace D2S
    {
        /////////////////////////////////////////////////////////////////////
        // D2S Structures
        /////////////////////////////////////////////////////////////////////
    
        struct D2SBase
        {
            Dword dwTag; /* 0x55AA55AA */
            Dword dwVersion;
            Dword dwSize;
            Dword dwCRC;
            Dword dwWeaponSet;
            Char  strName[16];
            Byte  Type;
            Byte  Title;
            Word  wUnknown1;
            Byte  Class;
            Word  wUnknown2;
            Byte  Level;
            Dword dwUnknown3;
            Dword dwTimeStamp;
            Dword dwUnknown4;
            Dword dwHotkey[16];
            Dword dwLeftSkill1;
            Dword dwRightSkill1;
            Dword dwLeftSkill2;
            Dword dwRightSkill2;
            Byte  Outfit[16];
            Byte  Colors[16];
            Byte  NTown;
            Byte  MTown;
            Byte  HTown;
            Dword dwMapSeed;
            Word  wUnknown5;
            Byte  bDeadMerc;
            Byte  Unknown6;
            Dword dwMercSeed;
            Word  wMercName;
            Word  wMercClass;
            Dword dwMercExp;
            Byte  Unknown[0x90];
        };
    
        struct D2SQuest
        {
            Char  strTag[4]; /* Woo! */
            Dword dwActs;
            Word  wSize;
        };
    
        struct D2SWaypoints
        {
            Char strTag[2]; /* WS */
            Byte Unknown[6];
            Dword dwData[3*6];
        };
    
        struct D2SNPC
        {
            Char strTag[2]; /* w4 */
            Word wSize;
        };
    
        struct D2SSkills
        {
            Char strTag[2]; /* if */
            Byte Level[30];
        };
    
        struct D2SItems
        {
            Char strTag[2]; /* JM */
            Word wItems;
        };
    
    
        /////////////////////////////////////////////////////////////////////
        // Stat Information Table
        /////////////////////////////////////////////////////////////////////
    
        CONST struct
        {
            Byte Size;
            Word Div;
            Char* pstrName;
        } SIT[] = 
        {
            10, 0, "Str",
            10, 0, "Nrg",
            10, 0, "Dex",
            10, 0, "Vit",
            10, 0, "Stat Points",
            8,  0, "Skill Points",
            21, 256, "CurLife",
            21, 256, "MaxLife",
            21, 256, "CurMana",
            21, 256, "MaxMana",
            21, 256, "CurStamina",
            21, 256, "MaxStamina",
            7,  0, "Level",
            32, 0, "Experience",
            25, 0, "Invo Gold",
            25, 0, "Stash Gold",
        };
    
    
        /////////////////////////////////////////////////////////////////////
        // Base Stat Table
        /////////////////////////////////////////////////////////////////////
    
        CONST struct _BST
        {
            Char* pstrClass;
            Byte Str;
            Byte Dex;
            Byte Vit;
            Byte Nrg;
            Byte Life;
            Byte Mana;
            Byte LifePerLvl;
            Byte ManaPerLvl;
            Byte LifePerVit;
            Byte ManaPerNrg;
        } BST[] =
        {
            /* Ama */ "Amazon",      20, 25, 20, 15, 50, 15, 8, 6, 12, 6,
            /* Sor */ "Sorceress",   10, 25, 10, 35, 40, 35, 4, 8, 8, 8,
            /* Nec */ "Necromancer", 15, 25, 15, 25, 45, 25, 6, 8, 8, 8,
            /* Pal */ "Paladin",     25, 20, 25, 15, 55, 15, 8, 6, 12, 6,
            /* Bar */ "Barbarian",   30, 20, 25, 10, 55, 10, 8, 2, 16, 4,
            /* Dru */ "Druid",       15, 20, 25, 20, 55, 20, 6, 8, 8, 8,
            /* Ass */ "Assassin",    20, 20, 20, 25, 50, 25, 8, 6, 12, 7,
        };
    
    
        /////////////////////////////////////////////////////////////////////
        // Exposed Routines
        /////////////////////////////////////////////////////////////////////
        EXTERN Void FASTCALL Decode(Game::Player* pPlayer, Byte* pD2S);
    }
    
    
    #endif
    Posted in: Diablo Tools
  • 1

    posted a message on Where does Diablo stands in your top 5 games?
    1. Might & Magic VII
    2. Might & Magic VI
    3. Diablo II
    4. Perfect Dark (N64)
    5. Age of Empires II: The Conquerors (PC)
    Posted in: Diablo II
  • To post a comment, please or register a new account.