Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat

Author Topic: Batch Png to Fsh tool  (Read 53629 times)

0 Members and 1 Guest are viewing this topic.

Offline Apple Delight

Re: Batch Png to Fsh tool
« Reply #100 on: November 20, 2014, 07:46:38 PM »
Archive attached.

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #101 on: November 21, 2014, 04:30:32 AM »
It looks like the duplicate and missing files may have caused by a bug in my code. &mmm

That is now fixed, file version updated to 1.5.1.5.

Offline Indiana Joe

  • NAM Team
  • Forums Governor
  • *
  • Posts: 453
  • Total likes: 72
  • Reputation: 2
  • Of Fruit Flies and Bananas
Re: Batch Png to Fsh tool
« Reply #102 on: December 17, 2014, 08:40:29 PM »
Always crashes if I try to add more than 50 textures on Win 8.1

EDIT:  Re-installed and restarted, now it won't let me add even one texture and gives me this exception.

Code: [Select]
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Index must be within the bounds of the List.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.Collections.Generic.List`1.Insert(Int32 index, T item)
   at PngtoFshBatchtxt.Form1.BuildAddList(Int32 startIndex) in C:\Dev_projects\sc4\PngtoFshBatchtxt\Form1.cs:line 1572
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
PngtoFshBatch
    Assembly Version: 1.5.1.5
    Win32 Version: 1.5.1.5
    CodeBase: file:///C:/Users/mmatunis/Downloads/PngtoFshBatch_1.5.1.5/PngtoFshBatch/PngtoFshBatch.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8008 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8007 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
FshDatIO
    Assembly Version: 1.3.0.1
    Win32 Version: 1.3.0.1
    CodeBase: file:///C:/Users/mmatunis/Downloads/PngtoFshBatch_1.5.1.5/PngtoFshBatch/FshDatIO.DLL
----------------------------------------
Microsoft.WindowsAPICodePack.Shell
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/Users/mmatunis/Downloads/PngtoFshBatch_1.5.1.5/PngtoFshBatch/Microsoft.WindowsAPICodePack.Shell.DLL
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.7903 built by: Win9Rel
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.WindowsAPICodePack
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/Users/mmatunis/Downloads/PngtoFshBatch_1.5.1.5/PngtoFshBatch/Microsoft.WindowsAPICodePack.DLL
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

« Last Edit: December 17, 2014, 09:01:26 PM by Indiana Joe »

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #103 on: December 17, 2014, 11:24:25 PM »
Always crashes if I try to add more than 50 textures on Win 8.1
Could you attach the images that cause this?

As far as the second crash is concerned, I know where the crash occurs but have no idea what might be causing it. :(
« Last Edit: December 17, 2014, 11:26:56 PM by null45 »

Offline Indiana Joe

  • NAM Team
  • Forums Governor
  • *
  • Posts: 453
  • Total likes: 72
  • Reputation: 2
  • Of Fruit Flies and Bananas
Re: Batch Png to Fsh tool
« Reply #104 on: December 19, 2014, 11:26:24 PM »
Always crashes if I try to add more than 50 textures on Win 8.1
Could you attach the images that cause this?

As far as the second crash is concerned, I know where the crash occurs but have no idea what might be causing it. :(

Solved it; a couple of textures were missing a digit in their names.
« Last Edit: December 20, 2014, 12:26:53 AM by Indiana Joe »

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #105 on: December 20, 2014, 04:21:38 AM »
That crash is now fixed.
File version updated to 1.5.5.6.

Offline Indiana Joe

  • NAM Team
  • Forums Governor
  • *
  • Posts: 453
  • Total likes: 72
  • Reputation: 2
  • Of Fruit Flies and Bananas
Re: Batch Png to Fsh tool
« Reply #106 on: December 20, 2014, 03:13:41 PM »
That crash is now fixed.
File version updated to 1.5.5.6.

I'll assume that instead of a crash you now get an error message about invalid ID's?

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #107 on: December 20, 2014, 07:04:04 PM »
I'll assume that instead of a crash you now get an error message about invalid ID's?

It turns out that when fixing that crash I introduced a regression which broke the ID reading entirely.  &ops

That is now fixed and it will now give an error message in invalid IDs.
File version updated to 1.5.1.7.



Offline Indiana Joe

  • NAM Team
  • Forums Governor
  • *
  • Posts: 453
  • Total likes: 72
  • Reputation: 2
  • Of Fruit Flies and Bananas
Re: Batch Png to Fsh tool
« Reply #108 on: December 20, 2014, 08:19:50 PM »
I'll assume that instead of a crash you now get an error message about invalid ID's?

It turns out that when fixing that crash I introduced a regression which broke the ID reading entirely.  &ops

That is now fixed and it will now give an error message in invalid IDs.
File version updated to 1.5.1.7.

Fantastic thanks for all the hard work!

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #109 on: March 16, 2015, 02:27:16 AM »
Fixed a crash when the process button is clicked if there are no files in the list and a UI bug with the End format radio buttons.
Fixed a bug with the DBPF header having the wrong version and a potential file corruption issue with saving into an existing dat.
Improved the QFS compression, file version updated to 1.5.3.0;)

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #110 on: March 16, 2015, 08:17:59 PM »
Added a missing DLL, file version updated to 1.5.3.1.

Offline mgb204

Re: Batch Png to Fsh tool
« Reply #111 on: March 16, 2015, 09:15:53 PM »
Thanks for your efforts, they really make working with textures a whole world simpler, these tools mean creators can spend their time making textures and not worrying about how to import/export and all that malarkey. It's great that you are still supporting them and releasing updates, I'm sure many mods have your work to thank for their existence.

Offline nos.17

Re: Batch Png to Fsh tool
« Reply #112 on: November 24, 2015, 08:36:25 PM »
First off, love the tool! Insofar, its saved me quite a bit of time...even though I have only created around a dozen textures. However, I am now running into issues.

I have 11 .pngs (10 overlay with transparency and one base without transparency) that I wish to turn to textures. However, when adding them to a new or existing .dat, the program appears to not generate any mips at all; the new (or existing) .dat only contains the 128x128 versions of the textures. No exceptions appear. As I mentioned before, it worked for the first +/- 10 textures. On 64 bit Win 7 Enterprise. Tried fresh install, writing to new and existing .dats, adding only one texture at a time, etc.

Am I doing something wrong?  %confuso


Oh, and also, the drag/drop functionality does not seem to function for me. Not a big deal...I can just manually add the textures, but it may be worth looking into if you'd like.

Thanks so much.

Offline mgb204

Re: Batch Png to Fsh tool
« Reply #113 on: November 24, 2015, 09:01:45 PM »
Underneath the window where your textures are listed is a drop down box. Make sure this has "Normal Mipmaps" selected, if it was changed it won't revert to the default when you close the application.

Offline nos.17

Re: Batch Png to Fsh tool
« Reply #114 on: November 24, 2015, 11:24:58 PM »
Underneath the window where your textures are listed is a drop down box. Make sure this has "Normal Mipmaps" selected, if it was changed it won't revert to the default when you close the application.

It is and has been selected, so that shouldn't be the problem...must be something else.

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #115 on: November 27, 2015, 05:41:30 PM »
It is and has been selected, so that shouldn't be the problem...must be something else.

The texture instance id must end in 4, 9 or E in order for normal mipmaps to be generated.
The drag and drop bug has been fixed, file version updated to 1.5.3.2.

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #116 on: July 19, 2016, 12:05:49 AM »
Fixed a bug with PNG files always being detected as having transparency, file version updated to 1.5.4.0.

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #117 on: August 27, 2017, 08:35:51 AM »
Fixed a bug that would corrupt the DBPF compression directory when a dat contains existing files, file version updated to 1.5.5.0.

Offline Akallan

Re: Batch Png to Fsh tool
« Reply #118 on: October 22, 2017, 02:40:28 PM »
Hello everyone,

I open the subject again because I downloaded the software but I have a problem. I want to create overlay textures for my future SNT mod, so when I drag my texture inside it (with the name ID code, for example: 0xF8DC4004).

I then create the texture, I open it with the Reader but the problem is that it is ultimately not an overley but a basic texture.

How should I proceed to create an overlay? I read the read-me, but there is nothing that speaks in depth about this subject.

Thank you in advance for your help.
Aka

Offline Andreas

  • Administrator
  • Forums Legend
  • *
  • Posts: 4780
  • Total likes: 994
  • Reputation: 33
    • SimCityPlaza
  • CL: ()bobby() Transit Controller
Re: Batch Png to Fsh tool
« Reply #119 on: October 22, 2017, 02:48:09 PM »
My best guess: Your source file must have some transparent part, then it creates an overlay texture rather than a base texture. Use PNG as source format, as it supports transparency natively.
Andreas