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 - picklejar

Pages: [1] 2 3 ... 6
Finally decided to start looking at battle models and animations this week, and already made a lot of progress. Here's a beta online viewer:

Gameplay Modding / Re: Question about Battle Models
« on: 2019-05-15 19:53:43 »
You can't substitute that easily, for multiple reasons.

The number of bones might be different.

The number of "body animations" might be different. (Different characters have different animations for stand, lunge, drink potion, use magic, etc.)

The number of "weapon animations" might be different. (Each character can have different weapons, each with separate animations.)

Ah, okay, yeah, I don't have much experience re-packing. I wouldn't be surprised if re-packing magic.lgp causes issues.

Does anyone in this forum know if anyone has ever successfully made any mod that involves changes to stuff inside magic.lgp? (Not sure if the existing graphics overhaul mods included any changes to spell effects, for example?) If so, it would be good to know how they were able to re-pack the magic.lgp.

niemasd: I can confirm that Aali's lgp utility can unpack the magic.lgp file. I just did it this morning and got over 5000 files including subdirectories.

Thank you NFITC1, Kimera can indeed open battle models and animations, and it can even place the different weapons in the different playable character's hands. AND I have source code for it. So, I'm set. Thanks!

Went back and checked, and sure enough, Kimera is supposed to be able to open battle models and animations. I tried a while back to get Kimera to load battle models, but it just didn't work. But I will try again. (I probably tried to open battle.lgp directly, but I'll try opening an "extracted" file like rtaa.)

I thought Kimera could not do battle models, only field models?

I found Wiki for PSX format, but not PC, and it's very different. The battle models are split into multiple files. For example, for Cloud, the files are named rtaa, rtab, rtac, etc. Apparently the animations are always in xxda (e.g. rtda for Cloud). But it's not clear to me yet how to determine which of the files are vertex data vs. texture data vs. etc.

I guess I could try to re-reverse-engineer it, e.g. by comparing PC vs PSX. But if there's anyone that has info or code or any insight, it would help a lot.

BTW, I have found 3 tools that can read battle model data: Ifalna, Leviathan, and biturn. But I can't find source code for them. Bleh.

Thanks for looking at that. Very good point. So, kaitai is worthless for editing, then, until they add write/serialization support.

Was discussing this in Discord with antiquechrono and... check this out:

Anyone know where I can find source code for reading battle models and animations?

The only program I know that can do this is Ifalna by Ficedula, but all the links I've found so far are either broken or only point to a binary.

I have a snapshot of a pretty darn recent version of Aali's lgp utility (binary and source) here:

General discussion / Re: FF7 Remake Teaser
« on: 2019-05-10 20:36:17 »
Would you rather live in a universe where Square just did a remaster, or where they're doing a remake?

The way I see it, the latter provides more value and potential, in proportion to "how different" it is.

Remember, not only can we mod the old game to be more "modern", but we'll also be able to mod the remake to be "more like the original".

Aww, you wanted it to be turn-based? Don't worry, I guarantee you there will be a mod soon enough to make it turn-based.

Aww, you wanted the choice to reject Aerith's flower? And for that to affect the date mechanics? Don't worry, there will be a mod for that.

The great thing about having a DIFFERENT remake is, it gives us a huge spectrum of possibilities. So more people can be pleased eventually. You just have to wait for the mod you want. Or write it yourself!

BTW, you said you tried "ulgp" and it didn't work in some cases? Which specific utility did you try, and which version? The reason I ask is, there are at least 2 or 3 different lgp utilities out there, and different versions, and links can get outdated, etc.

