From c0e48af5f3807442e34205fd43d9d501d8d082b4 Mon Sep 17 00:00:00 2001 From: Displee Date: Mon, 26 Nov 2018 23:17:41 +0100 Subject: [PATCH] Update README.md --- README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 39ccfd2..355a0b3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -##Welcome to Displee's cache library! +## Welcome to Displee's cache library! -##About +## About An application that is written in Java, used to read and write to the caches of RuneScape2. This application is able to read and write to various types of RuneScape2 caches between the revisions 561 and 743. A RuneScape2 cache is built of a 2-level container and in each level 1 container is the actual data of the game stored. @@ -14,7 +14,7 @@ The containers can contain multiple containers which makes you able to store a g A file contains useful data like the properties of a certain in-game item, object, image or even model. The application is able to read this data, and write manipulated read data to the cache. -###Features: +### Features: - XTEA (en/de)cryption. - Whirlpool hash generating. - CRC hash generating. @@ -28,19 +28,19 @@ The application is able to read this data, and write manipulated read data to th - Adding and removing files in an archive. - More to come... -######Note: it's only possible to add an index after the last index of a cache. The id of the new index will be the id of the last index increased by one. +###### Note: it's only possible to add an index after the last index of a cache. The id of the new index will be the id of the last index increased by one. -##How to use +## How to use -###Initialize your cache +### Initialize your cache ```Java -CacheLibrary library = new CacheLibrary("path_to_your_cache", 562);//Cache revision for optimal usage. +CacheLibrary library = new CacheLibrary("path_to_your_cache", CacheLibraryMode.UN_CACHED);//Uncached doesn't save data in the files of an archive ``` -###Get a specific file +### Get a specific file ```Java library.getIndex(19).getArchive(81).getFile(34);//Completionist cape ``` -###Add an archive to an index +### Add an archive to an index ```Java library.getIndex(7).addArchive(); ``` @@ -56,9 +56,9 @@ library.getIndex(7).addArchive(library.getIndex(7).getArchive(3223).copy()); ```Java library.getIndex(7).addArchives(library.getIndex(19).getArchives());//Add multiple archives ``` -###Add a file to an archive +### Add a file to an archive ```Java -library.getIndex(7).getArchive(3223).addFile(5, byte_array); +library.getIndex(7).getArchive(3223).addFile(0, byte_array); ``` ```Java library.getIndex(7).addArchive(3223).addFile("file_name", byte_array); @@ -72,7 +72,7 @@ archive.addFile(byte_array); ```Java library.getIndex(12).addArchive(1337).addFile("yol0"); ``` -###Remove an archive or file +### Remove an archive or file ```Java library.getIndex(12).removeArchive(1337); ``` @@ -85,13 +85,13 @@ library.getIndex(12).getArchive(1337).removeFile(0); ```Java library.getIndex(12).getArchive(1337).removeFile("open_bank"); ``` -###Update your cache after changes (important) +### Update your cache after changes (important) ```Java library.getIndex(7).removeArchive(4746);//Not saved into the cache yet. library.getIndex(7).getArchive(3223).removeFile(0);//Not saved into the cache yet. library.getIndex(7).update();//Now its written and saved in the cache. ``` -###Cache an index +### Cache an index ```Java library.getIndex(10).cache(); ``` @@ -100,14 +100,14 @@ int[][] xteas = new int[5][]; xteas[3] = new int[] { 5, 10, 20 };//Setting xteas for archive 3 library.getIndex(5).cache(xteas); ``` -###Data manipulation +### Data manipulation ```Java byte[] data = library.getIndex(19).getArchive(81).getFile(34).getData(); data[0] = 5; library.getIndex(19).getArchive(81).addFile(34, data); library.getIndex(19).update(); ``` -###Cross cache copying +### Cross cache copying ```Java final CacheLibrary from = new CacheLibrary("path_1_here", 742); final CacheLibrary to = new CacheLibrary("path_2_here", 718); @@ -119,9 +119,9 @@ to.getIndex(3).update(); Easy, isn't it? There are plenty more functions you can use, check it out! -######Note: if you add or delete archives/files, this is not directly written to the cache, to write it to the cache, you should update your cache. -######Note: if there are any issue's, please report them [here](https://github.com/Displee/RS2-Cache-Library/issues). +###### Note: if you add or delete archives/files, this is not directly written to the cache, to write it to the cache, you should update your cache. +###### Note: if there are any issue's, please report them [here](https://github.com/Displee/RS2-Cache-Library/issues). -###License +### License Displee's cache library is open-sourced software licensed under the MIT license.