|
|

So for example the skeletons index basically consist of,
Animation Cache Index-> Skeleton File -> Skeleton file contains subskeleton files (correct me if im wrong)
Now is my question how do i grab these "child files" in openrs, I tried this but it doesnt seem to be correct;
Code:public static byte[] getChild(int store, int skeletonID, int childId) { try { CacheIndex index = store == SKIN_FILESTORE ? CacheIndex.SKINS : CacheIndex.SKELETONS; Container container = Container.decode(cache.getStore().read(CacheIndex.REFERENCE, index)); ReferenceTable table = ReferenceTable.decode(container.getData()); ReferenceTable.Entry entry = table.getEntry(skeletonID); Archive archive = Archive.decode(cache.read(index, skeletonID).getData(), entry.size()); ReferenceTable.ChildEntry child = entry.getEntry(childId); if (child == null ) return null; ByteBuffer buffer = archive.getEntry(child.index()); return buffer.array(); } catch (Exception e) { e.printStackTrace(); } return null; }
First of all there are no Skins or Skeletons. Index 1 are frames which are used to animate your character, and index 0 are frame bases which tells client which vertex points to animate. Download this [Only registered and activated users can see links. ] it's less verbose than OpenRS and it's easier to access 400+ cache.
vsCode:byte[] buffer = cache.getFilesSystem(0).findFolderByID(frame).findFileByID(0).getData().getBuffer();
Code:public static byte[] getChild(int store, int skeletonID, int childId) { try { CacheIndex index = store == SKIN_FILESTORE ? CacheIndex.SKINS : CacheIndex.SKELETONS; Container container = Container.decode(cache.getStore().read(CacheIndex.REFERENCE, index)); ReferenceTable table = ReferenceTable.decode(container.getData()); ReferenceTable.Entry entry = table.getEntry(skeletonID); Archive archive = Archive.decode(cache.read(index, skeletonID).getData(), entry.size()); ReferenceTable.ChildEntry child = entry.getEntry(childId); if (child == null ) return null; ByteBuffer buffer = archive.getEntry(child.index()); return buffer.array(); } catch (Exception e) { e.printStackTrace(); } return null; }
| « Incorrect Wall Textures in Draynor | Adding Customs [Macintosh Help] » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |