ReClassNET / ReClass.NET

More than a ReClass port to the .NET platform.
MIT License
1.82k stars 371 forks source link

Lock nodes offset #48

Open Stridemann opened 6 years ago

Stridemann commented 6 years ago

Hi, Thanks again for a program.

I just wanted to ask if it's possible to add LOCK node feature. When you lock node it's offset can't be broken after deleting/inserting bytes before/under it. Sometimes we don't need to define types in whole structure, just some nodes at start, middle and end of structure.

Also this feature gives us other new awesome feature - we can delete some byte range we don't need (like "hide" in old reclass).

I know, this can be not easy task, just wanted to ask if this is possible. Thanks you.

Stridemann commented 6 years ago

Also adding options for inserting 1 and 2 bytes will be awesome too.

KN4CK3R commented 6 years ago

ye, locking something would be amazing, like the checkbox when u add a value in cheat engine, u press it, and it forces the value to it every 50 milisecond

That's not what he is talking about.

KN4CK3R commented 6 years ago

@Stridemann Currently that's not possible. There is a rewrite of the internal class representation planned. The new system may have support for that.

Stridemann commented 6 years ago

@KN4CK3R Thanks a lot for your work on this project. That will be really great. I also working on free program for reversing (searching offsets) https://github.com/Stridemann/StructureSpiderAdvanced

I got one stable bug that throws crash error (can continue working, no data lost). Don't want to create a new issue due to low priority: When you double click on node to edit name (enable text input field) and then right click on any other place or node you will got error.

KN4CK3R commented 6 years ago

I got one stable bug that throws crash error (can continue working, no data lost). Don't want to create a new issue due to low priority: When you double click on node to edit name (enable text input field) and then right click on any other place or node you will got error.

But a crash is a real issue so you should have created another one.

KN4CK3R commented 6 years ago

The original request isn't implemented...

dot-visual commented 5 years ago

Still no fix for this? @KN4CK3R

Timboy67678 commented 5 years ago

Nothing to fix, this is a feature request.

On Wed, 21 Aug. 2019, 9:00 pm .visual, notifications@github.com wrote:

Still no fix for this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ReClassNET/ReClass.NET/issues/48?email_source=notifications&email_token=AAHSZZVDGU2243YKHXI5UQ3QFUN3JA5CNFSM4ESX2SAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4ZJCBQ#issuecomment-523407622, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHSZZSBKHHFSY4WXGRIBPTQFUN3JANCNFSM4ESX2SAA .

LoneDev6 commented 3 years ago

Hello! I think this feature request is a must have to avoid doing using a top-down approach when reversing a structure. Let us know what you think @KN4CK3R

oculus472 commented 3 years ago

Does anyone know of a good way to handle this? At the moment redefining fields is a nightmare.

LoneDev6 commented 3 years ago

No idea sincerely, all the tools I tried have the same problem. I always have to redefine all my structures from the ground up and use a top down approach

ross-weir commented 3 years ago

@KN4CK3R Is this still something you'd be interested having added?

If so I'd like to have a go at implementing this. Do you have any preferences/suggestions on how to go about it?

From a quick look I was thinking something like:

LoneDev6 commented 3 years ago

@KN4CK3R Is this still something you'd be interested having added?

If so I'd like to have a go at implementing this. Do you have any preferences/suggestions on how to go about it?

From a quick look I was thinking something like:

* Before adding nodes in `InsertBytes` save all defined node offsets - defined nodes being those with a non empty `Name` value.

* After adding nodes restore saved nodes to original offsets

Why not implementing it anyway, opening a pull request and in the meantime publish your fork?

KN4CK3R commented 3 years ago

You have to keep in mind that BaseNode.Offset is not intended to be frozen. Every action which changes the class layout recalculates the offset for all nodes.

LoneDev6 commented 3 years ago

@KN4CK3R So basically this means that the program is structured in a way that this feature is very hard to implement without a lot of modifications?

KN4CK3R commented 3 years ago

Yes, you would have to insert HexNodes infront to increase a nodes offset or remove them. Removing will be a problem if there are no unused hex nodes to remove. Something like this is already there: https://github.com/ReClassNET/ReClass.NET/blob/0ee8a4cd6a00e2664f2ef3250a81089c32d69392/ReClass.NET/Nodes/BaseContainerNode.cs#L191-L204 Commented out 5 years ago because I decided it's not worth it.