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

Thanks WillieSea!

Sorry for not introducing myself, I fogot :)

Your idea sounds reasonable :D
Would it be easy enough to do, with being able to drop the Bottle/Lamp as an object in the world?
I.E, You leave it in the house, and a seperate actor steals it as part of the Quest lets say?

Thanks a bunch :)

-TheNorthridge

Link to comment
Share on other sites

I am trying to implement a few different things. First of all, is it possibly to tie stamina regeneration onto health percentage, and mackiga regeneration onto stamina percentage?

 

Second, I'm trying to make it so that attacking uses up stamina. Now, I've thought about just editing each weapon so that when swung it takes down stamina, but want to know if I can just add something to calculate weapon weight and reduce stamina automatically.

 

Finally, I want to do this to blocking too... A stamina cost to start blocking, and an ongoing cost to hold a block. I have a load more things I want to do, mainly based around stamina, but these are the most important. How far can I go along these lines?

 

I'm not looking for someone to write this for me, just someone to tell me how if it is possible. I'm still learning.

Link to comment
Share on other sites

  • 1 month later...

Hi,

I have an idea for a an Episodic Mod Series, Involving the Player Discovering Djinn/Genies across Skyrim, each with their own small story and quest line. The only problem im having is figuring out the best method of making the mechanics of the Djinn to work. Ive tried to find help at the Nexus forums, but with no joy. A Friend recommended I should try here.

They need to:

a) Be Summonable, If you have the Bottle in your Inventory, Using it Spawns the Djinn next to you. The Djinn is a fully interacterable NPC/Companion. Using the Bottle Again Returns them to it.

b)The Djinn needs to be Interactable. You can talk to them, they will give you the Story Quest, and they can obey your commads. Using a Dialogue Option, you can be granted three wishes, but you must be careful. After using all three, the bottle vanishes from your inventory, and you must find it again! (That last part im still contemplating, might be seen as unfair. Maybe just a wish recharge instead?)

Im just wondering how best it is to do this, if maybe I can alter the summonable creatues, like the ghostly horse or the daedric warrior, but replace the staff with a bottle, and the creature with the Djinn? Or maybe request a set of scripts I can use over and over, editing them for each Djinn. Thoughts?

If anyone would like to help out on this mod, id be much abliged smile.gif

Comment with your thoughts.

-The Northridge

I wouldn't use the "Summon Creature" spell effect to do this; that magic effect has restrictions on it that it sounds like you may not want. What I recommend is writing a script that is triggered when the player clicks on the bottle in his inventory. You could have it work something along these lines:

 

Player clicks on bottle with no genie out:

  • Enable that genie (you would have to have already placed him somewhere in the world disabled, so that you can reference that genie actor reference specifically, but you can place him pretty much anywhere).
  • Move the genie near the player
  • Play visual effects and sounds that you'd like.
  • Make a variable like GenieIsOut01 set to 1

Player clicks on bottle with genie out:

  • Disable that genie
  • Play unsummon effects/sounds
  • Make GenieIsOut01 set to 0

The variable would be used on the script so you could have 2 different "if" arguments so that it doesn't try to summon him when he's already summoned. Genie put away would be "if GenieIsOut01 == 0" and vice versa.

Edited by Penguinchao
Link to comment
Share on other sites

  • 2 weeks later...

     Hello, thank you to everyone who contributes to this forum. I've never programmed and find papyrus and the creation kit very difficult. So on to the request:

I have decided to add a friend into Skyrim as a companion and I'd like to add a behivor to the actor. She is not keen on darkness and my dungeons are very dark so I believe it would make sence that her actor would cast "Candlelight" upon entering a dungeon. I would love to see an example of how I can tell the actor follower to 'notice' when she is in a dungeon. I'd be completely satisified if it was only one particular theme. For example, I know some vanilla followers will take note of Draugr ruins and make a comment relevant to them but I cannot find where in the creation kit they are 'learning' this. So can anyone show me a script or point me to further reading on building a script that:

 

  1. Is attached to an actor follower
  2. Makes actor follower take note of us being in a place similar to: a ruin, a dungeon, a dark place.
  3. Has actor follower check if they already have candlelight spell active and if not casts it.

 

I don't need this to be all inclusive, it would just be nice if occasionally upon entering a dungeon she'd use the spell.

 

Thank you so very much for your time!

 

Wayoftzu

Link to comment
Share on other sites

Hello Wayoftzu,

maybe I can help you with that script or at least with some parts of it.

 

1. Is attached to an actor follower

That's the easy part. In this case the script will extend Actor. Just remember to give it a unique name, in this example I simply called it '_test'.

 

2. Makes actor follower take note of us being in a place similar to: a ruin, a dungeon, a dark place.

3. Has actor follower check if they already have candlelight spell active and if not casts it.

A bit more complicated. Using the event OnLocationChange will cause the script to react on that whenever the follower enters or leaves a location, so we need to check if the follower actually enters a dungeon, mine or such. Of course you could just add properties for all the locations to check for, but that would end up in a very large property list. For that reason I suggest to check for the keywords that are attached to the locations. And to make things even more complicated, put them in a formlist. The advantage of a formlist, you can add or remove keywords without changing anything to the script.

