PySoaSE Documentation¶
Content¶
Introduction¶
Note
PySoaSE is still in heavy development. There are yet file classes to be implemented.
PySoaSE is a modding tool for the PC Game Sins of a Solar Empire. Its main purpose is to provide modders with tools to check and verify that their mods are error-free. To that end, PySoaSE provides tools for syntax checking as well as reference checking. It is written in Python, and thus it can be used on all operating systems with a Python interpreter supporting at least Python 3.4.
To facilitate these features, PySoaSE provides text file parsers for all types of Sins files. To enable consistency checking, like ensuring that a referenced Brush actually exists, all Sins file types have been implemented as Python classes.
The following example shows the output from checking the Particle files of the Dev version of the SoGE mod:
Exhaust_EMPIREHEAVY.particle:
ERROR: Referenced Emitter '???????????????????????' could not be resolved.
Exhaust_EMPIREMEDIUM.particle:
ERROR: Referenced Emitter '???????????????????????' could not be resolved.
Exhaust_EMPIREVHEAVY.particle:
ERROR: Referenced Emitter '???????????????????????' could not be resolved.
Weapon_SW_VenatorBeam_Hit.particle:
ERROR: Referenced File 'techcapitalbeamcorona3['.dds', '.tga']' could not be resolved.
Weapon_SW_VenatorBeam_Muzzle.particle:
ERROR: Referenced File 'techcapitalbeamcorona3['.dds', '.tga']' could not be resolved.
Note
PySoaSE can only be used on the text version of a mods’ files. There is no way to use it on the files in binary format.
The program can be downloaded and contributed to via my Gitlab repository.
Current Progress¶
This section contains an overview of the current implementation progress, detailing tests and classes already implemented.
The following SoaSE files are currently implemented:
.asteroidDef.brushes.explosiondata.galaxy.galaxyScenarioDef.gameeventdata.manifest.particle.playerPictures.playerPicturesDef.playerThemes.playerThemesDef.randomeventdefs.renderingDef(DustCloudsDef).skyboxbackdropdata.sounddata.starscapedata.string.texanim- All
.entityfile types.
The following file classes are still missing:
Gameplay.constants.coronadataFarStar.dataPlanetElevators.data.exhaustTrailDef.lensflaredata.mesh.musicdata.postprocessdata.skyboxstarsdata.window
Also, the following kinds of problems can be found, where applicable:
- Syntax errors, e.g. missing lines, uneven number of quotation marks, misspelled line name, discrepancy for number of entries given at head of list and actual number of entries, wrong type of value given (e.g. string where number is expected), works for all implemented files
- Duplicate entries (
.stringand.brushesfiles) - Referenced but missing
.entityfiles (multiple file types) - Referenced
.entityfiles which exist, but have the wrong type, e.g. a Titan class entity being referenced in another Entity’ssquadTypeEntityDefline instead of a Fighter type Entity. - Referenced Brushes which could not be found in any
.brushesfile (multiple file types) - Referenced Strings which could not be found in any
.stringfile (multiple file types) - Referenced
.particlefiles which could not be found in theParticlessubdirectory (multiple file types) - Referenced
.oggfiles which could not be found in theSoundsubdirectory (.sounddatafiles) - Referenced Sound entries which could not be found in any of the
.sounddatafiles (multiple file types) - Referenced
.texanimfiles which could not be found in theTextureAnimationsdirectory (.particlefiles) - Missing internal definitions (e.g. templates) in the
.galaxyScenarioDeffile - Referenced
.tga/.ddsfiles missing from theTexturessubdirectory (multiple file types) - Vanilla files being used (this is not considered an error per se, but might be interesting information for modders)