Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Dropdown list table bloat & responsiveness

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
dharthoorn
Advanced Cheater
Reputation: 1

Joined: 27 Nov 2008
Posts: 84

PostPosted: Tue Dec 05, 2017 4:08 am    Post subject: Dropdown list table bloat & responsiveness Reply with quote

It has happened a number of occasions when I assign an item ID dropdown list of substantial size, lets say ~1000 lines to several hundred lines of item slots the resulting table bloat makes sorting and general responsiveness go down the drain.

I was wondering if a "smart" system could be implemented that would reference ONE embedded dropdown list by line instead of embedding the ENTIRE list in the HTML line by line.

This may well be beyond the scope of what is possible in current HTML format but I thought I'd ask anyway.

_________________
"If you could reason with religious people there would be no religious people" - House Md. (My Personal Life Coach)
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 54

Joined: 01 Oct 2008
Posts: 941

PostPosted: Tue Dec 05, 2017 5:31 am    Post subject: Reply with quote

May check http://forum.cheatengine.org/viewtopic.php?p=5712168

Also a handler OnActiavte can be attach to specific memory record to mimic the dropdown list function, but memory writing has to do it yourself.

It can also use a new lua function
--showSelectionList(title, caption, stringlist, allowCustomInput OPTIONAL)
--in recent version : eg. mgr.inz.Player's Recent CheatEngine builds [find the url yourself, the forum modified the link]
this ui function has the benefit to filter the 1000~ list with what user typed.
(type something in the top box to see the effect)

Code:

sl = sl or createStringlist() --
sl.Text = [[
Peter - 123
Paul - 456
Mary - 789
]]
rl = rl or createStringlist() --
rl.Text = [[
Peter - 99999
Paul - 88888
Mary - 77777
]]

print(sl.Count,rl.Count)

local al = GetAddressList()
for i=0,al.Count-1 do
  local mr = al[i]
  if mr.Description:find"@[rs]l" then
    mr.OnActivate = function(mr,before,current)
      if mr.Description:find"@sl" then
        print(showSelectionList("Select","choose",sl,true))
      elseif mr.Description:find"@rl" then
        print(showSelectionList("Select","choose",rl))
      else -- in case @[rs]l removed
        return true -- pass/ignore
      end
    end
  end
end
-- to test make some memory record with description having '@rl' or '@sl'

_________________
- Retarded.
Back to top
View user's profile Send private message
dharthoorn
Advanced Cheater
Reputation: 1

Joined: 27 Nov 2008
Posts: 84

PostPosted: Tue Dec 05, 2017 12:21 pm    Post subject: Reply with quote

Hi Panraven thanks for your help.

First I checked out you link and I find the mgr.inz.Player script very handy to use for mass assigning dropdown. However it seems it will still result in bloat because in the HTML it is still parsed by line instead of reference a single embedded file.
Zanzer then modifies the script to function with embedded file but I cannot seem to make that work because basically I am a lua noob. I did append a dropdown.txt table but then I don't know what to do next.

Also your script I can't seem to get it to work. Perhaps some syntax mistake again because my Lua knowledge is practically nonexistent.

I have uploaded my test table hope you can point me in the right direction to make your (and perhaps Zanzer) script to work.

Thanks Wink

https://drive.google.com/file/d/1glJ8AggmzCqTv78jHCyp5QxpASYcL59y/view?usp=sharing

_________________
"If you could reason with religious people there would be no religious people" - House Md. (My Personal Life Coach)
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 54

Joined: 01 Oct 2008
Posts: 941

PostPosted: Wed Dec 06, 2017 12:27 am    Post subject: Reply with quote

Hi,
I attached a test ct, but it is in *.lua extension, remove the .lua then try it.
It may display a message of mgr.inz.Player's Recent CheatEngine builds
if your ce doesn't has the showSelectionList function.

bye~



test_selection.CT.lua
 Description:
remove ".lua" to trye

Download
 Filename:  test_selection.CT.lua
 Filesize:  16.81 KB
 Downloaded:  743 Time(s)


_________________
- Retarded.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Wed Dec 06, 2017 9:29 am    Post subject: Reply with quote

Official CE6.7 provides "Link to other Memory Record Drop Down List" feature.
(I will refer to this feature as "Link" for simplicity)

Works like this:
1) you have first/main entry (main memory record) with normal drop down list.

For example memory record, with description "First Item", have normal drop down list like this one:
Code:
1:Crown
2:Overcoat
3:Gloves
4:Trousers


2) you want the same drop down list for other entries (memory records), e.g. "Second Item", "Third Item",...
You can use a link. Just type in the description of that memory record inside parenthesis.

Example:
Code:
(First Item)









Unfortunately, official CE6.7 has few bugs related to mentioned feature:

- reopened "drop down list editor" window forgets to check if there is a link or not. So you can not rely on all information you see in this window. Also, because of this bug, if you want to remove the link or use a normal drop down list, you have to save current work to CT file, open that CT file with XML editor (CT files are Extensible Markup Language text files) and remove <DropDownListLink> node.

- extra drop down list options, from main memory record, such as "Only show the description part" and "Make the record display values like the dropdown list" don't transfer properly to other memory records (which are linked to the main memory record)

- change value window will always highlight the value you see in main memory record





You can use my "custom Cheat Engine build", it doesn't have above bugs. You can compose and release CT file with nice DropDownLists and Links to those, and CT file size should be small. Of course you will have to recommend to use my CE build or recommend compiling CE from source on GitHub.


(or wait for CE6.7.1 or CE6.8)

_________________
Back to top
View user's profile Send private message MSN Messenger
dharthoorn
Advanced Cheater
Reputation: 1

Joined: 27 Nov 2008
Posts: 84

PostPosted: Mon Dec 11, 2017 9:46 am    Post subject: Reply with quote

Thanks for the replies guys.

I will experiment for a while with the latest test build -17.11.13 at time of writing. That global dropdown feature looks very, very useful.

Also very good to know this is being expanded on in next release(s).

Overall good stuff & much appreciated. Wink

_________________
"If you could reason with religious people there would be no religious people" - House Md. (My Personal Life Coach)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites