Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

The NORI Tool Released

Experienced Elementalist
Joined
Oct 2, 2005
Messages
234
Reaction score
48
some new info about NRI from nameless:
PyroSamurai - The NORI Tool Released - RaGEZONE Forums


7th Layer parameter (green outline)

looks like every MyCamp item uses it
The only thing i know is that 0x03 will add 3 x (4 + 4) bytes, 0x02 will add 2 x (4 + 4) bytes and so on
I've tried to change the values
ie: 03 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00
but i couldn't see any difference
---------------------------------------
Last Frame parameter (red outline)
obviously its not some kind of frame terminator :)
0x01 will add various amount of bytes (blue outline)
no idea what it does
Blue area is probably related to how many squares it takes in MyCamp
chair has 02 00 00 00 02 00 00 00
some table 03 00 00 00 04 00 00 00
bed 05 00 00 00 05 00 00 00
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Dec 21, 2017
Messages
38
Reaction score
17
i guess its not a bug, because its not supported

pet_cm_587.nri


image 1:

PyroSamurai - The NORI Tool Released - RaGEZONE Forums


0x06 at the beginning
contains 6 images:


PyroSamurai - The NORI Tool Released - RaGEZONE Forums


i dont know what its good for, it seems that no animation is using this image
there are more images like this in the NRI file (5 i think)
 
Newbie Spellweaver
Joined
Dec 21, 2017
Messages
38
Reaction score
17
1. NORI specs
BitmapData:
data_count: Always 1, May just indicate the start of new bmp - its 0x06 in this NRI file
param_04: looks like its Delay

2. TNT can extract only the first image (out of 6 images grouped together)
 
Libre Software Dev
Developer
Joined
Sep 25, 2012
Messages
676
Reaction score
434
okay, give me a link to download the nori file in question, (don't want to have to look for it since it isn't in the s2 release client). I'll see what I can do about fixing TNT after I analyze the file.
 
Libre Software Dev
Developer
Joined
Sep 25, 2012
Messages
676
Reaction score
434
@BattleCattle Just letting you know that I haven't forgotten about this problem. I just don't like the code duplication my current idea would require and I am trying to find a way around that.

This is a legitimate bug regardless of the number of files affected or what results from the extractions, so it will be fixed.

BattleCattle I finally found a couple days to finish the code for the fix. It's on github now. I don't really think it will make much of a difference in the images you extract though, I did some tests and the subsets are basically copies of images already in the original sets. But TNT now deals with them properly anyways. Problem solved.
 
Last edited:
Newbie Spellweaver
Joined
Dec 21, 2017
Messages
38
Reaction score
17
from TNT/Analyzer.java:

PyroSamurai - The NORI Tool Released - RaGEZONE Forums


is it necessary?
i dont know how hard it would be to change it, so TNT would treat pixels with 0x00 value (first color in the palette) as background
there would be no need for exceptions

another exception: chr008.nri


PyroSamurai - The NORI Tool Released - RaGEZONE Forums
 
Libre Software Dev
Developer
Joined
Sep 25, 2012
Messages
676
Reaction score
434
Actually didn't miss this. Every color I add to the replacement list gets universally change. So I'm very careful about adding any colors to that list. Especially when I don't know for sure if that color is used elsewhere on other images and nori files. Do the legwork to assure me that isn't an issue for this color and I'll add it.

Regarding your other question, the first color in the palette isn't always used as the background color, and I couldn't make such a generalization even if it was true.
Also, they aren't exceptions, they are purposeful bg color changes :)
No, the bg changes aren't necessary but uniformity makes code better and images better ;)
 
Newbie Spellweaver
Joined
Dec 21, 2017
Messages
38
Reaction score
17
hmm, the change to FF 00 FF :)
... Regarding your other question, the first color in the palette isn't always used as the background color ...
then there should be a parameter determining which color is used as a transparent background, right?
do you remember which NRI file is not using the first color as background?
and I couldn't make such a generalization even if it was true ...
hmm :)
 
