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

Search the Community

Showing results for tags 'papyrus'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Boards
    • About TESA
    • TESA Community
  • Hosted Boards
    • The Enclave
    • Hosted Projects
  • Gaming Boards
    • The Elder Scrolls
    • Fallout
    • Indie Games
  • RPG Boards
    • Roleplaying

Categories

  • Showcase
    • Skyrim
    • Fallout
    • Oblivion
    • Misc
  • Exclusives
    • Skyrim
    • Fallout
    • Oblivion
    • Morrowind
    • Misc
  • Community Works
    • Skyrim
    • Oblivion
    • Fallout
    • Misc
    • Student Projects

Categories

  • ESV: Skyrim Modding
    • Creation Kit Basics
    • Level Design
    • Character Design
    • Papyrus
    • Quest Design & Dialogue
    • Graphic Artistry
    • 3D Craftworks
  • ESIV: Oblivion Modding
    • Construction Set Basics
    • Worldbuilding
    • NPCs & Radiant AI
    • Scripting
    • Questbuilding & Dialogue
    • Story & Lore
    • Texturing
    • Modeling
    • Miscellaneous
  • ESIII: Morrowind Modding
    • Tool Set Basics
    • Worldbuilding
    • NPCs
    • Scripting
    • Questbuilding
    • Texturing
    • Modeling
  • Fallout 3 Modding
    • GECK Basics
    • Worldbuilding
    • NPCs & Radiant AI
    • Scripting
    • Questbuilding & Dialogue
    • Texturing
    • Modeling
  • Gaming Guides
    • Oblivion Gaming
    • Morrowind Gaming
    • Fallout 3 Gaming
  • Miscellaneous Tutorials
  • TES Alliance HowTo Guides

Product Groups

  • VIP Memberships
  • Subscriptions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Steam


XBox Live ID


MSN


Skype


Location


Interests

