Coder Social home page Coder Social logo

palworld-coord's Introduction

Palworld Coordinate Converter

What is this?

This is a small library with two functions used to convert between two different coordinat systems in Palworld:

  1. The coordinate system used in the game itself in the Paldex interactive map
  2. The coordinate system used in the game save files (.sav)

Installation

pip install palworld-coord

Also, if you want, you can just copy the contents of this file into your project instead of adding a dependency.

API

# Convert from save game file coordinate to Paldex
sav_to_map(x: float, y: float) -> Point
# Convert from Paldex coordinate to save game file
map_to_sav(x: int,   y: int) -> Point

Usage Examples

from palworld_coord import sav_to_map, map_to_sav

# Anubis boss location pulled from game data
sav_to_map(-167230, 96430)
# Point(x=-134, y=-94)

# Get .sav coordinates of random base location in-game:
map_to_sav(373, -359)
# Point(x=-288669, y=329207)

palworld-coord's People

Contributors

bostrt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

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.