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

edhelsereg

Allies
  • Posts

    22
  • Joined

  • Last visited

Posts posted by edhelsereg

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

     

    Scriptname tempQuestItemSCRIPT extends ObjectReference

     

    Actor property playerRef auto
    Quest property myQuest auto
    ReferenceAlias property myAlias  auto
    ObjectReference property SelfRef auto
     
    EVENT OnEquipped(Actor akActor)
    SelfRef = Self as ObjectReference
     
    IF akActor == playerRef
    IF myQuest.IsRunning()
    myQuest.stop()
    endIF
    myAlias.ForceRefTo(SelfRef)
    myQuest.start()
    endIF
     
    EndEVENT
     
    EVENT OnUnequipped(Actor akActor)
     
    IF akActor == playerRef
    myAlias.clear()
    myQuest.stop()
    endIF
     
    EndEVENT

     

    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.

  2. Lord of Nyrin,

     

    You can use a boolean (bool) to track if the scroll's placement

    and use an elder scroll static in the display

     

    script extends object reference

    bool property placed auto

    {placement tracker}

    actor property playerRef auto

    {best way to refer to player}

    book property myScroll auto

    {the obtainable elder scroll}

    objectReference property scrollRef auto

    {the static scroll in the case}

     

    bool placed = false ; false by default

     

    Event onActivate(ObjectReference akActionRef)

    if placed == false

    placed = true ; switches the bool

    playerRef.removeitem(myScroll)

    scrollRef.enable()

    elseif placed == true

    placed = false

    player.additem(myScroll)

    scrollRef.disable()

    endif

    endEvent

     

    You may want to also block activation of the triggerbox, states may be the best option for that. Take a look at the scripts attached to the Dragon Priest busts in Labyrinthian, they are a good example of how to accomplish this.

     

    EDIT: above is a very specific way to do it, another option would be to place an xmarker in each case, and have the script remove the book from the player, and then use the placeatme function to place the book at the xmarker. As far as messages go, there is a pretty good guide to message boxes on the Creation Kit Wiki http://www.creationkit.com/Options_Menu

  3. This is a known issue with the CK. It will not save alternate textures for 1stperson models.

    The only way around it is to change the models in NifSkope to your new textures and create new armoraddons and armor in the CK.

    Thank you for the info.

  4. Hey guys!

     

    I'm using texture sets for several variants of armor that share the same model, but I'm having issues with the female 1st person model (arms).

     

    I select the _1.nif and apply a new texture. It appears as it should in the CK render window, but when I reload the .esp in the CK or in Skyrim the new texture is gone and it reverts to the original.

     

    I have tried placing the male 1st person nifs (since they take texture sets fine in the male slots) into the female 1st person slots and adding a new texture sets, but they don't keep either. I assume if I just create models for every texture it will work, but I'd like to use texture sets if I can, since it keeps download sizes smaller.

     

    Has anyone encountered this issue or knows how to correct it, I would be very grateful!

  5. Hi Guys 

    I have been looking into trying compile a script that when the player equips a sword it adds a full set of armor to that player an then removes it when the player unequips the

    weapon. I am really struggling getting my head around Papyrus, Lol If a person who is experienced in scripting could help or write the script so i could learn of it would be great. Thanks

     

    I'm not that great at scripting, but I did write a script that works similarly to this, except it extends ActiveMagicEffect. Try attaching the script to the weapon and fill in the three properties. I hope this works for you! 

     

    Scriptname SwordGenArmorScript extends ObjectReference
     

    Armor Property cuirass  Auto  
     
    Armor Property boots  Auto  
     
    Armor Property gauntlets  Auto  
     
    Event OnEquipped(Actor akActor)
      if akActor == Game.GetPlayer()
        Debug.Trace("We were equipped by the player!")
    game.getPlayer().EquipItem(cuirass)
    game.getPlayer().EquipItem(gauntlets)
    game.getPlayer().EquipItem(boots)
      endIf
    endEvent
     
    Event OnUnequipped(Actor akActor)
      if akActor == Game.GetPlayer()
        Debug.Trace("We were unequipped from the player!")
    game.getPlayer().RemoveItem(cuirass)
    game.getPlayer().RemoveItem(gauntlets)
    game.getPlayer().RemoveItem(boots)
      endIf
    endEvent

     

    Edit: I tried compiling it and it didn't show any errors, but idk if it will work in-game though.

  6. Hey everyone,

     

    I'm trying to write a script that will cause a spell to cast on the player when they kill anything (rabbit, bandit, dragon, etc.)

     

    I need a script because I don't think there is any other way to make a 'constant magic effect' (for armor) contain a 'fire and forget effect' type spell.

     

    The closest script, in concept, to what I'm trying to do is the one for Dawnbreaker, this is my adaptation.

     

     

    Scriptname KARestoreStaminaSCRIPT extends ActiveMagicEffect  

     
    Spell Property RestoreStaminaAll Auto

     

    Event OnDying Actor(Actor akKiller, Form akSource, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked )
     
    Actor TargetActor = GetTargetActor()
     
    ; ; debug.trace(self + "OnDeath() casting RestoreStaminaAll from Target Actor:" + TargetActor)
     
    RestoreStaminaAll.Cast(TargetActor, None)
     
    EndEvent
     
     
    How do I re-write this Script so the event is triggered by the death of a combat target of the player, while redirecting the cast spell effect to the player?
     
    Thanks! Please let me know if more info is necessary.
  7. Hey guys!

     

    I'm trying to write a script that casts a spell on an actor when their attack kills another actor. This script effect will be applied to a magic effect / constant enchantment (for armor).

    This is what I have so far, but I don't know how to make the event check for the death of the kill target, and then cast the spell on the killer. Do I need more properties to identify the two different actors?

     

    Scriptname KARestoreStaminaSCRIPT extends ActiveMagicEffect  
     
    SPELL Property RestoreStaminaAll  Auto  
     
    Event OnDying(Actor akKiller) <------------ death target (i.e. npc)
     
    Actor TargetActor = GetTargetActor()
     
    ; ; debug.trace(self + "OnDeath() casting RestoreStaminaAll from Target Actor:" + TargetActor)
     
    RestoreStaminaAll.Cast(TargetActor, None) <-------------attacker (i.e. player)
     
    EndEvent

  8. I know this is taking on a bit more, but I have an idea I really want to make happen. I want to make a rune spell with a scripted effect that triggers only when a specific Item is placed on/near the rune. I designed a custom rune spell decal, but I'm not sure how to customize the spell to work the way I want it to.

    uOTKSBE.jpg?1

    Is it possible to change what triggers/sets off a rune? Can spells actually apply to things like misc items or armor? Are there work-around if not. I still think it is a good idea of using a keyword on the spell or item to meet conditions. The spell should work like so;

    A special rune is cast on a surface and when a specific item comes into contact with it, the rune explodes, and the item swaps with a new version of it.

  9. @edhelsereg - What is 'Filter' and how is it defined?

    RemoveItem requires an object reference. The attached script would replace the game.getPlayer() prefix, not what would go in the parenthesis.

     

    Thank you for your response. 'Filter' is a Keyword Property, the idea being if the spell has the keyword, the 'if' condition will be fulfilled.

    Is it possible to write a script that tells the item it is attached to to delete/remove itself at the end of the event? How would I write that?

  10. Hey! I have a script that works, but as I expand my mod, I am realizing that I need to make it more adaptable.

    The current script is connected to a Magic Effect so that when the spell is cast it swaps one item for another.

     

    Scriptname DragonPriestRobesAbjEffectSCRIPT extends ActiveMagicEffect 

    {Swaps cursed robes for the real robes}

     

    EVENT OnEffectStart(Actor Target, Actor Caster)

          

           selfRef = game.getPlayer()

          

           if game.getPlayer().IsEquipped(curse1)

                 Debug.Trace("The player has a cursed robe equipped")

                        game.getPlayer().RemoveItem(curse1)

                        game.getPlayer().EquipItem(clean1)

       

           

    Instead I want to make a script that is attached to items and when the spell is cast it checks for a keyword.

     

    This is what I wrote but its not working yet

     

    EVENT OnEffectStart(Actor Target, Actor Caster, MagicEffect akEffect)

           ; selfRef = game.getPlayer()

    if akEffect.hasKeyword(Filter) == TRUE <-- keyword is on a spell that when applied to player fulfills this condition.

    game.getPlayer().AddItem(NewItem, 1, true)

    game.getPlayer().RemoveItem() <-- should be the item that this script is attached to.

    endIf

    endEVENT 

     

     

    Thanks!

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

  12. The chest script is working now. Now it unlocks the chest rather than the player. haha

    Scriptname KonahrikGearCheckSCRIPT extends ObjectReference

    {unlocks chest if the ultra mask is in the player's inventory}

    Armor Property Mask Auto

    Event onactivate(ObjectReference akActionRef)

    if akActionRef == Game.GetPlayer() && akActionRef.GetItemCount(Mask) > 0

    Lock(false)

    endIf

    endEvent

    Thanks for the help!

  13. New plan. I tried making a chest that requires a key and unlocks when you have konahrik in your inventory, but this script doesn't work either.

    Scriptname KonahrikGearCheckSCRIPT extends ObjectReference

    {unlocks chest if the ultra mask is in the player's inventory}

    Armor Property Mask Auto

    Event onactivate(ObjectReference akActionRef)

    if (Game.GetPlayer().GetItemCount(Mask) == 1)

    endIf

    akActionRef.Lock(0)

    endEvent

    Any help would be greatly appreciated.

  14. I am trying to write a simple script whereby activating the Konahrik bust not only adds the ultra mask but also adds some other items. To limit the number of times the additional items can be acquired, I am applying a script to a quest alias of the bust activator. This way, once the quest completes, further activation of the bust adds and removes the mask, but doesn't add extra items anymore. It might be helpful to understand how the bust works, but I don't see any scripts attached to the center bust. This is what I have so far, as of now it is not working...

    Scriptname KonahrikAcSCRIPT extends ReferenceAlias

    Quest Property myQST Auto

    Int Property SetToStage Auto

    Armor Property Mask Auto

    Armor Property robes Auto

    Armor Property Gloves Auto

    Armor Property boots Auto

    Event onactivate(ObjectReference akActionRef)

    Debug.Trace("Activated by " + akActionRef)

    if (Game.GetPlayer().GetItemCount(mask) == 0)

    myQST.setstage(SetToStage)

    Game.GetPlayer().AddItem(robes, 1, true)

    Game.GetPlayer().AddItem(Gloves, 1, true)

    Game.GetPlayer().AddItem(boots, 1, true)

    endIf

    endEvent

    The onactivate Event is connected to the DragonPriestMaskUltra01 Activator Alias. The stage is supposed to set to 100 and complete the [undocumented] quest so that you can only collect the extra items once.

  15. First, ensure its a clean save game.

    Second, one reason for using a clean save game is that things can become 'broken' during your creation process. A clean save game will show this right away.

    Also, make sure you have the mod activated. Its also possible the save game your using is corrupt and actually did have early parts of your mod activated with it. Its best to deactivate your mod, start a new game and then get to a location near where your mod starts (or just outside the training dungeon near helgen) and save your game. Then exit the game and activate your mod. Use this save game for all your testing and never save over the top of it.

    You can use Levelers Tower to quickly level up test characters if you need it.

    Thanks, I started a whole new game and then uploaded the mod, but the items I added are just not showing up at all. Is there some sort of scripting to start the quest automatically, besides checking the start game enabled option.

    EDIT: Tested on clean character. Looks like quest activates after all, not sure why not at start, but its acceptable. Stage 70 still has no message box on activator.

  16. You need to load a save game that NEVER had your mod installed when you saved the game.

    Lots of things are saved with your save game and using a dirty save will give you all kinds of issues. Dirty being your mod was activated when you saved the game.

    Hmm. I loaded a previous game with no past use of my mod, and now my mod doesn't seem to be enabled at all. I have it set to start game enabled. To be more specific, items that were added through the quest aliases are not appearing.

  17. Have you attached the quest to the property correctly?

    Also, why are you using 'ReferenceAlias'? Physical activators in the game usually use 'ObjectReference' instead.

    GetStage may not work in a ReferenceAlias. :shrug:

    There is a GetCurrentStageID function you could try instead, although it should be the same.

    Scriptname DA02ScornPillarScript extends ObjectReference

    {Pillar active script}

    Quest Property myQST Auto

    MiscObject Property DA02Gem Auto

    ObjectReference Property ArenaStartMarker Auto

    Book Property Journal Auto

    Int Property preReqStage Auto

    {Quest Stage Requirement}

    Event onactivate(ObjectReference akActionRef)

    if (myQST.getCurrentStageID() == 70)

    Debug.MessageBox("Ready yourself, mortal.")

    Game.GetPlayer().MoveTo(ArenaStartMarker)

    endif

    endEvent

    still no message box

  18. Scriptname DA02ScornPillarScript extends ReferenceAlias

    {Pillar active script}

    Quest Property myQST Auto

    MiscObject Property DA02Gem Auto

    ObjectReference Property ArenaStartMarker Auto

    Book Property Journal Auto

    Int Property preReqStage Auto

    {Quest Stage Requirement}

    Event onactivate(ObjectReference akActionRef)

    ;Perhaps getStage() is none for some obscure reason...

    debug.Notification("QStage=" + myQST.getStage())

    debug.Trace("Ref=" + akActionRef + "QStage=" + myQST.getStage())

    if (myQST.getStage() == 70)

    Debug.MessageBox("Ready yourself, mortal.")

    Game.GetPlayer().MoveTo(ArenaStartMarker)

    endif

    endEvent

  19. I am trying to script an event where a message pops up when an activator is selected and the player is teleported to a new location; with the condition that a certain quest stage is active. This is what I wrote up but nothing is happening when I click the activator. When I take out the If statements the message box pops up.

    Event onactivate(ObjectReference akActionRef)

    if myQST.getStage() == 70

    Debug.MessageBox("Ready yourself, mortal.")

    Game.GetPlayer().MoveTo(ArenaStartMarker)

    endif

    endEvent

×
×
  • Create New...