Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Creating Oblivion Gates


Arthmoor
 Share

Recommended Posts

Ok. Hopefully this is the right spot for this, if not, someone move it please? XD

Anyway. Without giving too much away, I'm trying to setup an Oblivion Gate that goes from an underground dungeon to a new worldspace I've generated. Or rather borrowed and modified from one of Bethesda's existing ones :) I've followed as closely to the random gates as possible to figure out how to make it work properly, but for some reason clicking on the gate (which is active) only yeilds the response "This door leads nowehre." Needless to say, I'm stumped.

The gate has one worldspace listed on the random teleport definitions, which is mine. It has an XMarker used just like other realms use them for where to drop the player as they come in. Figuring maybe it needed to have the word Oblivion as the first part of the worldspace name, I changed it to match that. Didn't help.

Here's the script I'm using:

float timer
short count
short rand ; this can be removed eventually. Put it in just to be able to see the numbers that were being rolled.
short destroyed ; set to 1 after destroyed script runs
short ignore

begin OnLoad
; reset count
if count > 0
set timer to 60
endif
set count to 0

if destroyed == 1
setDestroyed 0
set destroyed to 0
endif
end

begin OnActivate
Activate
set ignore to 1
return
end

begin gamemode
if ignore == 1
set ignore to 0
return
endif

; no need to process further if destroyed
if destroyed == 1
return
endif

if getdestroyed == 1 && destroyed == 0
set destroyed to 1
endif

; start churning out creatures when I'm turned on
if GetDisabled == 0 && GetDestroyed == 0
if IsAnimPlaying == 0
playgroup specialidle 1
endif

if timer > 0
set timer to timer - getsecondspassed
elseif count < MQ00.maxCreatureCount
set count to count + 1
playgroup forward 1
set timer to 10
endif
endif
end[/codebox]

It's a hackish modification of the normal one. Although I've also tried the normal one and it doesn't work on the OB gate either. So it's probably not a scripting issue.

I have bypassed it in testing using the COW console command to go to the worldspace, so the game does know it's there. The sigil stone I've placed inside even works, up to the bright white flash, but as expected it doesn't transport me out because whatever sets that information up didn't work.

I feel like I'm missing something obvious or simple. Has anyone had any experience in building properly functioning OB gates or will I need to find another way to do this?

Link to comment
Share on other sites

I dunno much about scripting, but I do know that if you want the player to activate the gate and be plopped wherever you want in the worldspace, then you need a player.moveto <reference ID> somewhere in your script.

For example: You have this marker "XArthmoorOblivionGate" in your world space that you want the player to be when the gate in the dungeon is activated. The Oblivion Gates in Oblivion are activators, so you need something like,


float Doom


begin onActivate


        Activate

        set ignore to 1

        set Doom to 1

        return

end


if Doom == 1

   player.moveto XArthmoorOblivionGate

endif


And when you want the player to return to the dungeon:

if destroyed == 1

                setDestroyed 0

                set destroyed to 0

                player.moveto XArthmoorOblivionGateDestroyed

        endif

And I think that's about it. :smarty:

Hey Willie, if I messed up on something, don't be afraid to edit it, for crying out loud. :rofl: You know me, I always mess something up. And since I'm a noob at scripting, I'm pretty sure there's gonna be something wrong in one of the two parts of the script. XD

Link to comment
Share on other sites

That's just it though. Standard random OB gates are not activators, they're doors. They all use the same base object, which I duplicated so I could reassign it to my own worldspace.

Here's the unmodified vanilla script:

scn OblivionGateRandomScript

float timer
short count
ref mySpawnMarker
short rand ; this can be removed eventually. Put it in just to be able to see the numbers that were being rolled.
short destroyed ; set to 1 after destroyed script runs
short ignore

begin OnLoad
disableLinkedPathPoints
; reset count
if count > 0
set timer to 60
endif
set count to 0

; if MQ is over, destroy me if I'm open
if getdisabled == 0 && getdestroyed == 0 && getstage MQ16 >= 100
ForceCloseOblivionGate
enablelinkedpathpoints
endif

; if we're not at max gates, we might open a new one here
if MQ00.openGates < MQ00.maxOpenGates && ( getdisabled == 1 || ( MQ00.allowGatesToReopen == 1 && destroyed == 1 ) )
set rand to GetRandomPercent
if rand <= MQ00.randomGateChance
set mySpawnMarker to getParentRef
mySpawnMarker.enable
enablelinkedpathpoints
set MQ00.openGates to MQ00.openGates + 1
if destroyed == 1
setDestroyed 0
set destroyed to 0
endif
endif
endif
end

begin OnActivate
if isActionRef player == 1
; we aren't "near" any gate anymore (we're in Oblivion!)
set MQ00.nearOblivionGate to 0
ReleaseWeatherOverride
endif
Activate
set ignore to 1
return
end

begin gamemode
if ignore == 1
set ignore to 0
return
endif

; no need to process further if destroyed
if destroyed == 1
return
endif

if getdestroyed == 1 && destroyed == 0
set destroyed to 1
set MQ00.destroyedGates to MQ00.destroyedGates + 1
endif

; start churning out creatures when I'm turned on
if GetDisabled == 0 && GetDestroyed == 0
if IsAnimPlaying == 0
playgroup specialidle 1
endif

; make sure weather is eeeevil gate weather
if getiscurrentweather OblivionStormTamriel == 0
if getdistance player < 4000
if MQ00.nearOblivionGate == 0 && getdistance player < 1000
; this should only happen when I come out an Oblivion gate into Tamriel -- I'm suddenly close but the "near" variable hasn't been set
forceweather OblivionStormTamriel 1
else
setweather OblivionStormTamriel 1
endif
set MQ00.nearOblivionGate to GetSelf
endif
else
if getdistance player > 5000 && MQ00.nearOblivionGate == GetSelf
set MQ00.nearOblivionGate to 0
ReleaseWeatherOverride
endif
endif

if timer > 0
set timer to timer - getsecondspassed
elseif count < MQ00.maxCreatureCount
set count to count + 1
playgroup forward 1
mySpawnMarker.placeatme LL1DaedricBeast100
set timer to 10
endif
endif
end[/codebox]

Notice there's no MoveTo commands in there. Whatever magic is happening has to be happening on some other level I haven't figured out.

Link to comment
Share on other sites

This might help. Its a document I put together to help me get oblvion gates to work.

This is to make the gate go to the normal oblivion realms, but it contains all the pieces to the puzzle that you seem to be missing...

Without further ado:

Make a re-openable gate to Oblivion.

========================================================================================

Put Oblivion gate in world

========================================================================================

Place the Static -> xMarkerHeading

Copy Door -> OblivionGatetoOblivion

- Give it a new name. 'AncientObGateToOb' and remove the script from it.

Place the Door and give it a reference name. 'AncientObGateREF'

- Set the 'Teleport Ref' to the XMarkerHeading created above.

Now to make a script for the lever. I have two kinds of lever here, choose one:

========================================================================================

New Script Type: Object \dungeons\fortruins\dungeon\switchsandtraps\rfswitch01.nif

========================================================================================

scn AncientLeverGateScript

short next
short busy
short opened
float timer

begin onActivate
if busy == 0
set next to 1
if ( opened == 0 )
playgroup forward 0
set opened to 1
else
playgroup backward 0
set opened to 0
endif
set timer to 0.5
set busy to 1
endif
end

begin gameMode
if ( timer <= 0 ) && next == 1
if AncientObGateREF.GetDisabled == 0 && AncientObGateREF.GetDestroyed == 1 && AncientObGateREF.IsAnimPlaying == 0
AncientObGateREF.setdestroyed 0
AncientObGateREF.playgroup specialidle 1
endif
set next to 0
endif

if busy == 1 && isAnimPlaying == 0
set busy to 0
endif

if timer > 0
set timer to timer - getSecondsPassed
endif
end

begin onReset
reset3DState
set opened to 0
set next to 0
set busy to 0
end[/code] ======================================================================================== New Script Type: Object \Oblivion\Environment\OBClawWallSwitch01.nif ========================================================================================
[code]scriptname AncientLeverGateScript

short Busy

begin OnActivate
if Busy == 0
playgroup forward 0
if AncientObGateREF.GetDisabled == 0 && AncientObGateREF.GetDestroyed == 1 && AncientObGateREF.IsAnimPlaying == 0
AncientObGateREF.setdestroyed 0
AncientObGateREF.playgroup specialidle 1
endif
set Busy to 1
endif
end

begin Gamemode
if IsAnimPlaying == 0
set Busy to 0
endif
end
---or----------------------------------------------- This script will also control a light source being turned on and off ----------------------------------------------------
scriptname AncientLeverGateScript
short Busy

begin OnActivate
if Busy == 0
playgroup forward 0
if AncientObGateREF.GetDisabled == 0 && AncientObGateREF.GetDestroyed == 1 && AncientObGateREF.IsAnimPlaying == 0
AncientObGateREF.setdestroyed 0
AncientObGateREF.playgroup specialidle 1
AncientOblivionLightREF.enable
endif
set Busy to 1
endif
end

