CathodeLib
CathodeLib copied to clipboard
A C# library supporting a wide range of conventions and file formats for Alien: Isolation.
trafficstars
CathodeLib - Alien: Isolation C# Library
CathodeLib is an open source library providing functionality to handle formats from the Cathode game engine, for modding Alien: Isolation. Used to power OpenCAGE!
Available as a NuGet package, or alternatively just include this repo as a submodule in your project!
All parsers inherit from a base CathodeFile class which provides:
- A static
Implementationflag, defining if the parser supportsCREATE,LOAD, and/orSAVEfunctionality for the file. Parsers which support all three have the ability to generate files from scratch. - A
Loadedbool, which is true if the parser has populated its values from a pre-existing file that it has loaded. If false, the parser is creating a new file on save. - A
Filepathstring, which is the filepath that the parser is using to either load or save the file. - A
Savefunction, which will save the file out if the parser has theSAVEflag. This function can optionally be given a new filepath to save the file to. Returns false if saving fails. - Events for
OnLoadBegin,OnLoadSuccess,OnSaveBegin,OnSaveSuccesswhich fire at load/save start and successful completion respectively, with the appropriate filepath as an arg.
Most parsers provide access to the file's content via an Entries parameter, however this can vary per implementation.
Note: in debug mode the parsers will all fail hard, however in release mode all load/save calls are wrapped in try/catch statements.
Parsers currently available in CathodeLib...
For scripting:
CATHODE.CommandshandlesCOMMANDS.PAKfiles- The file consists of
Compositescripts which hold variousEntitytypes for logicFunctionEntity= functions which execute functionality, with parameters and links to childEntityobjectsVariableEntity= variables which can be used externally as parameters on an instancedCompositevia aFunctionEntityProxyEntity= a proxy of aFunctionEntitywithin anotherComposite, useful for acting on events in another compositeOverrideEntity= an override of a parameter value on an entity within an instancedCompositein thisComposite
- The file consists of
Check out a full overview of the Commands structure on the Wiki, and follow this handy guide to create your first script!
For assets:
CATHODE.PAK2handlesUI.PAKandANIMATIONS.PAKfilesCATHODE.ModelshandlesLEVEL_MODELS.PAKfiles, paired with aMODELS_LEVEL.BINCATHODE.TextureshandlesLEVEL_TEXTURES.ALL.PAKfiles, paired with aLEVEL_TEXTURE_HEADERS.ALL.BINCATHODE.LEGACY.Assets.Shadershandles variousSHADERSPAKfiles (WIP)
For level data and mappings:
CATHODE.MovershandlesMODELS.MVRfilesCATHODE.RenderableElementshandlesREDS.BINfilesCATHODE.ResourceshandlesRESOURCES.BINfilesCATHODE.MaterialshandlesMODELS.MTLfilesCATHODE.MaterialMappingshandlesMATERIAL_MAPPINGS.PAKfilesCATHODE.EnvironmentMapshandlesENVIRONMENTMAP.BINfilesCATHODE.EnvironmentAnimationshandlesENVIRONMENT_ANIMATION.DATfilesCATHODE.PathBarrierResourceshandlesPATH_BARRIER_RESOURCESfilesCATHODE.PhysicsMapshandlesPHYSICS.MAPfilesCATHODE.LightshandlesLIGHTS.BINfilesCATHODE.CollisionshandlesCOLLISION.BINfilesCATHODE.CollisionMapshandlesCOLLISION.MAPfilesCATHODE.AnimationStringshandlesANIM_STRING_DB.BINandANIM_STRING_DB_DEBUG.BINfilesCATHODE.EXPERIMENTAL.NavigationMeshhandlesNAV_MESHfiles (experimental)CATHODE.SoundNodeNetworkhandlesSNDNODENETWORK.DATfilesCATHODE.SoundLoadZoneshandlesSOUNDLOADZONES.DATfilesCATHODE.SoundFlashModelshandlesSOUNDFLASHMODELS.DATfilesCATHODE.SoundEventDatahandlesSOUNDEVENTDATA.DATfilesCATHODE.SoundEnvironmentDatahandlesSOUNDENVIRONMENTDATA.DATfilesCATHODE.SoundDialogueLookupshandlesSOUNDDIALOGUELOOKUPS.DATfilesCATHODE.SoundBankDatahandlesSOUNDBANKDATA.DATfilesCATHODE.CharacterAccessorySetshandlesCHARACTERACCESSORYSETS.BINfilesCATHODE.CustomCharacterInfohandlesCUSTOMCHARACTERINFO.BINfilesCATHODE.CustomCharacterConstrainedComponentshandlesCUSTOMCHARACTERCONSTRAINEDCOMPONENTS.BINfilesCATHODE.Stringshandles*.TXTfiles
For configurations:
CATHODE.BMLhandles any.BMLfiles- Get/set content as an
XmlDocumentviaBML.Content
- Get/set content as an
For saves:
CATHODE.ProgressionSavehandlesPROGRESSION.AISfilesCATHODE.EXPERIMENTAL.MissionSavehandles*.AISfiles (experimental)
CathodeLib is in no way related to (or endorsed by) Creative Assembly or SEGA.