Having never tried anything like this i can only guess how 0x517A5D is doing it, but id say it probably involves changing 2 loops to go from -8 to +8 instead of -1 to +1.
That is exactly what I'm doing.
I'm not sure how feasible it is to add code rather than just change existing constants.
It's very very difficult to add new code. It's easiest to remove functionality completely, then it's five to ten times harder to change functionality, then it's five to ten times harder again to add new functionality.
If he can, then it would be possible to add a call to the rng and a 'continue;' if the returned value is
greater than whatever chance you want for the tile to be revealed.
I can't easily call the game's RNG but I could put in a simple RNG of my own. It just ups the difficulty. If this is something most people want, I can try to do it.
Then again he said making the square a circle was "right out", and that would just be replacing the call to the rng with a sqrt(x^2+y^2).
I've been thinking about how to do this. I'd have to change the bounds of the inner loop on-the-fly based on the current value of the outer loop. This is possible. I likely wouldn't use the formula. Instead I would hardcode the values.
So I retract the "right out" statement. I could do it if that's what people tell me they want.
I think changing the code like that involves patching the exe directly, rather than patching the process after it's started.
Often that's the easier path. But this utility works with the in-memory copy of the game, while it's running.
Currently I'm just changing 4 bytes of the game. 01 to 08, twice, and FF to F8, also twice. (FF is a signed byte -1, F8 is a signed byte -8.)
I do know how to add new code to the game, while it's running, using a technique called memory injection. That's what I did with Regional Prospector. It's not easy. But I could.
Currently I'm going for the most bang for the buck, the most gain for the least pain. That means sticking very close to how the game already does things.
The other thing is, the more I add, the more fragile my additions get. I saw this with Regional Prospector. I tried to make it automatically work with future versions of the game, but it kept breaking. It got kind of annoying after a while. Currently, the Stone Sense beta installs in every version from .32a (the first 3d version) onward.