如何在Inform7交互式小说中让‘s’仅作为starboard(右舷)的缩写,而非代表south(南)?
解决Inform7中's'缩写独占starboard的问题
我懂你这个痛点——在空间站场景里用船用方向替代罗盘方向,结果默认的south和你想设置的starboard抢's'缩写,每次都弹出歧义提示,太破坏沉浸感了。
其实问题出在Inform7的内置默认设置:它本来就把"s"绑定成了south的缩写,所以你直接加Understand "s" as starboard.只会让"s"同时关联两个方向,自然会触发选择提示。要解决这个,我们需要先清除"s"的所有原有关联,再把它单独绑定给starboard。
具体修改步骤
- 首先添加一行代码,重置"s"这个命令的所有默认关联:
Understand the command "s" as something new.
这行代码会彻底移除Inform7内置的"s"对应south的设置,让这个缩写完全空白,等着我们重新定义。
- 然后再把"s"绑定到starboard:
Understand "s" as starboard.
- 保留你原来写的那些提示玩家不要用罗盘方向的代码就好——现在只有玩家输入完整的"north"/"south"等单词时才会触发提示,输入"s"只会指向starboard,不会再有歧义了。
修改后的完整代码块
[ Shipboard Directions ] Fore is a direction. The opposite of Fore is Aft. Aft is a direction. The opposite of Aft is Fore. Port is a direction. The opposite of Port is Starboard. Starboard is a direction. The opposite of Starboard is Port. Understand the command "s" as something new. Understand "f" as fore. Understand "forward" as fore. Understand "a" as aft. Understand "p" as port. Understand "s" as starboard. Understand "st" as starboard. Instead of going north, say "In space, there's no magnetic field, so there's no north. Also, no one can hear you scream in space. Not that you should be screaming. Well, there is that one room, but... oh, never mind." Instead of going east, say "There's no magnetic field here. Compasses are useless. Maybe 'port' is what you meant." Instead of going west, say "'Go west, young man.' Always with the going west. Obviously, they've never been in space. There's no 'west' in space. There's no I in team, either. There are port and starboard, however. But not in team... on the space station." Instead of going south, say "South? There ain't no Mason-Dixon line on a space station. Did you mean starboard? You can use 's' for starboard."
这样修改之后,玩家输入"s"就会直接触发starboard方向,完全不会再关联到south,完美契合你想要的空间站方向体系啦。
内容的提问来源于stack exchange,提问作者Dave H.
相关产品推荐
相关产品推荐

