Page 1 of 1

z Ancient Cities

Posted: Sun Apr 02, 2023 5:41 am
by Zanzer
Instant Build (must still clear the area)
Instant Knowledge
Resource Stacks

Re: z Ancient Cities

Posted: Mon Oct 30, 2023 4:57 pm
by bloodsucker
thank you , table work great

Re: z Ancient Cities

Posted: Wed Nov 01, 2023 12:28 am
by wrx5
I tried it on Ancient Cities v1.0.1.1. I don't think resource stacks bit is working.

Re: z Ancient Cities

Posted: Sat Mar 16, 2024 5:19 pm
by TioEdu


Was your process something like this?

I don't understand how you found these addresses in the script you made for "Resource Stacks"

Re: z Ancient Cities

Posted: Sat Mar 16, 2024 6:01 pm
by Zanzer
If I remember correctly, the game stores items in stacks on the ground. Those stacks have individual limits before the game creates a new stack on the ground (potentially on the same tile). You can't simply search for the total resources you have, because that number is calculated on the fly by totaling all of the individual stacks.

So if you want to reliably find a value, try searching at the very start of the game when you have only a single stack. Then slowly use only a single stick and search for the new stack value.

Watching that video, you'll notice the second instruction accessing that address is an ADD that is adding the value INTO the address itself. This is what's continuously calculating the total value of resources you have from all stacks. If you want to start from that instruction, you'll notice that it's adding the value from register R12D. That means the address you actually want is up above someplace. The one that's populating register R12D with its value.

Also, after looking back at my table, the stacks are stored as floats, not integers. So when you're starting a new game with only a single stack, you should be searching floats. I don't remember for certain, but that also leads me to believe that the display value isn't necessarily a whole number when stored as a float. But I don't remember that for certain. For instance, if you're gathering a stack of sticks, the value may slowly count up from 0 to 0.1 to 0.2 to 0.3 up until the progress bar reaches max and you've finally gathered 1.0 sticks. And if at any point the person is delayed with their task, they may deliver fractions of a stick to the pile. Don't quote me on that one though. :)