Found 25 results

  1. I'm trying to use SKSE's GetNthForm(idxItem) function to output an item in a container, but next I'd like to change its ownership with the ObjectReference's function thisItem.SetActorOwner(thisActor). Is it possible to get the ObjectReference from its Form?
  2. Hello Everyone! Forgive me if this is the wrong section for this type of content. Awhile back I started a series in an effort to teach the Papyrus scripting language more like a traditional software language. I start with the basics and work up the chain so to speak. I haven't completed the segment regarding the Object-Oriented side of Papyrus, only touching on an introduction to it. I will be updating this thread as more is added. Here is a link to the full series as it is currently, including the introductory episode and the 'Hello World' episode: For the Variables segment: For the Functions/Events segment: For Objects (current progress at least): Hopefully, modders and modders in training find these videos useful. Feel free to shoot me any messages over the content, or if you have a special topic.
  3. Preface: I am going to simplify my scripts to ease troubleshooting. I have script "A", which is used to declare properties that global functions in script "B" can use. Script "A": ScriptName rsAPI_Properties Extends Quest {Contains all the properties for rsAPI scripts} MiscObject Property myMiscObjectProperty Auto Script "B": ScriptName rsAPI_Functions Extends Quest Hidden {Contains all the functions for the rsAPI scripts} ;This function gets the forms from Script "A" rsAPI_Properties Function GetFrameworkProperties() Global return (Game.GetFormFromFile(0x294A97, "MyPlugin.esp") as Quest) as rsAPI_Properties EndFunction ;This function gets a specific form from Script "A" with the help of the above function. MiscObject Function GetMiscObject() Global return GetFrameworkProperties().myMiscObjectProperty EndFunction ;This function is an example of how I would like to handle the miscobject passed from Script "A" Function GivePlayerMiscObject(int howMany) Global Game.GetPlayer().AddItem((GetMiscObject()), howMany); I have tried declaring a MiscObject outside this command as well, but neither worked. EndFunction The second function in Script "B" is used to return a miscobject, but it only returns NONE. This way of obtaining a property from another script seems to only work for certain types of forms. The properties have been defined in the CK in Script "A". Any pointers papyrus wizards? p.s. The reason I am approaching it this way is because Script "A" and Script "B" are an API of sorts. I want to use a function in Script "B" that references properties in Script "A" after passing parameters directly from Script "C", which would utilize the third function in Script "B" like this: Script "C": ScriptName GivePlayerItem Extends Activator {Utilizes the rsAPI framework to give the player 2 MiscObjects} Event OnActivate(Actor akActionRef) rsAPI_Functions.GivePlayerMiscObject(2) EndEvent
  4. Introduction: Greetings everyone. I have an issue that I am hoping would prove a simple resolution to the more experienced script writers among you. After searching, I have been unable to find the answer myself so here we are and I thank you in advance just for taking a look at my problem. Issue/Goal: I wanted a way to add an item to what a merchant sells without changing/affecting the rest of what they sell. Because I wanted to reduce the likelihood of mod conflict, I thought a script would be the best way to go. I do not wish to add the item to any level lists as I think/believe this would result in other vendors possibly having the items as well as enemies. And in my search for a solution, it would seem AddItem alone would not suffice due to the fact that a merchant's chest respawns/refreshes. Problems With What I Found: I am still pretty novice at several aspects of this so despite finding what I believe to be the answer, I am not sure how to specifically get it to work (such as do I need to set up the aliases in the quest or is it defined in the script or both... if I have to set them up in the quest, which settings/checkboxes are used... where exactly do I tell the script to add my item to the chest). The answer may be obvious, especially with what I found, but while I understand what I found much better than I would have a few months ago, I'm still pretty green with scripting and quest making. What I Found: Because of how the site looks when you're not a member (it doesn't show anyone's name and any code shown is smushed together without spaces so it has to be manually separated) I do not know who to credit for this (though it may have been Chesko) but this is basically what was said as an answer to someone else asking a similar question as what I am asking...
  5. SOLVEDBeing stupid. When I filled the properties in the CK, I filled the DeadAttacker property the same as the TotalAttacker property, which when the game loaded it already had the DeadAttacker_var filled with the number of dead attackers, so when one was killed it automatically set the next stage, because the number was >= the the TotalAttacker. I'm attempting to advance a quest after killing "x" number of attackers. I have used these two scripts in the past without issue, but for some reason they are no longer working as designed, and I don't know why. I have placed this script on the actor Been working on this for two nights and going crazy. Any insight will be appreciated.
  6. I don't remember what what those are called, unfortunately. I want to use one for displaying an NPC's name in a Debug.Notification("") string. Any help is appreciated!
  7. UPDATE: Someone has helped me elsewhere, thankfully. Solution posted. I apologize in advance if I am totally overlooking something or unaware of a broken rule I am violating, I am far from a Papyrus Skyrim coding expert and barely a novice. Okay, so this is the setup; I have a quest. The quest is triggered and one of the reference aliases, an NPC, is spawned at a location. Okay, fine. I select “Initially Disabled†for the NPC, so they’re created when the quest runs, but they’re initially disabled. We’ll enable them later. This is how we’ll enable them; We have a very simple script that runs an OnInit, placed in the Quest scripts section. It runs when the Quest runs. After a period of time with a single update event, we Enable the NPC the Quest created. Seems simple, I have some things working, but the NPC still won’t be enabled. Scriptname Sin7War_TimedEnable5 extends Quest ReferenceAlias property myAlias auto ObjectReference property SelfRef auto Event OnInit() Debug.Notification("OnInit Event activated.") myAlias.ForceRefTo(SelfRef) RegisterForSingleUpdate(120.0) EndEvent Event OnUpdate() Debug.Notification("Event OnUpdate activated..") SelfRef.Enable() EndEvent Note, earlier I tried to DIRECTLY enable the NPC Ref alias in the quest. Apparently you cannot do that? For example, this stated earlier line gives the compiler fits; myAlias.Enable(), it gives me: Enable is not a function or does not exist. Okay, so we can’t Enable the refAlias directly. It seems to only work on ObjectReferences. So I look around, I find ForceRefTo and try to shove the reference into that created ObjectReference holder, so I can actually enable the script. That compiles. I of course go to the Quest section, properties for the script, and fill in the property for ReferenceAlias myAlias (The NPC), while keeping ObjectReference SelfRef default and unfilled. It runs in Skyrim, I get both ^ of my debug notifications. NPC still does not enable. So I assume the reference is not being put into SelfRef. I am at a loss. How can I enable an NPC initially disabled by the quest? I can’t point at it in the Cell Window, because of course it is not created yet. I have to use the reference set up by the quest, but I get “Enable is not a function or does not exist†with everything except ObjectReference. Bonus Question: Is there a little snippet of code that allows me to generate a random number between two values? If I can somehow get my above script attempt to work, I’d like to use a random value between two sets of numbers for my SingleUpdate. Thank you in advance for taking the time to read this, even if you don't have an answer. UPDATE SOLUTION: ReferenceAlias property myAlias auto Event OnInit() ;Debug.Notification("OnInit Event activated.") int random = Utility.RandomInt(120, 1200) RegisterForSingleUpdate(random) EndEvent Event OnUpdate() ;Debug.Notification("Event OnUpdate activated..") myAlias.GetActorReference().Enable() EndEvent
  8. I've been racking my brain trying to get the ForceToRef function to fill a quest alias through papyrus script. My goal is to track the specific instance of an item as a quest object (so it can't be dropped) while it is equipped by the player. The Quest does not start game enabled and has repeatable stages checked. The Quest contains one empty stage. The Quest Alias starts empty, has a fill type of "specific reference" and has "optional" and "quest object" flagged. I've tried all sorts of scripts, placing the ForceRefTo function on ObjectReference script, Quest script, and ReferenceAlias script; None of them filled the alias.
  9. Hello all, I know that there are detailed tutorials here and I am sure they answer my exact issue and/or explain why I am having this issue and I have read the tutorials here and in other places when it comes to scripting as well as followed along doing different things and I don't get it. My head isn't made for scripting. It's like I am reading a foreign language I don't understand (which is exactly what it is really) and so something that is plain as day to a native speaker is impossible for me to comprehend. So regardless as to the simplicity of this issue, please trust and believe I have really tried to figure this out on my own before coming here and failed. I used this tutorial: Making a Custom Follower but discovered an issue where the game isn't truly dismissing a follower that uses this framework when it auto dismisses. This is especially true for when the person you are marrying is an active follower at the time the ceremony starts. So what I wanted to do, since my Follower Dialogue Quest incorporated stages already, was simply add a script fragment to the stage it uses when a follower is dismissed/not following that dismisses the follower. So of course, I thought it would be easy to simply do what worked for the dialogue: (GetOwningQuest() as ARCTESTDialogQuestScript).DismissFollower(0,0) Then GetOwningQuest() errors because it isn't a function or something. To overcome this in the past, I would just declare the quest as a property for the fragment, but that doesn't work here because it is a script I need as a property and I don't know how to do that since I tried and that failed. My plan was to then try this function: ARCTESTDialogQuestScript.DismissFollower(0,0) or this: ARCTESTDialogQuestScript.DismissFollower() But somehow I think that even if I could declare the property, this wouldn't be right. I even tried declaring ARCTESTDialogQuestScript as the kmyQuest but that didn't allow me to use the above fragment either. So I am lost. All I am trying to do is make it to where when my follower's dialogue quest stage is set to 100, the follower is dismissed as if you dismissed them with the dialogue choice. Any help to resolve this would be majorly appreciated as this is tormenting the Oblivion out of me. Thank you. Sincerely, Tons
  10. Hello, I'm writing a mod that basically allows people to chat in an online lobby. The chat is displayed within an MCM menu. Now what I need is to periodically refresh the menu, even while the game is paused. So I want the options in the menu to change while the user is looking at the menu. I've looked at OnUpdate, but the Wiki specifically states that it doesn't run in MenuMode. So my question is, is there another way to periodically execute some code even while in MenuMode? Thanks in advance!
  11. Hello, newbie coding question but how do I print special characters on screen with papyrus? Where do I find the code and how's the input? Basically, what I'm trying to do is use debug.Notification to print characters like "ó" and "ú" and show like that on screen, I know coding doesn't accept special characters and uses workarounds (I used to code in html, but I don't know the equivalent code in papyrus) so if anyone knows and helps me would be appreciated. Thanks.
  12. Hey friends, the question is pretty simple: Can I write a script that adds an AIPackage to an certain NPC? Havent found anything usefull so far. Thanks!
  13. Okay, so I am trying to create a cheat menu for my mod, so I can choose many options by reading a book. Standard stuff. There are more than 10 options, so I need to make more than one menu. The last item in menu 1 is "next", which should bring the menu2, element 0 in menu2 is "previous", which would bring back menu1 and so for. The code looks something like that: Scriptname CheatBookScript extends ObjectReference Message Property Menu1 Auto Message Property Menu2 Auto Event OnRead() Menu1() EndEvent Function Menu1(int aibutton = 0) aibutton=Menu1.show() if aibutton==0 elseif aibutton ==1 ;options 2-8 here... elseif aibutton ==9 Menu2() EndIf EndFunction Function Menu2(int aibutton2 = 0) aibutton2=Menu2.show() if aibutton2==0 menu1() elseif aibutton2 ==1 ;options 2-8 here... elseif aibutton2 ==9 EndIf EndFunction Except, it doesn't work. When I click the "next" button, the game does nothing, staying in menu1. Why?
  14. From the album: Papyrus 101 homework

    Hi, my name is Rune Stemgördsson and this is jackass
  15. Hello I am trying to figure out how to script a spell effect in Papyrus. I want a spell that when it hits a door or lock will unlock it using the "Unlock" command, so I can unlock any door in Skyrim. I was sucessfull at doing this for Oblivion, but I just cant seem to get it to work for Skyrim and I am very new to Papyrus. But what I have so far is: Scriptname NATureSkeleton extends activemagiceffect {Event OnEffectStart(Actor akTarget, Actor akCaster) Unlock EndEvent} This is the script I used for the new spell effect I created and clearly its not right so I would appreciat any Help I can get. Thank you
  16. This is a script I wrote that mimics the effect of the Gray Cowl in Oblivion, when attached to an article of clothing. I wanted to share this with the TESA Community, so use it as you see fit, but I do request that you never repost the source on another website (preferrably just link them to this page) and to give credit if you use this in a published mod. When equipped by the player (it does not function on NPCs), the player will have a separate list of bounties for each hold (and any other vanilla crime factions). They will not stop fighting you, if you are already resisting arrest (I could probably tweak it to do that if someone would like though). I'll try to add a demonstration video when time allows. To use this script: Attach it to an Article of clothing Open the Properties Window and use the Auto-Fill button Click "Edit" on each of the Integers (you can just leave them at 0, but if you want the Gray fox to start out with a bounty like he did in oblivion, modify the "Fake" integers (the "Real" ones are the ones that store your regular bounties). You do not need to do anything else; all variables are stored internally and factions already exist, so there's no need to define any external variables.
  17. Hello Long time reader first time poster. I have created a script that alters the weight of all the potions in the game. It is working but I can't get rid of the feeling that I haven't done it in the most efficient way. Can any of you more experienced scripters suggest a more efficient or less resource intensive way to do this? setup: 1. I created a formlist of all potions and poisons currently in my game (I don't have any DLC) 2. I created a dummy quest to attach my script to in order to run on game init and on save game load (this is the only method I know of to get my script to run every time, may be a better way to do this?) Here is the script i created to do the work: ************************************************************* Scriptname PotsNPoisions extends Quest FormList Property PotsNPoisionsList Auto ; This is my formlist I created with all the pots and poisons in it Function Init() Int iIndex = PotsNPoisionsList.GetSize() While iIndex iIndex -= 1 Form kReference = PotsNPoisionsList.GetAt(iIndex) As Form kReference.SetWeight(0.1) EndWhile EndFunction ******************************************************** Additional Thoughts: This uses the SKSE for the SetWeight function In an Ideal world I would love to figure out a method to dynamically select all the pots and poisions instead of using a static form list. This would avoid causing errors with other mods, would make it work with any DLC, or even modify custom pots or poisions that are added on the fly. Don't know if this is possible, but would be cool.
  18. So, I'm new to papyrus scripting. This is the third script I've wrote. I'm having a problem, though. As it only fires one firebolt when it should be firing more than one. I'll use the spell, and it will fire only one firebolt. However, I want to fire multiple firebolts. This is my code: Scriptname a0BarrageTest extends activemagiceffect {Missle barrage test} int Property Count auto SPELL Property Missle auto Event OnEffectStart(Actor Target, Actor Caster) int i = 0 while i < Count Missle.Cast(Target) Utility.Wait(0.2) i = i + 1 endwhile EndEvent Count is set to 2 and Missle is set to Firebolt. It's my understanding that this should make it fire 3 firebolts. But it only fires one. What can I do to fix this and make it fire 3 firebolts?
  19. Updated 2013-08-01 Solved -- used the below methodology, but tied a Fear spell to the Enemy Trigger instead of trying to force the execution of an AI Package or other pathed behavior. Will post scripts and videos soon. ----------------------- Hi all! I'm working on a mod that's mainly for modders -- that is, I want to make a new toolset that will help the modding community create more sophisticated enemy AI a little easier. Less work, more payoff. While I love Skyrim, I noticed that most humanoid NPC's have some very basic, predictable behaviors -- melee folks rush, and archers / mages all hang around the exact same distance away. The game does some nice basic stuff with cover, but there's very little variance unless the modder goes in and makes extensive, explicit changes to behavior using a whole bunch of Packages with conditionals, etc.. That is very time consuming. I want to change that. Super quick synopsis of my tool: I've built a logging system that automatically clusters where all player and enemy hits take place in a dungeon -- i.e. when the player is within region A, s/he tends to deal a lot of damage to enemies in regions B, C, and D, etc.. The size and coordinates of each region are automatically calculated, honed down from hundreds or thousands of data points. The final outcome I want is: When the player enters Region A, the NPC's know to FleeFrom Regions B, C, and D. This will force the player to move around more, as the NPC's won't be "suckers" and all sit and die in the same spot. Ideally, I want to make my system translate the clustered region information into scripts automatically, so there is absolutely minimal work on the part of the developer. I would very much appreciate advice that would lead to the most efficient means of achieving the above goal. I tried the following methodology, but it doesn't work thus far, and I believe it's not optimal: I've made a dungeon with Triggers for each Player and Enemy Region -- I tried to set it up so when the player enters Region A, it would change a value in a Script attached to Trigger Regions B, C, and D, etc.. Each NPC would also have a new Script attached, which would just create two new Properties -- a Boolean for "ShouldFlee", and an ObjectReference for the Object to FleeFrom(). Default Boolean value is False. If an NPC entered Region B, C, or D while the player is in Region A, a Script attached to the Trigger in Regions B, C, and D would do three things: 1. Set the NPC Script's Boolean Property to True. 2. Set the NPC Script's ObjectReference Property to itself (the Trigger Box). 3. Force a re-evaluation of the NPC's Package Stack. There would be a single conditional in the Package Stack to check the Script Boolean Property, and then flee from the ObjectReference if the Boolean is True. Again, I'm not quite sure if this is the most efficient means of executing what I'd like. It depends a lot on Triggered Events (which is good...), but I haven't been able to get the code to work thus far. The Package Conditional fails to allow me to try and GetScriptVariable from my NPC, even when it has an explicit name / ID. The only other alternative which I can think of at the moment is making a HUGE series of Package Conditionals that emulate these Trigger Boxes -- that is, they would constantly check the Player and NPC positions. However, I believe that would be a HUGE hindrance to performance, since GetPos would likely be checked every "tick" of the engine. Again, I want to make my system translate the clustered region information into scripts automatically, so there is absolutely minimal work on the part of the developer -- so, if there's a way to get most of this behavior out of some Scripts with minimal use of the GUI, all the better! Your sage advice much appreciated!
  20. So I'm working on a script that is supposed to resemble the bound armor in TESIV. The variant that I'm having trouble with is one designed solely for NPCs. The goal is to have the spell trigger when the NPC goes into combat, and have it automatically dispel when he dies or leaves combat. I have just about everything sorted out, but I don't know how to have the "EquipItem" function reference the actor that the script is attached to. Here's what I have so far: Scriptname VHBoundArmorMythicDawnDeathDispel extends ObjectReference ;Begin Bound Armour list Armor Property Helmet Auto Armor Property chest Auto Armor Property boots Auto Armor Property Hands Auto ;End Bound Armour list ;Begin Regular Clothes list Armor Property Robe Auto Armor Property RobeBoots Auto Armor Property RobeHands Auto ;End Bound Armor list Message Property FailedEquip Auto Int Property Worked Auto SPELL Property ThisSpell Auto Event OnCombatStateChanged(Actor akTarget, int aeCombatState) if (aeCombatState == 1) SELF.AddItem(Helmet) ;SELF.EquipItem(Helmet) SELF.AddItem(chest) ;SELF.EquipItem(chest) SELF.AddItem(boots) ;SELF.EquipItem(boots) SELF.AddItem(Hands) ;SELF.EquipItem(Hands) SELF.RemoveItem(Robe) elseif (aeCombatState == 0) ;Put the same things as in "OnDying" in this area once bugs worked out else endif endEvent ;====================================================== ;The functions that have the semicolons are the ones that aren't working. Since they couldn't work, I nulled them for the time being ;so that the script could compile as-is. I'm wanting the person that this script is attached to to equip the items in those ;circumstances. ;====================================================== Event OnDying(Actor akTarget, Actor akCaster) SELF.RemoveItem(Helmet) SELF.RemoveItem(chest) SELF.RemoveItem(boots) SELF.RemoveItem(Hands) SELF.AddItem(Robe) ;EquipItem(Robe) ;EquipItem(RobeHands) ;EquipItem(RobeBoots) endEvent
  21. Good day world and happy new year to you all, I hope this post finds you well and inebriated for this time of year. I have Been gaming for many years and started using mods in Operation Flashpoint,(Bohemia Interactive Studio ,Codemasters). Then went on the consoles, which is never a good thing. But back with the world of PC now, it's been many years and things have changed way beyond reconnection. Brought skyrim two months back, yea I know late to that party to. Found the skyrim.nexusmods site and by the gods it would seem the world have gone mod mad. And you know what I think I may join them. Going to look over this amazing site you people have to put together and see what I can do. They say that Eve online is a learning wall, but with companies realising Creation Kits it has opened up the world of modding like never before. which brings me back to that learning wall new Papyrus Scripting and all the other things that have changed while I was away. Also looking forward the V3 of SkyUI which I am told will really kick up a gear with the modding community. As for me there is not that much to know, you could check out my steam profile is you feel the need. I promise I will update it soon. You all have my best wishes for this new year and thank for such a grand site. Love and light lonewolfe10
  22. I'm trying to create a magic effect that fires multiple projectiles at varied times (projectile 1 fires, then 0.1 sec later projectile 2 fires and so on and so forth on a loop). The multiple projectiles will each be positioned differently on the axis to create the whole "multiple" effect" I figured I could make use of the "oneffect start" and "oneffect end" to make use of multiple projectile properties but I don't think there are any functions that fires the projectiles at the target (aimed) Is there any way to do this?
  23. Hello all! First post here. Just wondering about Reference Alias and how useful it is. I've seen it get mentioned often in forums and while I tried to read up on it, I couldn't really wrap my head around it. Can anybody explain to me how it works and its possible applications? I'm tring to learn it because I'm currently trying to make a script that looks for hostile enemies in any given cell (meaning, there could be one hostile or no hostile). I'd then use this as a target for the spell.cast function (and the spell is an aimed spell). I wasn't successful, but I believe reference alias could be the key. Any help would be much appreciated.
×
×
  • Create New...