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...

Script Requests


Tonycubed2
 Share

Recommended Posts

Hello again guys, long time no see. I currently need a bit of help making a script that does the following:

  • Activates when the player puts a piece of armor on.
  • When activated, uses the SKSE function: SetGameSettingFloat (http://www.creationk...ingFloat_-_Game) to adjust whatever game setting I need. In this particular case it'd be the setting: fJumpHeightMin
  • Deactivates and resets the game setting to it's original state when the player removes the piece of armor.

What I need help with is how to exactly program using SKSE functions and such.

Edited by Altrunchen
Link to comment
Share on other sites

  • 2 weeks later...

Hiya Im trying to write a script for a concentration cast spell that fills soul gems (based of wow warlock soul harvest ability), this is my script but it keeps crashing the skyrim creation kit when I save the script, what am I doing wrong any help will be much appreciated.

ScriptName SOULREAPER

EVENT OnEffectStart

if akcaster.GetItemCount(SoulGemPetty) >= 1

akcaster.AddItem(SoulGemPettyFilled, 1, false)

akcaster.RemoveItem(SoulGemPetty, 1, true)

Debug.Trace("You have reaped a soul")

ElseIf akcaster.GetItemCount(SoulGemLesser) >= 1

akcaster.AddItem.AddItem(SoulGemLesserFilled, 1, false)

akcaster.RemoveItem(SoulGemLesser, 1, true)

Debug.Trace("You have reaped a soul")

ElseIf akcaster.GetItemCount(SoulGemCommon) >= 1

akcaster.AddItem (SoulGemCommonFilled, 1, false)

akcaster.RemoveItem(SoulGemCommon, 1, true)

Debug.Trace("You have reaped a soul")

ElseIf akcaster.GetItemCount(SoulGemGreater) >= 1

akcaster.AddItem(SoulGemGreaterFilled, 1, false)

akcaster.RemoveItem(SoulGemGreater, 1, true)

Debug.Trace("You have reaped a soul")

ElseIf akcaster.GetItemCount(SoulGemGrand) >= 1

akcaster.AddItem(SoulGemGrandFilled, 1, false)

akcaster.RemoveItem(SoulGemGrand, 1, true)

Debug.Trace("You have reaped a soul")

else

Debug.Trace("You cannot reap any more souls")

Endif

endEVENT

Link to comment
Share on other sites

Your script needs to extend a form, in this case, an activemagiceffect.

Also, you need some properties for your script to work with.

Lastly, I see you have duplicate "additem" functions in some of the lines of code.

here is what I think you're driving towards

Also, if you were using the debug.traces to debug your script, that is fine, otherwise, debug.notification would be a nice touch.

Hope this helped!

ScriptName SoulReaperScript Extends ActiveMagicEffect

ObjectReference Property SoulGemPetty Auto

ObjectReference Property SoulGemPettyFilled Auto

ObjectReference Property SoulGemLesser Auto

ObjectReference Property SoulGemLesserFilled Auto

ObjectReference Property SoulGemCommon Auto

ObjectReference Property SoulGemCommonFilled Auto

ObjectReference Property SoulGemGreater Auto

ObjectReference Property SoulGemGreaterFilled Auto

ObjectReference Property SoulGemGrand Auto

ObjectReference Property SoulGemGrandFilled Auto

EVENT OnEffectStart(Actor akTarget, Actor akCaster)

Int INVSoulGemPetty = akcaster.GetItemCount(SoulGemPetty)

Int INVSoulGemLesser = akcaster.GetItemCount(SoulGemLesser)

Int INVSoulGemCommon = akcaster.GetItemCount(SoulGemCommon)

Int INVSoulGemGreater = akcaster.GetItemCount(SoulGemGreater)

Int INVSoulGemGrand = akcaster.GetItemCount(SoulGemGrand)

if INVSoulGemPetty >= 1

akcaster.AddItem(SoulGemPettyFilled, 1, false)

akcaster.RemoveItem(SoulGemPetty, 1, true)

Debug.Trace("You have reaped a soul")

Elseif INVSoulGemLesser >= 1

akcaster.AddItem(SoulGemLesserFilled, 1, false)

akcaster.RemoveItem(SoulGemLesser, 1, true)

Debug.Trace("You have reaped a soul")

Elseif INVSoulGemCommon >= 1

akcaster.AddItem(SoulGemCommonFilled, 1, false)

akcaster.RemoveItem(SoulGemCommon, 1, true)

Debug.Trace("You have reaped a soul")

Elseif INVSoulGemCommon >= 1

akcaster.AddItem(SoulGemCommonFilled, 1, false)

akcaster.RemoveItem(SoulGemCommon, 1, true)

Debug.Trace("You have reaped a soul")

Elseif INVSoulGemGreater >= 1

akcaster.AddItem(SoulGemGreaterFilled, 1, false)

akcaster.RemoveItem(SoulGemGreater, 1, true)

Debug.Trace("You have reaped a soul")

Elseif INVSoulGemGrand >= 1

akcaster.AddItem(SoulGemGrandFilled, 1, false)

akcaster.RemoveItem(SoulGemGrand, 1, true)

Debug.Trace("You have reaped a soul")

Else

Debug.Trace("You cannot reap any more souls")

Endif

endEVENT

Edited by TripleSixes
Link to comment
Share on other sites

yes there is,

http://www.creationkit.com/Notepad%2B%2B_Setup

You will need to get notepad ++ and set it up properly. Alternatively you can download this mod...

http://skyrim.nexusmods.com/mods/25572

You will write the script, save it (making sure the scriptname matches what you save it as), then compile it. Compiling will create a .pex file that the CK can understand. Compiling is also a good way to proof-read your scripts.

Link to comment
Share on other sites

Scripts are 'not' saved within the CK. The CK only knows about the script when you compile it.

1. What are you doing to edit the script? What program are you using?

I use regular old notepad.

2. How are you compiling the script?

I right-click on the script in the Paypyrus script window and select 'compile'.

Edited by WillieSea
Link to comment
Share on other sites

Well I added it as a standalone script and added it to the spell, but it doesn't work, do I need to add properties to the spell script window?, if so do I add all the things with int before them?. thanks

Im using regular old notepad, I think It was because I wasn't compiling the script before trying to save it in the ck.

Link to comment
Share on other sites

  • 2 weeks later...

Hey I'm quite new to modding, I have 4 already (2 are hidden) over at steam

Anyway, I'm making a mod that adds the Phantom Form shout in the game the way it was meant to be. So far I've managed to get some good results by using the player NPC as a reference. I've found a way to make it so that the Greybeards don't use the wrong magic effect as well. But I still have a problem though. Small, but really annoying.

I need to be able to copy the player's inventory to the summoned NPC. If this will require SKSE, that's fine. I just can't find a good example script for this anywhere! Thanks in advance!

Edit: I also need a way to change the actor's sex to female if the player is female, is there away achieve this through use of a magic effect or will I need another script?

Edited by VenomD95
Link to comment
Share on other sites

  • 3 weeks later...

I'm uber new to modding here for Skyrim. So far I've got CK up and running fine. I'm not new to scripting in general though. Anyways, I'm looking for a simple script base that will help me do what I want.

Here's how it should work:

At anytime in game, if you hold the MMB(Middle Mouse Button), it will trigger something. If you release it, trigger something else.

//if User is holding MMB

//Do something

//else

//Do something

--

What I'm trying to do is, when the user holds the middle mouse button, it will set his camera to look back, once released it will show the "normal" camera.

Link to comment
Share on other sites

I'm so glad this thread is active.

Anywho, I have a question (well, maybe a few depending on the answer to the first)

I'm trying to figure out a way to modify the behavior of sheathing/unsheathing, particularly the timings of it. What I want to do is have weapon swapping wait until your current weapon is sheathed to unsheathe. Currently in the game, swapping weapons will automatically put your current weapon away and immediately begin the unsheathing animation of your next weapon. A quick play-by-play would work as such:

Assume your character has a bow on 1, and a greatsword on 2. Your bow is currently equipped. You press 2, and the bow sheathing animation occurs. Your greatsword will not begin to unsheathe until you bow has been successfully sheathed. Additionally, in the vanilla version of the game, pressing the hotkey of your currently selected weapon will revert to your previous selection. Let's say you have your greatsword equipped and unsheathed. Pressing 2 (as this is your greatsword hotkey) will automatically put your greatsword away and you will unsheathe your previous weapon. What needs to happen is the sheathe animation for your greatsword must display before reverting to the previous setup.

What inspired this was the discovery of the built-in flag "bDisableGearedUp=0" that seems to have gone unused in the release version of the game due to a bit of bugginess. What this flag does is allow all weapons in your favorites list to display on your character at all times (i.e. greatsword in hand yet still displays bow on back). It's quite functional, as it's already built into the game. The problem is that switching between weapons while you already have a weapon unsheathed causes problems. The only way to prevent these problems is to completely sheathe your current weapon before unsheathing your new one. A simple script that forces this to happen will effectively create a very stable and easy-to-install method of displaying many weapons on your character at once that doesn't require custom models and ugly inventory trickery that Armed To The Teeth uses.

So, question 1: Is this possible?

Question 2: How?

Edited by Reblonk
Link to comment
Share on other sites

If its possible, I would not know how to do it.

I suspect 'Armed to the teeth' could not find a way around it either and thus the work around.

I also suspect its part of the game engine, and that would be why its not possible to intercept the weapon changing functions. Although SKSE is getting some unique code in place, not sure it it would help though.

Link to comment
Share on other sites

Hello. Much as this one dislikes MMO games, this one thinks they have one thing going for them. That's the ability to "lock" items, preventing them from being sold to a merchant- handy if one has a "fetch" quest. Is there any way to script this feature into Skyrim? Sorry for my ignorance; Tiger doesn't know any of the steps involved.

Link to comment
Share on other sites

Hi there, I am so glad this site is here, because there is virtually no where else to go for help from a real person and I am at my wits end trying to figure this out. I'm trying to make the dwemer animated lock from blackreach animate each time the user opens or closes a portcullis *(using this dwemer lock as the portcullis activator parent). The actual parent activate works fine, but no animation :(

You'll see my failed attempt below. I've changed some true's to false and falses to trues... Any help is seriously appreciated. I have made my own duplicate of the lock and want to of course add a custom script to that dupe.

I dont really care if there is a key to open this, in fact I'd just be happy if the animation worked.

------------------------------------------------------------------

Scriptname CleanerVaultLock extends ObjectReference

{Checks for MasterVault Key in inventory, animates, and

activates the Blackreach door.}

import game

import debug

import utility

bool property isAnimating = false auto Hidden

{is the activator currently animating from one state to

another?}

Auto STATE Waiting

EVENT onactivate (objectReference triggerRef)

self.BlockActivation(true)

playAnimationandWait("Pull","Reset")

self.BlockActivation(false)

endEVENT

endState

STATE busy

; This is the state when I'm busy animating

EVENT onactivate (objectReference triggerRef)

; block activation

trace (self + " Busy")

endEVENT

endSTATE

function SetOpen(bool abOpen = true)

; if busy, wait to finish

while getState() == "busy"

wait(1)

endWhile

isAnimating = true

MasterVaultPortcullis=GetLinkedRef()

gotoState ("busy")

playAnimation(openAnim) ; Animate Open

Wait(2)

MasterVaultPortcullis.Activate(MasterVaultPortcullis)

gotoState("done")

isAnimating = false

AlftandCleanerVaultLockScript abls = (self as

AlftandCleanerVaultLock)

if (abls != None)

abls.isOpen = true

endif

endFunction

endSTATE

Edited by Hannibalektr
Link to comment
Share on other sites

This one knows that Oblivion, at least, has a way to create an "elevator" script. So his question is two-fold. First, can it done in Skyrim? And second, is it possible to make the elevator rise and rotate?

Some background. Myst, the game this one hopes to recreate, has a rotating elevator. It turns based on how the player manipulates a picture:

RealMYST2013-02-1923-00-54-71_zps4993bc15.png

Link to comment
Share on other sites

This script might be a bit complicated, but if anyone thinks they can tackle it that would be awesome!

I want to make a constant effect enchantment that is like a cross between the Konahrik's Privelege and the Aetherial Shield from Dawnguard.

Basically when you get hit you would turn ethereal for a short period of time.

That would be too overpowered so another part of the script would be the make it there is a chance that the effect will procure. As your life gets lower the greater the chance for effect to activate.

The Konahrik mask script has a complicated, but functional, chance mechanic, and the Ethereal effect is available as per the Ethereal shout and is used on the Aetherial Shield but does the opposite of what I want to do (it turns the player’s target ethreal).

My attempt at this effect used a condition of the enchantment that heath had to be below a set % but the problem was I could only get the effect by un-equipping and re-equipping the enchanted armor. I guess a script that did that when the player got hit would fix that, but that’s kind of a lame fix in my book.

I plan to add this effect to an item I have made for a quest I am working on. It would be the reward for players at the end of the storyline.

Anyone think this is possible?

Link to comment
Share on other sites

  • 2 weeks later...

I have two requests for help on scripting. I am trying to learn, but for me this is very confusing.

I have two quests that need scripts that I believe are pretty simple if someone knew what they were doing.

Any help would be very appreciated.

I only need these two scripts:

1.) A Script for a quest collecting four pieces of armor, that once the quest giver has these four quest items, he spawns a guard.

2.) Need a simple quest script that would enable an xmarker at a certain quest stage.

Please help! I am lost and can't continue on with any mods until I have these scripts.

_________________

Quest Details

-----------------------------

First quest is collecting four pieces of armor to create each draugr guard. I want to be able to spawn twenty seven draugr guards and the quest would no longer repeat unless one of the guards dies off. I have already made these guards. Just wanted there to be a collection quest to spawn them. Even thought of maybe adding bone powder as a requirement or human heart..

So I have an NPC named Irarak who will offer to take draugr armor (quest items you go and find in a dungeon nearby) and create guards from those four items. The created draughrs will spawn and go to their patrols inside the castle. I would need to also create a script that spawns these draugr guards that I have already made in the editor. I assume I might be able to just make it a quest stage and enter some text that you set the properties spawn guard1 on xmarker.

Next quest is an upgrade to the room. No where could I find a simple script that enables or disables an object through a quest stage. Ive tried everything I could, but nothing compiles. Very simple indeed, but I suck. Please help.

I do have a script for spawning the guard, but dont know how to tie it to a quest stage.

Scriptname spawndraugrguards Extends ObjectReference

import game

import debug

ActorBase property myNPC auto

ObjectReference property SpawnPlace auto

Event onactivate(ObjectReference akActionRef)

SpawnPlace.PlaceActorAtMe(myNPC, x)

EndEvent

Where x is the difficulty of the encounter (0-4).

Edited by Hannibalektr
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...