Jump to content


Photo

NearInfinity


  • Please log in to reply
1165 replies to this topic

#861 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 14 November 2017 - 11:46 AM

I am not sure this works as intended:

 

Spoiler

 

Or it's not a bug and filters are working exactly as they are supposed to?


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#862 Argent77

Argent77
  • Administrator
  • 1418 posts

Posted 14 November 2017 - 12:06 PM

The output filter works as intended (just try it out with one of the many split item description images, e.g. CAMUL02.BAM).

In you case the center location of the BAM frames doesn't produce a seamless image. I'd guess the game engine does some internal calculations to render the image. You could manually adapt the Y value of the frame center location, but that would require some trial and error. It's probably easier to export the BAM frames as graphics and manually assemble them in a graphics editor.
 



#863 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 14 November 2017 - 12:12 PM

Thank you for prompt reply Argent77, I'll adjust it manually then :)

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#864 Argent77

Argent77
  • Administrator
  • 1418 posts

Posted 24 November 2017 - 08:11 AM

Update: NearInfinity v2.1-20171124

Changes:

  • Added option to scale the default font sizes of UI controls (Options > Change Global Font Size), which should improve usability on high DPI monitors.
  • Switched color selection control, as used by creature colors or effect opcode 7 (Set Color), from slider to list.
  • Area Viewer: Use individual color shades for different region types (trap, info, travel).
  • BAM Converter: Resize filter supports scaling along individual axes.
  • Improved description of PRO area flag labels regarding target selection.
  • Improved icon display of SPL and ITM resources in Viewer tabs.
  • Reference search should ignore empty CRE script names.
  • Fixed a bug that prevented BALDUR.SAV files from being compressed if they contained empty files.
  • Various internal fixes and optimizations.

 

The new option "Change Global Font Size" (found under Options menu) has been added to help users on monitors with 4k or higher resolutions. I didn't have the opportunity to test NI with these resolutions yet, so any feedback is highly appreciated.



#865 Vlad

Vlad
  • Member
  • 577 posts

Posted 01 December 2017 - 02:36 PM

I don't know what you did to the code, but it is now damaging saved games. In the previous versions of yours, it was impossible to compress the saved game files at all. Now it's possible, but it is still killing some areas in the saved game. 

 

[EDIT] See the attached save. You won't be able to see it in the game because you don't have my files, but maybe you can see the code. The completely broken area is TT7005. Also, TT7001 makes problems. I didn't test other areas in this save, but may be they are too.

Attached Files


Edited by Vlad, 01 December 2017 - 02:43 PM.


#866 Argent77

Argent77
  • Administrator
  • 1418 posts

Posted 01 December 2017 - 03:07 PM

I couldn't reproduce the issue with the attached save in latest NI version (v2.1-20171124). The content of the BALDUR.SAV is identical with the original after a recompress operation. The file TT7005.ARE doesn't show any signs of corruption in NI either.

However, I'm using a different compression rate as the game. Maybe this is something the game chokes on. Could you test recompressing the save again with the attached NI version?
 

Attached Files



#867 Vlad

Vlad
  • Member
  • 577 posts

Posted 02 December 2017 - 03:06 AM

Nothing works. After re-compressing, the area is downloaded but in a couple of seconds freezes. Any attempt to move to another area is freezing on the save game screen. Any saved game re-compressed behaves similar. At some point it starts freezing (when attacking enemies or moving to another area etc.)

 

[EDIT] You may try to revert to original code to solve the problem. The original release 1.32 and even the release 1.33 from 2012 were very stable with no major issues.


Edited by Vlad, 02 December 2017 - 03:08 AM.


#868 Argent77

Argent77
  • Administrator
  • 1418 posts

Posted 02 December 2017 - 04:19 AM

There must be something else interfering. The NI version attached to my previous post produces a BALDUR.SAV that is bit-exact with the file from your attached save.



#869 Vlad

Vlad
  • Member
  • 577 posts

Posted 02 December 2017 - 01:41 PM

I've decompressed and compressed the save game with NI 1.33 - no problems. Did the same with the version you attached, and the saved game started again to freeze. I don't know but there must be some explanation. Maybe you're right - the problem is in somewhere else.



#870 Argent77

Argent77
  • Administrator
  • 1418 posts

Posted 02 December 2017 - 02:45 PM

The only notable difference between older and newer releases is a new Java I/O API I'm using to perform read and write operations on files. I haven't heard of any compatibility issues with the new API though.

If you want to check if it makes a difference, you could try your luck with NI v1.36-20160214 (last release with the old I/O API and Java 6 compatibility).



#871 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 09 December 2017 - 08:46 PM

It would be super awesome if the Convert image to MOS dialog could handle multiple input files at a time (or even just a whole folder of images).  The same probably goes for the image to TIS converter.  Any chance that could happen?


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#872 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 10 December 2017 - 12:53 AM

It would be super awesome if the Convert image to MOS dialog could handle multiple input files at a time (or even just a whole folder of images).  The same probably goes for the image to TIS converter.  Any chance that could happen?

You mean like this tool?

http://www.shsforums...tis#entry590082


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#873 Argent77

Argent77
  • Administrator
  • 1418 posts

Posted 10 December 2017 - 04:38 AM

It would be super awesome if the Convert image to MOS dialog could handle multiple input files at a time (or even just a whole folder of images).  The same probably goes for the image to TIS converter.  Any chance that could happen?

I'll add batch functionality to my todo list, but I can't promise anything.

For now I agree with Roxanne. tile2ee is the tool of choice for batch converting MOS files. For TIS conversion I would still recommend NI though, as it uses information from WED files to optimize texture layout.



#874 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 10 December 2017 - 08:49 AM

It would be super awesome if the Convert image to MOS dialog could handle multiple input files at a time (or even just a whole folder of images).  The same probably goes for the image to TIS converter.  Any chance that could happen?

You mean like this tool?

http://www.shsforums...tis#entry590082

 

 

It would be super awesome if the Convert image to MOS dialog could handle multiple input files at a time (or even just a whole folder of images).  The same probably goes for the image to TIS converter.  Any chance that could happen?

I'll add batch functionality to my todo list, but I can't promise anything.

For now I agree with Roxanne. tile2ee is the tool of choice for batch converting MOS files. For TIS conversion I would still recommend NI though, as it uses information from WED files to optimize texture layout.

My issue was I had 70 PNG files that I wanted to convert directly to MOS V2, which looking at tile2ee I don't think it can do.  I ended up writing an automation script to control NI's interface to automate the conversion, but it took a bit of fiddling because I couldn't detect the Class of the java GUI elements.  Both MOS and PVRZ are lossy formats compared to PNG, and as a general rule the fewer transcodings between lossy formats you have to perform the better your final result will be.  Thus my interest in direct PNG->PVRZ batch processing (but I suppose it's possible NI converts the PNGs to MOS V1 internally as part of the process anyway).


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#875 Argent77

Argent77
  • Administrator
  • 1418 posts

Posted 10 December 2017 - 09:20 AM

Yeah, tile2ee is only able to convert between MOS or TIS formats.

You don't need to worry too much about PVRZ quality loss. The texture formats DXT1/DXT5 are nearly lossless. Except for very special pixel patterns you won't see artifacts even after converting back and forth hundreds of times. Btw, NI converts PNG directly into PVRZ without (lossy) intermediate steps.

If all your PNG files are less than 1024x1024 pixels and you're up for a challenge, you could write a WeiDU mod to generate MOS V2 files with help of the command line tool "PVRTexTool" from the PowerVR SDK. The tool converts graphics files into the PVR format, which can be compressed by WeiDU's zlib compression functions into PVRZ format. The associated MOS V2 file can be generated with WeiDU commands as well. I made a related mod recently, which involves operations for compressing/uncompressing PVRZ and converting PVR files via PVRTexTool.


Edited by Argent77, 10 December 2017 - 09:21 AM.


#876 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 10 December 2017 - 10:33 AM

If all your PNG files are less than 1024x1024 pixels and you're up for a challenge, you could write a WeiDU mod to generate MOS V2 files with help of the command line tool "PVRTexTool" from the PowerVR SDK. The tool converts graphics files into the PVR format, which can be compressed by WeiDU's zlib compression functions into PVRZ format. The associated MOS V2 file can be generated with WeiDU commands as well. I made a related mod recently, which involves operations for compressing/uncompressing PVRZ and converting PVR files via PVRTexTool.

If I understand correctly, a PVRZ file can store a number of textures up to dimensions of 1024x1024, and multiple MOS V2 files can refer to textures within the same PVRZ file.  This means that instead of 70 MOS V2 files referring to 70 PVRZ files, I could have all of the textures within a single PVRZ file thus freeing up 69 PVRZ pages for other mods to use.  If this is indeed the case I would probably be interested in such a project, except I would quickly hit the WeiDU filesize limit making the entire project rather pointless...


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#877 Argent77

Argent77
  • Administrator
  • 1418 posts

Posted 10 December 2017 - 03:09 PM

If all your PNG files are less than 1024x1024 pixels and you're up for a challenge, you could write a WeiDU mod to generate MOS V2 files with help of the command line tool "PVRTexTool" from the PowerVR SDK. The tool converts graphics files into the PVR format, which can be compressed by WeiDU's zlib compression functions into PVRZ format. The associated MOS V2 file can be generated with WeiDU commands as well. I made a related mod recently, which involves operations for compressing/uncompressing PVRZ and converting PVR files via PVRTexTool.

If I understand correctly, a PVRZ file can store a number of textures up to dimensions of 1024x1024, and multiple MOS V2 files can refer to textures within the same PVRZ file.  This means that instead of 70 MOS V2 files referring to 70 PVRZ files, I could have all of the textures within a single PVRZ file thus freeing up 69 PVRZ pages for other mods to use.  If this is indeed the case I would probably be interested in such a project, except I would quickly hit the WeiDU filesize limit making the entire project rather pointless...


A PVRZ file, as used by the EE engine, is basically a canvas that may contain one or more graphics regions, where each region is referenced by associated TIS/MOS/BAM V2 files. The automation I talked about earlier does only work if you place one graphics per PVRZ file - a limitation of the PVRTexTool. PVRZ slots aren't really scarce (engine supports PVRZ files from MOS0000.PVRZ to MOS99999.PVRZ), so using one PVRZ texture per MOS file is fine.

PVRTexTool syntax is straightforward. For example, to convert a PNG into PVR with BC1 (DXT1) pixel encoding, call

PVRTexToolCLI.exe -i source.png -o target.pvr -f BC1,UBN,lRGB -potcanvas +

"-potcanvas +" is optional. It expands the canvas size to be a power of 2.

 

WeiDU's COMPRESS_xxx routines can turn the PVR into PVRZ. A MOS V2 is basically just a header with (in this case) a single PVRZ reference block.



#878 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 19 December 2017 - 06:37 AM

On items, I think it would be appropriate to edit the "Equipped appearance" as a string which does not currently appear to be an option.  Also, YW should probably be "Wings, Male" and ZW should be "Wings, Female".  Both originate from 1pp: Attachable Wings.


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#879 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 19 December 2017 - 07:12 AM

On items, I think it would be appropriate to edit the "Equipped appearance" as a string which does not currently appear to be an option.
I second that! It's not THAT difficult to edit equipped appearance field in the "raw" tab, but I'd feel much safer doing it within "edit" tab of NI.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#880 Argent77

Argent77
  • Administrator
  • 1418 posts

Posted 19 December 2017 - 07:22 AM

On items, I think it would be appropriate to edit the "Equipped appearance" as a string which does not currently appear to be an option.  Also, YW should probably be "Wings, Male" and ZW should be "Wings, Female".  Both originate from 1pp: Attachable Wings.

It is possible, but only indirectly. Right-click on the field and select "Edit as hex". Right-click again and select (the now available) "Edit as string". I'll see if I can expand the datatype for "Equipped appearance" to allow setting custom strings.

I don't know what YW stands for. In BGEE it doesn't seem to work. The only item with YW appearance is WING01B.ITM, which isn't used by the game. ZW doesn't look gender-specific. It can also be used by both male and female characters.