Oh, so there's no way to have it search for surrounding bytes to make it (mostly) version-independent?
What type of addresses are those though? Are they absolute memory addresses, or is it the number that would go after "Dwarf Fortress.exe+" in Cheat Engine?
There is a way. Do not be discouraged. Find it!
Basically that is out of scope for binary patches. The "version-independent" thing is a dream, there is no such thing ANYTHING can change. So binary patches work by you finding it for each version by hand.
There are pseudo automatic tools to do that if you still want to continue, most are used here:
https://github.com/DFHack/dfhack/blob/master/scripts/devel/find-offsets.lua (https://github.com/DFHack/dfhack/blob/master/scripts/devel/find-offsets.lua)
Namely look for "local ms = require 'memscan'" and then "local data = ms.get_data_segment()" and then it's used throughout to look for "special locations" e.g. data.int32_t:find_one{
-30000, -30000, -30000,
-30000, -30000, -30000, -30000, -30000, -30000,
df.game_mode.NONE, df.game_type.NONE
}
Though you probably need "ms.get_code_segment()"...