Random Teleport Pads - is it possible?

Post » Fri Feb 18, 2011 9:42 pm

Well, yes... so I had this absolutely epic idea for my mod: Random Teleport Pads.

Basically, I plan on placing about 20 teleport pads within an interior cell, and would like all of them to randomly teleport the player. However, I have NO IDEA how to do this.

I'm still rather new to the whole moddng buisness, so I guessed that my best call would be to ask here.

So please, please PLEASE, someone help me with this!
User avatar
StunnaLiike FiiFii
 
Posts: 3373
Joined: Tue Oct 31, 2006 2:30 am

Post » Sat Feb 19, 2011 5:49 am

Yes. It's possible (or The Ayleid Steps mod wouldn't be doing it).

You have two choices. Define the teleport doors with a random list in the CS for true random (see the Oblivion gates, Oblivion tunnel doors and Sigil Tower doors for examples), or script the portals yourself for more control over the list of destinations (e.g. you may want to only teleport to destinations not yet visited).
User avatar
Benjamin Holz
 
Posts: 3408
Joined: Fri Oct 19, 2007 9:34 pm

Post » Sat Feb 19, 2011 2:25 am

I see...

I have already seen that there is a possibility of random teleporting between a few different interior cells... I think that is what the oblivion tunnel doors do?

But, I'd like to use only one really big interior cell, with different rooms linked by teleport pads like the ones used in the IC mage guild. And yes, I do realise that it might not be the best idea to make a huge cel since it would eat up alot of processor power.

Scripting... I DID read the scripting tutorial, however I have to admit, I didnt understand much.
User avatar
NAtIVe GOddess
 
Posts: 3348
Joined: Tue Aug 15, 2006 6:46 am

Post » Sat Feb 19, 2011 12:01 pm

"Teleport" means going to a different cell, so you have me totally confused with this "one big cell" thing.

I should also point out that once a "random" teleport door is used, the connection is remembered in the save game, and the teleport ceases to be random - it will always lead to the same location if used again. The linked door makes the return trip, even though that door may also be marked as random.
User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am

Post » Sat Feb 19, 2011 12:45 am

Aaah, I kind of knew you'd get confused. I'm not aspecially good at explaining stuff... That, and I guess my idea IS kind of messed up.

Okay, so here is a very basic plan of my idea.

We have 1 interior cell. Within that cell, we have 4 rooms, not connected to eachother. And within each room, there are, lets say 4 teleport panels, of the kind used in the mage guild in the Imperal City.

That gives us 16 of those panels in 1 interior cell.

What I want to achieve is, when I use one of those, its supposed to randomly move me to one of the other 15.


But from what ive already heard, it either wont be posible at all, or only with some huge script, right?

...Or that it would be possible if I used several cells, which I kind of dont want to do in order to avoid the loading screen...
User avatar
Alycia Leann grace
 
Posts: 3539
Joined: Tue Jun 26, 2007 10:07 pm

Post » Sat Feb 19, 2011 9:46 am

You could do it without too much trouble. Would be easier with OBSE, then you could just use an array.... but anyway.

For each of the pads, they would basically have the same script. The script would just generate a random number, between one, and sixteen, and then you would move the player to that teleport pad. (yes, there would be a one in sixteen chance that you would end up on the pad you were currently standing on.....) Or, you could just have one object in the cell, that the script ran on, that payed attention to when you activated one of the pads, and then move you to the randomly generated location.
User avatar
TWITTER.COM
 
Posts: 3355
Joined: Tue Nov 27, 2007 3:15 pm

Post » Sat Feb 19, 2011 5:13 am

The script you mentioned sounds just like the thing I need. But yeah... I dont understand scripting at all, even after reading the tutorial 3 times. I guess I should find someone who's good with it to help me there...


Oh, and the slight chance of landing on the same pad doesnt disturb me much. Once im done with the mod, it will probably have around 50 pads, so...

And before you ask, yes, I AM insane.



So than, if someone would like to help out a new modder with that script, let me know please ^^
User avatar
Casey
 
Posts: 3376
Joined: Mon Nov 12, 2007 8:38 am

Post » Sat Feb 19, 2011 11:34 am

Generic code would look something like this

scn RandomTeleportScriptshort destinationbegin OnActivate     set destination to 1 + GetRandomPercent *   < count > / 100 ; determine a number from 1 to < count > randomly     if destination ==  1          Player.MoveTo target1     elseif destination == 2           Player.MoveTo target2     . . .     endifend


You'll need an "elseif" for each target location, and target1, target2 etc are the RefID's of the other teleport pads. Fill in the actual number of them in place of < count >. You can refine it by adding a test for the current teleport being the destination or playing a magic effect when it happens, or whatever.
User avatar
Christie Mitchell
 
Posts: 3389
Joined: Mon Nov 27, 2006 10:44 pm

