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

Decoded Rig.hpp properties #114

Merged
merged 12 commits into from
May 11, 2024
Merged

Decoded Rig.hpp properties #114

merged 12 commits into from
May 11, 2024

Conversation

Mozz3d
Copy link
Contributor

@Mozz3d Mozz3d commented Mar 28, 2024

Replaces the unk40 placeholder and adds boneParentIndexes and boneTransforms properties at offsets 0x40 and 0x48 respectively. Which have been confirmed through testing.

Replaces the `unk40` placeholder and adds `boneParentIndexes` and `boneTransforms` properties at offsets 0x40 and 0x48 respectively. Which have been confirmed through testing.
Copy link
Owner

@wopss wopss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR :)

This file will be overwritten when every time we dump the types. You can move it out of the "Generated" directory and it should be fine, like we did for others (https://github.com/WopsS/RED4ext.SDK/tree/master/include/RED4ext/Scripting/Natives).

@poirierlouis
Copy link
Contributor

I'm wondering, should it be defined here, without redscript declaration... Or better be in Codeware, as it already provides such kind of native extensions?
FYI @psiberx

@psiberx
Copy link
Collaborator

psiberx commented Mar 29, 2024

It should be in SDK but not in Generated.

Moves Rig.hpp to Natives path
@Mozz3d
Copy link
Contributor Author

Mozz3d commented Mar 29, 2024

Thanks for the PR :)

This file will be overwritten when every time we dump the types. You can move it out of the "Generated" directory and it should be fine, like we did for others (https://github.com/WopsS/RED4ext.SDK/tree/master/include/RED4ext/Scripting/Natives).

I moved it to Natives, I hope that's alright!

@psiberx
Copy link
Collaborator

psiberx commented Mar 29, 2024

Look at how other files are handled.

  1. Remove generated comments.
  2. Add generated stub that includes your manual override. After the edit you should still include generated header in your plugin, not the new one.

Also you could add a comment for new fields that the size is the same as boneNames.size.

@Mozz3d
Copy link
Contributor Author

Mozz3d commented Mar 29, 2024

Is this better? I've never really used github for anything besides viewing code so you'll have to excuse me if it's a little messy. Trying my best to figure it out.

@psiberx
Copy link
Collaborator

psiberx commented Mar 29, 2024

Scripting/Natives/Generated/anim/Rig.hpp should include your overridden header. Look at Scripting/Natives/Generated/ink/Layer.hpp as an example. You can generate it by running GameReflection::Dump() again, but for a single file it's easier to create it manually.

@Mozz3d Mozz3d changed the title Replace unk40 in Rig.hpp Decoded Rig.hpp properties May 8, 2024
Mozz3d added 2 commits May 8, 2024 12:02
Adjusted property names and decoded a couple previously unknown properties
@Mozz3d
Copy link
Contributor Author

Mozz3d commented May 8, 2024

A little late, but here are the requested changes along with some further decoded properties.

@wopss
Copy link
Owner

wopss commented May 9, 2024

You also have to update the Reflection-inl file to exclude it from being generated in the future.

See https://github.com/WopsS/RED4ext.SDK/pull/121/files#diff-859ef96671f9a21f801808df16274cd12c0711860ddf5e6787fa521a088fae06L310.

@Mozz3d
Copy link
Contributor Author

Mozz3d commented May 9, 2024

Is that okay? Also thank you for helping me help this project :3

@psiberx
Copy link
Collaborator

psiberx commented May 9, 2024

It should be placed at include/RED4ext/Scripting/Natives/animRig.hpp to exclude from being generated and keep existing includes valid, no manual override in Reflection-inl.

@Mozz3d
Copy link
Contributor Author

Mozz3d commented May 9, 2024

Let me know if I need to adjust anything else.

Copy link
Owner

@wopss wopss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! :D

@wopss wopss merged commit 1c283c3 into wopss:master May 11, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants