alphazolam / RE_RSZ

010 Editor Binary Template for editing RE Engine game files
MIT License
87 stars 26 forks source link

via.AnimationCurve issue #11

Closed victor-takai closed 1 year ago

victor-takai commented 1 year ago

I'm editing a ItemCraftSettingsUserData.user2 in RE4R and when I create a new via.AnimationCurve and change the Count value of List (Data) v0[0] from 0 to any number it will mess the file from that point below.

dtlnor commented 1 year ago

Did you re-apply(F5) the template after change the count?

victor-takai commented 1 year ago

Yes I did, it doesn't work when you create a new object and increase the count, but it does work if you edit an existing one. It seems the data being added is not aligned with the template for some reason.

dtlnor commented 1 year ago

Yes I did, it doesn't work when you create a new object and increase the count, but it does work if you edit an existing one. It seems the data being added is not aligned with the template for some reason.

have you try to increase a instanceinfo but not an object? Every user.2 data should have only one object inside rsz. You first increase a instance at instanceinfo list. Then increase the count of objectIndex list which referenceing other instance by index, and change that index to your newly added via.AnimationCurve instance. (better F5 every step)

victor-takai commented 1 year ago

Sorry if I wasn't clear before, but yeah I create everything first in InstanceInfo, copying the CombinedKey and pasting it in InsertKey NewKey field to generate other instance of the object I want, and F5 every step.

Are you saying you're not seeing/having the same issue?

dtlnor commented 1 year ago

Sorry if I wasn't clear before, but yeah I create everything first in InstanceInfo, copying the CombinedKey and pasting it in InsertKey NewKey field to generate other instance of the object I want, and F5 every step.

Are you saying you're not seeing/having the same issue?

ummmm, it might because of the padding. The template seems not able to add (align 16, size 16) element to a list with correct padding

you may manually add / delete bytes to fix the alignment to workaround before the template fix

victor-takai commented 1 year ago

Thanks, I will give a try

Edit: Adding 12 bytes when setting Count to 2 solved the issue