Talk:Bethesda Tutorial Papyrus Events and Properties

Active discussions

warning added about attaching propertiesEdit

I've added this warning, and one also on the tutorial category, as I took a long time myself understanding this and would have liked to find this kind of warning then. (To sum up, the problem is that I was learning by copy-pasting forms from another mod, but didn't realise I had to do the attach step the new scripts. Since propertie names are exactly as the actual object (hence autofill), nothing was warning me of the problem. What finally tipped me off was the icon difference for the scripts (a blue plus vs a blue plus with a pencil)...). To make things worse, sometimes the scripts still linked with the property of the original mod, which means unattached scripts are just completly unsafe and will attach dynamically with any random garbage. Potential improvement would be warnings for plugins with unattached properties in scripts (but who reads warnings anyways, when there are so many), or more visibility for this linking, which I tried to do here.

I'm going to describe the problem again in two different ways, for the sake of clarity, and for future people googling:
- The keyword "property" does NOT mean something like "inherit". It just means "local variable". This variable is left UNINITIALISED in the script (must be dynamic), and is actually initialized IN THE PLUGIN (the .esp), which must be done through the creation kit (CK). People usually use the same name for the property and the existing object which will be the value of the property, but that is NOT ENOUGH.
- Now for an example: I took a working mod with a piece of furniture, which triggers a script, which casts a spell called spellOne. I duplicated the spell, the new one is called spellTwo. I wrote a new script for the trigger, with "spell property spellTwo auto" at the top of the script. I use the furniture in-game, nothing happens. The reason: "spellTwo" in the script is NOT the spellTwo in the CK. Its just a local name, with no value. The solution is to go in the CK, edit the furniture's form, click on the script, click "properties", and select "spellTwo" as the value of the property "spellTwo". You can actually achieve that by clicking autofill in that window (but that's NOT what the "auto" keyword means). The ugliest part is that sometimes, it still works when not attaching. In my case, creating a tome of spellTwo, reading it, then casting spellTwo, then using the furniture worked... And that's actually worse, since it prevented me from debugging correctly.

Help RequestEdit

I want to make it so If I click something (a misc item) and I have another item (also misc) in my inventory, it creates another item (weapon this time) in my inventory and gets rid of the first two misc items. And I want to make it so that someway when I have that weapon in my hand, when I "attack" with it, I want the drugged sleeping tree sap effect to appear for a limited time, then the weapon object get deleted and replaced with the misc object from earlier.

1. Have misc item 1 2. Have misc item 2 3. Click misc item 1 > Deletes 1 & 2 and creates weapon item 3 4. Attack with weapon item 3 > drugged effect activate for 5mins~ > weapon item 3 gets deleted 5. Get back misc item 1

Essentially I need that in a script if you would be extremely kind to me :)

Name ChangeEdit

to the person who changed the name of the script from LokirsDraugrResurrection to LokirsDraugrReanimation if you really insist on changing it change all instances of the script name

It'd be really helpful if everyone put signatures so the discussion page was... readable. Going to clean up this discussion page for the sake of legibility. Won't change anyone's content though. --Kitsunececil 14:42, 9 February 2012 (EST)
I've reverted that change. As far as I'm aware there was no good reason to change the script's name in the first place, and since the change introduced inconsistencies I've reverted it instead of changing the bits they didn't.
-- Cipscis 15:56, 9 February 2012 (EST)


so now the first 3 instances of the script name is LokirsDraugrReanimate and every instance after is LokirsDraugrResurrection they all need to be one or the other and i would put my sig but im not exactly sure how to
iamthefritch
You can use four tildes (like this: ~~~~) to add your signature. --Mr6 12:00, 16 February 2012 (EST)
...or even the fancy   button that you can find at the top of the page whenever you are editing. Also using colons (:) will help keep track of responses. For instance, since this is a response to Mr6, who used 4 colons, I used 5 colons.--Electrosheep 09:39, 24 February 2012 (EST)

Chapter NumberEdit

I'm assuming this was put as N/A since it has no real ties with the previous chapters, however shouldn't it be Chapter 4 regardless, considering it's part of the Papyrus tutorial series in general? Kind of a nitpick, but ah well. --Pruvan 17:43, 10 February 2012 (EST)

I agree and I'm changing that. It is tied to the previous chapter of the Papyrus tutorials because this is the next one.--Electrosheep 09:30, 24 February 2012 (EST)

HahahaEdit

It appears as though the scripters are the outcasts of the mod world! An incomplete tutorial and a messy discussion page! And even senseless topics like this one! Incomplete, messy, and senseless, oh my!

By the way, I'll finish this tutorial and clean it up tomorrow...if someone doesn't beat me to it--Electrosheep 00:05, 24 February 2012 (EST)

Scripting needs more tutorialsEdit

This tutorial does not cover the Papyrus language in near enough detail for this to be considered complete. If you teach a computer science student how to use "if" statements in C++, that student knows about 0% of C++. We need more tutorials covering Papyrus (and pretty much everything else). The question is, is it appropriate/possible for non-Bethesda users to create additional pages?--Electrosheep 09:42, 24 February 2012 (EST)

Of course! It's a wiki! Community-made tutorials are appropriate, possible, delightful, and some exist already. --Catwheezle 17:26, 24 February 2012 (EST)
Sweet. So the only question is...ahem...how do you make a whole new page?--Electrosheep 14:54, 25 February 2012 (EST)
In a delightfully unintuitive way. First, search for the page that you want to make, even though you already know it doesn't exist. It'll offer you the chance to create that page. Accept that offer! It feels ass-backwards to me, but that's wikis for you. --Catwheezle 16:45, 25 February 2012 (EST)
You can just manually type in the URL of the page you want to create. Just replace the spaces in the article name with underscores...
Dragoon Wraith TALK 22:51, 25 February 2012 (EST)
I believe it's an introduction rather than a proper tutorial. Feel free to add, of course, I'm just saying. Also, historically, scripters have come to dominate TES Wikis, so I wouldn't worry about scripters being marginalized.
Dragoon Wraith TALK 22:51, 25 February 2012 (EST)

myTrigger PropertyEdit

The text means to imply that filling the myTrigger property with the "defaultActivateSelfTRIG nnnnnnnn" on the script for just one draugr is sufficient. Correct if no, for in-game testing verifies it should be done for the other, as the Properties on the other does not show it as filled at all.--Lmstearn 2015-02-20T07:42:43 (EST)

disableWhenDone in defaultActivateSelf.pscEdit

Just curious if disableWhenDone was implemented as a "just in case" variable as it is never set to be true. If it were to be used then the likely place for it would be in

State allDone

--Lmstearn 2015-02-20T08:39:32 (EST)

No, it might be used if
doOnce = false
as allDone is trigger_no_more.--Lmstearn 2015-02-20T08:47:49 (EST)
Return to "Bethesda Tutorial Papyrus Events and Properties" page.