Jump to content

[LE] Quick Questions, Quick Answers


Recommended Posts

Any way to force the reading of a particular note upon receipt ? Ie., dialogue with npc, 'see this note' - end conversation, player given note, player enters into viewing note mode.

 

@IsharaMeradin

 

"Activate is not a function or does not exist" (Papyrus error)

 

I believe that when the note goes into the player's inventory it has no object reference, only an entry in the player's inventory containing the base object id and an amount.

 

You can do either one of two things,

A. Instead of adding the note directly to the player's inventory place the note in the world and then use note.activate(player) where note is the object reference of the placed note.

form note = ;;here goes the form of your note in the CK, not the object reference

player = Game.GetPlayer()

player.PlaceAtMe(note).Activate(player)

Or B. Place the note in the player's inventory and as far as I know you should be able to simply equip it to cause the player to open it up (once they're out of menus of course)

form note = ;;form of your note

player = Game.GetPlayer()
player.AddItem(note, 1, false)
player.EquipItem(note, false, true)
Edited by dalsio
Link to comment
Share on other sites

@dalsio - there's something I'm not clear about regarding your directions: you suggest that 'note' should refer to the object reference of the placed note, but in that first section of code you're saying 'form note = ' and then say to use the form, not the object reference. This is probably obvious, but I've never used this kind of code before. My attempts at implementing your code (version a.) resulted in nothing happening.

 

Thanks for the help.

Link to comment
Share on other sites

This should be an easy one, but I'm baffled. How do you easily find wilderness cells ? Let's say I'm adding items that cross from one named worldspace cell (e.g. bonechillpassageexterior01) to adjacent cells that are wilderness. How do I know what those adjacent wilderness cells are named ? Is there a trick to easily transition to an adjacent cell and load it up ?

Edited by csbx
Link to comment
Share on other sites

This should be an easy one, but I'm baffled. How do you easily find wilderness cells ? Let's say I'm adding items that cross from one named worldspace cell (e.g. bonechillpassageexterior01) to adjacent cells that are wilderness. How do I know what those adjacent wilderness cells are named ? Is there a trick to easily transition to an adjacent cell and load it up ?

Try this. http://www.nexusmods.com/skyrim/mods/2251/?tab=1&navtag=http%3A%2F%2Fwww.nexusmods.com%2Fskyrim%2Fajax%2Fmoddescription%2F%3Fid%3D2251%26preview%3D&pUp=1

Link to comment
Share on other sites

@CSBX in reference to code A, "note" is supposed to be set to the form corresponding to your note.

 

The entry you see in the object window where you change it's model, texture, value, etc. is what's called the form and it's basically a "pattern" the editor uses to create "copies" that it then puts in the world. When a copy of the form is placed in the world that copy is called an "Object Reference", literally a "reference" to the "base object" (form). Changes made to the form cause all object references of that form to also be changed, but any changes to the Object Reference (or anything that interacts with that Object Reference such as other scripts or quests) do not apply to the form or any other reference of that form.

 

So, what you want to pass to PlaceAtMe() is the Form of your note. There are a few ways to do this depending on what you want to do, when you want to do it, and just your personal preference.

 

The most common way and one that should work for you is to set the variable "note" to be a property. This way you can just manually tell the script through the editor what form to use (should be able to select it from a drop-down menu).

If you don't know how to do that: Tutorial quickly explaining how to set a property in the editor. Be sure to name it "note", or else replace any code referencing "note" with whatever you named your property.

 

Once you make your property (the editor should add a line in the script with the property) just remove the first line in my Code A.

Link to comment
Share on other sites

I'm trying to add a condition to the investor perk that checks if a merchant has been invested in. If so, then the player gets a discount.

The way that i see that i can accomplish this is by scripts that are attached to the invest dialogue that add the merchant to a formlist.

My question: Do the "IsInList" condition work for the "modify sell prices" entry point?

 

 

 

EDIT: Another question:

 

 

Scriptname xxxxxStealthSpeechPersuasionScript Extends Quest


GlobalVariable Property SpeechEasy  Auto  
GlobalVariable Property SpeechAverage  Auto  
GlobalVariable Property SpeechHard  Auto  
GlobalVariable Property SpeechVeryHard  Auto  

Float Property SpeechEasyMult  Auto  
Float Property SpeechAverageMult  Auto  
Float Property SpeechHardMult  Auto  
Float Property SpeechVeryHardMult  Auto  


Function OnInit()
        SpeechEasy.SetValue(SpeechEasy.GetValue() * SpeechEasyMult)
        SpeechAverage.SetValue(SpeechAverage.GetValue() * SpeechAverageMult)
        SpeechHard.SetValue(SpeechHard.GetValue() * SpeechHardMult)
        SpeechVeryHard.SetValue(SpeechVeryHard.GetValue() * SpeechVeryHardMult)
EndFunction

 

 

 

Do the above script "extend as quest" is correct? I pretend to use it a perk. It sets the persuasion values to the values set in the Float Properties.

 

And if i use it on multiple perks, do i need to create a copy of the script for each one or is one enough?

 

 

EDIT #2: Nevermind the second question. Figured out that i had to make a quest and add the script to a stage.

Edited by Magnusen2
Link to comment
Share on other sites

Question: If I use the SKSE function GetName(), will it correctly display localized names, or will I need to translate by appending a $ prefix to the name and add it to a translation file? I'm assuming that it returns the proper localization, but I want to make sure just in case.

Edited by blennus
Link to comment
Share on other sites

Question: If I use the SKSE function GetName(), will it correctly display localized names, or will I need to translate by appending a $ prefix to the name and add it to a translation file? I'm assuming that it returns the proper localization, but I want to make sure just in case.

GetName() returns the name on the form if and only if there is a Name field. If the name used in the name field is localized, then yes it will display that. It will also display changes to the name that were made during runtime with SetName(). However, I do not have any language but English so cannot test to verify what happens with non-English versions.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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