- In Misc -> Formlist, create a new formlist.

- Select the keyword category and filter for loc*.

- Drag & drop the relevant keywords into the formlist, I think 'LocTypeDungeon' is the most important.

 

unbenannt-1.jpg

 

After you created the formlist, use the following script on the actor and compile it.

Scriptname _test extends Actor

Spell Property CandleLight auto
MagicEffect Property LightFFSelf auto
Formlist Property LocationTypeList auto


Event OnLocationChange(Location akOldLoc, Location akNewLoc)
	int i = LocationTypeList.GetSize()
	While i > 0
		i -= 1
		if akNewLoc.HasKeyword(LocationTypeList.GetAt(i) as Keyword)
			if !HasMagicEffect(LightFFSelf) && IsInInterior()
				Utility.Wait(2.0)
				CandleLight.Cast(self)
                                i = 0
				;	debug.messagebox("Candlelight was cast")
			endif
		endif
	EndWhile
EndEvent

One thing left to do, filling the properties. For that, open the 'properties' window. Ideally you named the formlist property in the script equal to the formlist object in Creation Kit, or vice versa. If you did so, you can just hit the button 'auto-fill all' and you're done, otherwise use the dropdown list to the right.

 

unbenannt-2.jpg

 

I hope it helps. :smile:

Edited by Ghaunadaur
  • Upvote 2
Link to comment
Share on other sites

Ghaunadaur, This is incredible; I greatly appreciate your reply being detailed yet easy to follow. This did not take long at all. I used a custom candlelight which would burn a little longer and I couldn't be more pleased with the results! While to many this would be a nightmare for stealth the personality of the person is not such that she'd be running around in the dark. Again thank you so very much for your time this small detail really helps make it more personal and I learned about how to use form lists and location keywords.

 

Wayoftzu

Edited by Wayoftzu
Link to comment
Share on other sites

Hi folks!

 

Im not much of a coder (I prefer graphics ;)), but I got the idea that would change the magic system quite a bit and that in just small script edting (at least I think so :laugh:)

 

Ok so I want to edit script that lets player learn spells from a spellbok, so there is a check to see if player has a perk defined by me. The perk will be added to player at mages collage (maybe a quest or something)..

 

If you have that perk you will learn spell as normal. However if you do not have the perk, you get message: "You do not understand what is written here", you do not learn the spell and spell book is not removed.

 

I found these 2 scripts:

Scriptname SpellTomeScript extends ActiveMagicEffect  

Spell Property SpellLearned Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	akTarget.AddSpell(SpellLearned)
EndEvent

^this is spell learning script

Scriptname SpellTomeRemoveScript extends ObjectReference  

Event OnEquipped(Actor akActor)
	If akActor == Game.GetPlayer()
		akActor.RemoveItem(SpellTome, 1)
	EndIf
EndEvent

book Property SpellTome  Auto  

^This seems to be a script that removes spellbooks after learning spells.

 

Could you help me out?

Edited by taro8
Link to comment
Share on other sites

Hello Everyone!

I've been struggling with scripting an idea. I'm an experienced Skyrim player (1200+ hours) and am now just getting into the immersion and environment, and don't

really want to deal with all the mundane gibberish anymore; just play!  So, the idea was, rather than having to go around, and find all the various merchants (and hope

they have enough gold to buy anything), I thought having a "sell barrel" which is scripted to give base value to the player for every item put into it, would save a lot of

time and heartache.  So, here's the basic concept:

---=== Begin Concept ===---

There's a barrel (or chest) into which the player can place items; there is a button on/near the container, which when pressed, gives the player the options of: "Sell

the Items", "Get Rid of the Items", and "Exit".

If the player selects "Sell the Items", the "totalgold" variable is zeroed, then the items in the barrel/chest are evaluated item for item, the value of each is asses to the

"totalgold" variable, and then the item is deleted from the container's inventory; once all the items are gone, then the sum of gold is given to the player, and the script

ends and returns the player to the game.

If the player selects "Get rid of the Items", then each item is deleted from the container's inventory; once all the items are gone, the script ends and returns the player

to the game.

If the player selects "Exit", then the script ends and returns the player to the game.

---=== End Concept ===---

Making the button, barrel, and the basic form of the activator and event is done, and the skeleton functions. (barrel and "ImpButton01" as the button).

Giving the player the options on the screen is working fine. The "delete" portion is already done and tests as working as expected, as are the responses onto the

screen.  I'll probably change the "MessageBox" to "Trace" just to make a little less need for interaction after-the-fact.

The problem is in the "Sell the Items" portion of the script, as I really can't seem to conceptualize how to do an efficient, looped and selective process for figuring out a random inventory and evaluating it. FList's and direct references don't really seem applicable, as there's no easy way to determine what a player might dump into the container.  So, I don't know how to script the inventory handling and such, and would like to see if anyone has any ideas and/or examples.

Here's the script so far:
 

Scriptname KentiItemSellBarrel extends ObjectReference  
{script to "sell" or delete items from an in-game container on button activation}

import game
import debug

