This is an RPG Maker MZ script/plugin I made, based somewhat on a certain other script that performs a similar service/function.
The script is for use in any commercial, or non-commercial game. Compatibility with other scripts/plugins were not taken into consideration when writing this, so, if you do have issues that arise from that, my ability to assist may be hampered, but will still be considered on a case-by-case basis.
While I do not currently ask for monetary recompense, I would, humbly, ask that I am credited in your project if this script/plugin is used. The precise details can be up to the end-user, but, I would prefer to be credited by my username, "Marrend", in this case.
Points of contact:
The preferred point of contact is through RMN. So, posting here, or use RMN's messaging service would be sufficient. I also dip in and out on RMN's Discord channel at times, and can also be contacted on that platform. My user ID on Discord is Reikan#3234.
First, register the plugin into your project's Plugin Manager. You can then use the manager's parameter settings to alter the various maps/positions players can fast-travel to. Some examples exist in the help text as a reference point of how the default parameters were derived.
Once that is done, set up a Common Event that uses the function-call:
How that Common Event could be used is largely on a case-by-case basis, but, the easiest use would either be with an item, or as part of an event.
The script attaches an arry variable called "locales" to $gameParty for easier manipulation of that variable and to not worry about having to overwrite/override the saving/loading functions. To set the availability of a location to fast-travel to, the call would be...
...where "index" is the item within the $gameParty.locales array, and where "enable" is either true or false, based on the new availability of the location.