cheat-engine / cheat-engine

Cheat Engine. A development environment focused on modding
http://cheatengine.org
15.12k stars 2.24k forks source link

Feature request to copy "Structure Dissect" into cheat table #1850

Open Shroototem opened 3 years ago

Shroototem commented 3 years ago

I can't see an easy way to copy all of the pointers from Structure Dissect into the table.

Structure Dissect: image

Example in table (don't mind the 'script' tags): image

Y-A-K-E commented 3 years ago

I second that!

Frouk3 commented 3 years ago

I can't see an easy way to copy all of the pointers from Structure Dissect into the table.

Structure Dissect: image

Example in table (don't mind the 'script' tags): image

You used generate from structure?

Shroototem commented 3 years ago

I used "Dissect data/structure" in the memory viewer.

Shroototem commented 3 years ago

Or if anyone has a converter for this?

# Old

# <Element Offset="56" Vartype="Pointer" Bytesize="8" OffsetHex="00000038" Description="Item[3]" DisplayMethod="Unsigned Integer">
#   <Structure Name="Slot" AutoFill="0" AutoCreate="1" DefaultHex="0" AutoDestroy="0" DoNotSaveLocal="0" RLECompression="1" AutoCreateStructsize="4096">
#     <Elements>
#       <Element Offset="24" Vartype="Pointer" Bytesize="8" OffsetHex="00000018" Description="itemInstance" DisplayMethod="Unsigned Integer">
#         <Structure Name="ItemInstance" AutoFill="0" AutoCreate="1" DefaultHex="0" AutoDestroy="0" DoNotSaveLocal="0" RLECompression="1" AutoCreateStructsize="4096">
#           <Elements>
#             <Element Offset="16" Vartype="Pointer" Bytesize="8" OffsetHex="00000010" Description="baseItem" DisplayMethod="Unsigned Integer"/>
#             <Element Offset="96" Vartype="4 Bytes" Bytesize="4" OffsetHex="00000060" Description="amount" DisplayMethod="Unsigned Integer"/>
#           </Elements>
#         </Structure>
#       </Element>
#     </Elements>
#   </Structure>
# </Element>

#  New

# <CheatEntry>
#   <ID>0</ID>
#   <Description>"Item[3]"</Description>
#   <VariableType>8 Bytes</VariableType>
#   <Address>PlayerInventory</Address>
#   <Offsets>
#     <Offset>38</Offset>
#   </Offsets>
#   <CheatEntries>
#     <CheatEntry>
#         <ID>1</ID>
#           <Description>"itemInstance"</Description>
#           <VariableType>8 Bytes</VariableType>
#           <Address>PlayerInventory</Address>
#           <Offsets>
#             <Offset>18</Offset>
#             <Offset>38</Offset>
#           </Offsets>
#             <CheatEntries>
#               <CheatEntry>
#                   <ID>2</ID>
#                     <Description>"baseItem"</Description>
#                     <VariableType>8 Bytes</VariableType>
#                     <Address>PlayerInventory</Address>
#                     <Offsets>
#                       <Offset>10</Offset>
#                       <Offset>18</Offset>
#                       <Offset>38</Offset>
#                     </Offsets>
#               </CheatEntry>
#                 <CheatEntry>
#                   <ID>3</ID>
#                     <Description>"amount"</Description>
#                     <VariableType>4 Bytes</VariableType>
#                     <Address>PlayerInventory</Address>
#                     <Offsets>
#                       <Offset>64</Offset>
#                       <Offset>18</Offset>
#                       <Offset>38</Offset>
#                     </Offsets>
#               </CheatEntry>
#             </CheatEntries>
#     </CheatEntry>
#   </CheatEntries>
# </CheatEntry>
Shroototem commented 3 years ago

My God.. I've just learned you can set an address to "+0" and it will copy the parent pointer above. image image

Frouk3 commented 3 years ago

This may fix your problem: https://github.com/FreeER/CE-Extensions/blob/master/genFromStruct.lua

Shroototem commented 3 years ago

This may fix your problem: https://github.com/FreeER/CE-Extensions/blob/master/genFromStruct.lua

That's really helpful. Thank you! ❤️