guthix / jagex-store-5 Goto Github PK
View Code? Open in Web Editor NEWA library for modifying Jagex Store 5 game files
License: Apache License 2.0
A library for modifying Jagex Store 5 game files
License: Apache License 2.0
Both to maven central and github package repository
Netty ByteBuf shouldn't be exposed by the Jagex-Store-5 API.
ByteArray can be used instead.
Adding a brand-new group doesn't seem to actually write said group into the cache.
The code used to write:
if (serverOnlyCache) {
val basGroup = runCatching { configArchive.readGroup(BaseAnimationSetConfig.id) }
.getOrElse { Js5Group(BaseAnimationSetConfig.id, 0, 1) }
ConfigArchive.configs.basConfigs.toSortedMap().forEach { (id, value) ->
basGroup.files[id] = Js5File(id, null, value.encode(serverOnlyCache))
}
configArchive.writeGroup(basGroup, appendVersion = true)
}
cache.writeArchive(configArchive)
BaseAnimationSetConfig.id = 15
Number of files being encoded = 1
Edit: After some investigating, I've found out the issue to be the fact that it adds in the middle of the groups. The map behind the groups must be sorted for some reason, so adding this:
val settings = configArchive.groupSettings.toSortedMap()
configArchive.groupSettings.clear()
settings.forEach { (key, value) -> configArchive.groupSettings[key] = value }
Right before the cache.writeArchive(configArchive)
solved the issue.
The same issue applies for individual files. They must be sorted manually by the user, or else it corrupts the cache and writes the ids completely weird.
The image shows the version being encrypted, this is actually not true
These are hard to read on Github darkmode.
This could be used for validation and to get the archive count.
It stores the CRC-32 of the uncompressed data (the other CRC hash stores the CRC-32 of the compressed data).
-Thanks to Graham
For both NXT and Java client.
Hello,
I'm trying to use the library to decode the osrs cache for last revision.
I get this error:
15:36:25.212 [main] DEBUG io.guthix.cache.js5.container.disk.Js5DiskStore - Reading index file 255 container 14 15:36:25.213 [main] DEBUG io.guthix.cache.js5.container.disk.Js5DiskStore - Reading index file 255 container 15 15:36:25.213 [main] WARN io.guthix.cache.js5.container.disk.Js5DiskStore - Could not read index file 255 container 16 because the index does not exist Exception in thread "main" java.lang.IndexOutOfBoundsException at io.netty.buffer.EmptyByteBuf.readUnsignedByte(EmptyByteBuf.java:534) at io.guthix.cache.js5.container.Js5Container$Companion.decode(Js5Container.kt:111) at io.guthix.cache.js5.container.Js5Container$Companion.decode$default(Js5Container.kt:110) at io.guthix.cache.js5.container.heap.Js5HeapStore$Companion.open(Js5HeapStore.kt:61)
Has I understand the lib does not support last revision at the moment.
I am willing to contribute but I have only little comprehension of osrs cache format.
Do you have any clue or idea on how to fix that issue?
Thx
Do testing using samples from games like OSRS, RS3 and maybe also funorb games.
In Runescape 3 more than one .dat2 file can be present in a single cache.
Unreferenced sectors can be created by either:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.