Nordic Puzzle Door.

Post » Wed Jun 20, 2012 1:18 am

...the one with the claw keys? Honestly they've got me stumped. I've got the door set up correctly, even got it to open, but setting the ring combination is givng me a massive headache. To test that the set up worked I set the ring starting position and solution position to 1, then tried it out in game. This should mean that the door should open as soon as it's activated, but nope. The door did open but only after rotaing each ring around back to it's starting position. So this must mean the positions must refer to the the end of an animation cycle (so position 1 is really the final position of 3). I tried this out but, again, failure.

It's pretty time intensive brute forcing my way to a solution and I was hoping someone had figured out the knack behind how the combinations work?
User avatar
Sammie LM
 
Posts: 3424
Joined: Thu Nov 30, 2006 1:59 pm

Post » Wed Jun 20, 2012 3:44 am

maybe the combinations are coded into the claws themselves? They are, after all, displayed on the things.

(edit) Looks like the place to start looking is the scripts on the PuzzleDoorKeyHole activators...

import debugimport utilitybool property puzzleSolved auto hiddenbool property doorOpened auto hiddenint property numRingsSolved auto hiddenMessage property ActivateWithoutObjMessage autoobjectReference property doorBase auto{base piece of the door}objectReference property largeRing auto{large rotating disk of the door}objectReference property mediumRing auto{medium rotating disk of the door}objectReference property smallRing auto{small rotating disk of the door}objectReference property doorFX auto{dust FX for when doors opens}int property ringCount auto{number of rotating disks}bool property allowNonPlayerActivation = False auto{Allow other activators to activate this?}objectReference property refActOnFailure01 auto{This ref is activated when puzzle is not solved and lever is pulled}objectReference property refActOnFailure02 auto{This ref is activated when puzzle is not solved and lever is pulled}objectReference property refActOnFailure03 auto{This ref is activated when puzzle is not solved and lever is pulled}objectReference property refActOnFailure04 auto{This ref is activated when puzzle is not solved and lever is pulled}objectReference property refActOnSuccess auto{This ref is activated when puzzle is solved and lever is pulled}MiscObject property myMiscObject auto{the MiscObject needed to activate the keyhole}Quest property myQuest auto{if needed, the quest to update}Quest Property AltQuest auto{if needed, the alternate quest to update}int property myQuestStageSuccess auto{if needed, what stage to set the quest upon success}int Property myAltQuestStageSuccess auto{if needed, what alternate stage to set the quest upon success}objectReference property backDoorActivator auto{This ref is the the activator that opens the door from behind regardless of solve state}bool property activationAlwaysSucceeds = False auto{Forces CheckSuccess to always open the door.};************************************Function openDoor()    gotoState("done")    ;play FX    doorFX.playAnimation("FXDoorOpen")        ;open main door    doorBase.playAnimation("Open")        ;open the the pieces    largeRing.playAnimation("Open")    mediumRing.playAnimation("Open")    smallRing.playAnimation("Open")        ;open self    playAnimation("Open")        ;if there is a myQuest, and it's running, set it's stage.    if (myQuest)        if myQuest.IsRunning()            myQuest.setStage(myQuestStageSuccess)        endif    endif            ;if there is an AltQuest, and it's running, set it's stage.    if (AltQuest)        if AltQuest.IsRunning()            AltQuest.setStage(myAltQuestStageSuccess)        endif    endif        endFunction;************************************Function checkSuccess()    if (numRingsSolved >= ringCount || activationAlwaysSucceeds)        gotoState("done")        puzzleSolved = True        refActOnSuccess.activate (self as objectReference)        openDoor()    else        ;activate failure refs        if(refActOnFailure01)            refActOnFailure01.activate (self as objectReference)        endif        if(refActOnFailure01)            refActOnFailure02.activate (self as objectReference)        endif                if(refActOnFailure01)            refActOnFailure03.activate (self as objectReference)        endif        if(refActOnFailure01)            refActOnFailure04.activate (self as objectReference)        endif                gotoState ("mainState")    endifendFunction;************************************Auto STATE mainState    Event OnLoad()        ;teammates shouldn't use this ever        Self.SetNoFavorAllowed()    EndEvent    EVENT onActivate (objectReference triggerRef);         Debug.Trace("Door " + Self + " Activated")        Actor actorRef = triggerRef as Actor        HallofStoriesDiskScript LRing = largeRing as HallofStoriesDiskScript        HallofStoriesDiskScript MRing = mediumRing as HallofStoriesDiskScript        HallofStoriesDiskScript SRing = smallRing as HallofStoriesDiskScript        if (actorRef == game.GetPlayer() || allowNonPlayerActivation);             Debug.Trace("Check 1 Passed")            if (game.GetPlayer().GetItemCount(myMiscObject) >= 1 || (allowNonPlayerActivation && actorRef != game.GetPlayer()));                 Debug.Trace("Check 2 Passed")                if((LRing.GetState() != "busy") && (MRing.GetState() != "busy") && (SRing.GetState() != "busy"))                    gotoState("busy")                    playAnimation("Trigger01")                    wait(3)                    checkSuccess()                endif            else                ActivateWithoutObjMessage.show()            endif        else            if (triggerRef == backDoorActivator)                openDoor()            endif        endif    endEVENTendState;************************************STATE busy    ; This is the state when I'm busy animating        EVENT onActivate (objectReference triggerRef)            ;do nothing        endEVENTendState;************************************State done    ; This is the state when the puzzle is solved and the door is opened    ; created new state for clarity, could've used busy    Event onActivate (objectReference triggerRef)        ;do nothing    endEventendState
User avatar
Kelly Upshall
 
