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 


Towns

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Single player cheat request
View previous topic :: View next topic  
Author Message
Lord Blade
Master Cheater
Reputation: 0

Joined: 29 Mar 2010
Posts: 319

PostPosted: Mon Nov 12, 2012 10:58 pm    Post subject: Towns Reply with quote

Any chance of something to make it so that your people don't need to eat or sleep?

I'm sure they'll balance everything in time, but right now it seems like the main focus is just to get as much food production going as possible, otherwise your guys all starve. Which leaves little time to do anything else. :p
Back to top
View user's profile Send private message
jgoemat
Expert Cheater
Reputation: 15

Joined: 25 Sep 2011
Posts: 159

PostPosted: Wed Nov 14, 2012 7:26 pm    Post subject: Reply with quote

I haven't been able to create a cheat yet, but here's some info in case anyone else wants to work on it.

The game runs in "javaw.exe", and I can't get "find out what accesses this address" to not crash the game, it must use the debug registers.

A unit's basic structure from what I found is this, I don't know what the start offset is so these are really relative. The ones with question marks seem to be those values too, but the tooltip just changes when I change the 'Current' ones.
Code:
00: Current HP
04: ?Atk?
08: ?
0C: ?Def?
10: ?HP?
14: ?Dmg?
18: ?5
1C: ?5
20: ?60
24: ?0
28: ?0
2C: Current Atk
30: ?5
34: Current Def
38: Max HP
3C: Current Dmg
40: ?5
44: ?5
48: ?60
4C: Name Structure Pointer
      00, 14, 2C: Length
      30: Unicode string of name
50: Pointer?


You can use the groupscan type to search for them, let's say your current atk is 894, def is 350, max hp is 1727 and dmg is 177, you would change Value Type to "Grouped" and use this to find offset 2C:

4:894 w:4 4:350 4:1727 4:177

I think you'll find two probably, try changing the second one's HP to see if it changes. I don't know where it starts, but it seems to end after the pointer at 50 because the name pointer points there at least for the ones I've seen. Also the they both seem to have the same pointer at -04 and 00000000 at -08, but the one that works has the name length I think at -0C and the other one has some pointer just past the one that works at an odd offset though...

***** Update *****

I'm able to get the find addresses to work, it was using 64-bit java, I changed Towns.exe to run in XP sp3 compatability mode and changed Towns.cmd to point to my 32-bit version of java:
Code:
"C:\Program Files (x86)\Java\jdk1.7.0_05\bin\java.exe" -Djava.library.path=lib/native/ -Djna.library.path=lib/native/ -Xms1024M -Xmx1024M -Xss2048k -jar lib/xaos.jar


HP seems to be at offset 8 into the structure, and a base structure points to that stats structure at BC. I'll try to investigate more.

The attached table just has structs for the base and stats and a script that my or may not work, since it's JITed, at least the instruction before's stack offset changed between game loads, and you'll have to be using the 32-bit java, but the addresses can let you look into the structures.

***** update 2 *****

The structure with turns to sleep/eat is at 00DC in the base. I noticed when I started from steam on my computer at home it actually ran Towns.exe instead of java.exe and couldn't find the pointer I don't think, so I ran it from Towns.cmd modified to point to 32-bit java.exe.

Sleep struct:
Code:
0C: Happiness
18: Turns to reset to after eating?
1C: Turns to eat (starts way higher than value at 18)
24: Turns to reset to after sleeping (second part on units screen)
28: Turns to sleep (starts out way higher, but reset to value at 24 after sleeping)
2C: How long slept, increased from 0 to about 720 when I slept, then back to 0 when I woke up and 28 was reset to 24



Towns.CT
 Description:
Table with just structs and script to find hovered unit

Download
 Filename:  Towns.CT
 Filesize:  51.13 KB
 Downloaded:  831 Time(s)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Single player cheat request 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)