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 


[Assembler][Terraria] static address of a Assemble?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Marcus101RR
Expert Cheater
Reputation: 2

Joined: 09 Mar 2011
Posts: 131
Location: USA, FL

PostPosted: Fri Nov 08, 2013 3:38 pm    Post subject: [Assembler][Terraria] static address of a Assemble? Reply with quote

So, I am attempting to find in Terraria the Static Address in the Assemble of the minion limit, which is controlled by armor pieces or items.

I know where the value of the minion is stored, and the max you can have.

Thus, I was able to find the assemble and edit it to increment the value more than once. My question is, how do I go on about finding the static address of the code that "Increments" the minion limit, the address changes everytime I load up the game. Do I use the same method I did to find the pointer for the minion/max minion limit? Or something else?

Once I do have it, How does one put it in a code like this:

17DA9B18
Is the address where it begins to calculate the amount of MAX minion limit a user can have. This address however changes once every load, so a pointer is required...Is this the same method of finding a pointer using the scanner? If so, I do I go on about defining it once I have it?

Code:
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
jg 17DA9B18
mov eax,[ebp-00001528]
inc [eax+000000C8]
inc [eax+000000C8]
mov eax,[ebp-00000218]

originalcode:
jg 17DA9B18
mov eax,[ebp-00001528]
inc [eax+000000C8]
mov eax,[ebp-00000218]

exit:
jmp returnhere

17DA9B0A:
jmp newmem
nop
nop
nop
returnhere:
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Fri Nov 08, 2013 3:58 pm    Post subject: Reply with quote

In this game a pointer can be quite long, and is dependent on the .net version the user uses.

Best thing is use an signature scan for the bytes that make up this function, and go from there. Problem there is that .net may not generate the same code for everyone. (e.g I can't find that original code of your script. But could be it's the version of terraria as well)

_________________
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
View user's profile Send private message MSN Messenger
Marcus101RR
Expert Cheater
Reputation: 2

Joined: 09 Mar 2011
Posts: 131
Location: USA, FL

PostPosted: Fri Nov 08, 2013 4:03 pm    Post subject: Reply with quote

Dark Byte wrote:
In this game a pointer can be quite long, and is dependent on the .net version the user uses.

Best thing is use an signature scan for the bytes that make up this function, and go from there. Problem there is that .net may not generate the same code for everyone. (e.g I can't find that original code of your script. But could be it's the version of terraria as well)


The script is very hard to find, and the address changes. I have a table which has all the info in it, and this is what i used to find the values:

See attachment

Be advised, the cheat table only works with the top most character, and Index = 0 (1), etc

That is how I found the minion limit so far, still searching for the static address of the call, so I can actually import my new code.



Terraria.CT
 Description:
Terraria 1.2.1.2

Download
 Filename:  Terraria.CT
 Filesize:  20.41 KB
 Downloaded:  1473 Time(s)

Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Fri Nov 08, 2013 7:22 pm    Post subject: Reply with quote

Hmm, I probably have a different steam version, and my .net version compiles the code slightly different. (my ebp relative offsets are different)

Anyhow, in next ce version you will be able to lookup the entry of Terraria.Player::UpdatePlayer
Get the (self) object (ECX)

and then set [ECX+C8] to the max number of minions you wish.
edit: Hmm, looks like it gets set back immediately

_________________
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
View user's profile Send private message MSN Messenger
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Fri Nov 08, 2013 9:40 pm    Post subject: Reply with quote

Dark Byte wrote:
Anyhow, in next ce version you will be able to lookup the entry of Terraria.Player::UpdatePlayer
Get the (self) object (ECX)
and then set [ECX+C8] to the max number of minions you wish.

That's so freaking awesome! I know I sound like a sycophant, but you rock.

Dark Byte wrote:
edit: Hmm, looks like it gets set back immediately

I did this cheat for my table, and it looks like there are a few places where the game constantly recomputes the current max according to whatever bonuses you have at the moment. It's weird the way that some things, like max enemy spawns, have a base value that can be easily modified while others, like max minions and most buffs, are constantly recomputed.
Back to top
View user's profile Send private message
Marcus101RR
Expert Cheater
Reputation: 2

Joined: 09 Mar 2011
Posts: 131
Location: USA, FL

PostPosted: Fri Nov 08, 2013 11:32 pm    Post subject: Reply with quote

Dark Byte wrote:
Hmm, I probably have a different steam version, and my .net version compiles the code slightly different. (my ebp relative offsets are different)

