Searching .txt files and print to drop down. Even possible?

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
oldstuff
Expert Cheater
Expert Cheater
Posts: 478
Joined: Thu Apr 06, 2017 6:53 pm
Reputation: 187

Re: Searching .txt files and print to drop down. Even possible?

Post by oldstuff »

Not sure if this is the best way or not.. but i managed to get it working with this:

Code: Select all

	local dropDownData = { }
	for address, name in fileStr:gmatch('%[%x-%]%s(%x-)%sItemPoolData%s.-([%w_]*%.[%w_]*)') do
		if wanted[name] then
			local prettyName = name:match('^[%w_]-%.ItemPool_(.-)$')
			---- this will make the names look like this: "BigBoomBlaster", "Pills Downer"
			---- 	But you can just use name if this doesn't match enough.
			---- Here we setup a table to call concat on.
			if prettyName then
				table.insert(dropDownData, address..':'..prettyName:gsub('_', ' '))
			else
				prettyName = name:match('^[%w_]-%.DA_ItemPool_(.-)$')
				if prettyName then
					table.insert(dropDownData, address..':'..prettyName:gsub('_', ' '))

            else
				prettyName = name:match('^[%w_]-%.Itempool_(.-)$')
				if prettyName then
					table.insert(dropDownData, address..':'..prettyName:gsub('_', ' '))

				else
					table.insert(dropDownData, address..':'..name)


				end
			end
		end
	end
end
It seems to be pulling all the address's now and not giving any error... Do you see anything i might of done wrong that im not seeing?

User avatar
SunBeam
Administration
Administration
Posts: 4702
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4285

Re: Searching .txt files and print to drop down. Even possible?

Post by SunBeam »

Since this is BL3 or Tiny Tina related, why not use the helpers in my Table? There is a function called staticFindObjectEx (it calls up on the UE4 internal function StaticFindObject) which you can use to query the Objects pool and get the address of an UObject instantly. Just format it properly (takes from 1 to 3 args). Add a loop and you will get all you need very fast, no txt file required to be read :))

P.S.: I even use it in the Set Weapon Properties script, so you have an example there.. :) Good luck!

Post Reply

Who is online

Users browsing this forum: No registered users