| View previous topic :: View next topic |
| Author |
Message |
kein92 How do I cheat?
Reputation: 0
Joined: 19 Aug 2009 Posts: 4
|
Posted: Tue Feb 25, 2020 10:15 pm Post subject: Exporting values to excel/google docs in real time |
|
|
Hello,
I am currently playing The Guild 3 and I have been enjoying creating spreadsheets in excel and google docs to help me optimize what my businesses produce based on current market prices.
Until now I have been updating market prices in my spreadsheet manually by looking at the market price in-game and then alt-tabbing to my spreadsheet and updating the relevant cells, however, since market prices change multiple times an in-game day, and I am dealing with multiple commodities, doing so is quite tedious.
I am trying to find an efficient way of capturing the buy and sell prices of a given commodity/commodities and then exporting these values in some way that can be imported to excel or google docs in real-time. Naturally, Cheat Engine came to mind.
I have already done a little snooping and discovered that the relevant values are simple 4-byte, exact values whose addresses were easily ascertained with two scans.
I am clueless as to how to proceed beyond this point and was hoping someone a lot smarter and more skilled than I would be generous enough to help me figure out the best way of accomplishing my goal.
Thanks in advance for any help!
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4717
|
Posted: Wed Feb 26, 2020 12:03 am Post subject: |
|
|
If I'm not mistaken, most spreadsheet programs parse tabs and newlines as "next column" and "next row" operations when pasting a string. Generate the string by reading values from addresses, write it to the clipboard, and make a macro that switches to excel and updates the spreadsheet. Trigger all this perhaps with a hotkey.
The hotkey and clipboard are easy with the functions createHotkey and writeToClipboard respectively. Generating the string shouldn't be too difficult, but it would obviously depend on how the spreadsheet is organized and how you're getting the addresses. The macro part might be more annoying than it would be worth- switching to the spreadsheet and pasting it in yourself might be the best option.
Pointers can help with finding the addresses automatically. If this is a game where good base addresses aren't exactly easy to find, you can still get a non-static base common to all the addresses through a code injection (or just get the values themselves through a code injection; however, the order those values are in might be difficult to determine).
See DB's video on step 8 of the CE tutorial (link) for information on pointers and the pointer scanner, and search for "injection copy" / "injection copies" for information on this code injection technique. There are also plenty of tutorials on Lua out there (CE uses Lua 5.3), CE-related Lua stuff is documented in celua.txt, and examples are in these forums.
Some more information would help others give more practical help to you. What does the spreadsheet look like? How many values are there? Are you fine with finding the addresses yourself every time the game starts? How are the values stored in memory? (consecutively and/or in the same order?)
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
kein92 How do I cheat?
Reputation: 0
Joined: 19 Aug 2009 Posts: 4
|
Posted: Fri Feb 28, 2020 1:40 pm Post subject: |
|
|
I appreciate your taking the time to respond to me Penguin!
I'm pasting a link to the spreadsheet here so you can see what I've got going on: docs.google.xxx/spreadsheets/d/1qE7VKXPaY8jcZxm_Xt4odPuNPkkStb_gsHtux-uxeSo/edit?usp=sharing
The values being pulled from the game would be the buy price and the sell price for each commodity and would be updated in rows 5 and 6 of the spreadsheet.
Based on your response it seems like maybe using a spreadsheet isn't the best way of going about this. I'm thinking it might be simpler in the long run to code some kind of app that does this rather than trying to use a mixture of cheat engine and spreadsheets.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4717
|
Posted: Fri Feb 28, 2020 4:29 pm Post subject: |
|
|
You could have a look at CE's form designer if you want. Click on "Create form" under the Table menu in the main CE window and play with stuff. e.g. editboxes to input data, listview or treeview to display data, anchors to position everything...
The CE wiki has a page on this:
https://wiki.cheatengine.org/index.php?title=Tutorial:LuaFormGUI
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
|