Skip to main content

A package to create Beat Saber maps within python.

Project description

Beat Saber Python Mapper

A Simple Python Package that allows developers to make Beat Saber maps in Python!

Installation

pip install BSPM

The Basics

Import the required Packages

from BSPM import info, level, events, notes, obstacles

Set the desired path for your map folder

path = ("C:/Program Files (x86)/Steam/steamapps/common/Beat Saber/Beat Saber_Data/CustomWIPLevels/Example Map/")

Making a new Map

#Define variable "mapInfo" as the Info for the Map
mapInfo = info

Making a new Level/Difficulty

#Define variable "normalStandard" as a level
normalStandard = level

Adding Events

#Define "normalEvents" as a set of events
normalEvents = events.events()

#Add an Event to Normal Events (Time, Type, Value)
normalEvents.append(4, 0, 2)
normalEvents.append(4, 2, 2)
normalEvents.append(4, 3, 2)

#Define "normalEvents" as the events for "normalStandard"
normalStandard.events = normalEvents.events

Adding Notes

#Define "normalNotes" as a set of notes
normalNotes = notes.notes()

#Add a Note to Normal Notes (Time, Type, X, Y, Direction)
normalNotes.append(4, 0, 1, 2, 1)
normalNotes.append(4, 1, 2, 2, 1)

#Define "normalNotes" as the notes for "normalStandard"
normalStandard.notes = normalNotes.notes

Adding Obstacles

#Define "normalObstacles" as a set of obstacles
normalObstacles = obstacles.obstacles()

#Add an Obstacle to Normal Obstacles (Time, Type, X, Width, Duration)
normalObstacles.append(0, 0, 0, 1, 4)
normalObstacles.append(0, 0, 3, 1, 4)

#Define "normalObstacles" as the obstacles for "normalStandard"
normalStandard.obstacles = normalObstacles.obstacles

Writing the Files

#Write the "normalStandard" file at the pre-defined path
normalStandard.write(path)

#Write the Info file at the pre-defined path
mapInfo.write(path)

Adding Metadata

Default Metadata is provided in the package but alot of elements should be changed to fit your map, this can be done easily with the following code.

Map Wide Metadata

#Define the metadata of the Map
mapInfo.version = "3.2.0"
mapInfo.songName = "Faded"
mapInfo.songSubName = "Where Are You Now"
mapInfo.songAuthorName = "Alan Walker"
mapInfo.levelAuthorName = "Jerry marshall"
mapInfo.beatsPerMinute = 90
mapInfo.shuffle = 0
mapInfo.shufflePeriod = 0.5
mapInfo.previewStartTime = 12
mapInfo.previewDuration = 10
mapInfo.songFilename = "song.ogg"
mapInfo.coverImageFilename = "cover.jpg"
mapInfo.environmentName = "DefaultEnvironment"
mapInfo.songTimeOffset = 0
mapInfo.contributors = ""

Per Level/Difficulty Metadata

#Define the metadata of normalStandard
normalStandard.characteristicName = "Standard"
normalStandard.difficulty = "Normal"
normalStandard.difficultyRank = 3
normalStandard.noteJumpMovementSpeed = 12
normalStandard.noteJumpStartBeatOffset = 0
normalStandard.editorOffset = 0
normalStandard.editorOldOffset = 0
normalStandard.warnings = "Don't Break Ur Arms lol"
normalStandard.information = "Mapped With Beat Saber Python Mapper"
normalStandard.suggestions = "Technicolor, Chroma"
normalStandard.requirements = ""

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file BeatSaberPythonMapper-jerrymarshall2004-1.0.0.tar.gz.

File metadata

  • Download URL: BeatSaberPythonMapper-jerrymarshall2004-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for BeatSaberPythonMapper-jerrymarshall2004-1.0.0.tar.gz
Algorithm Hash digest
SHA256 84b8416eadc3eea01877e1c5ced60d936482e73b6e68b80fe7f0b692d1c6224b
MD5 21128b616bdabb95368304d549648c08
BLAKE2b-256 5bc1922587b659c5f4f55e023a9f53b453519e23c2e2523df031dfb9d2aa4207

See more details on using hashes here.

File details

Details for the file BeatSaberPythonMapper_jerrymarshall2004-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for BeatSaberPythonMapper_jerrymarshall2004-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d2c009db1e392602fd062f7e1cc2136be6386f0f485beddeb669856ead1b4ab
MD5 d75241f499484a6e4a67cc1397b475f2
BLAKE2b-256 4f2487ca39f9d03bfc0f388470445797e4c4fd746d236a2334beaefd36d4bebe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page