| View previous topic :: View next topic |
| Author |
Message |
simonzack Newbie cheater
Reputation: 0
Joined: 19 Jun 2014 Posts: 15
|
Posted: Mon Jun 23, 2014 10:04 pm Post subject: Feature request: using structs as types |
|
|
It would be nice to select a user-defined struct as a type, in the table of addresses.
This can be applied to inventories for example, where there are an array of items with the same struct.
It could be done with a script, but I think using structs allows for interactivity, i.e. field-renaming.
|
|
| Back to top |
|
 |
justa_dude Grandmaster Cheater
Reputation: 23
Joined: 29 Jun 2010 Posts: 893
|
Posted: Mon Jun 23, 2014 10:41 pm Post subject: |
|
|
Have you tried the structure dissector? It sounds like exactly what you need.
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on... |
|
| Back to top |
|
 |
simonzack Newbie cheater
Reputation: 0
Joined: 19 Jun 2014 Posts: 15
|
Posted: Mon Jun 23, 2014 10:46 pm Post subject: |
|
|
| Yeah, I know about it, what I want is to display a struct defined by the dissector in the table of addresses.
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon Jun 23, 2014 10:57 pm Post subject: |
|
|
| Not sure what you mean by 'field renaming', but everything can be done using a script and it's all interactive (the values just won't populate unless the script is enabled). Without a script, you'd need some way to differentiate addresses with shared instructions anyway.
|
|
| Back to top |
|
 |
simonzack Newbie cheater
Reputation: 0
Joined: 19 Jun 2014 Posts: 15
|
Posted: Mon Jun 23, 2014 11:19 pm Post subject: |
|
|
| I mean that you can see all the fields (as in struct fields) and values in the address dissector in the address table directly, and that you can edit the fields from there, doesn't that sound more convenient?
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon Jun 23, 2014 11:37 pm Post subject: |
|
|
| I'm still not sure what you mean, but if you write a script, you can add/remove offsets, rename offsets and edit their values...all in real time.
|
|
| Back to top |
|
 |
simonzack Newbie cheater
Reputation: 0
Joined: 19 Jun 2014 Posts: 15
|
Posted: Mon Jun 23, 2014 11:44 pm Post subject: |
|
|
Maybe this screenshot (attached, don't have permission to post urls) will make it clearer, each item[i] is just the struct inventory_item on the left, but there are 256 items, I could use your suggestion and make a script to populate the address table with a list of inventory_items, but what I'm suggesting is to do this in a more direct fashion, by changing the type of each item[i] to inventory_item, so whenever I rename a field in the address table, it gets renamed in the struct dissector, and in all the other items as well.
| Description: |
|
| Filesize: |
67.45 KB |
| Viewed: |
4878 Time(s) |

|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25835 Location: The netherlands
|
Posted: Tue Jun 24, 2014 2:40 am Post subject: |
|
|
It's not functional for renaming(renaming structure elements will actually break it), but do you know you can use relative addressing and structure element names to make copy pasting at least easier?
if you change item[x] into a pointer to the related object and then give type as address "+inventory_item.type", stack as address "+inventory_item.stack", etc...
then all you need to do is copy/paste these entries each time you make a change without having to update the addresses for the other entries
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|