Coder Social home page Coder Social logo

Mapping generates weird data about diablo2 HOT 7 CLOSED

blacha avatar blacha commented on June 2, 2024
Mapping generates weird data

from diablo2.

Comments (7)

blacha avatar blacha commented on June 2, 2024 2

Interesting I see the wine container I use has recently been updated maybe there are changes in that..

Hopefully I get a bit of time in the weekend to dig into this more!

Good to see it now works for you!

from diablo2.

mgalos999 avatar mgalos999 commented on June 2, 2024 1

@dyriddle @blacha I've raised a PR to update the README https://github.com/blacha/diablo2/blob/c625b03775e8524bd699fedea91ac5ec3bf191d0/packages/map/README.md

from diablo2.

mgalos999 avatar mgalos999 commented on June 2, 2024 1

I've got it working with that public docker image!
This should probably be the recommended way as it's actually really easy to get going.

I just had to do these commands:

docker pull blacha/diablo2
docker run -it -v "/E/Games/Diablo II":/app/game docker.io/blacha/diablo2:latest /bin/bash
wine regedit /app/d2.install.reg
wine bin/d2-map.exe game --seed 10 --level 1 --difficulty 0

I'm running Diablo with 1.14d patch and Project D2 installed.

Response is:

{"type":"map", "id":1, "name":"Rogue Encampment", "offset":{"x":5800, "y":5640}, "size":{"width":280, "height":200}, "objects":[{"id":147, "type":"npc", "x":25, "y":143}, {"id":150, "type":"npc", "x":78, "y":93}, {"id":155, "type":"npc", "x":56, "y":100}, {"id":154, "type":"npc", "x":24, "y":82}, {"id":148, "type":"npc", "x":122, "y":71}, {"id":119, "type":"object", "x":84, "y":69, "name":"Waypoint"}], "map":[[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [0, 1], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [1, 149], [1, 149], [1, 149], [1, 149], [1, 70, 2, 32, 2, 23, 2, 18], [1, 35, 1, 34, 2, 18, 1, 13, 2, 13, 2, 8, 3, 17], [1, 36, 1, 17, 10, 6, 2, 19, 1, 7, 1, 4, 2, 13, 3, 7, 3, 17], [1, 54, 10, 6, 2, 27, 2, 18, 3, 27], [1, 54, 10, 35, 
2, 18, 3, 27], [1, 9, 25, 16, 15, 34, 2, 13, 6, 29], [1, 9, 25, 16, 15, 34, 2, 13, 6, 29], [1, 9, 2, 3, 15, 22, 11, 37, 2, 13, 6, 29], [1, 9, 2, 3, 15, 22, 7, 41, 2, 13, 5, 30], [1, 9, 2, 3, 15, 23, 4, 43, 2, 13, 5, 30], [1, 9, 2, 3, 18, 7, 2, 58, 2, 13, 5, 30, 1, 1], [1, 9, 2, 3, 18, 7, 2, 
58, 2, 13, 4, 31, 1, 1], [1, 9, 2, 3, 18, 7, 2, 58, 2, 13, 3, 32, 1, 1], [1, 14, 15, 85, 3, 32, 1, 1], [1, 14, 15, 120, 1, 1], [1, 12, 9, 4, 4, 106, 2, 15], [1, 11, 10, 5, 2, 107, 2, 15], [1, 11, 10, 5, 2, 107, 2, 15], [1, 11, 10, 5, 2, 107, 2, 15], [1, 11, 10, 131], [1, 11, 10, 48, 14, 69], [1, 11, 10, 48, 14, 69], [1, 11, 10, 49, 13, 69], [1, 11, 10, 51, 11, 69], [1, 11, 10, 131], [1, 12, 7, 25, 13, 48, 27, 20], [1, 14, 4, 26, 13, 48, 27, 20], [1, 44, 2, 106], [1, 44, 2, 106], [1, 44, 2, 106], [1, 44, 2, 3, 4, 1, 1, 97], [1, 44, 2, 3, 4, 1, 1, 97], [1, 44, 2, 3, 4, 99], [1, 44, 2, 3, 4, 99], [1, 44, 2, 106], [1, 4, 18, 22, 2, 33, 2, 30, 13, 28], [1, 19, 1, 24, 2, 33, 3, 28, 17, 25], [1, 19, 1, 24, 2, 33, 3, 28, 19, 23], [1, 110, 19, 23], [1, 110, 19, 23], [1, 110, 18, 24], [1, 110, 18, 12, 1, 11], [1, 110, 17, 14, 1, 10], [1, 110, 17, 25], [1, 64, 4, 42, 17, 25], [0, 15, 1, 48, 6, 41, 17, 24], [0, 15, 1, 48, 6, 41, 17, 24], [0, 15, 1, 48, 6, 41, 17, 25], [0, 15, 1, 48, 6, 41, 17, 25], [0, 15, 1, 48, 6, 41, 17, 25], [0, 15, 1, 9, 2, 84, 16, 25], [0, 15, 1, 9, 2, 85, 15, 25], [0, 15, 1, 9, 2, 85, 14, 26], [0, 15, 1, 99, 11, 26], [0, 15, 1, 99, 11, 26], [0, 15, 1, 49, 3, 7, 2, 35, 14, 27], [0, 15, 1, 49, 3, 7, 2, 35, 3, 7, 5, 26], [0, 15, 1, 49, 3, 7, 2, 36, 2, 8, 4, 26], [0, 15, 1, 108, 2, 27], [0, 15, 1, 108, 2, 27], [1, 139, 2, 11], [1, 139, 3, 10], [1, 139, 3, 10], [1, 152], [1, 152], [1, 49, 13, 27, 2, 61], [1, 49, 13, 27, 2, 61], [1, 49, 13, 27, 2, 61], [1, 49, 12, 28, 2, 61], [1, 49, 11, 29, 2, 61], [1, 5, 2, 2, 18, 22, 11, 29, 2, 61], [1, 4, 3, 2, 18, 22, 11, 29, 2, 61], [1, 4, 3, 7, 6, 29, 11, 29, 2, 61], [1, 14, 8, 27, 11, 29, 2, 61], [1, 14, 9, 26, 11, 29, 2, 61], [1, 14, 14, 21, 12, 9, 17, 17, 13, 8, 14, 13], [1, 14, 14, 21, 5, 5, 2, 9, 17, 17, 13, 8, 14, 13], [1, 14, 14, 22, 3, 51, 2, 46], [1, 14, 12, 78, 2, 46], [1, 14, 11, 79, 2, 46], [1, 14, 9, 81, 2, 23, 4, 19], [1, 14, 8, 82, 2, 23, 4, 19], [1, 14, 8, 82, 2, 23, 4, 19], [1, 14, 8, 107, 4, 19], [1, 14, 8, 130], [1, 14, 5, 60, 6, 27, 6, 33], [1, 14, 5, 60, 6, 26, 7, 33], [1, 14, 4, 61, 6, 26, 7, 34], [1, 14, 4, 61, 6, 27, 1, 39], [1, 14, 4, 61, 6, 67], [1, 9, 2, 45, 6, 8, 2, 7, 6, 39, 1, 26], [1, 9, 2, 34, 1, 9, 7, 8, 2, 7, 6, 40, 1, 25], [1, 9, 2, 35, 1, 8, 7, 8, 2, 7, 6, 49, 3, 14], [1, 9, 2, 44, 7, 8, 2, 7, 6, 49, 3, 14], [1, 9, 2, 44, 7, 17, 6, 49, 3, 14], [1, 9, 18, 12, 2, 14, 7, 17, 6, 29, 3, 17, 3, 12, 1, 2], [1, 9, 18, 12, 2, 14, 7, 17, 6, 20, 1, 8, 3, 7, 2, 8, 3, 12, 1, 2], [1, 39, 2, 14, 7, 17, 6, 21, 1, 7, 3, 7, 2, 8, 3, 12, 1, 2], [1, 55, 7, 17, 6, 49, 3, 12, 1, 2], [1, 55, 7, 17, 6, 64, 1, 2], [1, 55, 7, 17, 6, 64, 1, 2], [1, 56, 6, 17, 6, 64, 1, 2], [1, 56, 6, 17, 6, 64, 1, 2], [1, 59, 2, 18, 6, 64, 1, 2], [1, 79, 6, 64, 1, 2], [1, 84, 2, 63, 1, 2], [1, 84, 2, 63, 1, 2], [145, 5, 1, 2], [145, 5, 1, 2], [145, 5, 1, 2]]}

I'll put this in my README PR.

from diablo2.

EternalNooblet avatar EternalNooblet commented on June 2, 2024

Could you try with this as the seed instead of 10?

Hex: 0x3607656c
Dec: 906454380

from diablo2.

dyriddle avatar dyriddle commented on June 2, 2024

So I got the mapping working on Windows (in docker) I wrote down all the steps I needed to get it working, should I raise a PR to update the README?

I would appreciate that. I hit some docker build issues probably related to WSL before giving up and doing it all on linux, but I would like to get the project working E2E on windows.

Edit: What version of windows/docker did you build with?

from diablo2.

blacha avatar blacha commented on June 2, 2024

I wrote down all the steps I needed to get it working, should I raise a PR to update the README?

Sure!

The object array gets all weird, I'm assuming this is the offsets not being correct so it's grabbing incorrect values.

That is super weird, generally if the offsets fail to load, everything fails with segmentation faults, I have never seen it outputting data like that.

I have pushed up a copy of a my current container to https://hub.docker.com/r/blacha/diablo2 this will still need a copy of the game.

I am using the current version of ProjectDiablo2 and just followed their install instructions from reddit.

from diablo2.

mgalos999 avatar mgalos999 commented on June 2, 2024

Could you try with this as the seed instead of 10?

Hex: 0x3607656c
Dec: 906454380

I tried wine bin/d2-map.exe game --seed 3607656c --level 2 --difficulty 0
Got gibberish again
{"type":"map", "id":2, "name":"Blood Moor", "offset":{"x":5600, "y":4600}, "size":{"width":280, "height":480}, "objects":[{"id":130, "type":"object", "x":172, "y":432, "name":"Well"}, {"id":2, "type":"object", "x":57, "y":412, "name":"Shrine"}, {"id":8, "type":"exit", "x":134, "},o1},j o,m [245 , 94,,43,[ 51 31 114,,[ ,13,3 991 1,797 3,22 8 0 3,,3 ,,,,178 ,, 3,93, 7,2 ,6]]]05,15 ,3 5632,2 0 ,,8,5 , ,, 57, ,3,,[27,291,2 2 ,,]01,2,117543 6 ,2,0,9, 46,,0,,,555, 7 ]]7,3,9,, ,[ ,,,,0,, ,52,7 4 ,[1, 23 ,8 ,2], , 5,][[ 7[62 ,, 7, ,9 2 ]7,52,7,7,7[, ,,,072 68 5, [,[7,,5, , 67 0,1, 36 191,[,,,12,18,6,2,3 ,, 70,[ 822, [ ,22 323]649715344, , 999,33 ],,]], ,6 466,633, ,56,1, ,4, 5 8 8,[80 1,, 728 6, 8,,155 ,7 6 ,0210 4051621 , 6, 842 5 ], 2 70 ,2,91,0 ,,4,,6,,72 ,,,,21 [123 84 ,,2 1578, 02][[,0322 8[,,,[2,] 8]7]7}

It's a bit strange, I also tried version 1.13b, 1.13c and 1.14d and they all yield similar results (but different gibberish).
I see comments mentioning v1.13 in d2_client.c

I'll try with your published docker container and see how that goes

from diablo2.

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.