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

Struct data type support #145

Open
jaredballou opened this issue Oct 16, 2022 · 2 comments
Open

Struct data type support #145

jaredballou opened this issue Oct 16, 2022 · 2 comments

Comments

@jaredballou
Copy link

Hi all,

I'm regularly running into issues which would be much easier to deal with if there were a struct data type. For example, when handling inventory in a game, each item has two int8 values for item id and count, an int32 for experience, and a float for durability. When I have to enter the same four fields over and over (and do the hex math in my head) for the 24 item slots, I make mistakes all the time because I have to hand-edit all the addresses and descriptions one by one.

I would really like to be able to define "inventory item" as a type, with those 4 fields referenced by offsets, and then I just need to point the main item at the base address to wire it up.

I was going to take a crack at adding the type myself, but I'm not quite advanced enough to figure out the type management code in PINCE. That said, if someone wants to add the bare bones for the type, I'd be glad to handle adding in the UI elements.

As a "nice to have" I'd love to be able to define an array of other types, so I can point at the base inventory item and say "create 24 of these X byte structs starting at Y and increment each new item to the correct offset".

@korcankaraokcu
Copy link
Owner

This will be also required for automatic analysis of data chunks. CE already has data chunk comparison to identify similar objects, so yeah, good feature. Leaving this issue open for further discussion

@jaredballou
Copy link
Author

The automatic analysis would be excellent, but I'd be happy taking the smaller step of being able to create an assembly of other data types into a struct. Even better would be the ability to nest data types (i.e. for Persona 5, having a "Persona" data type with id/traits/skills/xp, and then being able to add that as a sub-item on "Player" and "Party member" objects, because while the Player and Party Member contain a lot of different fields, the Persona contained within their data is consistent.

As with the other issue, I can do some mock ups and examples if it'd help, but I get the impression that we'd need to make some pretty significant changes to the data type system to allow this to work, so I am not much help with regards to actually implementing the feature.

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