begin Gamemode
if IsAnimPlaying == 0
set Busy to 0
endif
if AncientObGateREF.GetDestroyed == 1 && AncientOblivionLightREF.GetDisabled == 0
AncientOblivionLightREF.disable
endif
end[/code]

========================================================================================

Copy the lever

========================================================================================

Activator -> RFSwitchLever01

- Give it a new name. 'AncientOGSwitch'

- Add the script: 'AncientGateScript'

---Or use the claw lever:---------------------

Activator ->OBClawWallSwitch01

Add the lever to the world.

========================================================================================

Attach your Cell to the return Oblivion Gate

========================================================================================

1. Double-click your 'Object Window' >Door >OblivionGatetoTamriel

2. Open Menu >World >Cells...

3. Find the cell that has your oblivion gate, and drag it onto the door properties you opened in #1 above.

(The cells that are titled, "Randomly Teleports to these interiors/worldspaces only:")

NOTE: It must be placed in the "OblivionGatetoTamriel" door object or the door will not work.

4. Save the door.

====================================================

Cell Properties

====================================================

>World >Cells...

Find your oblivion gate cell. Make sure these checkboxes are NOT checked.

- Can't Travel from here

- Oblivion Interior

If you have these checked, it will CTD when you return from Oblivion after getting the sigil stone.

Link to comment
Share on other sites

Willie, thanks for that. It pointed me to where I screwed things up. I didn't have a matching gate in the Oblivion realm to link back with. I misunderstood how the teleport process worked. Helps to pay closer attention to what I'm mimicing from in the wild. :smarty:

Just in case it helps anyone in the future, here's what I did for a gate that's not depenent on the MQ still running:

1. Duplicate the OblivionGatetoOblivion object, and give it a name you can find later.

2. Duplicate the OblivionGatetoTamriel object and give it a name you can find too.

3. You can use this script:

scn SomeCleverScriptName

float timer
short count
short rand ; this can be removed eventually. Put it in just to be able to see the numbers that were being rolled.
short destroyed ; set to 1 after destroyed script runs
short ignore

begin OnLoad
; reset count
if count > 0
set timer to 60
endif
set count to 0

if destroyed == 1
setDestroyed 0
set destroyed to 0
endif
end

begin OnActivate
if isActionRef player == 1
; we aren't "near" any gate anymore (we're in Oblivion!)
set MQ00.nearOblivionGate to 0
endif
Activate
set ignore to 1
end

begin gamemode
if ignore == 1
set ignore to 0
return
endif

; no need to process further if destroyed
if destroyed == 1
return
endif

if getdestroyed == 1 && destroyed == 0
set destroyed to 1
endif

; start churning out creatures when I'm turned on
if GetDisabled == 0 && GetDestroyed == 0
if getdistance player < 512
set MQ00.nearOblivionGate to GetSelf
else
set MQ00.nearOblivionGate to 0
endif

if IsAnimPlaying == 0
playgroup specialidle 1
endif

if timer > 0
set timer to timer - getsecondspassed
elseif count < MQ00.maxCreatureCount
set count to count + 1
playgroup forward 1
set timer to 10
endif
endif
end[/codebox]

4. On your duplicated OblivionGatetoOblivion object, clear all of the worldspaces listed and then drag your Oblivion worldspace into its list. Set it's script to the one above.

5. On your duplicated OblivionGatetoTamriel object, clear out all of the worldspaces, and then drag the interior or worldspace cell for where your gate is located into the list.

6. Place your newly created gate objects where you want them in the respective worldspaces.

7. Create an XMarkerHeading near each one, and set that gate's teleport ref to the XMarkerHeading.

That should be enough to establish the working pair.

If you want to make it closeable with a Sigil stone, you need to find somewhere appropriate and place the following items:

SigilSigilStoneRD004 (probably doesn't specifically matter which one)

SigilFireBoom01

TrigZoneCloseCurrentOblivionGate01

CitadelDeadraLordsCenterRing

The sigil stone needs SigilFireBoom01 set as it's enable parent, SigilFireBoom01 needs TrigZoneCloseCurrentOblivionGate01 set as its enable parent, and TrigZoneCloseCurrentOblivionGate01 needs CitadelDeadraLordsCenterRing set as its enable parent. In this manner, taking the sigil stone triggers the chain reaction which will properly close the gate and return you to the entry point in your cell.

That last item, CitadelDeadraLordsCenterRing, it can really be anything you want, but it needs to be an activator with the script that item comes with to be attached to it. If you're not building a sigil tower for your stone, you probably don't want the big bulky chained thing one sits in.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...