Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
/ d2mapapi Public archive
forked from jcageman/d2mapapi

d2 map rest API to retrieve the map layout per area given a map seed

Notifications You must be signed in to change notification settings

Adephx/d2mapapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

d2mapapi

Diablo II map rest API to retrieve the map layout per area given a map id.

A diablo 2 1.13C installation is required, but the result returned by this API should work for all versions of diablo 2, since the map generation has stayed the same across all verisons.

Note: for 1.09 and lower, higher difficulties do not generate larger maps, hence when interfacing with the API, always use difficulty normal.

Installation

This project assumes you have VS2022 installed with .NET 8.0 and C++ workloads.

Usage Examples

./D2Map.Api.exe Diablo2Directory="C:\Diablo II1.13c"
./D2Map.Api.exe --urls https://localhost:8080 Diablo2Directory="C:\Diablo II1.13c"
./D2Map.Api.exe --urls https://0.0.0.0:8080 Diablo2Directory="C:\Diablo II1.13c"

Note: to run from source use dotnet run or simply start the project from visual studio.

Running in Docker

This requires Docker Desktop

Example Dockerfile:

FROM tianon/wine
ENV WINEARCH=win32
ENV WINEDEBUG=-all
# change this to your Diablo 2 installation
COPY [ "C:\Diablo II1.13c", "/app/game" ]
WORKDIR /app
# d2mapapi should be in the same folder as your dockerfile
COPY ./d2mapapi .
EXPOSE 8080
CMD ["wine", "D2Map.Api.exe", "Diablo2Directory=/app/game", "--urls=https://0.0.0.0:8080"]

Download the latest release

Place the d2mapapi folder the dockerfile in the same folder, and navigate their via command line then run docker build -t d2mapapi .

Once that completes run docker run d2mapapi

API

GET https://localhost:5001/maps?mapid=1053646565&area=BloodMoor&difficulty=Normal

GET https://localhost:5001/maps?mapid=1053646565&area=2&difficulty=0

List Of Areas

About

d2 map rest API to retrieve the map layout per area given a map seed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 68.4%
  • C 17.2%
  • C++ 14.4%