PDA

View Full Version : NPA format


Minagi
2009-04-24, 13:27
I've finished my documentation and program for the NPA file format used in Nitro+/Nitro+CHiRAL games since late 2006. I know crass can already extract the archives but it can only do that and it's without docs. My tool allows you to extract and create NPA archives. Currently Django and Lamento Trial are not working because the formats are slightly different but I plan to support them later.

download (bin): http://www.mediafire.com/?28loj4xpo3dggpd
download (src): http://www.mediafire.com/?t4fz2piq52ng50a
docs: http://www.tsukuru.info/nipa/npadoc.html

usage:
General
-h - Help. Displays this information.

Extraction
-x (file) - Extract NPA archive
-g (id) - Game ID for encryption (if applicable). Defaults to ChaosHead if no encryption is entered

Creation
-c (folder) (output file) - Create archive
-z - Compress files

Examples
-x nss.npa - Extract nss.npa into the folder "nss"
-xg nss.npa MuramasaTr - Extract nss.npa into the folder "nss" using the Muramasa Trial encryption
-c nss nss.npa - Create an archive out of the folder "nss"
-cz nss nss.npa - Create a compressed archive out of the folder "nss"

(Type -h in the program to see the list of game IDs to use for decryption/encryption.)

DO NOT compress a CG folder. There is little change in size by doing so and it messes up the engine. This is a problem with the engine and Nitro+ doesn't compress their CG files because of it.

Please report any bugs. I'm also not a technical writer so let me know if there's something unclear in my documentation.

If you are having troubles with locales, try Tsukiko's modified version: https://github.com/Wilhansen/nipa/downloads

Weinx
2009-06-29, 12:27
^Thanks for the update Minagi.

Unregistered
2009-07-12, 14:09
hello a group of friends and me are trying to make a english patch for lamento and im trying to work on the technical part and your stuff looks like it will help but your links are dead (or just not working for me)

dsp2003
2009-07-12, 21:29
They've deleted the stuff on purpose, so there's nothing you can do.

P.S. Ask somebody at forum in PM, there are must be some copies left.

Edit: Ahaha, my bad, Minagi. ^^' With all stuff happened at TLWiki I started to suspect everyone...

Minagi
2009-07-12, 21:34
They've deleted the stuff on purpose, so there's nothing you can do.

P.S. Ask somebody at forum in PM, there are must be some copies left.
You're wrong. It wasn't deleted, I simply forgot to change the filenames in the first post.

http://loliserv.org/~elixir/noah/nipa/

Updated first post.

Unregistered
2009-07-13, 11:23
thank you!!!

Unregistered
2009-09-30, 13:27
Links don't work. =[