Also... I forgot to say the most important thing: WELCOME! This community can always use more smart developers. (I'm not an official forum moderator or anyone special. Just one of many people who love the game and reverse engineering it. Every time I try to let it go, I keep coming back.)

BTW, the Python suite I mentioned didn't seem to have lgp utility.

But you could look at Aali's lgp utility source code and maybe find the answer there.

I can't remember where to get Aali's source code, but I made a snapshot copy of it here:

Hope this helps!

(Edit: I originally said this was Ficedula's, but it's Aali's.)

You should check out this:

It's a whole suite of Python code for reading tons of FF7 asset files.

Basically, I'd suggest:
Any Python Dev should extend the above Python project.
Any C dev should look at sithlord's ff7 toolkit.
Any JS dev should look at Kujata.

Thanks for adding that link!

Where is "The Reunion Database"?

DLPB: I received a comment saying they felt like the Enemy Attack that is currently translated as "The Emperor" (official) or "The Pope" (Beacause) should really be "The Heirophant". If you want more details, let me know. I doubt you are still entertaining ideas on changes anymore, but just FYI.

codemann8: yeah, that hex editor "010 Editor" looks pretty sweet, thanks for sharing! here's a screenshot for others interested:

Another challenge to keep in mind: There's a difference between the "original data" and "serialized data". So there are really two different schemas we're talking about here.

As a simple example, suppose a game had an "array of all Weapon objects", and each Weapon had a name and an attack value, and suppose the total number of weapons is not set in stone (until file-write time).

The schema for the "original data" might be something simple like:

schema for "AllWeapons" object:
  • weapons: List of Weapon
sub-schema for "Weapon" object:
  • name: string
  • attackPower: uint16

The schema for the "serialized data", however, might be:

schema for "all-weapons.bin" binary file:
  • fileSize: uint64
  • numWeapons: uint32
  • weaponSections: sequence of ${numWeapons} WeaponSections
  • @integrityCheck: ${_data}.length == ${fileSize}
sub-schema for "WeaponSection" (serialized/chunk)
  • sectionSize: uint32
  • nameLength: uint32
  • name: string of length {$nameLength}
  • attackPower: uint16
  • @integrityCheck: ${_data}.length == ${sectionSize}

So the "schemas" are different. The latter "schema" has "size" information, but that's only needed for deserialization logic.

Also, the serialized data might be encoded with gzip encoding or lzs encoding, whereas the original data might not.

Having the schema of just the original data is not good enough, because there are multiple ways to serialize it.

Having the schema of just the serialized data is much better, but ideally the schema should also somehow define how it is deserialized into the original data.

Also, deserializers can often work by reading data "in order", but serializers often work backwards, for example, they often write the total file size at the beginning of the file, which is the last thing they know.

So the challenge is, how a schema can define all of this stuff, instead of just one format, or the other format, or the transformation in between.

And yeah, as you pointed out codemann8, each file will definitely has its own nuances, so it definitely needs to support more than just the primitive data types like uint8 and such.

But hey... I'm sure we could come up with something!

Idea #1: Language-agnostic Binary data schema

So... most of our projects involve consuming, editing, and writing binary data like Final Fantasy game asset files.

This community has been awesome as far as bringing people together to reverse engineer the file formats, publish their findings on Wiki, and sharing source code.

So now, it would be super nice if we could go just one step further and to create actual schema definitions, in a structured format. "That way, we could auto-generate documentation. And most importantly, I wouldn't have to develop code to parse the data, because it can just be parsed automatically, by my program, which by the way is written in... uh, my preferred programming language..."

Yeah. Exactly. That's why we don't have schema files. Everyone has different needs, prefers different programming languages, etc.

But still... just imagine the possibilities if we could agree on a language-agnostic schema. This is a common problem and there are solutions for it. For example, perhaps we could use one of these:

Even if the language-agnostic schema isn't super-friendly to your preferred programming language, it would not matter if there were utilities to generate documentation for you to read and understand it in a user-friendly way, and if there were utilities to translate the schema to data structures in your preferred programming language. Right?

Well, for new projects, yeah, that might be fantastic. But... for existing projects... well, suppose we did come up with such a plan and even developed the tools to generate docs and code in everyone's preferred language. Would we expect the authors of existing tools to re-factor their code to use the new auto-generated code? Probably not.

But, if you are such an author, then you probably have some good insight into what kind of features you would want such auto-generated code to have, in your preferred programming language. So, perhaps you would be interested in contributing ideas, or even code, to translating universal schema to "code in my preferred language".

And long-term, imagine the possibilities with future tools!

I'm sure this community has talked about this before numerous times, so my main question is, do we have a forum topic dedicated to this? If not, can we create one? And if there are any individual threads where this has been discussed at length, can you point to them?

Idea #2:

It would be cool to have a tool to auto-reverse-engineer new file formats. The tool could use a repository of known file formats / characteristics (like "magic numbers", other patterns to look for, etc.). It could even be interactive and show different interpretations to the user and let the user guide the tool to choose the right interpretation. Finally, it could output schemas for the user. What format should the schema be in, though? See idea #1 above. (See?! That's another reason we need it!)

General discussion / Wiki
« on: 2019-04-29 20:35:11 »
I just signed up as a new member of the new *.ru Wiki site. It looks like my account was created successfully. And I can access edit pages (haven't tried to submit yet though) and I can see History pages. But, every time I click on a user link on a History page, I get a weird error like "user is not registered", even for Qhimm. Is this expected?

Scripting and Reverse Engineering / Re: Field IDs
« on: 2019-04-29 20:25:07 »
Interesting. BTW, we should update the Wiki with the stuff we're finding.

BTW, I imagine that any modder working on models and animations would like to have a nice reference website that provides things like:

"Given a field model, show me a list of all field maps (flevels) and field scripts where the model is used."

"Given a field model animation, show me a list of all field maps (flevels) and field scripts where the animation is used."

I plan to update the Kujata website soon with some of this functionality.

Pages: [1] 2 3 ... 6