While the GriFFin project, as of now, is about the library, first and foremost, there are some sample applications that showcase API use and may be of some limited use on their own.
This is intended to evolve into collection of command-line utilities. Right now, the only feature supported is unpacking ERF or BIF files.
If you run it without specifying a command, you get a list of valid commands, like this:
C:\griffin-cli\target>java -jar griffin-cli-1.0-SNAPSHOT-jar-with-dependencies.jar
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
Please specify a command as the first argument.
Valid commands are: unpack
Ignore the lines starting with SLF4J, or add a SLF4J logger implementation of your choice, if you want to actually configure some logging, e. g. for debugging purposes.
The unpack command has a help page that tells you how to use it. If you're trying to extract resources from BIF, make sure you understand how BIF and KEY files work together. To extract from BIF, this tool requires you to have a KEY file. The KEY file, however, could also reference other BIF files for some resources. Those will not get extracted. If you have a KEY file that has the keys for six BIF files, to extract them all you would have to run the comman six times, specifying a different BIF file along with the same KEY file, each time.
C:\griffin-cli\target>java -jar griffin-cli-1.0-SNAPSHOT-jar-with-dependencies.jar unpack
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
This command extracts ERF and BIF files. By default it
expects an ERF file. To extract a BIF file, you specify
the corresponding KEY file with the key parameter. In
BIF extraction mode, this command only extracts resources
mentioned in the KEY file from the BIF files mentioned on
the command line. It does not try to _find_ BIF files
based on the information from the KEY file.
All files are extracted to the current directory.
Non-option arguments:
[File] -- Files to extract.
Option Description
------ -----------
-?, --help Display help/usage information.
-K, -k, --Key, --key <File> Use the specified KEY file. This also changes
behaviour to BIF extraction
-v, --verbose Print verbose output.
Build from source or download here
This is a quickly hacked together and totally ugly demo web application to spark off some imagination. You can download it from the "griffin-web-app" folder in the files section.
Use it like this with a NWN:EE installation that has subdirectories in the server vault by player public key:
conf/tomcat-users.xml below where you extracted the tomcat archive. Add lines like the following: <role rolename="player"/> <user password="ready" roles="player" username="player1"/>webapps/griffin in the tomcat installation and extracting the war file there: jar xvf griffin-web-app-<version>.warwebapps/griffin/WEB-INF/classes/nwn.properties to point to your server vault directoryThe use case that is implemented here is where you want to allow people to manage their own player characters, but need to be sure they actually own the account. You likely don't want to manually process people's claims that account XYZ is theirs. A challenge-response mechanism springs to mind, like this:
This is all a long way from complete. It doesn't even do conflict resolution for when multiple people claim an account. But feedback is very welcome.
And if you're a UI hacker and want to turn this into a cool HTML5 AJAX thing that pulls everything from the game resources to eventually become a full-blown graphical character editor, go for it :P