Users browsing this thread: 1 Guest(s)
Unreadable DDS files
#6
Thank you for all these replies Wink

(04-08-2016, 02:12 AM)Raccoon Sam Wrote: I got 17 files out - two ".dds" files, one ".material" file and 14 ".bnry" files.

It appears the DDS files aren't DDS files at all. Both of them begin with the bytes "14 FE 01 49" while normally all DDS' begin with "44 44 53 20" so unless there's some sort of encryption/compression in there, these are not 'real' DDS files.

EDIT: And that's exactly what the error message "DDS Magic Number invalid.  Got 0x4901FE14, expected 0x20534444 ('DDS ').  At 0x00000004." you got tells us.

The DDS files are texture files for sure.

(04-08-2016, 02:22 AM)iyenal Wrote: apparently .bnry are .dds
http://www.modthesims.info/d/printthread...ge=2&pp=25
Other solution : Dolphin Emulator with option dump textures.
Or this program : https://github.com/s4ptacle/Sims4Tools

BNRY are not DDS files in MySims files, they are models and code files. I can use Dolphin for textures dumping yeah, but there are a lot of unused resources in the game files, such as a whole unused area, so I'd like to get these too.
And S4PE is not able to open MySims Kingdom packages, only S3PE can do that. What is needed is writting wrapper for DDS files in S3PE.

Also, someone here wrote a script to extract models from MySims Agents packages on 3ds Max, perhaps something in it will be useful to understand MySims files?

Code:
gc()
enableSceneRedraw()
clearlistener()

global globalStartTime = timestamp()
global globalImportedFilePath = ""
global globalBoolApplyNormals = false
global globalBoolApplySkinning = false


-- Structs

struct PakEntryInfoStruct
(
   unk1,     -- u32
   unk2,     -- u32
   offset,     -- u32
   size,        -- u32
   type        -- procedural, u32
)

struct VertDescriptorStruct
(
   gxAttr                 = 0, -- byte
   stride                 = 0, -- byte
   unk                     = 0, -- 4 bytes
   vertArrayOffset     = 0  -- u32
)


-- General helper functions

fn GetOpenFile =
(
   clearlistener()
   local fname = getOpenFileName \
   caption:"Open Model" \
   types:"Package file (*.package)|*.package" \
   historyCategory:"PACKAGEWII Object Presets"
   if (fname == undefined) then
   (
       return undefined
   )
   else
   (
       globalImportedFilePath = fname
       local f = fopen fname "rb"
       return f
   )
)

-- Reading functions

fn ReadBEShort fstream =
(
   return bit.swapBytes (ReadShort fstream #unsigned) 1 2
)

fn ReadBELong fstream =
(
   return bit.swapBytes (bit.swapBytes (ReadLong fstream #unsigned) 1 4) 2 3
)

fn ReadBEFloat fstream =
(
   return bit.intAsFloat (bit.swapBytes (bit.swapBytes (ReadLong fstream #unsigned) 1 4) 2 3)
)

fn ReadBEVector3 fstream =
(
   return [(ReadBEFloat fstream), (ReadBEFloat fstream), (ReadBEFloat fstream)]
)

fn ReadBEVector4 fstream =
(
   return [(ReadBEFloat fstream), (ReadBEFloat fstream), (ReadBEFloat fstream), (ReadBEFloat fstream)]
)

fn ReadBEMatrix44 fstream =
(
   return matrix3 (ReadBEVector4 fstream) (ReadBEVector4 fstream) (ReadBEVector4 fstream) (ReadBEVector4 fstream)
)

fn WriteBELong fstream val =
(
   WriteLong fstream (bit.swapBytes (bit.swapBytes val 1 4) 2 3)
)

fn WriteBEShort fstream val =
(
   WriteShort fstream (bit.swapBytes val 1 2)
)

fn GetEntryType fstream offset =
(
   local startPos = ftell fstream
Sorry for bad spelling, I don't speak fluent English.
Reply
Thanked by:


Messages In This Thread
Unreadable DDS files - by Mattrio - 04-06-2016, 02:33 PM
RE: Unreadable DDS files - by iyenal - 04-08-2016, 01:48 AM
RE: Unreadable DDS files - by Raccoon Sam - 04-08-2016, 02:12 AM
RE: Unreadable DDS files - by iyenal - 04-08-2016, 02:22 AM
RE: Unreadable DDS files - by Raccoon Sam - 04-08-2016, 02:40 AM
RE: Unreadable DDS files - by Mattrio - 04-12-2016, 07:13 AM
RE: Unreadable DDS files - by Raccoon Sam - 04-12-2016, 01:08 PM
RE: Unreadable DDS files - by Mattrio - 04-12-2016, 01:10 PM
RE: Unreadable DDS files - by Mattrio - 05-16-2016, 01:37 PM
RE: Unreadable DDS files - by TGE - 05-17-2016, 04:17 AM
RE: Unreadable DDS files - by Mattrio - 05-17-2016, 06:04 AM

Forum Jump: