Jump to content

Made a mod, Need help with ONE thing!


CrashMasterJMM

Recommended Posts

Heya peoples... I've just finished pretty much everything except for one thing in my mod... the intent is to keep the door to a dwelling I made locked until you can hit it with at least the first word in Unrelenting force.

 

There would be a small story involved, via a book discovered near by the dwelling added once this goal is reached, where this place is only meant for the dragonborn to open, hence needing the door to unlock after getting hit with Fus.

 

I'm willing to have the mod downloadable to who ever could help in that regard, and toss said person's name in credit for helping when I publish the mod.

 

Would very much appreciate it =^_^=

Link to comment
Share on other sites

I am not a scripter, and did only basic stuff in Oblivion, so don't quote me on this.

But couldn't you just:

- Have door locked with a key.

- Add an activator at the front of the door.

- Add a script to the activator, which will react once the player cast said shout.

- Open door.

 

The only problem there, as I can see, is to recognize what the player does. It is possible, of course, though I got no idea how.

 

It's what I can think of at least :)

 

Matth

Link to comment
Share on other sites

I am not a scripter, and did only basic stuff in Oblivion, so don't quote me on this.

But couldn't you just:

- Have door locked with a key.

- Add an activator at the front of the door.

- Add a script to the activator, which will react once the player cast said shout.

- Open door.

 

The only problem there, as I can see, is to recognize what the player does. It is possible, of course, though I got no idea how.

 

It's what I can think of at least :smile:

 

Matth

Trouble is, I'm still a _bit_ on the learning side of the creation kit, and would have no idea where to start with anything below step 1. Thanks for your input at the very least =^_^=

Link to comment
Share on other sites

(See the long-ish script? Use that.) The activator isn't needed. After all of the below (which this renders obsolete), I realized there was an alternative to OnHit(); namely, OnMagicEffectApply(). You can attach a script to the door by first placing a door, then editing the placed door (not the original) and going to the scripts tab. Once there, click Add and double click New Script. Give it a unique name with no spaces and press ok. Right click your newly made script and choose edit and you can start scripting. For this, you'll need the magic effect from Fus, the event OnMagicEffectApply(), and the function Lock() [it's also used to unlock].

 

First, make the property for the magic effect by typing this on its own line:

MagicEffect Property VoiceUnrelentingForceEffect01 Auto 

Now, on another new line, make the event:

Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect) 
Note that akCaster and akEffect are variables which the event fills in for you. You can then ask about them:
If (akCaster == Game.GetPlayer() && akEffect == VoiceUnrelentingForceEffect01 && IsLocked() )

In the above, the and symbols just tell the 'if' that everything has to be true. So, if the caster is the player, the effect is Fus, and the door is locked, then...

Lock(False)

The lock function will unlock the door if set to false. It's not a command "Hey, lock this", it's more of a state, "This is locked: false".

When you open an if, make sure to close it and do the same for events.

EndIf
EndEvent

Finally, if you want it to play a sound, you can do that by telling it which sound and telling that sound to play. I'll throw those into the final script:

Scriptname X99_TestingScript1 extends ObjectReference 

MagicEffect Property VoiceUnrelentingForceEffect01 Auto
Sound Property UILockpickingUnlockxxx Auto
	
Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
	If ( IsLocked() && akCaster == Game.GetPlayer() && akEffect == VoiceUnrelentingForceEffect01 )
		Lock(False)
		UILockpickingUnlockxxx.Play(Self)
	EndIf
endEvent

Note that the ILockpickingUnlockxxx.Play(Self) means: this sound.play it(from here). So it'll play the sound "ILockpickingUnlockxxx", and the sound's origin will be at "Self" which is what the script is attached to (the door), so that's where the player will hear it coming from.

 

 

 

If you don't care if it's Fus, Fus Roh, or Fus Roh Da, then you'll need to tweak it a tad so it makes sure the other requirements (it's locked and it's the player) are filled, then use || in a new if statement. || means or.

Scriptname X99_TestingScript1 extends ObjectReference 

