Skip to main content

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 = ""

Release files for BSPM 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for BSPM 1.0.0
File Size Uploaded
BSPM-1.0.0.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for BSPM 1.0.0
File Interpreter ABI Platform
BSPM-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / BSPM-1.0.0.tar.gz

Download URL BSPM-1.0.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f961f09dca95e0ef50e07e757b90a0ec2acd006a398638425e1b65f889092041
BLAKE2b-256 checksum
How to use checksums
8c64b538782417891d158435dcde6a427e907e27a54a3458782bac7499e5b96f
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / BSPM-1.0.0-py3-none-any.whl

Download URL BSPM-1.0.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0779260ad6cf7872bd703827f6fe70f11dc8a355ed9ffb6f1b976b0fac4d7e57
BLAKE2b-256 checksum
How to use checksums
94f162e34a466a39e969891c30855cc415bfd03de33a565efcf62ff78db70069
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page