Comments (5)
looks, like the game doesn't read a files only because of this issue.
from d2d2s.
also, the code actually calculates a checksum here but sadly in a wrong way 😢
here is also a checksum description
from d2d2s.
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 00
s 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.
@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.
from d2d2s.
@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)
- `d2sitems`: provide easy in use interface for creating items
- `d2scorpse`: add unittest
- `d2sdifficulty`: add some api?
- `d2sdifficulty`: unittests HOT 1
- `d2sirongolem`: unittest
- `d2smercenary`: unittest
- `d2snpc`: unittest HOT 1
- `d2sskills`: unittest HOT 1
- `d2sstats`: unittests HOT 1
- `d2sstatus`: unittest
- `d2swaypoints`: unittest HOT 1
- `d2sitems`: parse class specific data HOT 4
- Test template
- `d2sitems/d2smagicattributes` add `String()` method
- pkg structure: update to use golang-standards
- data reader/writer
- d2swidget: complete d2s editor
- possibility to create completely new data files which works with d2.
- cannot read and write created by d2 file properly
- d2sitems: cannot parse some itm's daat HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d2d2s.