A library to code tools for Shapez 2.
Documentation
You can find below the documentation for the features this library offers.
Even if technically not enforced, all classes in this library should be considered immutable, unless said otherwise in the class description.
blueprints
- Blueprint
- BlueprintError
- BlueprintIcon
- BlueprintIconType
- BlueprintType
- BuildingBlueprint
- BuildingEntry
- decodeBlueprint
- encodeBlueprint
- getBlueprintVersion
- getDefaultBlueprintIcons
- getPotentialBPCodesInString
- ISLAND_ROTATION_CENTER
- IslandBlueprint
- IslandEntry
- NUM_BP_ICONS
- PREFIX
- SEPARATOR
- SUFFIX
- TileEntry
- VALID_BP_ICONS
The blueprint code prefix.
The separator between the different blueprint code sections.
The blueprint code suffix.
The center of an island tile, used for rotations.
The number of blueprint icons displayed ingame.
The error raised for all blueprint-related errors.
Represents a blueprint icon.
Parameters
- type : The type of blueprint icon.
- icon : The icon ID if it's a regular icon.
- shape : The shape if its a shape icon.
Attributes
The type of blueprint icon.
The icon ID if it's a regular icon.
The shape if its a shape icon.
Create a blueprints.BlueprintIcon from an encoded string.
Parameters
- raw : The raw string, None for an empty icon.
Encode the icon to a string or None if it's empty.
ⓘ This class is mutable.
Represents a building inside a blueprint.
Parameters
- pos : The building's position.
- rotation : The building's rotation.
- type : The building's type.
- extra : The building's extra data. If None, then the default extra data for that building type will be used if it exists. If a blueprintsExtraData.BuildingExtraData, a blueprintsExtraData.BuildingExtraDataHolder will be created out of it.
Attributes
The building's position.
The building's rotation.
The building's type.
The building's extra data.
ⓘ This class is mutable.
Represents a building blueprint.
Parameters
- entries : The buildings inside the blueprint.
- icons : The blueprint's icons, if None then use the default building blueprint icons.
Attributes
The buildings inside the blueprint.
The blueprint's icons, without restrictions.
Creates a mapping of occupied building tiles to which building entry they are from.
Returns the blueprint's size.
Returns the numbers of buildings inside the blueprint.
Returns the amount of each building type present in the blueprint.
Returns the number of occupied tiles inside the blueprint.
Returns the blueprint's icons as if they were displayed ingame, i.e. with invalid icons turned into empty icons and with the list cropped/padded to 4 elements.
ⓘ This class is mutable.
Represents a island inside a blueprint.
Parameters
- pos : The island's position.
- rotation : The island's rotation.
- type : The island's type.
- extra : The island's extra data. If None, then the default extra data for that island type will be used if it exists. If a blueprintsExtraData.IslandExtraData, a blueprintsExtraData.IslandExtraDataHolder will be created out of it.
- buildingBP : The building blueprint contained inside that island, or None if there isn't one.
Attributes
The island's position.
The island's rotation.
The island's type.
The island's extra data.
The building blueprint contained on that island, or None if there isn't one.
ⓘ This class is mutable.
Represents an island blueprint.
Parameters
- entries : The islands inside the blueprint.
- icons : The blueprint's icons, if None then use the default island blueprint icons.
Attributes
The islands inside the blueprint.
The blueprint's icons, without restrictions.
Creates a mapping of occupied island tiles to which island entry they are from.
Returns the blueprint's size.
Returns the numbers of islands inside the blueprint.
Returns the amount of each island type present in the blueprint.
Returns the number of occupied tiles inside the blueprint.
Returns the blueprint's icons as if they were displayed ingame, i.e. with invalid icons turned into empty icons and with the list cropped/padded to 4 elements.
Represents a blueprint container object.
Parameters
- blueprint : The building or island blueprint contained.
- majorVersion : The blueprint's major version, i.e. the number visible at the start of the blueprint code.
- version : The blueprint's version number.
Attributes
The contained blueprint's type.
The contained blueprint.
If a building blueprint, the contained blueprint. If an island blueprint, the building blueprints of all the island entries merged together, or None if there aren't any buildings.
The contained island blueprint or None if it's a building blueprint.
The blueprint's major version.
The blueprint's version number.
Returns the blueprint points cost of placing the blueprint with a 'copy/paste cost' of 100%. Raises blueprints.BlueprintError if an OverflowError happens in the computation.
Returns the platform units cost of placing the blueprint.
Parameters/Attributes
Which building or island this tile belongs to.
The list of all valid blueprint icon IDs.
Does as little as possible of the decoding process and returns the blueprint's version. Raises blueprints.BlueprintError if the blueprint format is invalid.
Parameters
- blueprint : The raw blueprint code.
Creates a blueprint object from a blueprint code. Raises blueprints.BlueprintError if the blueprint format is invalid or it contains invalid data. When migrate is False, runs the same migration features as ingame. When True, also runs additional migration features :
- If an entry type is invalid, the entry is ignored instead of raising an error.
- If the blueprint's version is less than 1024 (alpha 8), default stackers (which were changed from straight to bent in that update) are changed to straight stackers.
- If the blueprint's version is less than 1119 (0.1.0-pre2), global wire transmitters are turned into global signal transmitters and global wire receivers that weren't set to a ROS channel get turned into global signal receivers.
- For the rest of the migration features see here.
Parameters
- rawBlueprint : The raw blueprint code.
- migrate : Whether or not to run additional migration features.
Creates a blueprint code from a blueprint object.
Parameters
- blueprint : The blueprint object.
Returns the potential blueprint codes from a string, i.e. substrings starting with the blueprint code prefix (SHAPEZ2) and ending with the blueprint code suffix ($).
Parameters
- string : The string to search.
Returns the default blueprint icons for the specified blueprint type.
Parameters
- bpType : The blueprint type.
blueprintsExtraData
- BuildingExtraData
- BuildingExtraDataHolder
- ButtonExtraData
- CompareMode
- ComparisonGateExtraData
- decodeEntryExtraData
- DisableableTrainUnloadingLanesExtraData
- encodeEntryExtraData
- FluidGenerator
- FluidGeneratorType
- FluidProducerExtraData
- getDefaultEntryExtraData
- IslandExtraData
- IslandExtraDataHolder
- ItemProducerExtraData
- LabelExtraData
- OperatorSignalReceiverExtraData
- RailConnectionAllowedColors
- RailExtraData
- ShapeGenerator
- ShapeGeneratorType
- SignalGeneratorType
- SignalProducerExtraData
The type of a blueprintsExtraData.ShapeGenerator.
Attributes
An empty shape generator, doesn't produce anything.
A shape generator producing a shape.
Represents a shape generator, used in blueprintsExtraData.SignalProducerExtraData and blueprintsExtraData.ItemProducerExtraData.
Parameters
- genType : The type of shape generator.
- shape : The shape if it's producing a shape.
Attributes
The type of a blueprintsExtraData.FluidGenerator.
Attributes
An empty fluid generator, doesn't produce anything.
A fluid generator producing paint.
Represents a fluid generator, used in blueprintsExtraData.SignalProducerExtraData and blueprintsExtraData.FluidProducerExtraData.
Parameters
- genType : The type of fluid generator.
- color : The paint color if it's producing paint.
Attributes
The type of signal generated by a blueprintsExtraData.SignalProducerExtraData.
Attributes
No signal.
A null signal.
A conflict signal.
A number signal.
A shape signal.
A color signal.
The mode of a comparison gate, used in blueprintsExtraData.ComparisonGateExtraData.
Attributes
Equal to.
Greater than or equal to.
Greater than.
Less than.
Less than or equal to.
Not equal to.
Represents the extra data of a signal producer.
Parameters
- signalType : The type of signal generated.
- number : The number if it's producing a number signal.
- shapeGen : The shape generator if it's producing a shape signal.
- fluidGen : The fluid generator if it's producing a color signal.
Attributes
The type of signal generated.
The number if it's producing a number signal.
The shape generator if it's producing a shape signal.
The fluid generator if it's producing a color signal.
Represents the extra data of an item producer.
Parameters/Attributes
What the item producer is producing.
Represents the extra data of a fluid producer.
Parameters/Attributes
What the fluid producer is producing.
Represents the extra data of a button.
Parameters/Attributes
Whether or not the button is activated.
Represents the extra data of a comparison gate.
Parameters/Attributes
What comparison mode the gate is set to.
Represents the extra data of an operator signal receiver.
Parameters/Attributes
Which channel the receiver is set to.
A union for all the building extra data classes listed above.
A holder class for a building extra data class.
Parameters
- value : The building extra data class to hold.
Attributes
If it's holding a label extra data.
If it's holding a signal producer extra data.
If it's holding an item producer extra data.
If it's holding a fluid producer extra data.
If it's holding a button extra data.
If it's holding a comparison gate extra data.
If it's holding an operator signal receiver extra data.
The allowed train colors on a rail connection.
Parameters/Attributes
If blue trains are allowed.
If green trains are allowed.
If red trains are allowed.
If white trains are allowed.
If cyan trains are allowed.
If magenta trains are allowed.
If yellow trains are allowed.
Represents the extra data of a rail.
Parameters/Attributes
The allowed train colors on each connection inside the rail.
Represents the extra data of an island with disableable train unloading lanes (i.e. unloaders and transfer stations).
Parameters/Attributes
Which lane (floor) indexes are disabled.
A union for all the island extra data classes listed above.
A holder class for an island extra data class.
Parameters
- value : The island extra data class to hold.
Attributes
If it's holding a rail extra data.
If it's holding a disableable train unloading lanes extra data.
Decodes extra data from raw bytes and returns the custom class result or None if the entry isn't supposed to have extra data. Raises blueprints.BlueprintError if the raw bytes data format is invalid.
Parameters
- rawDecoded : The bytes decoded from base64.
- entryType : The entry type's ID this extra data belongs to.
Encodes extra data from a custom class into bytes and returns the result or None if the entry doesn't have extra data.
Parameters
- extra : The extra data to encode or None so this function can be ran for all entries.
- entryType : The entry type's ID this extra data belongs to.
Returns the default extra data for an entry type or None if it doesn't have extra data.
Parameters
- entryType : The entry type's ID.
buildings
Represents a building variant.
Parameters
- id : The variant's ID.
- title : The variant's title.
Attributes
The variant's ID.
The variant's title.
The building internal variants this variant contains.
Represents a building internal variant.
Parameters/Attributes
The internal variant's ID.
The internal variant's tiles.
The building variant this internal variant is from.
A mapping of all the ingame building variant IDs to their corresponding building variant.
A mapping of all the ingame building internal variant IDs to their corresponding building internal variant.
Categorizes counts of building internal variants into building variant groups.
Parameters
- counts : The raw internal variant counts.
gameCode
This module ports over some of the ingame code originally in C#, except that if a C# class already has an equivalent python class in this library, the already existing class is used instead. All classes and functions in this module use fixedint.Int32 instead of int. Only objects with notable aspects are documented below.
gameCode.RandomResearchShapeGenerator
The code used by the random operator shapes.
Attributes
The shape returned will be the cost to unlock the given level, so +1 from the level displayed ingame next to the shape.
Parameters
- level : The level which will be unlocked by the shape.
gameCode.otherClasses
Similar to gameObjects, holds miscellaneous classes used by the other submodules of gameCode.
gameObjects
A mapping of how each color should look.
Parameters/Attributes
The color skin's ID.
The mapping of colors to how they look as an (R,G,B) tuple.
Represents an ingame color mode.
Parameters/Attributes
The color mode's ID.
The color mode's color skin.
If the color mode has colorblind patterns.
Represents an ingame color scheme.
Parameters
- id : The color scheme's ID.
- primaryColors : The color scheme's primary colors.
- secondaryColors : The color scheme's secondary colors.
- tertiaryColors : The color scheme's tertiary colors.
- defaultColor : The color scheme's default color.
- colorModes : The color modes available in this color scheme.
- mixingRecipes : The mixing recipes in this color scheme as a mapping of inputs to output, where the inputs are represented by a 2-elements frozenset.
Attributes
The color scheme's ID.
The color scheme's primary colors.
The color scheme's secondary colors.
The color scheme's tertiary colors.
The color scheme's default color.
The color modes available in this color scheme.
The mixing recipes in this color scheme as a mapping of inputs to output, where the inputs are represented by a 2-elements frozenset.
The color scheme's colors.
A mapping of each color code to its corresponding color.
A mapping of each color mode ID to its corresponding color mode.
Returns the result of mixing two colors. Abstracts the creation of a frozenset for the gameObjects.ColorScheme.mixingRecipes attribute.
Parameters
- color1 : The first input color.
- color2 : The second input color.
The type of a shape part.
Parameters/Attributes
The part type's one letter code.
If the part can have a color.
If the part can change color, i.e. in a painter.
If the part connects to other parts horizontally and thus supports them and is supported by them.
If the part has the behavior of crystals.
If the part is replaced by crystal in a crystal generator.
Represents an ingame shapes configuration.
Parameters
- id : The shapes configuration's ID.
- numPartsPerLayer : The number of parts each layer of a shape should have.
- pinPart : The part type that should be considered a pin.
- crystalPart : The part type that should be considered a crystal.
- parts : The part types available in this shapes configuration. Each list element is a tuple of the shape part type and the map generation rareness : 0 for common, 1 for rare, 2 for very rare, 3 for doesn't generate on the map.
Attributes
The shapes configuration's ID.
The number of parts each layer of a shape should have.
The part type that should be considered a pin.
The part type that should be considered a crystal.
The part types that are considered common when generating shape asteroids.
The part types that are considered rare when generating shape asteroids.
The part types that are considered very rare when generating shape asteroids.
The part types available in this shapes configuration.
A mapping of each part type ID to its corresponding part type.
Represents a part inside a shape.
Parameters/Attributes
The part's type or None if it's an empty part.
The part's color or None if it doesn't have a color.
Returns the string representation of the shape part, like in a shape code.
Returns a shallow copy of the shape part.
Represents an ingame shape.
Parameters
- layers : The shape's layers, each layer being a list of shape parts.
Attributes
The shape's layers, each layer being a list of shape parts.
The number of layers in the shape.
The number of parts each layer contains.
Creates a shape object from a shape code.
Parameters
- shapeCode : The shape code.
- shapesConfig : The shapes configuration of the shape code.
- colorScheme : The color scheme of the shape code, defaults to the ingame default color scheme.
Returns the shape code representing the shape.
Returns whether the shape is empty, i.e. whether it contains only empty parts.
Returns a copy of the shape, with the shape parts inside also copied.
ingameData
The default (and only) color scheme ingame.
The quad shapes configuration ingame.
The hex shapes configuration ingame.
islands
Represents an island's tile.
Parameters/Attributes
The tile's position.
The tile's buildable area, empty if not buildable.
Represents an island/platform.
Parameters
- id : The island's ID.
- title : The island's title.
- tiles : The island's tiles.
- islandUnitCost : The island's cost.
- group : The island group this island belongs to.
Attributes
The island's ID.
The island's title.
The island's tiles.
The island's cost.
The island group this island belongs to.
The island's total build area, made from merging the build areas of all its tiles.
Represents a group of similar islands, used for research unlocks.
Parameters/Attributes
The group's ID.
The group's title.
The islands this group contains.
A mapping of all the ingame island IDs to their corresponding island.
A mapping of all the ingame island group IDs to their corresponding island group.
Categorizes counts of islands into island groups.
Parameters
- counts : The raw island counts.
pygamePIL
The weird part of this library. The code of this library originates from ShapeBot 2, which was originally developed with pygame. To convert it to using Pillow, I created this interface which copies some of the pygame functions and classes to not have to change the code too much, although as a result, some functions might not be as efficient as if they were done with Pillow directly.
If you want to do further processing on a Surface generated by this library, there are 3 cases :
- If you are using Pillow, you can use the
_imageattribute ofSurfaceobjects which points to the internalPIL.Image.Image. - If you are using pygame, use the instruction
os.environ["SHAPEZ2_USE_PYGAME"] = ""before importing the shapez2 library. This will have the effect of replacing everything in the pygamePIL module with the real pygame objects. Additionally, if you have the shapez2 library listed as a dependency somewhere, you can use the optional dependency syntaxshapez2[pygame]so that pygame will automatically be added as a dependency. - For other cases, use the
pygamePIL.image.savefunction with either a file name to save it to a file, or a buffer to then load it using another library's image loading feature.
Thus, see the pygame documentation.
research
Represents an ingame scenario. This class and all the classes contained inside roughly follow the scenario file format except that any object that's seriallized will instead be a custom class here, so their attributes won't be documented, except for the main differences.
Represents an upgrade (milestone/side upgrade) that doesn't exist in the current scenario.
Parameters/Attributes
The upgrade's ID.
Replaces the RequiredUpgradeIds and RequiredMechanicIds keys of an object.
Attributes
The required milestones.
The required side upgrades.
The required future upgrades.
The required mechanics.
Replaces a list of reward objects.
Attributes
The rewarded building variants.
The rewarded island groups.
The rewarded mechanics.
The rewarded knowledge panel pages.
The amount of blueprint points rewarded.
The amount of platform units rewarded.
The amount of research points rewarded.
The rewarded building internal variants. Not defined in the scenario but deduced from the rewarded building variants.
The rewarded islands. Not defined in the scenario but deduced from the rewarded island groups.
The error raised if something is invalid while decoding a scenario.
Creates a scenario object from a raw string of json data. Returns a tuple of the scenario and a list of warning messages. Raises research.ScenarioDecodeError if the given data is invalid.
Parameters
- rawScenario : The raw json data.
Encodes a scenario object into raw json data. Note : this function currently doesn't have an intended use as the modification or creation of scenario data classes is not supported.
Parameters
- scenario : The scenario to encode.
A mapping of each ingame scenario ID to its corresponding scenario object.
shapeCodes
The character that separates layers in shape codes.
The character that's used to indicate an empty shape or no color in shape codes.
Check if a shape code is valid. Returns a tuple with 3 elements : whether the shape code is valid, the error message or None if the shape code was valid, the shapes configuration that was used to check the shape code or None if it didn't make it to that step.
Parameters
- potentialShapeCode : The shape code to check.
- shapesConfig : If the shape is supposed to be in a specific shapes configuration, then that shapes config, otherwise None, which will check the shape in both ingame shapes configs and choose the first one that works.
- emptyShapeInvalid : If the shape code represents a fully empty shape, whether or not to consider it invalid.
shapeOperations
This module contains all shape operations as functions. All of them share these properties :
- The first argument(s) are the input shape(s) as gameObjects.Shape. If there are multiple input shapes, all of them need to have the same number of parts per layer, otherwise a shapeOperations.InvalidOperationInputs is raised.
- Then the next argument(s) are the input color(s) as gameObjects.Color, if there are any.
- Then the keyword only argument
configis used to specify the shapeOperations.ShapeOperationConfig. - Lastly, the function returns a list of gameObjects.Shape for the shape outputs, even if there is only one.
The error raised if a shape operation can't process some inputs.
The configuration settings that are passed to shape operations.
Parameters/Attributes
The maximum number of layers output shapes can have in operations that can increase the number of layers of input shapes.
The shapes configuration that will be used for the operation.
shapeViewer
Renders a shape as an image.
Parameters
- shape : The shape to render.
- surfaceSize : What size will the returned surface be.
- colorMode : Which color mode to use to render the shape.
- shapesConfig : Which shapes configuration to use to render the shape.
translations
The type of a translations.FeatureTag.
Attributes
A self closing tag, i.e. <tag/>.
An opening tag, i.e. <tag>.
An ending tag, i.e. </tag>.
The type of value separator in a translations.FeatureTag.
Attributes
A colon separator, i.e. <name:value>.
An equals separator, i.e. <name="value"> or <name=value>.
Represents a tag inside a translation string.
Parameters/Attributes
The type of tag.
The name of this tag's feature.
The value associated with the feature, if any.
The type of value separator, if there is a value.
Returns the tag's string representation.
Represents a string with additonal styling and content modifying features using feature tags. Some rendering methods are provided with the functions listed below. For other rendering implementations, the translations.FeatureString.components attribute should be used.
Parameters/Attributes
The list of strings and feature tags composing the feature string. When the object is created, components are sanitized : empty strings are removed and adjacent strings are merged together.
Returns a new feature string with parameters inside the string replaced with some values. A parameter is any feature tag that's of type translations.TagType.single. The translations.FeatureTag.feature is considered to be the parameter name.
Parameters
- params : A mapping of parameter names to what string they should be replaced with. If a parameter name is present in this dictionary but not inside the feature string, it will be silently ignored.
- default : The string to use if the feature string contains a parameter name that's not in the
paramsargument. If None, instead a ValueError is raised when an unknown parameter is encountered.
Returns a string representation of the components with feature tags included.
Returns a concatenation of the string components without feature tags.
Returns an image representation of the string. New lines as well as the following tags are supported : <b>,<u>,<gl>,<link>,<color="#hex">, <color="named-color"> (supported named colors).
Parameters
- font : The font to use to render regular text.
- boldFont : The font to use to render bold text.
The language used as a fallback when a translation doesn't exist in an other language, also used as a default value for function arguments.
Represents a string that's ready to be translated.
Parameters/Attributes
The translation key, for example research.RNBlueprints.title.
Translate the string into a given language. If it isn't found in that language, translations.FALLBACK_LANGUAGE is used instead. If it isn't found there either, a feature string of just the translation key is returned.
Parameters
- language : The language to translate into.
ⓘ This class inherits from translations.TranslationString
Represents a translation string coming from a source that could either be a translation key or a raw feature string.
Parameters
- key : The raw source. If the string starts with
@, what's after the@will be considered a translation key. Otherwise, the string will be treated as a raw feature string.
Attributes
The translation key or None if it's a raw feature string.
The raw feature string or None if it's a regular translation string.
If a regular translation string, same as translations.TranslationString.translate. Otherwise, returns a feature string from translations.MaybeTranslationString.rawString.
Parameters
- language : The language to translate into.
Returns the source from which this string originated, i.e. the translation key with a @ in front or the raw feature string.
Returns the raw string associated to a translation key in a specific language. If it isn't found in that language, translations.FALLBACK_LANGUAGE is used instead. If it isn't found there either, the translation key is returned.
Parameters
- key : The translation key.
- language : The language to translate into.
Returns a feature string object from a raw feature string.
Parameters
- rawString : The raw feature string.
utils
Returns whether a string is non-empty and is composed of only digits.
Parameters
- string : The string to search.
Decode a byte string which has its length encoded as a prefix. This format is for example used in blueprints and savegames. Raises ValueError if the format is invalid.
Parameters
- string : The string to decode.
- numBytesForLen : The number of bytes used to encode the length.
- emptyIsLengthNegative1 : Whether a length of -1 signifies a length of 0.
Encode a byte string with its length as a prefix (see above for more details).
Parameters
- string : The string to encode.
- numBytesForLen : The number of bytes used to encode the length.
- emptyIsLengthNegative1 : Whether the encoded length should be changed to -1 if the string's length is 0.
Represents the rotation of something.
Parameters/Attributes
The rotation value as a number, 0 means East, 1 means South, 2 means West, 3 means North.
Creates a new Rotation rotated 90° clockwise some number of times.
Parameters
- numTimes : The number of times to rotate clockwise. If a Rotation, the utils.Rotation.value is used.
Represents a position with integer coordinates.
Parameters/Attributes
The X coordinate.
The Y coordinate.
The Z coordinate.
Returns a new position rotated 90° clockwise some number of times.
Parameters
- numTimes : The number of times to rotate clockwise. If a Rotation, the utils.Rotation.value is used.
- aroundCenter : The center of rotation to use.
Represents the size of something.
Parameters/Attributes
The width, i.e. the size on the X axis.
The height, i.e. the size on the Y axis.
The depth, i.e. the size on the Z axis.
Creates a new Size rotated 90° clockwise some number of times.
Parameters
- numTimes : The number of times to rotate clockwise. If a Rotation, the utils.Rotation.value is used.
Represents a rectangular area.
Parameters/Attributes
The position of the top left corner.
The size of the retangle, only the width and height attributes are used.
Returns a new rectangle rotated 90° clockwise some number of times.
Parameters
- numTimes : The number of times to rotate clockwise. If a Rotation, the utils.Rotation.value is used.
- aroundCenter : The center of rotation to use.
Returns whether a position is contained inside the rectangle.
Parameters
- pos : The position to check.
Creates a Pos object from a raw dictionary with X, Y, and Z keys, where all of them can be missing and default to 0.
Parameters
- raw : The raw data.
The return type of utils.loadDirection.
Attributes
Creates a direction, a direction being a rotation associated to a position. The raw data is a dictionary with a Position_L key for the position (same format as in utils.loadPos) which defaults to a Pos(0,0,0), and a Direction_L key for the rotation which defaults to 0.
Parameters
- raw : The raw data.
versions
A mapping of version numbers to the corresponding list of version IDs.
The latest game version number.
The latest major version number, used in blueprints.
Represents an alpha suffix in a versions.VersionName. The alpha version takes the form of version.subVersion.
Parameters/Attributes
The main alpha version.
The alpha sub version or None if there isn't one.
Represents a release candidate suffix in a versions.VersionName.
Parameters/Attributes
The release candidate number.
Represents a preview suffix in a versions.VersionName.
Parameters/Attributes
The preview number.
Represents a demo suffix in a versions.VersionName.
Represents the name of a version, in the form of major.minor.patch-suffix1-suffix2....
Parameters/Attributes
The version's major number.
The version's minor number.
The version's patch number.
The version's suffixes.
Returns a version name object from a version ID.
Parameters
- versionId : The version ID.
Returns a string representation of version name object.
Parameters
- versionName : The version name.
This documentation is generated with code I made myself, but the style is inspired by the Sphinx documentation generator, and in particular the style used by the discord.py library documentation.