Minagi
2009-09-30, 16:12
Loliserv is having issues right now it seems (I can't even access it). I don't have control over the server so the best thing I can do is tell you to give it another try in a few hours or tomorrow.

Unregistered
2009-09-30, 16:18
Loliserv is having issues right now it seems (I can't even access it). I don't have control over the server so the best thing I can do is tell you to give it another try in a few hours or tomorrow.

I didn't expect such a quick reply. I'll try again tomorrow, but do you think it would be possible to email the files? (That might be asking a bit much. Sorry.)

Unregistered
2009-10-03, 00:09
the link still doesnt work TT^TT, is it possible that you send the file to us??

dsp2003
2009-10-03, 01:24
For the time being, here's the 7-zipped 2009/06/30 version with source and copy of it's page (http://ever17.narod.ru/trash/nipa-20090630.7z). The link will expire in about 5-10 days, when I'll do the cleanup.

Minagi
2009-10-03, 11:04
the link still doesnt work TT^TT, is it possible that you send the file to us??
If it's not up by next week, I'll rehost it on my website. I can't remember if the version on my computer is newer or not (too lazy to get up and check).

Minagi
2009-10-06, 12:08
I've been busy the past few days so I haven't had much of a chance to rehost everything.

The links in the first post have been changed. The new directory for nipa is http://amaterasu.is.moelicious.be/nipa/.

Unregistered Again
2009-10-07, 15:19
Thanks for the update!

LoneTiger
2011-07-13, 19:14
Thank you for this little tool, i was having trouble with crass for Demonbane, it kept extracting the files but encrypted, this little tool was very easy to use :)

Keep the good work.

Tsukiko
2012-02-26, 18:43
I hope you don't mind Minagi but I upped the source of nipa in github https://github.com/Wilhansen/nipa and modified the code to be non-japanese-locale-friendly (i.e. it can extract japanese file names even if the system locale is not Shift-JIS).

Minagi
2012-02-29, 15:14
I don't mind but the source code you are working with is more than half year out of date (even older than the one hosted on tsukuru). Here's the latest version: http://www.mediafire.com/?ga79dk40qaflq2y

I guess my only request is that you include a binary release every once in a while (especially when/if you add new games) since I intended for this to be for the average person (mostly just those working on fan translations using the N2System engine) and not just people who knew how to compile the code.

I'm kinda curious, is there any particular reason you wanted to fix it up? I know my code isn't all that great but I figured it would have been too specific of a tool for anyone besides me to care about maintaining.

Tsukiko
2012-03-02, 05:40
I don't mind but the source code you are working with is more than half year out of date (even older than the one hosted on tsukuru). Here's the latest version: http://www.mediafire.com/?ga79dk40qaflq2y


Ooooh, ok. I'll merge the changes as soon as I can (probably over this weekend). Is this purely a bugfix or did you add something?


I guess my only request is that you include a binary release every once in a while (especially when/if you add new games) since I intended for this to be for the average person (mostly just those working on fan translations using the N2System engine) and not just people who knew how to compile the code.

No problem. Actually, the download links are here: https://github.com/Wilhansen/nipa/downloads (YAY free file hosting). I also changed the TLWiki page link to this url.


I'm kinda curious, is there any particular reason you wanted to fix it up? I know my code isn't all that great but I figured it would have been too specific of a tool for anyone besides me to care about maintaining.

I was working with the people on the Lamento project and well, it seems that the executable requires resources to be encrypted for it to be loaded. So I implemented encryption for repacking (thank goodness the cipher is symmetric). So don't worry, I'm not on a code-cleaning crusade :)

Also, as what I've said previously, I want it to be usable for people who are too lazy to set their system locale to Japanese (like me :P). Actually... this is the initial reason why fudged with the code.

This might be redundant but: thanks for the documentation!

Minagi
2012-03-02, 13:10
Ooooh, ok. I'll merge the changes as soon as I can (probably over this weekend). Is this purely a bugfix or did you add something?
Just adding stuff. At this point the only time it gets updated is to add new games. I'll probably still be updating it for as long as the engine is still in use or until I no longer care.

Also, as what I've said previously, I want it to be usable for people who are too lazy to set their system locale to Japanese (like me :P). Actually... this is the initial reason why fudged with the code.
Not a big deal but your modifications make all of the Japanese display as ?s for me in the command prompt.

Good luck with Lamento!

Tsukiko
2012-03-03, 00:35
Incorporated the additions you made. If you have a github handle, I can add you as a project collaborator if ya want.

As for the japanese text issue, well, I sorta "fixed" the issue with the new build (you may want to test it out again). It's not 100% bullet-proof because Unicode support in windows is... shall I say... broken:

For example, if you pipe the output to a text file, "type dump.txt" will show you garbage but if you open it in notepad, it will show you the text properly. Saving the text and typing "type dump.txt" in the command line will show you the fixed output.

Another is when you have a non-japanese console, the output will contain the dreaded "[]". But if you copy-paste it to something like notepad... it appears fine.

Minagi
2012-03-03, 02:27
I don't have a github account or even git installed so I'll have to pass on that. The text looks alright now too.

Unregistered
2012-03-09, 18:33
Nitro+ released a new trailer for an upcoming game, it uses some new encryption though.

http://www.nitroplus.co.jp/game/lost_x/story/trailer/

There's cg, nss, sound, and system .npa files along with a directx folder. It'd be great if someone who knew what they were doing could take a look at it, there's some really nice art!

Minagi
2012-03-12, 01:54
Thanks for the heads up, Unregistered. Updated to support the Lost Xmas trailer.

Bin: http://www.mediafire.com/?ww29snnibeim7ir
Src: http://www.mediafire.com/?7m46wq9lb68t56j

Tsukiko
2012-03-14, 19:31
just to notify, also updated the binary at the github.

swiftnissity
2012-04-05, 06:38
Any chance you could make it compatible with DMMD? (http://vndb.org/v5916)
Considering it for a future project after Togainu.

Tsukiko
2012-04-09, 09:39
I'll see what I can do after I manage to get the game running (3 gigs wow)... But Minagi might beat me to it :P

Minagi
2012-04-09, 16:22
I'll see what I can do after I manage to get the game running (3 gigs wow)... But Minagi might beat me to it :P
Eh, sorry. :P You could can usually just download patch data if it's available since they usually include the EXE.

Updated first post with new versions.

By the way, I've been kinda working on a Go version in my free time just to play around with the language a little bit. It fixes a lot of the issues I had with my original design and the code is nicer. It's just a little bit slower, though. I may start only maintaining the Go version once it's near finished.

Tsukiko
2012-04-10, 17:13
Naw, it's ok as long as things get done :) (that was fast)

I was plannin' to figure out how to extract the key table myself so yeah XD

Avalon
2012-07-27, 08:57
Nitro+ released a new trailer (ver. 2.0), i think it uses some new encryption.
Sorry my English is not good.
www.nitroplus.co.jp/game/lost_x/story/trailer

Minagi
2012-07-29, 18:32
Nitro+ released a new trailer (ver. 2.0), i think it uses some new encryption.
Sorry my English is not good.
www.nitroplus.co.jp/game/lost_x/story/trailer
Thanks for the report of a possible new encryption but it looks to be the same as the first trial's encryption. Use the following parameters: "nipa.exe -xg (file).nss LostXTrailer". It works for me on the nss.npa and cg.npa files I tried.

Avalon
2012-07-31, 10:06
Thanks for the report of a possible new encryption but it looks to be the same as the first trial's encryption. Use the following parameters: "nipa.exe -xg (file).nss LostXTrailer". It works for me on the nss.npa and cg.npa files I tried.

Oh, realy. Sorry, when i try extract file on this computer i have NUL in any file. But on another computer it work.
And you could work on full game Guilty Crown Lost Xmas?
Here is disk image (If you need it)
[URL removed.]

Or maybe i'm wrong because Nipa can extract files from nss.npa, but when i open this file Example lx0601.nss i can see only NUL
http://thumbnails76.imagebam.com/20399/6cecb5203987150.jpg (http://www.imagebam.com/image/6cecb5203987150)

And again sorry for my English.

Message
2012-07-31, 22:22
Please do not post links to warez.

Triplego
2012-08-01, 07:57
Full LostXmas can be found on any relevant torrent site. I too tried extracting files from it, but none of them are (dis)played correctly. Tried two different computer builds, got the same results.

Avalon
2012-08-01, 08:16
Please do not post links to warez.

Sorry about this. This does not happen again.

Triplego
2012-08-01, 20:51
Also, this extractor doesn't work on Phenomeno (promo game for a novel with the same name): http://www.nitroplus.co.jp/game/phenomeno/

MiLØ
2012-08-01, 22:29
Thanks a lot for this great tool. Gotta love art in Nitro+ novels.
Hopefully you guyz can add a proper Lost Christmas support in the future.

Kudos.

Minagi
2012-08-03, 09:51
First post updated with new links. It now supports both the Phenomeno trial (use the game name "PhenomenoTr") and Guilty Crown Lost Xmas (use the game name "LostXmas").

Avalon
2012-08-03, 12:29
First post updated with new links. It now supports both the Phenomeno trial (use the game name "PhenomenoTr") and Guilty Crown Lost Xmas (use the game name "LostXmas").

Thank you very much.

MiLØ
2012-08-03, 14:14
Awesome, thanks a lot for "LostXmas" support!

Swiftnissity1
2012-09-14, 00:31
Small question; I'm on the Dramatical Murder translation team but the game apparently doesn't like English punctuation. Are you able to assist us?

Swiftnissity1
2013-01-22, 14:36
Small question; I'm on the Dramatical Murder translation team but the game apparently doesn't like English punctuation. Are you able to assist us?
We've since fixed this punctuation issue but have one other problem perhaps you can assist with.

The game includes .ngs files for the movie sequences, some of which contain text important to the game. Is it possible to include these in NIPA? CRASS is able to rip the movie files but of course can't repack them.

I've attached the first one in the game here:
http://www.mediafire.com/?d2d5b6y9f02gi63

Unregistered
2013-03-25, 01:08
We've since fixed this punctuation issue but have one other problem perhaps you can assist with.

The game includes .ngs files for the movie sequences, some of which contain text important to the game. Is it possible to include these in NIPA? CRASS is able to rip the movie files but of course can't repack them.

I've attached the first one in the game here:
http://www.mediafire.com/?d2d5b6y9f02gi63

File is an mpeg mate

Video: MPEG1 Video 256x224 29.97fps [Video]
Audio: MPEG Audio 44100Hz stereo 128kbps [Audio]

They just renamed the file extension, you will have to find a sub group.

Swifty
2013-04-27, 15:28
Would it be possible to add the Dramatical Murder fandisk to NIPA?
The same group that worked on the main game is interested in working on the fandisk.

If it helps:
The DramaticalMurder encryption rips everything but nothing can be viewed (images/script/ect)

I've uploaded the exe file and the script here:
http://rapidgator.net/file/c144ddadc52b7e41f230fa769acb43dd/DMMD_reconnect.rar.html

Tenya
2013-05-01, 02:39
Yeah, it rips everything but nothing works, so would it be possible to add the fandisc? I wanted to get the OST, but it's impossible for now.

banhtieu
2013-05-21, 01:56
Hi, I've tried to extract nss.npa file from Steins;Gate but failed, and it said "Invalid NPA archive". Please help me, and sorry for my english.

fujoshi-chan
2014-02-01, 13:33
Any chances of it work with Togainu no Chi? If not, can you please make a patch (if I'm not asking too much, that is...).
And one more thing, I know this may not be the right place to ask this, but how can I edit the sript from the .nss files?

Unregistered
2014-02-09, 08:01
Can you add support for the full version of Phenomeno? I really need to get it's OST and some CGs.

raphael512
2014-03-29, 21:44
hello sir , do you have any tool that can extract .arc file archives?

Belderak
2014-03-30, 06:54
.arc can be extracted with arc_conv ;)

sunmaid
2014-10-07, 02:34
I was going to try my hand at translating the nitrochiral april fools' game (I have a copy of it here (http://www.mediafire.com/download/oh67sfjb2b6m0nx/osu_trial.zip)) but none of the game IDs appear to work for encryption (extracted .nss files are blank, .ogg files will not play, and .jpg and .png files don't display).

My question is, what's involved in determining a Game ID? Is this something I can manage on my end, or does support have to be added in nipa?