Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Params - Empty groups get ignored #54

Open
Dr-HyperCake opened this issue Apr 20, 2017 · 3 comments
Open

Params - Empty groups get ignored #54

Dr-HyperCake opened this issue Apr 20, 2017 · 3 comments

Comments

@Dr-HyperCake
Copy link
Contributor

When editing parameter files, empty groups - that is, groups which are defined, but have no values and are immediately followed by another group definition - are ignored.

Due to this, when saving a parameter file that had an empty group in it, that group definition is not included. This can cause crashes in-game.

I think a solution to this would be to read in the empty group, display it as exactly what it is (a group with entries that have no values), and include this group definition when saving.

@Sammi-Husky
Copy link
Owner

Do you have an example file you could show me? I believe what you're probably seeing is what's supposed to be embedded groups (groups within groups) which aren't supported, as it's impossible to know the size of the parent group the way the files are structured.

Each param file is supposed to be read into the game INDIVIDUALLY by it's own parser, so reading them in generically with one editor wasn't something they intended. Because of this, the only way we actually can read them in generically causes some issues.

Namely, that the count field in the group definition is not a value count field. It's a STRUCT count field, and the only way to know the size of the structs the group contains is by reading in EVERY value we come across until we see another group definition and then divide the total number of values read by the original group's struct entries count field (because the structs in a group are all the same size and formats).

@Dr-HyperCake
Copy link
Contributor Author

Apologies, I meant to give examples but it must have slipped my mind. The only two files I have seen this in are fighter_param_vl_bayonetta.bin and fighter_param_vl_zelda.bin, both of which are in param\fighter.

Bayonetta's has this at offset 0x2CBF, where a group with 2 entries is defined, but no values are present before the next group definition. Attempting to use this file after this group definition has been removed causes a game crash upon entering a match with Bayonetta.

Zelda's has this at offset 0x2A16, where a group with 1 entry is defined but, again, no values are present before the next group definition. Attempting to use this file after this group definition has been removed causes a game crash upon Zelda's Phantom projectile being reflected.

@Sammi-Husky
Copy link
Owner

I have a few idea for maybe fixing these issues and making parameters structure 1:1 to how the game sees it. I'll keep this issue open and updated as I work it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants