Giter VIP home page Giter VIP logo

Comments (5)

gucio321 avatar gucio321 commented on June 20, 2024

looks, like the game doesn't read a files only because of this issue.

from d2d2s.

gucio321 avatar gucio321 commented on June 20, 2024

also, the code actually calculates a checksum here but sadly in a wrong way 😢
here is also a checksum description

from d2d2s.

pairofdocs avatar pairofdocs commented on June 20, 2024

thrugg_aka_trogg on discord

I also used https://github.com/krisives/d2s-format#checksum as a reference

the way I did the checksum calc was
https://github.com/pairofdocs/d2s_edit_recalc/blob/master/edit_and_recalc.py#L11-L18

so I think if you set the four bytes of data[i] where the checksum is placed to 00s that calculation should work

data[12:16] = 0

// then the for-loop

        var sum uint32
        for i := range data {
		sum <<= 1
		sum += uint32(data[i])
	}

from d2d2s.

gucio321 avatar gucio321 commented on June 20, 2024

@pairofdocs thanks for link to your repo. I'll take a look.

I think, that I'm doing something wrong, because my checksum isn't equal to base sum but data are.
The game doesn't want to read my saves.
image

from d2d2s.

gucio321 avatar gucio321 commented on June 20, 2024

@pairofdocs I fixed it with your code! thanx a lot!
the problem was, that sum <<= 1 wasn't correct. this expression should look like:

                sum = ((sum << 1) % math.MaxUint32) | (sum >> (int32Size*byteLen - 1))

from d2d2s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.