A .brs reader/writer for brickadia
Brickadia is a multiplayer brick building game
Made for version 14 saves (Brickadia Early Access)
Example Usage:
Display info about a save:
import brs
save = brs.readBRS("foobar.brs")
print(save)
Make a save from scratch, with bricks showing the default colorset
import brs
save = brs.BRS.default(brs.User("Speedy Boi", "54937200-3f6e-4d8e-8e65-0e7c0bfcc117"))
#create asset
default_asset = brs.Asset("PB_DefaultBrick", 0)
save.brick_assets.append(default_asset)
for i, col in enumerate(save.colors):
brick = brs.Brick()
brick.brick_index = i
brick.asset = default_asset
brick.size = brs.Size(5, 5 ,6) #size of a 1x1 brick
brick.position = brs.Position((i%12) * 10, (i//12) * 10, 0)
brick.orientation = brs.Orientation(brs.Direction.Z_POSITIVE, brs.Rotation.DEG_0)
brick.collision = brs.Collision() # all True by default
brick.visibility = True
brick.material = save.materials[3] # 4th material is BMC_Plastic
brick.physical_material = save.physical_materials[0] # BPMC_Default
brick.material_intensity = 5 # doesnt matter for plastic
brick.color = col
brick.owner = save.brick_owners[0]
# dont forget to increment brick count
brick.owner.brick_count += 1
# add the brick to the save
save.bricks.append(brick)
save.to_file("all_colors.brs")
Make a new component from scratch and add it to a brick:
import brs
...
brick = save.bricks[0] # take some brick to add a "Component_Target" component to
# create a new Component_Target component with one Property "OnTime" of type Float
new_component = brs.Component()
new_component.index = len(save.components)
new_component.name = "Component_Target"
new_component.version = 1
on_time = brs.Property("OnTime", brs.PropertyType.FLOAT)
new_component.properties = [on_time]
# add component to save
save.components.append(new_component)
# make a component instance and set values
component_instance = brs.ComponentInstance(new_component)
component_instance.property_values = {on_time: 1.234}
# attach the component instance to the brick
brick.components[new_component] = component_instance
# add the brick to the component
new_component.bricks.append(brick)
...
Metadata
Release files for brs 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brs-1.0.0.tar.gz | 2.2 kB | Without provenance | Details for brs-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brs-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for brs-1.0.0-py3-none-any.whl |
Total release size: 4.3 kB
Release files / brs-1.0.0.tar.gz
| Download URL | brs-1.0.0.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6d8d67a78771168087a2465ec05fe920e53583f0be109b43044508759f66e63
|
|
BLAKE2b-256 checksum How to use checksums |
0f0460f3f3ac1d82be6546d9f299dfabceb5bc822dc82848a9640cb51dc034a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / brs-1.0.0-py3-none-any.whl
| Download URL | brs-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32aa08406c97d61ccc4643f3d88f89abdf6460504ca25dcb9abc6f771e3229dc
|
|
BLAKE2b-256 checksum How to use checksums |
b7d57e4319e495649b32789c840084a2689e938548effc16422798b4405649d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for brs 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.