Can Someone Teach Me How to Script for Hero's Hour?

Memory scanning, code injection, debugger internals and other gamemodding related discussion
GreenHouse
Expert Cheater
Expert Cheater
Posts: 852
Joined: Fri Oct 12, 2018 10:25 pm
Reputation: 896

Re: Can Someone Teach Me How to Script for Hero's Hour?

Post by GreenHouse »

I didn't play the game, I just loaded the match and looked for those values. So I don't know about other stuff. But I sure won't do a table, as that engine is annoying to make tables. And the screen is "Dissect data/structures". Or Ctrl+D when on the Memory Viewer.

Sigan
Expert Cheater
Expert Cheater
Posts: 267
Joined: Fri May 26, 2017 1:23 am
Reputation: 125

Re: Can Someone Teach Me How to Script for Hero's Hour?

Post by Sigan »

Lord Blade is experiencing exactly what I'm experiencing.

Why is it annoying to make a table for games with this engine?

bloodaxis
Expert Cheater
Expert Cheater
Posts: 460
Joined: Thu Apr 13, 2017 5:09 am
Reputation: 59

Re: Can Someone Teach Me How to Script for Hero's Hour?

Post by bloodaxis »

Sigan wrote:
Tue Oct 05, 2021 1:45 pm
Lord Blade is experiencing exactly what I'm experiencing.

Why is it annoying to make a table for games with this engine?
I managed to get it working by just searching and picking the last entry in the list before those green memory entries and changing that. The last one worked for all resources, if I ended a turn to do a "next search" it would only find the value that wasn't possible to change.

User avatar
ApeDemon66
Expert Cheater
Expert Cheater
Posts: 226
Joined: Sat Mar 03, 2018 7:31 am
Reputation: 180

Re: Can Someone Teach Me How to Script for Hero's Hour?

Post by ApeDemon66 »

Slapped this table together really quick, working from a table I recently made for a 32-bit GameMaker game and put the necessary 64-bit stuff:
Re: [Request] Hero's Hour v1.5.8

On the "teach"ing part of the topic, I AoB scanned for the list of Objects and CScripts, got their CCodes, and read through the CCodes' VMBuffers for what variables they were accessioning by the offset used. Then I use those offsets in the appropriate variable addresses with Global variables being in the Global variables area, which I AoB scanned for the static pointer, and instance variables being in the Object's CInstance's variable area. For the currencies, they were in an array of an array of a global variable. For anything more technical beyond that, I'd recommend just looking through the code I wrote. While the code isn't perfect and could have more work done, it seems to get the job done.

For adding more to the table yourself, you can go to the tools section of the table, use, and adjust the scripts according to your need to find the CCodes and referenced variable indexes and then look at the existing variables I have in the table for how to format it.

Sigan
Expert Cheater
Expert Cheater
Posts: 267
Joined: Fri May 26, 2017 1:23 am
Reputation: 125

Re: Can Someone Teach Me How to Script for Hero's Hour?

Post by Sigan »

Geo wrote:
Tue Oct 05, 2021 8:34 pm
On the "teach"ing part of the topic, I AoB scanned for the list of Objects and CScripts, got their CCodes, and read through the CCodes' VMBuffers for what variables they were accessioning by the offset used. Then I use those offsets in the appropriate variable addresses with Global variables being in the Global variables area, which I AoB scanned for the static pointer, and instance variables being in the Object's CInstance's variable area. For the currencies, they were in an array of an array of a global variable. For anything more technical beyond that, I'd recommend just looking through the code I wrote. While the code isn't perfect and could have more work done, it seems to get the job done.

For adding more to the table yourself, you can go to the tools section of the table, use, and adjust the scripts according to your need to find the CCodes and referenced variable indexes and then look at the existing variables I have in the table for how to format it.
OK! Well... I guess if you ask, you might eventually receive. And, when it sounds like a foreign language compared to what you're used to dealing with, you should probably just appreciate the resulting table rather than the explanation since it went way over your head anyway!

I'm "you," in that last sentence. LoLz...

You lost me at, "I AoB scanned for the list of Objects and CScripts." I know what an AoB scan is, but I'm lost at this approach.

Normally, the way I write anything, requires me to find the address for something (gold, for instance) that I can change to affect the game. Then, find out what accesses this address, and go to the memory viewer. Start the auto assembler, and use the AoB scan template. Then, I can alter all the code that I want. However, I'm limited in my understanding of how to find the offsets for everything unless it's something I can access in mono. Otherwise, if I wanted to find another resource, like wood, I would have to start that process over again.

I'd be interested in a more detailed explanation - or a link to a video about this - if you have the time. If not, I appreciate what you've done here anyway.

Thanks, and have a great one.

aSwedishMagyar
Table Makers
Table Makers
Posts: 690
Joined: Mon Jul 06, 2020 3:19 am
Reputation: 1262

Re: Can Someone Teach Me How to Script for Hero's Hour?

Post by aSwedishMagyar »

Sigan wrote:
Tue Oct 05, 2021 8:49 pm
I'd be interested in a more detailed explanation - or a link to a video about this - if you have the time. If not, I appreciate what you've done here anyway.

Thanks, and have a great one.
Here are some tutorials I wrote. The objects and instances tutorial needs to be updated to include info about parent objects but just these three will give you the basics of how to understand GameMaker games. To be perfectly honest, with the last one I made (GameMaker Variable Names and Indexes), GameMaker hacking is just plain easy now.
  1. GameMaker CScript Manipulation
  2. GameMaker Objects and Instances
  3. GameMaker Variable Names and Indexes

Sigan
Expert Cheater
Expert Cheater
Posts: 267
Joined: Fri May 26, 2017 1:23 am
Reputation: 125

Re: Can Someone Teach Me How to Script for Hero's Hour?

Post by Sigan »

Thanks! I appreciate this. It's hard for me to recognize certain engines outside of UE4 and Unity. But, that short list of links should help.

pacifista
Expert Cheater
Expert Cheater
Posts: 178
Joined: Wed Jun 27, 2018 2:07 am
Reputation: 23

Re: Can Someone Teach Me How to Script for Hero's Hour?

Post by pacifista »

Something is off, even if you find the address and change it gold reverts back immediately.

Sigan
Expert Cheater
Expert Cheater
Posts: 267
Joined: Fri May 26, 2017 1:23 am
Reputation: 125

Re: Can Someone Teach Me How to Script for Hero's Hour?

Post by Sigan »

I'll have to check it out when I next get the desire to play the game again :)

Post Reply

Who is online

Users browsing this forum: No registered users