gucio321 / d2d2s Goto Github PK
View Code? Open in Web Editor NEWDiablo II save files (.d2s) editor written in golang.
License: GNU General Public License v3.0
Diablo II save files (.d2s) editor written in golang.
License: GNU General Public License v3.0
for clearity, it could be cool, to add wrapcheck linter
hmm, this giant nolint
directive over the d2sitems/itemdata/item.go
looks.... strange
I think, that it should be cut.
IMO gomnd
could be left.
For now, all data in Stats
structure are uint64
s or float64
s
I think, that it could be something smaller
currently, items.go
wrapps d2s/d2s.go:ParseItemsList
We need to verify, if it is possible to encode this structure or it is needed to create a new decoder/encoder
getting strange issue while parsing data of the following items:
Currently no info about frequency of the behaviour
the save files has to contain a 32-bit checksum, because the game will not read them.
checksum needs to be calculated in the same way as file size
.
Hi
currently, app stores merc code in an uint16 format, but there are known merc types and we need to enumerate them.
see here
OpenDiablo2/OpenDiablo2 dependency is a wrong idea. there are 2 alternatives:
also need to split some long methods to avoid nolint
directives
Originally posted by @gucio321 in #8 (comment)
each quests has some status notes. We need to parse them into Quest structure.
see more here
Cannot open and write again (with no diff) a new file created by retail d2 lod 1.14d (see test failure).
It seems not working since at least v1.1
currently, attribute structure Name
field and Values
field
String
method should join them and instead of +{0} to Strength [5]
should print +5 to Strength
Currently, when we do:
ioutil.WriteFile("testchar.d2s", New().SetName("testchar").Encode(), 0o644)
package main
import (
"io/ioutil"
"github.com/gucio321/d2d2s/pkg/d2s"
)
func main() {
data, _ := d2s.New().SetName("testchar").Encode()
ioutil.WriteFile("testchar.d2s", data, 0o644)
}
there is a lot of connections between various fields in item
structure. IMO it needs an easy in use API
it is a time, to split this d2s
package into a several smaller ๐
+ d2s
+ d2sirongolem
+ d2smerc
+ d2sitems
+ itemdata
+ d2sdifficulty
e.t.c.
IMO names MagicalPrefix0, MagicalPrefix1 aren't correct ๐
Yo!
d2senums/skill_id.go
should contain enumeration of all skill IDs with its strings.
for list of them, see here
hmm. RareName1, RareName2 isn't ok
Yo!
datautils
was copied (and modified) from OpenDiablo2. It could be cool to get back to original base (using it as a dependency).
But base doesn't have some methods used here.
see OpenDiablo2/OpenDiablo2#1123
Hi there, I'd like to describe used in a project tests template.
each _test.go
file should look as follows:
testdata() map[*TestedType]binaryFormat
method.Test_Load(t *testing.T)
this method is really easy// declare testdata
td := testdata()
// testing loop
for key, value := range td {
// load tested structure using data (value) given
// in some cases, it could be necessary to create bitmuncher (datautils.CreateBitMuncher(value, 0) ) and pass it as an argument to load
s := New()
s.Load(value)
// then just use `assert` to check results
assert.Equal(t, key, s, "unexpected structure loaded")
}
Test_Encode(t *testing.T)
is also really simpletd := testdata()
for key, value := range td {
// encode tested structure into binary form (value)
data := key.Encode()
// use assert to detect differences
assert.Equal(t, value, data, "unexpected data encoded")
}
there is Item.ClassSpecific
substructure. We need to parse Data to something human-readable
d2sdifficulty.Difficulty
is a map-type. So I store pointer to it in main D2S
structure, but the problem is, that reffering to a pointer-map is a bit... strange. it looks like `(*p.d2s.Difficulty)[d2enum.DifficultyNormal]. I suggest to add some api for this stuff or reduce this noise in some other way
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.