Posts: 3475
Joined: Sat Oct 28, 2006 6:26 pm

Post » Wed Jun 20, 2012 12:01 am

Here's what I can see:

*The Key has no script on it. It can be anything at all. It's only purpose is to let the keyhole know whether it should play it's activate animation or whether it should display a "you need X claw" message.
*The Keyhole checks to see how many of the outer rings are reporting that they are solved and opens if the number of rings solved = number of rings.
*The rings are given an initial position and a solved position. The position increases by 1 each time a ring is activated up to a maximum of 3. There is a line of code to check if the initial position of the ring is also the solved position.

So technically setting the initial positions as 1 and the solution positions as 1 should cause the door to open on activation. That doesn't happen though. Instead the rings have to be rotated a full cycle before the door opens. Setting the Initial position as 1 and a solution position of 2 causes the door to open after each ring has been activated once, as expected. Setting an initial position of 3 and a solution position of 1 causes the door to open after being activated once, again as expected.

Here's the strange part: The initial/solution position can be the same so long as at least one other ring doesn't follow the rule. The rings that have matching initial/solution positions will then count as being solved without having to be rotated. I can't fathom why this is though.

On the positive side I got my door to work.

Now of to try setting up a word wall that gives the player not only a shout on approach but a dragon soul too. Yikes! Tall order for a noob like me.
User avatar
Inol Wakhid
 
Posts: 3403
Joined: Wed Jun 27, 2007 5:47 am

Post » Wed Jun 20, 2012 4:03 am

I'm guessing it's implemented that way to ensure the player has to turn at least one ring to open the door. Since the Combos are always literally on the key (Akin to putting your password on a big sticky note on your monitor) guessing the combo is no big deal.
User avatar
helen buchan
 
Posts: 3464
Joined: Wed Sep 13, 2006 7:17 am

Post » Wed Jun 20, 2012 4:35 am

Sorry for necroing this, but I really need help with this one and I didn't want to start a new thread. I guess the OP guy had no problem solving this, but I'm missing something here big time.

So the big question is how to link the Puzzle Keyhole with correct Claw Key? I have custom Steel Dragon Claw and Keyhole to go with it. Now I need to link these two somehow. When I look the use info of any of the claws in the CK, it shows that there exists a REF to the keyholes in each of dragon claws. My problem in its very simplicity is this - how to create this reference? There is no sign of any connnection with these objects except in the use info.
User avatar
BaNK.RoLL
 
Posts: 3451
Joined: Sun Nov 18, 2007 3:55 pm

Post » Wed Jun 20, 2012 3:33 am

In the keyhole under Script select "HallofStoriesKeyholeScript" and under the scripts Properties set "myMiscObject" to your key item of choice, it doesn't need to be a claw, but the animation will always use a claw.

Each ring uses the key hole as Linked Ref and under Scripts...(HallofStoriesDiscScript)...Properties you set the "solveState" variable to the solution of this ring (1-3)
User avatar
Soraya Davy
 
Posts: 3377
Joined: Sat Aug 05, 2006 10:53 pm

Post » Tue Jun 19, 2012 6:01 pm

Thank you, JOG! You're a savior! And I just realized that the scripting system is nothing like Oblivion's and I have a lot to learn. But this was a huge help indeed.
User avatar
Sweet Blighty
 
Posts: 3423
Joined: Wed Jun 21, 2006 6:39 am


Return to V - Skyrim