 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
AltairPL Newbie cheater
Reputation: 2
Joined: 25 Jan 2014 Posts: 24
|
Posted: Sat Jan 25, 2014 10:52 pm Post subject: few minor(?) bugs in CE6.3 ... suggestions too |
|
|
First of all, thank you for all your hard work on CE, DB. I'm using CE for a few years now and it just gets better and better. And now to a main topic:
In Structure Dissect dialog, addresses' name labels (those from Set name/Rename option in context menu) are not always correctly displayed if there is more than one group. It's hard to explain, so see StructureDissect.png attachment.
EDIT: request moved to second post
Events lists in Object Inspector dialog of Form Designer contains also entries which are not functions. It seems that the lua stript is scanned for "function" keyword without checking if it's in comment or not. Extremely simple example in FormDesigner.png attachment.
About what you (DB) wrote in post 5379953 in Cheat Engine Forum Index -> Cheat Engine Lua Scripting -> cttrainer.exe in lua, with error (sorry for that form, but I can't post urls yet). Is there a chance that using pause/unpause in protected trainers will be possible?
There are also few bugs in CE help file, but for the time I remember only this one in the ASM Basics 1: MUL opcode usage is described identical to ADD/SUB opcodes even if, correct me if I'm wrong, it should be more similar to DIV.
This one in not necessary a bug, but it is really annoying sometimes: when copying/pasting multiple entries of the Address List their order is reversed on paste - is it possible to retain their order?
I think there were few more small bugs like that, but I was too lazy to register earlier to report them and now I simply don't remember them. Sorry for the bother. Will post more if I find/remember any.
Description: |
|
Filesize: |
20.59 KB |
Viewed: |
9255 Time(s) |

|
Description: |
|
Filesize: |
12.19 KB |
Viewed: |
9255 Time(s) |

|
Last edited by AltairPL on Wed Jan 29, 2014 8:40 am; edited 2 times in total |
|
Back to top |
|
 |
AltairPL Newbie cheater
Reputation: 2
Joined: 25 Jan 2014 Posts: 24
|
Posted: Wed Jan 29, 2014 8:38 am Post subject: |
|
|
One small copy-paste error(?) in main.lua: Should both entries have the same description?
Code: | writeBytes(address, x,x,x,x,...) : Write the given bytes to the given address from a table
writeBytes(address, table) : Write the given bytes to the given address from a table |
Quick note to avoid problems and weird looks : despite the form, those are not demands, but merely suggestions/feature requests. DB will still do what he thinks is best (for CE and/or himself ).
GENERAL:
Some CE preferences should be remembered or user should be allowed to set default values for those preferences, i.e. Memory Viewer hex view settings (Display Type, Separators, Default rowsize, Fade timer) or Editor preferences for AA/Lua script edit windows. Editor preferences could also be added to Lua Engine window to allow already formatted code to be quickly copy-pasted to script window.
Exclude right Alt key from internal CE hot-keys. Some keyboard layouts use it for input of language specific characters, e.g RAlt+A gives "ą" or "Ą" in Polish, and in CE it opens Auto Assemble window. I usually write comments in English, but some quick ones (TODO's, etc.) I also write in Polish which uses RAlt extensively.
STRUCTURE DISSECT:
Add option to reorder structures on the list (Structure menu item). If new window is needed for that it could possibly also be used for basic structures management (Add, Delete, Rename, Clone/Duplicate, etc.).
Add some kind of indication that address field is locked - maybe disable the field on lock. The only thing that changes after entering new value in locked address field I have noticed is update of related elements addresses but not values - those are updated only after unlocking address field.
Add address identification to the offset list. It could display custom name of the address (if set) or address itself (direct copy of what's in the address field). First proposition was to do this in the same manner the structure name is displayed below Offset-description column header. But I think that using column headers would be much better for this, as they would be visible even if structure is scrolled way down. This can be really useful when Show addresses option is disabled or when symbol is used in address field.
Add Sub-structure data type or modify existing Pointer type to extend its use. Whatever the case, it would be almost identical to current Pointer type, but instead of using element value as pointer destination, element's address itself would be used. What for? There are probably more applications, but IMHO those are most useful:
- Internal structures. Let's say that game stores inventory (10 item slots) of every character directly in its structure and every item takes 16 bytes (structure in itself). Now, you can either store whole inventory elements in character structure or you can leave only elements marking start and/or end of whole inventory or every item to decrease structure clutter, but you will probably make separate structure for items. With sub-structure type you will be able to add only one element for every item and pointed structure will do the rest. Also you will have easy access to every item, and if you finally find out what byte "x" in items structure is for, instead of going through "y" elements of "z" structures you can just update description in sub-structure. Did I mention that collapsing currently unneeded entries will decrease structure clutter.
- Identical data blocks. Some games uses identical "blocks" for more than one structure, i.e. every unit and building has identical header and data specific to unit/building type. Once again sub-structure can speed up update of offsets descriptions and decrease structure clutter (collapse and all).
- Decrease structure clutter. Yup, it was mentioned in previous two points, but I think it deserves its own. With sub-structures, large structures could be divided into smaller ones, showing only ones that are interesting at the time. It's pretty much the same as collapsible groups in main CE window list, but if you want to compare few larger structures looking for yet unknown differences, possibility to hide already identified sub-structures would be very nice.
Only other change then addressing from Pointer type I can think of, is the way in which offsets are displayed. Pointer type displays pointed structure offsets, but in the case of sub-structures showing main structure offsets would sometimes be better, so maybe some kind of check-box could be added.
BTW, there's an option called Add child element in the context menu of structure name (in offset list). I was hoping that it does just like what I suggested, but it seems that it adds normal entry (same as Add element option, which is also in this context menu).
I have one more idea for data type, but it will be probably hell to implement and it's use will be marginal, but if DB will be interested in reading (after this post I seriously doubt it ), I will be willing to write it.
Happy hacking and don't hate me, please .
|
|
Back to top |
|
 |
AltairPL Newbie cheater
Reputation: 2
Joined: 25 Jan 2014 Posts: 24
|
Posted: Mon Feb 03, 2014 6:42 am Post subject: |
|
|
I have found few imo pretty serious bugs in lua:
Function doubleToByteTable(number) creates table with only 4 elements.
Thanks to the great idea to use float as the only number type in lua, using qword is very limited:
- highest usable value is 9223372036854775808 (0x8000000000000000) - everything above is rounded to that value and is displayed as 9.2233720368548e+018,
- lowest effectively usable value is -9223372036854775806 (0x8000000000000002), value -9223372036854775808 is probably rounded since it's displayed as -9.2233720368548e+018,
- still, value -9223372036854775807 (0x8000000000000001) takes the cake - execute twice following code in the Lua Engine window:
Code: | i = -9223372036854775807 | First execute causes Unknown Run-Time error : 202 error popup, second hangs CE for good.
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Mon Feb 03, 2014 7:12 am Post subject: |
|
|
large numbers are a bit tricky, but they are usable. (this lua build has a patch to support large numbers a little)
You have to make sure the value is stored as the number type, and that inputting those values using a script with the specific value alone won't properly work
e.g:
Code: |
i=getAddress("8000000000000001")
i=i-1 --negative test
i=i+0x64 --positive test
return string.format("0x%x",i)
|
returns 0x8000000000000064 which is correct
_________________
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 |
|
 |
AltairPL Newbie cheater
Reputation: 2
Joined: 25 Jan 2014 Posts: 24
|
Posted: Mon Feb 03, 2014 9:32 am Post subject: |
|
|
Thanks for suggestion.
That's really weird...
Code: | i1 = 9223372036854775910
i2 = tonumber("9223372036854775910")
i3 = tonumber(0x8000000000000002)
i4 = getAddress("8000000000000002")
print(i1,i2,i3,i4) |
Every time the number is initialized using decimal notation (e.g. i1 and i2), value is stored and displayed as "9.2233720368548e+018" and value 9223372036854775808 is used for every calculations.
When hexadecimal notation is used (e.g. i3 and i4 as you suggested) value is stored displayed and calculated as it should (as signed, but at least correct).
Well, for normal lua use in CE, i3 and i4 should be sufficient, so kids, use hex values as much as possible .
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Feb 05, 2014 3:50 pm Post subject: |
|
|
Quote: | GENERAL:
Some CE preferences should be remembered or user should be allowed to set default values for those preferences, i.e. Memory Viewer hex view settings (Display Type, Separators, Default rowsize, Fade timer) or Editor preferences for AA/Lua script edit windows. Editor preferences could also be added to Lua Engine window to allow already formatted code to be quickly copy-pasted to script window.
Exclude right Alt key from internal CE hot-keys. Some keyboard layouts use it for input of language specific characters, e.g RAlt+A gives "ą" or "Ą" in Polish, and in CE it opens Auto Assemble window. I usually write comments in English, but some quick ones (TODO's, etc.) I also write in Polish which uses RAlt extensively. |
Ja tam stosuję bezogonkowce Ale zobaczę, może da się zrobić jakiś skrypcik zamieniający hotkey'e
(I will try to find solution with some Lua code. All ALT changed to leftALT)
For now I've made phase 1:
Code: | mf = getMainForm()
indent='\t\t\t\t\t\t\t\t\t\t\t\t\t'
function listAllShortcuts(obj,level)
level = level or 0
for i=0,obj.ComponentCount-1 do
local com = obj.Component[i]
if com.Shortcut~=nil and com.Shortcut~='' then -- must be not nil, and not empty string
print(indent:sub(1,level), com.ClassName, com.Name, com.Shortcut, com.ShortCut)
print('')
end
if com.ComponentCount~=nil then
listAllShortcuts(com,level+1)
end
end
end
listAllShortcuts(mf) |
give me 30 minutes.
EDIT:
OK, here:
Code: |
mf.actSave.ShortCut = 0
mf.Save1.ShortCut = 0 -- remove ctrl+alt+S (which is also: rightALT+S)
mf.frmAutoInject.APIHook1.ShortCut = 0 -- remove ctrl+alt+A (which is also: rightALT+A) (Lua script window)
mf.miShowLuaScript.ShortCut = 0 -- remove ctrl+alt+L (rightALT+L)
mf.actAutoAssemble.ShortCut = 0 -- remove ctrl+alt+A (rightALT+A)
|
Yes. It's not perfect. Inside Lazarus, we can not differentiate between leftALT and rightALT, for shortcuts.
And...., while editing AutoAssemble scripts and Lua scripts, we are using SynEdit. And for some reason it creates "?" just after we type ą ś ł. (SynEdit in new Lazarus project works as should, there's no "?")
_________________
|
|
Back to top |
|
 |
AltairPL Newbie cheater
Reputation: 2
Joined: 25 Jan 2014 Posts: 24
|
Posted: Wed Feb 05, 2014 8:10 pm Post subject: |
|
|
Well, I'm still new to lua, so I didn't think of that - and it works fine, thanks (dzięki) .
BTW, it seems you're using different (fixed?) version of CE - in mine obj(dot)Component[i] always returned 222 number for every index, which was causing indexing error in condition line - had to change it to obj(dot)getComponent(i) to get listing.
lol, sorry for the (dot), but forum engine thinks i'm trying to post a url - how many post one need to be able to post url's anyway? it's kinda getting on my nerves
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Feb 05, 2014 9:38 pm Post subject: |
|
|
You don't need Lua code from phase 1.
Only the second part.
"it seems you're using different (fixed?) version of CE"
Yes
object.Component[i] - is bugged in official CE6.3 (it works with CE6.3+ and it will with future CE6.4) (DB naprawił już w źródłach w SVN)
object.getComponent(1) - should work everywhere
_________________
|
|
Back to top |
|
 |
AltairPL Newbie cheater
Reputation: 2
Joined: 25 Jan 2014 Posts: 24
|
Posted: Wed Feb 05, 2014 9:55 pm Post subject: |
|
|
Quote: | You don't need Lua code from phase 1.
Only the second part. |
well, first line is needed , but apart from that i just wanted to see, how does it work
oh, and maybe we should avoid writing in Polish, before someone starts raving "fucking Poles, they're everywhere"
thanks again for your help
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|