Post » Sat Feb 19, 2011 11:37 am

Ok so I'll need a unique Ref-ID for each pad... fun fun, aspecially if I REALLY end up with 50 pads. BUT, that solves my problem, yes.

Thank you ever so much, I'm going to try this out, and report the result later.


EDIT: It works flawlessly, thank you ever so much!

Howevver, another issue popped up. Because im using the cript, and not the teleport tab to move, I dont have a doormarker anymore, which causes me to pop up an another pad.... facing a wall.

Any idea how to fix that?
User avatar
Sara Johanna Scenariste
 
Posts: 3381
Joined: Tue Mar 13, 2007 8:24 pm

Post » Fri Feb 18, 2011 8:33 pm

The pads are persistent refs already, so accessing them in scripts is most easy. You could for example use "<-ref id->.getangle z" to obtain the pads orientation relative to the cell's north marker. Then use this angle in a call to "player.setangle z <-angle->" after the move and the player should face into the direction of the pad. If this isn't the relative direction you want him to face (don't know which direction of the pad is the front, might be +/-90° off or 180°), just add a constant angle offset to it to rectify this. The angle value returned and set is in degrees, not in radians, so it should be easy to handle and calculate with.
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

Post » Fri Feb 18, 2011 11:09 pm

Uhm... okay. If I understood you right, this will work even if there ae several pads, each facing a different direction... So, I'll have to extend the move script...

Since I know the z angle of each pad, can I skip the GetAngle part and simply set the players angle after moving? Something like... this?


   if destination ==  1      Player.MoveTo target1      Player.SetAngle z 90   elseif destination ==  2      Player.MoveTo target2      Player.SetAngle z 120   . . .


Okay nevermind that, I just tested it, doesnt work :P
User avatar
zoe
 
Posts: 3298
Joined: Sun Nov 12, 2006 1:09 pm

Post » Sat Feb 19, 2011 10:34 am

Okay, so I officially admit my utter fail at scripting, I just dont understand that crap.

Anyone wanna join up on making the mod by providing the scripts?
User avatar
Lil'.KiiDD
 
Posts: 3566
Joined: Mon Nov 26, 2007 11:41 am

Post » Fri Feb 18, 2011 8:58 pm

Oh, I'm sorry. I forgot that "player.moveto" acts as a return and ends script execution for this frame. So actually the "setangle" calls never happened.

Hmm, let's see. This script is attached to an activator you have to click and runs from an OnActivate block, right? Then it of course won't run again after teleporting unless you trigger it again. This makes it necessary to let the reorientation of the player "after move" happen somewhere else. I'd add a GameMode block to the same script with a check for another short variable like:
Begin GameMode    if doOnceAfterTeleport == 1 ; arrived at destination 1        player.setangle Z <-angle of pad 1->        set doOnceAfterTeleport to 0 ; so it wont happen again until called for again, GameMode blocks run again each frame so this has to be prevented    elseif doOnceAfterTeleport == 2 ; arrived at destination 2        player.setangle Z <-angle of pad 2->        set doOnceAfterTeleport to 0    elseif...        ...    endifEnd

and in your OnActivate block where you move the player add a line "before" the MoveTo call setting this new variable accordingly "set doOnceAfterTeleport to <-number of pad to teleport to->". So after the move the GameMode block will take over and reorient the player accordingly.
At least that should do it. I haven't tested it myself, yet, but I'm quite positive... unless I'm missing something else really obvious here, just as last time.
User avatar
Ana Torrecilla Cabeza
 
Posts: 3427
Joined: Wed Jun 28, 2006 6:15 pm

Post » Fri Feb 18, 2011 11:28 pm

Awesome, thanks. I'll try it out once I re-construct the mod... I effed it up on accident... BADLY.


Slowly I start to think that several interior cells would have been a better idea...
User avatar
Tamara Dost
 
Posts: 3445
Joined: Mon Mar 12, 2007 12:20 pm

Post » Sat Feb 19, 2011 12:54 am

Okay, so I have no idea just WHAT THE HELL happened... But after I started my CS, my mod simply wasnt there, da eff?


Well, its only half that bad though, now I can restart with better planning. I will also ask from time to time for help with scripting, as I seriously have no idea about it.
User avatar
Paula Rose
 
Posts: 3305
Joined: Fri Feb 16, 2007 8:12 am

Post » Sat Feb 19, 2011 9:04 am

Well, I'm having a somewhat similar problem. Maybe it's my Win7 Pro itself, me running the game from an external HDD drive connected over USB, or perhaps the fact it's inside a virtual machine, but whenever I try to alter some of the general info you can only edit in the Data Files menu the CS complains, in the background, about not having access rights to the file, and my file's at size 0 and saved, empty. Thus I'm now 1) staying away from altering this info and 2) always having at least 1 backup of my ESPs whenever I open them. But if your ESP file itself is missing, make sure it's not somewhere aside in a compatibility folder of your OS or anything. Those nasty things are far more secure nowadays than is good for their user, or themselves. (I still vividly remember this one particular error message back then which made me wonder what the heck those MS devs were smoking: "kernel.exe was not allowed to access system32.dll", which is somewhat comparable to your brain not being allowed to access muscle control for your heart to keep it pumping. Yeah, sure.) Sry for the off-topic rant.
User avatar
steve brewin
 
Posts: 3411
Joined: Thu Jun 21, 2007 7:17 am

Post » Sat Feb 19, 2011 6:47 am

Its ok, and only understandable. Still, nothing beats the "epic" windows error message: Critical Error: Error not found.


Lets see now, after some pen & paper planning, I came up with:

29 rooms and 70 teleport pads.

That includes:

8 small rooms, 4 pads per room
6 medium rooms, 3 pads per room
4 large rooms, 2 pads per room
4 "challenge" rooms, 1 pad per room
4 "safe" rooms with a bed and some potions, 1 pad per room.
And last but not least, 4 bossrooms, 1 pad per room + tier system. (You have to beat the weaker bosses to get access to the stronger ones)


...This will be one effed up dungeon. Aspecially since I plan to pack all of that in one interior cell.

..I think I broke all records of human insanity.


EDIT: Another question, is it posible to remove the leaves from a tree? I found a tree that would be perfect as the dungeon entrance (After I pimp it up a bit) but I dont want it to have leaves, as I only need the branches.
User avatar
Sarah Evason
 
Posts: 3507
Joined: Mon Nov 13, 2006 10:47 pm

Post » Sat Feb 19, 2011 1:52 am

Okay, since the work on the mod goes forward pretty fast, I might stat looking for testers. Nothing serious for now, just want some early feedback and eventually bug reports, better start early with it, so I can edit something without having to change the whole mod.


Interested? Send me a PM then, m'kay?


In addition, I would need someone who would like to provide my mod with scripts... and people who would have the patience to answer my noobish questions, like this one: How do I remove leafs from a tree? Is not selecting any leaf texture enough?
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm

Post » Sat Feb 19, 2011 10:28 am

Not selecting any texture might give you pink leaves, I know that if one of the components of the texture isn't there though, you will end up with invisible leaves.... I think.... Don't recall which part though.....
User avatar
Channing
 
Posts: 3393
Joined: Thu Nov 30, 2006 4:05 pm

Post » Sat Feb 19, 2011 7:03 am

Just make the alpha channel of the leaf texture flat black, nothing will show.
User avatar
Roddy
 
Posts: 3564
Joined: Fri Jun 15, 2007 11:50 pm

Post » Sat Feb 19, 2011 7:45 am

Oh wait I just found the large dead Kvatch tree. Not quite the kind I had in mind, but it will do.


Okay then, with that, I think... all of my questions are answered... For now anyway. If something new pops up, I'll let you know.
User avatar
Naughty not Nice
 
Posts: 3527
Joined: Sat Nov 04, 2006 6:14 am

Post » Sat Feb 19, 2011 3:45 am

Ah yes, my questions continue.

Well, I decided to add traps to my dungeon. I started with gas emitters, over darts, killer welkynd stones, spikes....

Well, the dart traps arent working, even when I clearly walk into their range. (Hell, I was standing right infront of them.)

What could possibly be wrong?
User avatar
Karen anwyn Green
 
Posts: 3448
Joined: Thu Jun 15, 2006 4:26 pm

Post » Sat Feb 19, 2011 11:10 am

I think you need a triggerzone tied to the various traps, to set them off? (not sure, haven't looked at 'em much)
User avatar
Margarita Diaz
 
Posts: 3511
Joined: Sun Aug 12, 2007 2:01 pm

Post » Sat Feb 19, 2011 4:30 am

Oh, the objects have a triggerzone attached to them, its just when I walkt into it, nothing happens.
User avatar
Roberto Gaeta
 
Posts: 3451
Joined: Tue Nov 06, 2007 2:23 am

Post » Fri Feb 18, 2011 11:52 pm

When that happens to me (or rather doesn't) it's usually because I got the enable parent relationship back to front - I can never remember if the trap is the parent of the trigger or the other way round. I always have to compare to one in the vanilla game.

Once I get that right, the next thing is forgetting to use a resetting trigger when I need one. Trigger zones don't show when something else set them off, unlike tripwires etc. where you have a visible state. Sometimes the trap is a one-time-only like falling logs, and you can see from that, but other traps (e.g darts) can fire more than once.
User avatar
Gemma Woods Illustration
 
Posts: 3356
Joined: Sun Jun 18, 2006 8:48 pm

Next

Return to IV - Oblivion