Eh, I'll just do that then. It somehow never came to mind that I can create new groups and don't have to add that kind of stuff into main.
For anyone interested, I've set it up so at the start of the game talking to a dead guard once sets V[15/32]'s 0bit to 1 (and you obtain Potion), talking to one again sets V[15/32]'s 1bit to 1 (and you obtain Potion), and talking to them again sets V[15/32]'s 0bit back to 0, and you obtain a new special No Encounters Materia, and at the same time this will allow access to the Materia option in the menu, and the menu will automatically open. Quitting then deactivates the option.
Then in a new script which will go into almost every field files checks that V[15/32]'s 0bit is 0 and that the 1bit is 1 (this tells the script whether the Materia was obtained or not); and then it checks the amount of NoEncounters Materia in the inventory and stores the number in V[1/71] (if equipped, it will be 0-- also if sold or trashed it will be 0 but I won't do that). If the result is 0 then encounters will be disabled.
I could have done the same with an accessory, and then it couldn't be sold or trashed, but since it's for personal use it doesn't matter.
Also I chose V[1/71] because I believe it's the last byte in a set of eight reserved for key items, but never gets used because there aren't that many key items. I would have preferred to use one of the unused bits in the byte relating to the Kalm Traveler but I do not believe it is possible to store a boolean value based on whether there is a specific Materia in the inventory or not so I needed to use an entire byte.