Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Zervox

Pages: 1 2 [3]
51
Would it work to process it twice per quad?
tri1(Vertice1,Vertice2,Vertice3)
tri2(Vertice1,Vertice5,Vertice3)
- one quad
tri3(Vertice4,Vertice5,Vertice6)
tri4(Vertice4,getdata8,Vertice6)

that is I wonder on the edges of the mesh, if there isn't stored an additional vertices but not all three so the last row of that quad would be
3+1 instead of 3+2 offset?

52
Just wanted to say, even if a file has a .something extension doesn't mean it is the format you found.
Just like some Engines can use .obj doesn't mean it is necessarily wavefront .obj but rather an object in its entirety which could be
name of object
AI module link
Mesh info
Texture info
other engine's object properties for use in game like, stats or similar.
maybe it is keeping records of where in the world it was called from so that a player can be returned to that location.

and in this case .x seems to include other data than what would need to be in a normal directx .x file.

53
Not sure if this might help others(not even sure how these files are supposed to be written)
I also note that its been awhile that someone posted in this thread.

Basically just convert folder of files instead of singular entered file.

Python 3.
This code is based on what Vehek posted.
Code: [Select]
import struct
import os
import sys

path = './Unconv/'
pathd = './Conv/'

imageCount = 2

for file in os.listdir(path):
    current = os.path.join(path, file)
    if os.path.isfile(current):
        try:
            model = open(current, 'rb')
            model.seek(4)
            offsets = struct.unpack("IIII", model.read(16))
            model.seek(offsets[0])
           
            modelData = model.read(offsets[3] - offsets[0])
           
            outt = open(pathd+os.path.basename(current)+ '_mdl.dat', 'wb')
            outt.write(struct.pack("IIII", 11, offsets[0] + 0x1C, offsets[1] + 0x1C, offsets[2] + 0x1C))
            for i in range(8):
                outt.write(struct.pack("I", offsets[3] + 0x1C))

            outt.write(struct.pack("I", offsets[3] + 0x1C + 4 * (imageCount + 2) + imageCount * 0x4220))

            outt.write(modelData)
            outt.write(struct.pack("I", imageCount))
            for i in range(imageCount + 1):
                outt.write(struct.pack("I", i * 0x4220 + 4 * (imageCount + 2)))
            #Create placeholder textures
            for j in range(2):
                outt.write(struct.pack("IIIHHHH", 0x10, 9, 0x20C, 2, 2, 256, 1))
                for x in range(256):
                    outt.write(bytes("\x22\x22", 'UTF-8'))

                outt.write(struct.pack("IHHHH", 0x400C, 1, 1, 0x40, 0x80))
                for x in range(0x4000):
                    outt.write(bytes("\x00", 'UTF-8'))

            outt.close()
        except Exception:
            pass

This is the altered code.
Code: [Select]
import struct
import os
import sys

path = './Unconv/'
pathd = './Conv/'

imageCount = 2

for file in os.listdir(path):
    current = os.path.join(path, file)
    if os.path.isfile(current):
        try:
            model = open(current, 'rb')
            model.seek(4)
            offsets = struct.unpack("IIII", model.read(16))
            model.seek(offsets[0])
           
            modelData = model.read(offsets[3] - offsets[0])
           
            outt = open(pathd+os.path.basename(current)+ '_mdl.dat', 'wb')
            outt.write(struct.pack("IIII", 11, offsets[0] + 0x1C, offsets[1] + 0x1C, offsets[2] + 0x1C))
            for i in range(8):
                outt.write(struct.pack("I", offsets[3] + 0x1C))

            outt.write(struct.pack("I", offsets[3] + 0x1C + 4 * (imageCount + 2) + imageCount * 0x4220))

            outt.write(modelData)
            outt.write(struct.pack("I", imageCount))
            for i in range(imageCount + 1):
                outt.write(struct.pack("I", i * 0x4220 + 4 * (imageCount + 2)))
            #Create placeholder textures
            for j in range(2):
                outt.write(struct.pack("IIIHHHH", 0x10, 9, 0x20C, 2, 2, 256, 1))
                for x in range(256):
                    outt.write(bytes("\x22\x22", 'UTF-8'))

                outt.write(struct.pack("IHHHH", 0x400C, 1, 1, 0x40, 0x80))
                for x in range(0x4000):
                    outt.write(bytes("\x00", 'UTF-8'))

            outt.close()
        except Exception:
            pass

54
FF8 Tools / Re: [RELEASE] IFRIT - FFVIII Enemy editor 0.10
« on: 2014-02-17 08:14:08 »
That's nice, thank you very much. :)

55
FF8 Tools / Re: [RELEASE] IFRIT - FFVIII Enemy editor 0.10
« on: 2014-02-07 08:55:47 »
Sorry to reawaken this thread, but figuring editing monster stat tables I was wondering if you still had the source codes lying about for this tool, that is if you want to share it?

Anyone wouldn't know about any other tools which can look into the player characters leveling tables and their default stats?

Pages: 1 2 [3]