Random doors and gates

Post » Fri May 13, 2011 11:42 am

The Oblivion worlds contain two random door types, the Tower Portal doors that lead into a random spire, and the doors connecting tunnels that lead to random sections. The latter haven't caused me any problems yet, but I have a dilemma with the Tower doors.

When I create a custom Oblivion worldspace that has a random Tower I can change the specific door on the outside of the Tower to be a unique one leading to a random interior by cloning the form, but the problem is getting out. The random interior has a door that leads back out to a "random" - i.e. determined on the way in - worldspace. The problem is that I can't add my new worldspace to that list as a destination without introducing incompatibility with any other mod that wants to do so. I can't assume there won't be any such mods, as I'm building two of them myself, and that's how I found the problem!

Making the Tower non-random avoids the problem, of course, but it's a lot of extra work creating a new set of interior cells.

There doesn't appear to be any OBSE function for adding a destination to the list dynamically, any ideas for alternatives?
User avatar
Lady Shocka
 
Posts: 3452
Joined: Mon Aug 21, 2006 10:59 pm

Post » Fri May 13, 2011 5:54 am

I am nor familiar with the scenario, but how about setting the destination of the doors that lead back using OBSE's SetDoorTeleport?
User avatar
jessica robson
 
Posts: 3436
Joined: Mon Oct 09, 2006 11:54 am

Post » Fri May 13, 2011 11:46 am

The problem is going to be determining the door to apply that function to. The door out isn't selected until the player goes in, because the destination of the inbound door is random. I need to play with GetLinkedDoor and see if that gives any useful data. Waiting until I'm inside and checking GetPlayersLastActivatedLoadDoor will probably give me the outside one, not the exit, but I need to test that.

If I use the buckshot approach and change every possible target door to point back to my entrance door, then I'd still need a way to reset that to a list when I'm done, and SetDoorTeleport won't take a list as argument, so that's not viable.
User avatar
Manuela Ribeiro Pereira
 
Posts: 3423
Joined: Fri Nov 17, 2006 10:24 pm

Post » Fri May 13, 2011 7:58 am

And how about, placing a disabled clone over the interior doors and script your exterior door to disable the originals and enable your clones (which sends you to your exterior, of course).

The exterior door script would, also, need to detect when the player comes back out to revert the process.
User avatar
Monika Fiolek
 
Posts: 3472
Joined: Tue Jun 20, 2006 6:57 pm

Post » Fri May 13, 2011 2:49 pm

It's reaching the level of complexity where having a random tower isn't worth the extra effort. I think I'll go with a cloned interior of a single tower where I have full control of the one inside door, and then each Tower is unique to its own mod, instead of sharing the vanilla random ones.

I haven't thought it through completely, but I think that the enabling and disabling of the doors would leave me with the original problem that two mods can't do the same thing, but it probably depends on how the scripts are triggered (and messing with the scripts on the vanilla tower objects is unwise). Anyhow, avoiding the problem is probably prudent.
User avatar
FoReVeR_Me_N
 
Posts: 3556
Joined: Wed Sep 05, 2007 8:25 pm


Return to IV - Oblivion