Jump to content

toy soldiers war chest (.pngb)


Go to solution Solved by h3x3r,

Recommended Posts

Posted
11 minutes ago, erickkingofarmy14 said:

help me! for .pngb in toy soldiers please!

imagem_2025-09-03_195101298.png

Without samples and script it's impossible to tell.  At a guess, the format might be slightly different across platforms (different endian, etc.), as the game was made for PS4, PC, XBox One.

 

Posted (edited)

 

22 hours ago, DKDave said:

Without samples and script it's impossible to tell.  At a guess, the format might be slightly different across platforms (different endian, etc.), as the game was made for PS4, PC, XBox One.

 

like this?

 

imagem_2025-09-04_184022735.png

Edited by erickkingofarmy14
upload other image
Posted (edited)
On 9/4/2025 at 7:05 PM, DKDave said:

No, I mean samples of the actual files, not screenshots.  Screenshots don't show much for anyone to check the files properly.

 

here weapons textures sorry DKDave

textures.rar

Edited by erickkingofarmy14
add text
  • Engineers
Posted

//------------------------------------------------
//--- 010 Editor v14.0 Binary Template
//
//      File: 
//   Authors: 
//   Version: 
//   Purpose: 
//  Category: 
// File Mask: 
//  ID Bytes: 
//   History: 
//------------------------------------------------
FSeek(112);
uint16 MipMap;
uint16 TextureWidth;
uint16 TextureHeight;
uint16 Unknown;
enum <uint32>
{
    PF_DXT1 = 1,
    PF_DXT5 = 3,

}PixelFormat;

FSkip(20);
uint32 TextureBufferOffset;
uint32 TextureSize;

Posted
3 hours ago, h3x3r said:

//------------------------------------------------
//--- 010 Editor v14.0 Binary Template
//
//      File: 
//   Authors: 
//   Version: 
//   Purpose: 
//  Category: 
// File Mask: 
//  ID Bytes: 
//   History: 
//------------------------------------------------
FSeek(112);
uint16 MipMap;
uint16 TextureWidth;
uint16 TextureHeight;
uint16 Unknown;
enum <uint32>
{
    PF_DXT1 = 1,
    PF_DXT5 = 3,

}PixelFormat;

FSkip(20);
uint32 TextureBufferOffset;
uint32 TextureSize;

how to use?

  • Engineers
  • Solution
Posted (edited)

You can write Noesis script by that code.

Anyway there you go.

from inc_noesis import *
import noesis
import rapi
import os

def registerNoesisTypes():
   handle = noesis.register("Toy Soldiers War Chest - Texture", ".pngb")
   noesis.setHandlerTypeCheck(handle, noepyCheckType)
   noesis.setHandlerLoadRGBA(handle, noepyLoadRGBA)
   noesis.logPopup()
   return 1
        
def noepyCheckType(data):
   bs = NoeBitStream(data)
   if len(data) < 20:
      return 0
   return 1
   
def noepyLoadRGBA(data, texList):
    bs = NoeBitStream(data)
    baseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getInputName()))
    bs.read(112)
    MipMap = bs.readUShort()
    TextureWidth = bs.readUShort()
    TextureHeight = bs.readUShort()
    bs.read(2)
    PixelFormat = bs.readUInt()
    bs.read(20)
    TextureBufferOffset = bs.readUInt()
    BufferSize = bs.readUInt()
    bs.seek(TextureBufferOffset, NOESEEK_ABS)
    data = bs.readBytes(BufferSize)
    
    if PixelFormat == 1:
        print("Pixel Format > DXT1 ", PixelFormat)
    elif PixelFormat == 3:
        print("Pixel Format > DXT5 ", PixelFormat)
    else:
        print("Unknown Pixel Format > ", PixelFormat)
    
    if PixelFormat == 1:
        texFmt = noesis.NOESISTEX_DXT1                      
    elif PixelFormat == 3:
        texFmt = noesis.NOESISTEX_DXT5
           
    texList.append(NoeTexture(rapi.getInputName(), TextureWidth, TextureHeight, data, texFmt))
    return 1

 

Edited by h3x3r
Posted (edited)
19 hours ago, h3x3r said:

You can write Noesis script by that code.

Anyway there you go.

from inc_noesis import *
import noesis
import rapi
import os

def registerNoesisTypes():
   handle = noesis.register("Toy Soldiers War Chest - Texture", ".pngb")
   noesis.setHandlerTypeCheck(handle, noepyCheckType)
   noesis.setHandlerLoadRGBA(handle, noepyLoadRGBA)
   noesis.logPopup()
   return 1
        
def noepyCheckType(data):
   bs = NoeBitStream(data)
   if len(data) < 20:
      return 0
   return 1
   
def noepyLoadRGBA(data, texList):
    bs = NoeBitStream(data)
    baseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getInputName()))
    bs.read(112)
    MipMap = bs.readUShort()
    TextureWidth = bs.readUShort()
    TextureHeight = bs.readUShort()
    bs.read(2)
    PixelFormat = bs.readUInt()
    bs.read(20)
    TextureBufferOffset = bs.readUInt()
    BufferSize = bs.readUInt()
    bs.seek(TextureBufferOffset, NOESEEK_ABS)
    data = bs.readBytes(BufferSize)
    
    if PixelFormat == 1:
        print("Pixel Format > DXT1 ", PixelFormat)
    elif PixelFormat == 3:
        print("Pixel Format > DXT5 ", PixelFormat)
    else:
        print("Unknown Pixel Format > ", PixelFormat)
    
    if PixelFormat == 1:
        texFmt = noesis.NOESISTEX_DXT1                      
    elif PixelFormat == 3:
        texFmt = noesis.NOESISTEX_DXT5
           
    texList.append(NoeTexture(rapi.getInputName(), TextureWidth, TextureHeight, data, texFmt))
    return 1

 

I NOT UNDERSTAND!

 

image.thumb.png.bde45cb640123e5199a0f7fbdc64c1a8.png

Edited by erickkingofarmy14
ADD TEXT
  • Engineers
Posted

Copy that code into txt and save it as *.py. Then move it into the Noesis\plugins\python

Update noesis via Tools > Check for Updates

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...