Reaching Outside shenanigans

Rather belatedly, I found out that Reaching outside rules do not fire if the enterable supporter that the player is on is ‘a part of’ something else. I resolved this issue by making that supporter a separate thing–my Reaching outside rule already had clauses for doing things with its holder. But is there a way to write a Rule for reaching outside for supporters (and containers) which are a part of something else? Or could it be a Reaching outside rule for the holder of the part?

The controlling logic is part of the I6-written ACCESS_THROUGH_BARRIERS_R():

[ ACCESS_THROUGH_BARRIERS_R ancestor i j external p;
	...
	if (CoreOf(p) ~= ancestor) {
		i = parent(CoreOf(p)); j = CoreOf(i); external = false;	! find immediate holder of player and its core
		if (j ~= i) { i = j; external = true; }					! if holder is not its own core, make holder core and set "external" flag
		while (i~=ancestor && i) {
			if ((external == false)
				&& (FollowRulebook(REACHING_OUTSIDE_RB, i))		! reaching outside rules run only if external is false
				&& (RulebookFailed())) rtrue; ! Barrier
			i = parent(CoreOf(i)); external = false;
			if (~~(i ofclass K5_container)) {
				j = CoreOf(i);
				if (j ~= i) { i = j; external = true; }
			}
		}
	}
	...

By disabling the part of the condition that checks external == false, you will see reaching outside checks for the core of the holder. (For example, if there is a pole to which an enterable basket is attached, and the player is in the basket, the check would be for reaching outside the pole.) Is that close enough for your purposes?

1 Like

Thanks, Otis

I’ll need to copy/paste this. I’m not well-versed in I6.

No problem. You’ll need to replace the whole routine. Are you using 10.1.2 or 9.3/6M62? (The replacement format varies depending on version.)

EDIT: Come to think of it, you might be able to replace this rule with an I7-written version of the logic – I’m pretty sure that the same directives for unlisting and replacing rules will work.