ObjectReference Property SellBarrelContainerREF auto ; the actual container being referenced where the player places the items

MiscObject Property gold001 auto

Message Property KentiItemBarrelMsg auto ; message used in-game to place options onto the screen

int SellGoldValue
int ItemGoldValue
int TotalInventoryItems
int ItemCount

Event OnActivate(ObjectReference akActivator)

int ibutton = KentiItemSellBarrelMsg.Show()
    If ibutton == 0 ; "Sell" all items in the container
        SellGoldValue = 0 ; reset the value to be sure its zeroized
        TotalInventoryItems = [functionvalue] ; total number of items in container
        ; begin loop; while TotalInventoryItems > 0 continue
            [ select next object from current inventory ] = CurrentItemREF
            ItemCount = CurrentItemREF.GetItemCount()
            ItemGoldValue = CurrentItemREF.GetGoldValue()
            SellGoldValue = SellGoldValue + ( ItemGoldValue * ItemCount )
            SellBarrelContainerREF.RemoveItem(CurrentItemREF)
            TotalInventoryItems = TotalInventoryItems - ItemCount
        ; end loop; aka go to next item in the container
        Game.GetPlayer().AddItem(Gold001, SellGoldValue) ; give the player the value in gold
        Debug.MessageBox("All the items have been purchased by Khajiit Traders and Thieves Guild contacts.")

    ElseIf ibutton == 1 ; delete all items in the container
        SellBarrelContainerREF.RemoveAllItems()
        Debug.MessageBox("All the items in the barrel have been donated to charity.")

    ElseIf ibutton == 2
        return
    
    EndIf

EndEvent
 

Thank you in advance for the guidance and assistance, and any wisdom you can bestow on me is most appreciated.

Link to comment
Share on other sites

Hi. I'm looking for a script that will place a fire cloak on the player when they have two specific weapons equipped and remove it when they unequip one or both of the weapons. They have to have both weapons equipped for it to activate the flame cloak.

Link to comment
Share on other sites

It seems like that would be a minor change to any script that can put on a fire cloak when one specific weapon is equipped. Whenever one of the two is equipped, check IsEquipped(akform) for the other to decide whether to start the fire cloak. Whenever one of the two is unequipped, turn off the fire cloak.

Link to comment
Share on other sites

Hello everyone.

 

Has anyone devised a way to incorporate the effect of a shout onto a object (specifically a ring or amulet)?

 

My idea is to take the Aura Whisper shout (highest level of using all three words) and have it as a "constant effect" while the player is wearing the ring or amulet.

 

I was playing in the Creation Kit, and could not figure out how to apply the Aura Whisper onto a ring (or amulet), only a scroll, which I couldn't make work as intended.  While it worked to a fashion, it was limited to the direction the PC was facing when the scroll was cast, and it had range limitations. In other words, I couldn't get it to function as desired (which may have been because of my misunderstanding the parameters passed to the effect at the time of the cast).

 

So, the question for the experience scripters here: is there a way to accomplish this using scripting, and if so, would someone be willing to teach me how?  Or, as a side question, is there a more effective methodology than scripting?

 

Thanks.

 

UPDATE:

 

I figured out how to create some new magic effects based on the originals, and I tie them together in an enchantment, but still not working.  The ring seems to have no effect on anything in-game.  Anyone have any ideas?

 

As for the magic effects, they're the same as the vanilla "Detect Life" effects (interior and exterior) except for the area being the same as the Aura Whisper effects. And, they're set as "constant effect" vice "fire and forget".

 

Again, I don't know if this is in the realm of scripting, or if it can be done just as easily without it.  Thanx again.

Edited by ShastaConcolor
Link to comment
Share on other sites

Hey guys, I need a bit of help. I need to apply a magic effect to the player using dialogue papyrus fragment.

The effect is called xgfPferdeKarrenRuf

I would be really happy if you guys could help me out.

SOLVED: I managed to get to work, the code requied was:

Spell ID.Cast(Game.GetPlayer())

 

And you need to add parameter. Just saying in case someone needs it.

Edited by taro8
Link to comment
Share on other sites

Hey guys, i need help

 

i'm trying to make a simple script that makes an actor sneak .-.

 

here's what i got so far:

 

Scriptname Arons_NPCVampireLordFly extends activemagiceffect  
{Makes actors sneak}

;===============================================


EVENT OnEffectStart(Actor Target, Actor Caster)        

GetTargetActor().StartSneaking()

EndEvent

 

 

 

 

I attach the script to a new magic effect, then i place the effect on a spell and then place the spell on an actor, but it doens't work at all. I'm sure something is wrong with the script. please, help .-.

 

Yeah, i'm still a noob at scripting

Link to comment
Share on other sites

EVENT OnEffectStart(Actor Target, Actor Caster)        
GetTargetActor().StartSneaking()

 

Why are you using 'GetTargetActor()?

 

You should have the target actor in the variable named 'Target' which is part of your EVENT.

 

EVENT OnEffectStart(Actor Target, Actor Caster)        
Target.StartSneaking()

 

Also, where is the rest of your script? Do you have it setup as an active magic script?
 

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