Libre Software Dev
Developer
Joined
Sep 25, 2012
Messages
676
Reaction score
434
@BattleCattle the palette is only used by the client to display the image when it is an 8-bit image (so basically only chr files). So all non-8bit images? :)

Another line of thought is that the setting information for which colors the client presents as transparent is located in the client files not the NORI data. If we find that I could just copy those colors to the list and not worry about any undesired results. Unfortunately, I don't know where that info is.
 
Newbie Spellweaver
Joined
Dec 21, 2017
Messages
38
Reaction score
17
do you really think that you can use palette in NRI file with 16 or 24 bit images?
if you put it in such NRI file, then its only a waste of time and space

im pretty sure that TO client is using the first color of the palette :)
why should it be otherwise?

you can try it yourself:
change the first color to anything and the game will use it as transparent color

i used FF FF FF (its also color 0x01) and it works

PyroSamurai - The NORI Tool Released - RaGEZONE Forums
 
Libre Software Dev
Developer
Joined
Sep 25, 2012
Messages
676
Reaction score
434
You misunderstood my first statement, I was saying that all non-8bit images don't have a palette to pick the "first color" from, so that is how I know that the the client uses a different criteria for non-8bit transparency.

Nice to know that that is how the client handles transparency for 8-bit though. Nice find.
 
Newbie Spellweaver
Joined
Dec 21, 2017
Messages
38
Reaction score
17
You misunderstood my first statement, I was saying that all non-8bit images don't have a palette to pick the "first color" from, so that is how I know that the the client uses a different criteria for non-8bit transparency.
my mistake, sorry



param_05 and twoNums seems to be related

PyroSamurai - The NORI Tool Released - RaGEZONE Forums


it looks like twoNums only exists if param_05 = 1

but still no idea what it does :)
 
Libre Software Dev
Developer
Joined
Sep 25, 2012
Messages
676
Reaction score
434
@BattleCattle I've been rereading your posts from #29 on. I realized that with your discovery that the 1st color of the palette is the bg color for 8bits, I could make the code you pointed out much better. With the location being static I don't have to worry about what the color is.

The new code handles any color to pink like you suggested. I've already pushed the new code to github.
Just wanted to thank you for pointing it out. Made sure to give you credit in the commit message.
Sorry for not seeing this sooner.
 
Newbie Spellweaver
Joined
Dec 21, 2017
Messages
38
Reaction score
17
Many years of work have now come to fruition for me.

Edit (Dec 11, 2019):
(the professor): ...
So I've been working all-day for almost 2 weeks now on TNT, adding feature after feature.
This culminated in the completion of Creation feature.
Unlike previous attempts, mine doesn't stop at loading images.
You can modify or create any non-8bit NORI file you want. (My JBL doesn't support 8-bit creation, atm)

...

about the config file:

lets say i have extracted chr001.nri -> i have 24-bit BMP images
now i want to create the same NRI file as chr001.nri (using 24 bpp BMP images, but changing them to 16 bpp)
same animations as well

how would config file look?

merry christmas
:D:
 
Libre Software Dev
Developer
Joined
Sep 25, 2012
Messages
676
Reaction score
434
@BattleCattle FINALLY SOMEONE POSTS!!!! I knew I could count on you.

yes, you can do that. change the bpp to 16 in the config and then change the fsize, gsize, bmpoffsets, and dlens. Someone could probably make a nice GUI that does all this everytime you change one of them (dynamic sizing) but it won't be me.

Thank you for posting. I was getting really annoyed with the lack of response to such a release.

Btw, if you're using photoshop to do the resizing, if it fails it's probably b/c PS added some null bytes at the end. I wrote my own program to resize images using my JBL. Oh and photoshop, export as xrgb555, no other options should be selected.
 
Last edited:
Newbie Spellweaver
Joined
Dec 21, 2017
Messages
38
Reaction score
17
i didnt expect to learn about new version in a different thread

----------------
what i meant was an actual example, how to write it
do i write there a list of paths to images?
how?
separated by comas?
how do i define each animation and frame?
do i use parameter names from Create.java?
there are differences from NORI format.md
please, could you show me? (something simple)
thanks
 
Back
Top