Skip to content

Repository files navigation

TACTLib TACTLib

License: MIT


Usage:

Creating a ClientHandler

The ClientHandler is the base object that controls the CAS(C).

The path passed to ClientHandler should be the base path of the game install. E.g. where the game executables are. Upon creation, the client handler will load everything required for CASC operation.

stringpath=@"C:\ow\game\Overwatch";ClientHandlerclientHandler=newClientHandler(path);

Logging:

Logging is handled through the TACTLib.Logger class. It has events that are triggered by TACTLib during runtime. Basic logging can be enabled by using TACTLib.Logger.RegisterBasic. That method also serves as an example of how to do custom logging. (see Logger.cs)

// enables the default basic logger. should be called *before* creating the clientLogger.RegisterBasic();

Product specific:

(none of this is true yet)

VFS: (Black Ops 4)
ClientHandlerclient=newClientHandler(path);if(client.VFS==null){// invalid installreturn;}VFSFileTreevfs=client.VFS;using(Streamstream=vfs.Open(@"zone\base.xpak")){// do whatever}foreach(stringfileNameinvfs.Files.Where(x =>x.StartsWith(@"zone\"))){using(Streamstream=vfs.Open(fileName)){// could do this too}}
Tank: (Overwatch)

TACTLib is used internally in TankLib/DataTool.

ClientHandlerclient=newClientHandler(path);ProductHandler_TanktankHandler=client.ProductHandlerasProdcuctHandler_Tank;if(tankHandler==null){// not a valid overwatch installreturn;}using(Streamstream=tankHandler.OpenFile(0xE00000000000895)){// open any asset you want// in this case, parse the material}
WorldOfWarcraftV6: (World of Warcraft)

Not all features are implemented yet. Anything below is a concept.

ClientHandlerclient=newClientHandler(path,newClientCreateArgs{HandlerArgs=newClientCreateArgs_WorldOfWarcraft{ListFile="https://raw.githubusercontent.com/wowdev/wow-listfile/master/listfile.txt"}});ProductHandler_WorldOfWarcraftV6wowHandler=client.ProductHandlerasProductHandler_WorldOfWarcraftV6;if(wowHandler==null){// not a valid warcraft installreturn;}using(Streamstream=wowHandler.OpenFile("world/maps/azuremyst isle (7.3 intro)/azuremyst isle (7.3 intro).wdt")){// open any asset you want// in this case, parse wdt}foreach(stringfileinwowHandler.GetFiles("world")){// will be empty if listfile is invalid}foreach(stringdirinwowHandler.GetDirectories("world")){// will be empty if listfile is invalid}

We can't wait to see the amazing things you will do with it

Used by

Contributors

Languages