MagicEffect Property VoiceUnrelentingForceEffect01 Auto
MagicEffect Property VoiceUnrelentingForceEffect02 Auto
MagicEffect Property VoiceUnrelentingForceEffect03 Auto
Sound Property UILockpickingUnlockxxx Auto
	
Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
	If ( IsLocked() && akCaster == Game.GetPlayer() )
		If ( akEffect == VoiceUnrelentingForceEffect01 || akEffect == VoiceUnrelentingForceEffect02 || akEffect == VoiceUnrelentingForceEffect03 )
			Lock(False)
			UILockpickingUnlockxxx.Play(Self)
		EndIf
	EndIf
endEvent
I made sure to title all of the properties correctly, so you won't have to search for anything. Just open the properties tab and hit auto fill and they should all fill in on their own. Make sure you attach this to the door itself and fill the properties or it won't work. It can easily be made to work when attached to something else, but it made for the door.
This actually caused me quite a few problems, though. I had a mod called A Tale of Tongues and it modified the shouts. So, be careful as the player's mods may make them unable to get through this.
--------------------------------------------------------

 

The following was my attempt to work this using OnHit(). It didn't work very well. But I'm leaving it in in the hopes someone who understands it will see it and be able to explain the results.

 

The activator may or may not work. The problem is, I tried activators, but nothing seemed to register hits from Unrelenting Force. They'd register fine with normal spells, and maybe with other shouts, but not with that one. It does have a projectile, and everything else also seems to align with something like Flames (which worked fine).

 

After EXTENSIVE testing, I found exactly two activators which register hits from Fus. I expected the jar that falls and explodes would, but no. Even though it activates, it doesn't tell me it was hit (that's extremely odd) (debug messages wouldn't display and unlocking the door didn't work). I also expected the combat training dummies to work, but they too registered nothing when hit with Fus. I also tried the destructible spider webs, but it turns out they're not broken using Fus. Finally, two activators which I'd left in because I thought there -might- be a chance they'll work displayed the notification and opened the door. They were wisp cores and vine pustules (from DA13: The Only Cure in Bthardamz). I don't think I used any DLCs. Anyway, why do those two work when nothing else does? And the oil lamp even activates and falls but won't do anything else...

 

The rest of this is ranting because Bethesda did such a simple thing so very, very strangely that I thought SURELY they must be doing this in order to do it properly. But no, they just did it that way to be weird. Or maybe it's more efficient? Anyway, the rest is really irrelevant.

 

This topic prompted me to attempt to figure out how Bethesda went about triggering things with shouts. I never did figure out how they triggered the ghost people being destroyed with Fus, but you CAN detect if it hits an actor, so I imagine they did it like that. But obviously we don't want to use an actor if we don't have to (tried with a mannequin, but the shout doesn't go through doors so I couldn't place the mannequin behind the door and it's not invisible so it can't be in front of it either).

 

Checked on how they trigger for Wuld at the closing gate, but it appears they actually don't check for it. If they player is faster enough, they can trigger the quest advancement without using the shout at all (it's all done through timers and assuming the player isn't fast enough to do it without the shout).

 

Finally, I decided to see how Faralda checks for different spells to see if it would be usable for shouts, and then I realized you could get through that bit by actually using a shout. This led to a LONG, LONG, LONG process of trying to decipher Bethesda's construction of this. Everything I tried led to a dead end. The quest would advance but nothing seemed to actually be doing the advancing :sad: It was just spontaneously going on at the right time. Eventually (after installing a program to search through every single script in the game) I found it being set forward in another related quest. Problem is, that quest wasn't checking for shouts (I'd already identified the quest and checked it). FINALLY,I realized that secondary quest was being checked by a Story Manager Quest Node (which is why it had to be its own quest and not just a stage of the original, the node needed a certain setting which affected the entire quest). In the node, it checked if the player cast a spell at the right time and in the right place; and if so, was the spell in a certain list (specifically, a list of all shouts).

Link to comment
Share on other sites

  • Recently Browsing   0 members

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