Anyhow, in next ce version you will be able to lookup the entry of Terraria.Player::UpdatePlayer
Get the (self) object (ECX)

and then set [ECX+C8] to the max number of minions you wish.
edit: Hmm, looks like it gets set back immediately


Yes it does get set back immidiatly because the main line eax,al controls the starting number. A normal new character can only summon 1, and this code also checks the increment of the additional slots you gain from the items in your accessory. When I changed the eax,al to eax,cl, I was able to summon 6000 of them, i didn't but you get the idea.

Meanwhile,

It seems that the initial 1 minion you get from the game seems to be stored even higher up before this eax,al value that seems to be accessed repeatedly.

I thought it would be as easy as getting the pointer for the minion limit, didn't think it would get hard.

PS: So this means my cheat table doesn't work for everyone? Only for those that use the same .Net and Terraria Version?
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Sat Nov 09, 2013 1:48 am    Post subject: Reply with quote

Marcus101RR wrote:
So this means my cheat table doesn't work for everyone? Only for those that use the same .Net and Terraria Version?

None of them work for me, I'm afraid. Unless I'm mistaken, even different XNA version, CPU architecture, OS, etc. can cause failure.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Sat Nov 09, 2013 8:53 am    Post subject: Reply with quote

Marcus101RR, out of curiosity, does your edit actually have an effect?
If not, the maxMinions field might just be a display value and when a minion is spawned it does the calculation itself.

_________________
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
View user's profile Send private message MSN Messenger
Marcus101RR
Expert Cheater
Reputation: 2

Joined: 09 Mar 2011
Posts: 131
Location: USA, FL

PostPosted: Tue Nov 12, 2013 7:19 pm    Post subject: Reply with quote

Dark Byte wrote:
Marcus101RR, out of curiosity, does your edit actually have an effect?
If not, the maxMinions field might just be a display value and when a minion is spawned it does the calculation itself.


here I updated it to Latest Terraria 1.2.1.2 with .NET 4.5.1

No, the Minion/Max Minion is calculated in game, but if you remove the source of the calculation then you can edit MAX limit manually.



Terraria.CT
 Description:
1.2.1.2 for .NET 4.5.1

Download
 Filename:  Terraria.CT
 Filesize:  21.08 KB
 Downloaded:  1278 Time(s)

Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Tue Nov 12, 2013 7:32 pm    Post subject: Reply with quote

Yes, this table seems to work.
But what I meant, is that if you have set the MAX limit to 50, can you actually spawn in 50 minions, or will it still be limited to 1 ?

E.g Terraria.Player also contains the value named 'RopeCount". But I'm quite sure that no matter what you change it to, you can't use more ropes, as your inventory has none

_________________
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
View user's profile Send private message MSN Messenger
Marcus101RR
Expert Cheater
Reputation: 2

Joined: 09 Mar 2011
Posts: 131
Location: USA, FL

PostPosted: Tue Nov 12, 2013 9:59 pm    Post subject: Reply with quote

Dark Byte wrote:
Yes, this table seems to work.
But what I meant, is that if you have set the MAX limit to 50, can you actually spawn in 50 minions, or will it still be limited to 1 ?

E.g Terraria.Player also contains the value named 'RopeCount". But I'm quite sure that no matter what you change it to, you can't use more ropes, as your inventory has none


No, it resets to whatever your current accessories are.

It will only allow 1 Minion, the table at its current state does not work. If I goto "Search what access this pointer" and change its status, It will allow me to spawn unlimited. In short, the pointer is useless as it is, but it helps finding the source of the spawn limit calculation. So if you change it, you can spawn whatever you want.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Marcus101RR
Expert Cheater
Reputation: 2

Joined: 09 Mar 2011
Posts: 131
Location: USA, FL

PostPosted: Sun Nov 24, 2013 6:13 pm    Post subject: Reply with quote

I have been working on trying to find the Player's INDEX the game assigns so one can find the Values such as Health, Mana, Minions, etc for that player. Here is my result so far:

An AOB scan of the following will give you the value location where the "Player index" is stored. This should help finding the players health and mana. However, I am every new to cheat engines AOB system and turning it into a script or pointer from there.

AOB ?? 00 00 00 C5 0A 00 00 2C 01
?? = Index of Player (Max 255)

Trying to figure out how to use that and grab the player index, put it in a pointer, and use that to find the person's health.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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