Jump to content

Door puzzle.


98abaile

Recommended Posts

I'm in the process of creating a (massive) pristine vault. The story goes that the door broke and the potential vault dwellers were unable to get in. The problem is that I'm VERY new to modding so I was wondering if anyone could give me some step by step instructions on how to create this door.

 

I intend the door to be a vault gear door, but it could also be a large utility door. What I had planned was that the door won't operate until the player finds and fixes one/three fuse boxes (or other object) in the same/seperate cells (probably the same cell). These shouldn't open the door, just unlock it, I would preffer that the door could not be picked.

 

The alternative is that I lock the door with the hardest lock level (I don't know how to have a terminal unlock it), but this is very unimaginative.

 

Please note that I am very inexperienced, I have no idea how to create, write or use scripts. The most complicated thing I have made so far is an automatic door which I just copied from the museum and chaged the door model.

 

Please also note that I don't have internet access at home and the geck wiki is blocked under hacking on the library computers.

 

Thanks.

Link to comment
Share on other sites

I'm a copy-paste/duplicate-modify scripter, so my suggestion would be to take a look at the scripts for the fuse boxes in Jefferson Memorial and the scripts for the doors at some Vaults.

I'm sure it's something along the line of giving the fuses variables like 'fuse1' etc. and when you activate a fusebox (which would require that player has item 'fuse') it changes the 'fuse1' variable to fuse1 == 1, etc. then when the player tries to activate the Vault door, the script for it would check to see if all fusebox variables == 1 then open the door.

Should be fairly easy.

Link to comment
Share on other sites

The Script should be fairly simple, you can do it all with if/elseif statements. You could make it more complex to display a diffrent message accorrding to which items you have in your inventory.

 

I am fairly new to this, but as far as I can tell this should work.

 

 

 

Scriptname VaultDoor001

Ref VaultDoorRef01

Begin GameMode

               set VaultDoorRef01 to GetLinkedRef

         if (player.GetItemCount Item01 == 1) && (player.GetItemCount Item01 == 1) && (player.GetItemCount Item01 == 1)

                          VaultDoorRef01.Unlock
                          ShowMessage VaultDoorUnlockedMessage01

         elseif

                          ShowMessage VaultDoorUnlockFAILMessage01

	
         endif
End


Link to comment
Share on other sites

Thanks for replying, I'm not sure this will be much help though since as I said, I have no idea how the create or use scripts. About all I can do is create a vault door with a control panel (which is merely copied from another vault) and three fuse boxes.

 

I have no idea how to apply scripts, how each object is linked to each other, how the player is supposed to have a fuse item (whats that about, I didn't know you were able to pick up a fuse box). The script in Interfer0's post is almost just meaningless characters to me.

 

I'm sorry if I'm being rude here, but I actually need a step by step tutorial on how to actually make this thing (as in what buttons do I press).

 

I will try what both of you have suggested (I can't seem to recal anything about fuse boxes at the jefferson memorial, or even what the Jefferson memorial is (I'm British, lol), but I'll look into it).

 

Again sorry if I'm being rude, but hopefully the end should justify the means, I've almost finished the entrance to this vault, the greenhouse/gardens area (full sized tress in a vault if you can imagine that) is coming along smoothly and I plan on starting the atrium/living quarters soon.

 

I forgot to put the esp on a flash disk so I can't show you anything yet, but I'll try and remember tommorrow or thursday.

Link to comment
Share on other sites

At the Jefferson Memorial building, when you get your Dad to go there with the scientists from Rivet City, there's a part where you have to do something with the fuse box to get things up and running.

Anyway, I have random minimal experience with scripts/programming language (like javascript, DHTML, qbasic, etc.) so I guess I take it for granted that I can intuit what a script is doing by reading it.

 

Have you beaten the game yet? I'd suggest doing that; it should help with building your levels.

 

I won't be able to make a tutorial for you, as I'd have to go through and make the whole thing for you, and I just don't have the time. Sorry :(

 

Anyway, the Jefferson Memorial sub-basement cell is called PPurity03. The fusebox is an activator, called MQ05FuseBox. The inventory fuses are called MQ05Fuse.

 

The script for the fusebox (which is found if you open up the reference dialogue box (right-click and edit from cell view window) then click 'edit base' then click the "..." button beside the script name) is this (anything that has a semi-colon in front of it is just a comment, and is ignored by the compiler, meaning it's just there for notes from the programmer), I'll put some of my own comments in a different colour to give you a starting point:

 

ScriptName MQ05FuseBoxScript

 

;Script covers object MQ05FuseBox, used in MQ05

;Object Ref placed in cell ProjectPurityInterior02

 

short doonce - a variable that's modified to activate different parts of the script

 

 

Begin OnActivate - if the activator MQ05Fusebox is activated by the player

if IsActionRef player == 1

;update doonce if player has fuses (item MQ05Fuse) in inventory. Otherwise do nothing.

 

if ( GetStage MQ05 == 50 ) - this is based on the quest from the game, should be removable

if ( Player.GetItemCount MQ05Fuse > 0 ) - if the player has more than 0 fuses in inventory

Player.RemoveItem MQ05Fuse 10 - remove the fuses

FuseToggle.enable - not too sure, but I think this changes the look of the fusebox to add the fuses

set doonce to 1 - changed variable doonce to equal 1

else - otherwise

ShowMessage MQ05CantUseNowMessage - show the message 'mq05cantusenowmessage' because the player doesn't have more than 0 fuses

endif - end the if statement

else

ShowMessage MQ05CantUseNowMessage

endif

 

endif

End

 

Begin GameMode

 

;When doonce == 1, Dad comes back on over the intercom and updates quest stage

;TEMP

 

if ( Doonce == 1 ) - now that doonce is equal to 1

MQ05IntercomFuseRef.SayTo Player Greeting - this is part of the quest, you'd want to change it to activate the door. You'll have to find a script that does that from the game (probably on the vault101 door when you go back after amata calls you for help)

set doonce to 2 - probably only useful if you have another script that does something based on the fact that doonce == 2

endif

 

End

 

 

Hope this helps you get started.

I'd also like to suggest using the bethsoft geck forums because this forum is relatively dead in comparison. There's a lot more helpful/knowledgable people there.

 

Good luck!

Link to comment
Share on other sites

Thanks for the advice, after much blundering and trial and error, I finally managed to get something working. Its not perfect, but it works (even if its not obvious). There are a few problems, like the messages not displaying, but the system works.

 

Despite what I said in my previous post, your replies were actually very helpful, and I was able to gather enough inspiration and knowledge to create a working solution.

 

I still need help ironing out the scripts, so any advice you can give would be great.

 

These are mostly juust copied (note and all) from other scripts and then modified.

 

Script on the controlpanels:

scn Edencontrolpodscript
;See V112 for generic setup.


short mode
ref myLink

begin onActivate
if IsActionRef player == 1
	set myLink to getLinkedRef		;the linked ref should be the door.
	if (fusefix < 3)
	showmessage doorbroken
	elseif ((myLink.getOpenState == 3) || (myLink.getOpenState == 1)) && mode != 2					;door closed or open
		playgroup Forward 0;pull handle out
		set mode to 2
		activate myLink	;activate all the things that this is an activate parent of - klaxon light and activator.
	endif
endif
end

begin gameMode
if (mode == 2)
				if (isAnimPlaying == 0)
		set myLink to getLinkedRef		;the linked ref should be the door.
		playgroup Left 1											;pull handle down
		set mode to 3
		myLink.activate player
	endif
endif
end

 

Fuse box scripts (there are 3 of these, named accordingly:

scn Edenfusebox1script

Begin OnActivate

if IsActionRef player == 1

if ( used1 == 0)
if ( fixfuse == 0)
	set fixfuse to 1
elseif ( fixfuse == 1)
	set fixfuse to 2
elseif ( fixfuse == 2)
	set fixfuse to 3
endif
set used1 to 1
else
showmessage Fusefixed
endif
endif

end

 

As a thank you, here is a WIP version. The door is just outside the entrance to megaton, sadly the cave entrance in the actual vault seems to have dissapeared in the game despite being there in the geck, also the greenhouse is not conected yet, so you will need to use "coc vault001garden" to get there. The garden is not properly lit yet, I'm still building it and experimenting in trying to create an artificial sunlight effect.

 

You are free to use any scripts, but please don't use the actual content in other mods. Also, if you want to play around in the geck, for the love of whatever god you pray to, don't touch the coves above the trees, you will probably lose hours trying to put them back together without gaps.

Link to comment
Share on other sites

Your scripts didn't work when I tried them. The door still opened even if I didn't activate the fuseboxes, so I went through and got it to work.

 

I got rid of the global variable fusefix because I just set the control pod script IF condition that used1, 2 and 3 all == 1 for it to open, otherwise it displays that the door is inoperable. I also changed the message ID's to end with Msg to keep with the naming convention used by bethesda, and changed it so it's not a message box, but just a message that shows in the top left of the screen (don't have to click 'OK' that way).

 

One thing I suggest when you're testing is to try things in as many different combinations possible, like activate fusebox 1, then try to open the door to make sure you get the right behaviour, or activate fusebox 1 and 2, then try again, etc.

 

Anyway, here's the modified esp:

http://www.mediafire.com/?sharekey=56286a0...04e75f6e8ebb871

 

have fun :)

 

I really like your layout. It's very well done :) The automatic doors are a nice touch as well.

 

Edit: oh, and I don't know which cave you said is in the GECK but not ingame when you're playing. Was there supposed to be one outside of megaton, because I didn't see on even in the GECK.

Link to comment
Share on other sites

Thanks for the advice, after much blundering and trial and error, I finally managed to get something working. Its not perfect, but it works (even if its not obvious). There are a few problems, like the messages not displaying, but the system works.

 

Despite what I said in my previous post, your replies were actually very helpful, and I was able to gather enough inspiration and knowledge to create a working solution.

 

I still need help ironing out the scripts, so any advice you can give would be great.

 

These are mostly juust copied (note and all) from other scripts and then modified.

 

Script on the controlpanels:

short used1

, you will also need to declare it as a global variable, since it will be used outside of this script. Global variables are set in the geck under one of the top tabs, not sure which, I don't have GECK on this computer.

 

Your second script needs alot of work. you need to declare fix fuse, and set it to be a global, but thats just the beginning of whats wrong with it. Currently the first time you open the fuse box, its going to set fixfuse to 1, the second time it sets it to 2 the third sets it to 3. Then it will set used1 to 1 and it will do nothing after that.

 

I'll give you a better commented version of my script.

 

Scriptname VaultDoor001

Ref VaultDoorRef01         ; Here I am declaring the varaible I will use later

Begin GameMode           ; Runs the script without bringing up a menu screen
              
         set VaultDoorRef01 to GetLinkedRef    ;Here I am setting the variable from earlier to the linked referance

         if (player.GetItemCount Item01 == 1) && (player.GetItemCount Item01 == 1) && (player.GetItemCount Item01 == 1)
; This line checks the players inventory to check is it has item 1 2 and 3 



                      VaultDoorRef01.Unlock      ;if the three times are in yout inventory it will unlock the door, which is your linked referance                    
                      ShowMessage VaultDoorUnlockedMessage01  ;Showes the message. This message must be created in the GECK.

         elseif
                      
                      ShowMessage VaultDoorUnlockFAILMessage01  ; If the three items don't exist, it will display this message
	          
         endif

End

Link to comment
Share on other sites

You don't need to declare a global variable in the script to modify it, just if it's not global.

Also, he just wanted to have the fuseboxes activated to be able to open the door, each fusebox had its own global variable, respectively used1, used2, used3.

Therefore all it needed to be was:

 

scn Edenfusebox1script

Begin OnActivate

if IsActionRef player == 1 && used1 == 0
      set used1 to 1
     showmessage FuseFixedMsg
     elseif ( used1 == 1)
      showmessage FuseFixedMsg
endif
endif

end

This way he can make another message for elseif saying something like 'Fusebox is already fixed."

 

Then I set the control panel to make sure that used1, 2 and 3 == 1 or else show message 'doorbrokenMsg'.

The control panel script was just copied from the existing script in the game to open it from a control panel.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...